:root {
  --maroon: #560404;
  --maroon-deep: #410404;
  --maroon-mid: #780613;
  --cream: #faf4e8;
  --bg: #faf4e8;
  --bg-header: rgba(86, 4, 4, 0.92);
  --card: #fffdf8;
  --card2: #fff6e8;
  --gold: #c48b28;
  --gold-deep: #560404;
  --gold-line: rgba(196, 161, 90, 0.45);
  --text: #1a1a1a;
  --muted: #666666;
  --buy: #2fa500;
  --sell: #ff3a3a;
  --navy: #560404;
  --border: rgba(196, 161, 90, 0.55);
  --input: rgba(255, 253, 248, 0.9);
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, sans-serif;
}

.page {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--bg) url("../imgs/jp-bg.png") no-repeat center top / cover;
}

/* Desktop/web scroll — product lists must not clip under the dock */
html.scrollable,
body.scrollable {
  overflow-x: hidden !important;
  overflow-y: auto !important;
  height: auto !important;
  min-height: 100%;
}

.page.scrollable {
  overflow-x: hidden !important;
  overflow-y: auto !important;
  height: auto !important;
  min-height: 100%;
  padding-bottom: 6rem;
}

.top {
  display: table;
  width: 100%;
  height: 9vh;
  background: var(--bg-header);
}

.top-cell {
  display: table-cell;
  width: 33.33%;
  vertical-align: middle;
}

.top-center {
  text-align: center;
}

.top-right {
  text-align: right;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.6vw;
  vertical-align: middle;
}

.brand-mark {
  width: 4.6vw;
  height: 4.6vw;
  object-fit: contain;
}

.brand-rule {
  width: 1px;
  height: 3.2vw;
  background: #251901;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1;
  text-align: left;
}

.brand-copy b {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  font-size: 1.7vw;
  letter-spacing: 0.08em;
  color: #1b2744;
}

.brand-mid {
  display: flex;
  align-items: center;
  margin-top: 0.2vh;
  color: #1b2744;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.62vw;
  letter-spacing: 0.22em;
}

.brand-mid i {
  width: 1.1vw;
  height: 1px;
  margin: 0 0.35vw;
  background: #251901;
}

.brand-copy small {
  margin-top: 0.35vh;
  color: #251901;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.48vw;
  letter-spacing: 0.04em;
}

.icon-btn {
  width: 2.2vw;
  height: 2.2vw;
  line-height: 2.05vw;
  border-color: #e6d3b0;
  background: linear-gradient(160deg, #fffaf0, #f3e2b8);
  color: #1b2744;
}

.user-wrap {
  display: inline-block;
}

.user-chip {
  background: #fffdf8;
  color: #1b2744;
  border-color: #e6d3b0;
}

.user-name,
.user-id {
  color: #1b2744;
}

.kyc {
  background: rgba(255, 252, 248, 0.78);
  color: #6b5a4a;
  text-align: left !important;
  overflow: hidden;
  padding: 0.55vh 0;
  border-bottom: 1px solid rgba(196, 161, 90, 0.35);
}

.kyc-marquee {
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
}

.kyc-track {
  display: inline-flex;
  align-items: center;
  width: max-content;
  animation: kyc-marquee 32s linear infinite;
  will-change: transform;
}

.kyc-item {
  display: inline-block;
  padding: 0 3rem;
  font-size: clamp(11px, 0.85vw, 14px);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.kyc-marquee:hover .kyc-track {
  animation-play-state: paused;
}

@keyframes kyc-marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.live-head,
.live-market-panel,
#viewLive .tabs,
.layout {
  max-width: 1400px;
  width: calc(100% - 2.8vw);
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.live-market-panel {
  margin-top: 0.8vh;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.live-market-panel .live-head {
  width: 100%;
  max-width: none;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.live-market-panel .tabs {
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

.live-market-panel .cards {
  width: 100%;
  margin-top: 0.8vh;
}

/* Tab with products only (e.g. GOLD COINS) — no MCX header cards */
#viewLive .cards.cards-collapsed,
.live-market-panel .cards.cards-collapsed {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  min-height: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
}

.live-market-panel.no-mcx-cards {
  gap: 8px;
  padding-bottom: 10px;
}

.live-head {
  background: rgba(255, 252, 248, 0.94);
  border: 1px solid rgba(228, 214, 184, 0.9);
  border-radius: 1.2vw;
  margin-top: 0;
  margin-bottom: 0;
  padding: 0.9vh 1vw;
}

.live-head .trade-info {
  flex: 0 0 auto;
  margin: 0;
  margin-left: auto;
}

.trade-lock {
  display: none;
}

.card-spark {
  display: none;
}

.live-head-title,
.live-head-sub,
.trade-info-text strong,
.trade-info-text span {
  color: #560404;
}

/* PRODUCTS label sits on maroon page bg — must be light */
.products-head-left,
.products-head-left span,
.products-head-left svg,
.prod-title-desk {
  color: #ffffff !important;
}

.trade-info {
  border-color: #efe4cf;
  background: #fffdf8;
}

#viewLive .tabs,
.tabs {
  max-width: 1400px;
  width: calc(100% - 2.8vw);
  margin: 0.8vh auto 0;
  padding: 0.45vh 0.5vw;
  background: #fffdf8;
  border: 1px solid rgba(228, 214, 184, 0.9);
  border-radius: 1.2vw;
  box-sizing: border-box;
}

.tabs.tabs-one {
  max-width: 1400px;
  width: calc(100% - 2.8vw);
}

.tab {
  color: #1b2744;
}

.tab.on {
  background: linear-gradient(90deg, #1b2a4e, #152038);
  color: #fff;
}

.card {
  background: #fffdf8;
  border-color: #e6d3b0;
  box-shadow: 0 8px 18px rgba(27, 39, 68, 0.06);
}

.card-gold {
  background: #fff6e8;
}

.card-blue {
  background: #f3f7fd;
}

.card-lavender {
  background: #f4f1fa;
}

.card-title,
.card-price,
.prod,
.buy-val,
.sell-val {
  color: #1b2744;
}

.card-hl {
  border-top-color: rgba(196, 161, 90, 0.35);
}

/* Desktop — one white panel like mobile (title + tabs + rates together) */
@media (min-width: 769px) {
  .live-market-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px 16px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(196, 161, 90, 0.28);
    box-shadow: 0 8px 24px rgba(65, 4, 4, 0.14);
  }

  .live-market-panel .live-head {
    padding: 2px 4px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .live-head .trade-info {
    padding: 8px 14px;
    border-radius: 14px;
    border: 1px solid rgba(196, 161, 90, 0.4);
    background: linear-gradient(180deg, #fffefb, #fff6e8);
  }

  .live-market-panel .tabs,
  #viewLive .tabs {
    margin: 0 !important;
    padding: 4px;
    border-radius: 999px;
    background: rgba(239, 239, 239, 0.95);
    border: 0;
    box-shadow: none;
  }

  .tab {
    padding: 0.85vh 1.4vw;
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: 0.06em;
  }

  .tab.on {
    background: linear-gradient(90deg, #560404, #8c0b18);
    color: #d4af37;
    box-shadow: none;
  }

  .live-market-panel .cards,
  #viewLive .cards {
    display: flex !important;
    flex-wrap: nowrap;
    gap: 8px;
    width: 100%;
    margin: 0;
    padding: 2px 0 0;
  }

  .live-market-panel .card,
  #viewLive .card {
    flex: 1 1 0;
    min-width: 0;
    padding: 10px 8px 8px;
    border-radius: 10px;
    border: 0 !important;
    background: #fff !important;
    box-shadow: 0 0 10px 1px rgba(174, 172, 172, 0.22);
  }

  .live-market-panel .card:hover,
  #viewLive .card:hover {
    transform: none;
    box-shadow: 0 0 12px 2px rgba(174, 172, 172, 0.32);
  }

  #viewLive .card-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2px;
  }

  #viewLive .card-icon {
    display: block;
    width: 52%;
    max-width: 56px;
    margin: 0 auto 2px;
    border: 0;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    height: auto;
    min-height: 0;
    min-width: 0;
  }

  #viewLive .metal-icon {
    width: 100% !important;
    height: 40px !important;
    object-fit: contain !important;
    border-radius: 0 !important;
  }

  #viewLive .card-info {
    width: 100%;
    text-align: center;
  }

  #viewLive .card-title {
    font-size: clamp(10px, 0.72vw, 12px);
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #1b2744 !important;
  }

  #viewLive .card-price {
    margin-top: 2px;
    font-size: clamp(22px, 1.85vw, 34px);
    font-weight: 800;
    line-height: 1.15;
    color: #3e0303 !important;
  }

  #viewLive .buy-val,
  #viewLive .sell-val,
  .buy-val,
  .sell-val {
    font-size: clamp(22px, 1.75vw, 32px) !important;
    font-weight: 800;
    line-height: 1.2;
  }

  #viewLive .sub,
  .buy-val .sub,
  .sell-val .sub,
  .sub {
    font-size: clamp(12px, 0.85vw, 15px) !important;
    margin-top: 0.35vh;
  }

  #viewLive .card-price.green {
    color: #15803d !important;
  }

  #viewLive .card-price.red {
    color: #dc2626 !important;
  }

  #viewLive .card-price.white {
    color: #3e0303 !important;
  }

  #viewLive .card-hl {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 4px;
    padding-top: 0;
    border-top: 0 !important;
  }

  #viewLive .card-hl b {
    display: none;
  }

  #viewLive .card-hl .hl-col {
    width: auto;
    flex: 0 0 auto;
  }

  #viewLive .card-hl .hl-mid {
    width: 1px;
    height: 10px;
    background: #a19f9f;
  }

  #viewLive .card-hl i {
    font-size: clamp(11px, 0.78vw, 14px) !important;
    font-weight: 700;
    font-style: normal;
    color: #a19f9f !important;
  }

  #viewLive .card-spark {
    display: block !important;
    width: 88%;
    margin: 4px auto 0;
    height: 16px;
  }

  #viewLive .card-spark svg {
    width: 100%;
    height: 16px;
    display: block;
  }

  #viewLive .card-spark path {
    stroke: #dc2626;
  }
}

.products-head-left svg {
  color: #1b2744;
}

.badge-buy,
.badge-sell {
  border: 0;
  border-radius: 999px;
  padding: 0.45vh 0.9vw;
}

.badge-buy {
  background: #1b2744;
  color: #fff;
}

.badge-sell {
  background: #f3d2cc;
  color: #1b2744;
}

.prod-row {
  display: table;
  background: #fffdf8;
  border-color: #e6d3b0;
}

.prod-name {
  display: inline-block;
  vertical-align: middle;
}

.prod-name b,
.prod-name small {
  display: block;
  color: #1b2744;
  font-weight: 700;
}

.prod-name small {
  font-size: 0.72vw;
  font-weight: 600;
  opacity: 0.85;
}

.icon-gold {
  background: #f8e7c4;
  border-color: #e4c98a;
}

.icon-silver {
  background: #eef2f8;
  border-color: #d5deea;
}

.metal-icon,
.metal-icon-sm {
  object-fit: cover;
  border-radius: 50%;
}

.nav-desktop {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  width: min(720px, calc(100% - 2rem)) !important;
  max-width: 720px !important;
  margin: 0 auto;
  padding: 0.55rem 0.75rem !important;
  table-layout: auto;
  border-radius: 999px !important;
  border: 1.5px solid rgba(196, 139, 40, 0.65) !important;
  background: linear-gradient(180deg, #fffefb 0%, #faf4e8 100%) !important;
  box-shadow:
    0 12px 32px rgba(65, 4, 4, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.5) inset !important;
}

.nav-mobile {
  display: none;
}

.bottom-wrap {
  left: 0;
  right: 0;
  width: auto;
  transform: none;
  padding: 0.75rem 1rem 1.25rem;
  background: transparent;
}

.bottom-nav {
  background: rgba(255, 252, 248, 0.96);
  border-color: #eadcc4;
  box-shadow: 0 10px 28px rgba(27, 39, 68, 0.08);
}

.nav-desktop .nav-item {
  display: flex !important;
  flex: 1 1 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: auto;
  min-height: 52px;
  padding: 0.35rem 0.4rem;
  border-radius: 14px;
  color: #560404 !important;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.nav-desktop .nav-item svg {
  display: block !important;
  margin: 0 !important;
  width: 18px;
  height: 18px;
}

.nav-desktop .nav-item:hover {
  background: rgba(86, 4, 4, 0.06);
  color: #410404 !important;
}

.nav-desktop .nav-item.on {
  color: #410404 !important;
  font-weight: 800;
  background: rgba(196, 139, 40, 0.14);
}

.nav-desktop .nav-live {
  flex: 1.35 1 0;
}

.nav-desktop .live-pill {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0.55rem 1.1rem !important;
  border-radius: 999px;
  border: 1px solid rgba(212, 175, 55, 0.55);
  background: linear-gradient(160deg, #810e12 0%, #9b1515 45%, #470707 100%) !important;
  color: #f5e6c8 !important;
  box-shadow: 0 6px 16px rgba(86, 4, 4, 0.35);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.nav-desktop .live-pill svg {
  color: #ecb131;
}

.nav-desktop .nav-live:hover .live-pill {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(86, 4, 4, 0.42);
}

.nav-desktop .nav-live.on .live-pill {
  box-shadow:
    0 0 0 2px rgba(236, 177, 49, 0.35),
    0 8px 18px rgba(86, 4, 4, 0.4);
}

.live-pill {
  background: linear-gradient(160deg, #810e12, #470707);
  color: #f5e6c8;
}

/* Booking cards: in-flow on mobile only (scroll with content, not sticky) */
.mobile-dock-cards {
  display: none;
}

.modal-box,
.order-card,
.order-card-v2,
.login-card,
.drawer {
  background: #fffdf8;
  color: #1b2744;
}

.drawer {
  background: #f7f1ea url("../imgs/jp-bg.png") no-repeat center top / cover;
}

.drawer-card,
.drawer-support {
  background: rgba(255, 253, 248, 0.92);
  color: #1b2744;
}

.mode-pill {
  background: #fff;
  border-color: #eadcc4;
}

.mode-pill .mode.on {
  color: #fff;
  background: #1b2744;
}

.bidask-v2 .bid {
  color: #dc2626;
}

.bidask-v2 .ask {
  color: #16a34a;
}

.btn-sell {
  background: #b4232c;
  color: #fff;
}

.btn-buy {
  background: #1b2744;
  color: #fff;
}

.order-product-icon {
  overflow: hidden;
  background: #f8e7c4;
  border-color: #e4c98a;
  line-height: 0;
}

.order-product-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.login-logo {
  width: 5vw;
  height: auto;
  max-height: 12vh;
}

/* Mobile: scrollable page + app-style dock + compact cards */
@media (max-width: 768px) {
  html,
  body,
  .page {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    height: auto !important;
    min-height: 100%;
    -webkit-overflow-scrolling: touch;
  }

  .page,
  .page.scrollable {
    overflow-y: auto !important;
    height: auto !important;
  }

  /* Always show bottom dock on mobile (ignore desktop nav-hidden) */
  body.nav-hidden .bottom-wrap {
    display: block !important;
  }

  .nav-desktop {
    display: none !important;
  }

  .nav-toggle {
    display: none !important;
  }

  .bottom-wrap {
    display: block !important;
    position: fixed !important;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0 0 calc(10px + env(safe-area-inset-bottom, 0px));
    overflow: visible;
    background: transparent;
    z-index: 200 !important;
    pointer-events: none;
  }

  /* Sidebar must cover bottom nav when open */
  .drawer-bg {
    z-index: 220 !important;
  }

  .drawer {
    z-index: 230 !important;
  }

  .bottom-wrap .bottom-nav {
    pointer-events: auto;
  }

  /* JP app booking banners (scroll with content) */
  .mobile-dock-cards {
    display: block !important;
    width: 100%;
    margin: 14px 0 8px;
    padding: 0;
    text-align: left;
  }

  .jp-book-banner {
    position: relative;
    display: block;
    margin-bottom: 10px;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    min-height: 76px;
    border: 1px solid rgba(217, 182, 93, 0.45);
  }

  .jp-book-banner-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: brightness(0.45) saturate(1.1);
  }

  .jp-book-banner-row {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 0;
    min-height: 76px;
    padding: 10px 12px;
    background: linear-gradient(90deg, rgba(70, 8, 10, 0.88), rgba(96, 13, 13, 0.72) 55%, rgba(70, 8, 10, 0.55));
  }

  .jp-book-wa-circle {
    display: inline-flex;
    width: 43px;
    height: 43px;
    border-radius: 50%;
    border: 1.2px solid #d9b65d;
    align-items: center;
    justify-content: center;
    color: #e8c77a;
    flex-shrink: 0;
  }

  .jp-book-divider {
    width: 1px;
    height: 43px;
    margin: 0 12px;
    background: #c7a75e;
    flex-shrink: 0;
  }

  .jp-book-copy {
    flex: 1;
    min-width: 0;
  }

  .jp-book-copy b {
    display: block;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
  }

  .jp-book-copy small {
    display: block;
    margin-top: 4px;
    color: #e6d6d6;
    font-size: 12px;
  }

  .jp-book-chev {
    color: #fff;
    font-size: 28px;
    line-height: 1;
    font-weight: 300;
    padding-left: 6px;
  }

  .jp-book-strip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #600d0d;
    text-decoration: none;
  }

  .jp-book-strip-ico {
    color: #d3af67;
    flex-shrink: 0;
  }

  .jp-book-strip-copy {
    min-width: 0;
    flex: 1;
  }

  .jp-book-strip-copy small {
    display: block;
    color: #d3af67;
    font-size: 11px;
    font-weight: 600;
  }

  .jp-book-strip-copy b {
    display: block;
    margin-top: 2px;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* App BottomTab floating pill */
  .nav-mobile {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    width: 92% !important;
    max-width: none;
    height: 64px;
    margin: 0 auto;
    padding: 0 10px;
    border-radius: 32px;
    border: 1.5px solid #d9c08a;
    background: #fffefb;
    box-shadow: 0 6px 14px rgba(27, 39, 68, 0.1);
    overflow: visible;
    position: relative;
    box-sizing: border-box;
  }

  .nav-mobile .nav-item {
    display: flex !important;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: auto;
    height: 100%;
    padding: 0 2px;
    color: #1b2744 !important;
    font-size: 10px;
    font-weight: 500;
    white-space: normal;
    background: transparent;
    position: relative;
    overflow: visible;
  }

  .nav-mobile .nav-ico {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    margin: 0 0 3px;
    color: #1b2744;
  }

  .nav-mobile .nav-ico svg {
    display: block !important;
    margin: 0 !important;
  }

  .nav-mobile .nav-label {
    display: block;
    white-space: nowrap;
    line-height: 1.1;
    color: #1b2744;
  }

  /* Gold circle always on Live Rates — other tabs only bold/unbold label */
  .nav-live-mob {
    overflow: visible !important;
  }

  /* JP app: maroon elevated Live circle + gold icon */
  .nav-mobile .live-circle,
  .nav-mobile .nav-live-mob .nav-ico.live-circle {
    width: 52px;
    height: 52px;
    margin: -18px auto 2px;
    border-radius: 50%;
    border: 1.5px solid #c9a45c;
    background: linear-gradient(160deg, #810e12 0%, #9b1515 48%, #470707 100%);
    box-shadow: 0 4px 12px rgba(86, 4, 4, 0.4);
    color: #ecb131;
  }

  .nav-mobile .nav-ico {
    color: #640906;
  }

  .nav-mobile .nav-label {
    font-weight: 500;
    color: #1b2744;
  }

  .nav-mobile .nav-item.on .nav-label {
    font-weight: 800;
    color: #560404;
  }

  .layout,
  .margin-page,
  .empty-screen,
  .notify-list,
  #viewOrders .layout,
  #viewLive .layout {
    padding-bottom: 96px !important;
  }

  .top {
    height: 72px;
    padding: 0;
  }

  .top-cell {
    padding: 0 8px;
  }

  .brand-lockup {
    gap: 8px;
    max-width: calc(100vw - 96px);
  }

  .brand-mark {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
  }

  .brand-rule {
    width: 1px;
    height: 36px;
  }

  .brand-copy b {
    font-size: 15px;
    letter-spacing: 0.1em;
  }

  .brand-mid {
    font-size: 8px;
    letter-spacing: 0.18em;
    margin-top: 1px;
  }

  .brand-mid i {
    width: 10px;
    margin: 0 4px;
  }

  .brand-copy small {
    font-size: 7px;
    letter-spacing: 0.02em;
    margin-top: 2px;
  }

  .icon-btn {
    width: 34px;
    height: 34px;
    line-height: 32px;
  }

  .live-head {
    margin: 8px 10px 0;
    padding: 8px 10px;
    border-radius: 14px;
  }

  .live-head-title {
    font-size: 13px;
    letter-spacing: 0.08em;
  }

  .live-head-sub {
    font-size: 10px;
  }

  .trade-info {
    margin-top: 6px;
    padding: 6px 8px;
  }

  .tabs,
  .tabs.tabs-one {
    margin: 8px 10px 0;
    padding: 2px;
    border-radius: 12px;
  }

  .tab {
    padding: 7px 12px;
    font-size: 11px;
  }

  .layout {
    padding: 8px 10px 110px;
  }

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

  .card {
    min-height: 0;
    height: auto;
    padding: 8px 8px 6px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(27, 39, 68, 0.06);
  }

  .card-top {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    text-align: left;
  }

  .card-icon {
    display: block;
    width: auto;
    margin: 0;
    flex-shrink: 0;
  }

  .card-info {
    display: block;
    text-align: left;
    min-width: 0;
    flex: 1;
  }

  .metal-icon {
    width: 28px;
    height: 28px;
  }

  .card-title {
    font-size: 10px;
    letter-spacing: 0.04em;
    text-align: left;
  }

  .card-price {
    margin-top: 2px;
    font-size: 15px;
    line-height: 1.15;
  }

  .card-hl {
    margin-top: 6px;
    padding-top: 6px;
    font-size: 9px;
  }

  .card-hl i {
    margin-top: 1px;
    font-size: 10px;
  }

  .products-head {
    margin: 10px 0 6px;
  }

  .products-head-left {
    font-size: 12px;
  }

  .prod-row {
    padding: 10px 10px;
    border-radius: 12px;
  }

  .prod-name b {
    font-size: 14px;
    line-height: 1.2;
  }

  .prod-name small {
    margin-top: 3px;
    font-size: 11px !important;
    line-height: 1.35;
    font-weight: 600;
    color: #5a6b7c;
    opacity: 1;
    white-space: normal;
    word-break: break-word;
  }

  .metal-icon-sm {
    width: 22px;
    height: 22px;
  }

  .login-logo {
    width: auto;
    max-width: 70vw;
    max-height: 72px;
    height: auto;
  }

  .brand-mark {
    width: auto;
    height: 56px;
    max-width: calc(100vw - 100px);
  }

  .brand-rule,
  .brand-copy {
    display: none !important;
  }
}

/* ===== JP brand overrides (maroon/gold) ===== */
.top {
  height: 11vh;
  border-bottom: 1px solid rgba(196, 139, 40, 0.35);
  background: linear-gradient(180deg, rgba(65, 4, 4, 0.9) 0%, rgba(86, 4, 4, 0.75) 55%, rgba(86, 4, 4, 0.25) 100%);
}

.top-left {
  color: #f5e6c8;
}

.brand-lockup {
  gap: 0;
  justify-content: center;
}

.brand-mark {
  width: auto;
  height: 9vh;
  max-width: 32vw;
  object-fit: contain;
}

.brand-rule,
.brand-copy {
  display: none;
}

.icon-btn {
  border-color: rgba(212, 175, 55, 0.55);
  background: rgba(255, 255, 255, 0.12);
  color: #f5e6c8;
}

.user-chip {
  background: rgba(255, 253, 248, 0.95);
  color: var(--maroon);
  border-color: rgba(196, 161, 90, 0.55);
}

.user-name,
.user-id {
  color: var(--maroon);
}

.title-row,
.title-row .spark,
.title-row #pageTitle {
  color: #f5e6c8;
}

.title-row .line {
  background: linear-gradient(90deg, transparent, rgba(196, 139, 40, 0.85), transparent);
}

.empty,
.empty-screen {
  color: #f5e6c8 !important;
}

.white {
  color: #ffffff !important;
}

.tab.on {
  background: linear-gradient(90deg, #410404, #780613);
  color: #fff;
}

.badge-buy {
  background: var(--maroon);
  color: #fff;
}

.btn-buy,
.gold-btn {
  background: linear-gradient(90deg, #410404, #780613);
  color: #fff;
}

.live-pill {
  background: linear-gradient(160deg, #780613, #410404);
  color: #f5e6c8;
}

.drawer {
  background: #560404 url("../imgs/jp-bg.png") no-repeat center top / cover;
  color: #f5e6c8;
  border-right: 1px solid rgba(196, 139, 40, 0.35);
}

.drawer-user-text b {
  color: #fff;
}

.drawer-user-text i {
  color: rgba(245, 230, 200, 0.85);
}

.drawer-bell {
  border-color: rgba(212, 175, 55, 0.55);
  background: rgba(255, 255, 255, 0.12);
  color: #f5e6c8;
}

.drawer-card {
  background: linear-gradient(90deg, #410404, #6b0a12);
  border-color: rgba(196, 139, 40, 0.4);
  color: #fff;
}

.drawer-card.on {
  border-color: var(--gold);
}

.drawer-support {
  background: rgba(255, 253, 248, 0.96);
  border-color: rgba(196, 139, 40, 0.45);
}

.drawer-support-text,
.drawer-support-text b,
.drawer-support-kicker {
  color: var(--maroon);
}

.drawer-logout {
  background: linear-gradient(90deg, #5a0a10, #8a121c);
  color: #fff;
}

.drawer-powered {
  color: #d9bb7f;
}

.login-logo {
  width: auto;
  max-width: 16vw;
  max-height: 18vh;
  height: auto;
}

.login-kicker,
.login-title {
  color: var(--maroon);
}

/* Equal-width rate cards — fill the row */
#viewLive .cards,
.live-market-panel .cards {
  display: flex;
  flex-wrap: nowrap;
  gap: clamp(8px, 0.8vw, 14px);
  width: 100%;
  box-sizing: border-box;
}

#viewLive .card,
.live-market-panel .card {
  flex: 1 1 0;
  min-width: 0;
  max-width: none;
  box-sizing: border-box;
}

/* Margin panels on dark red bg */
.margin-outer {
  background: rgba(65, 4, 4, 0.45);
  border-color: rgba(196, 139, 40, 0.55);
}

.margin-inner {
  background: rgba(45, 4, 8, 0.55);
  border-color: rgba(196, 139, 40, 0.4);
}

.margin-metric,
.metric-left {
  color: #f5e6c8;
}

.margin-metric strong {
  color: #fff;
}

.margin-gold h2 {
  color: var(--gold);
}

.margin-silver h2 {
  color: #e8eef5;
}

.notify-item {
  background: rgba(255, 253, 248, 0.96);
  border-color: rgba(196, 139, 40, 0.45);
}

.notify-item b {
  color: var(--maroon);
}

.nav-toggle {
  background: linear-gradient(160deg, #810e12, #470707);
  border: 1.5px solid #c9a45c;
  color: #f5e6c8;
  box-shadow: 0 8px 18px rgba(65, 4, 4, 0.35);
}

.nav-toggle:hover {
  filter: brightness(1.08);
}

/* Keep product rows clear of floating bottom dock (desktop + mobile) */
#viewLive .layout,
#viewOrders .layout,
.margin-page,
.empty-screen,
.notify-list {
  padding-bottom: 7rem;
}

.live-head-title,
.live-head-sub,
.prod-name b,
.prod-name small,
.card-title,
.card-price,
.buy-val,
.sell-val {
  color: var(--maroon);
}

.products-head-left,
.products-head-left span,
.products-head-left svg {
  color: #ffffff !important;
}

.prod-name small {
  color: #6b4a4a;
  font-weight: 600;
}

.kyc {
  background: rgba(255, 252, 248, 0.78);
  color: var(--muted);
}

.bottom-nav {
  background: rgba(255, 252, 248, 0.98);
  border-color: rgba(196, 161, 90, 0.5);
}

/* desk/mob label switches */
.live-title-mob,
.live-sub-mob,
.prod-title-mob,
.badge-mob {
  display: none;
}

.live-title-desk,
.live-sub-desk,
.prod-title-desk,
.badge-desk {
  display: inline;
}

@media (max-width: 768px) {
  .live-title-desk,
  .live-sub-desk,
  .prod-title-desk,
  .badge-desk {
    display: none !important;
  }

  .live-title-mob,
  .live-sub-mob,
  .prod-title-mob,
  .badge-mob {
    display: inline !important;
  }

  .user-wrap,
  #phoneText,
  #pageTitleRow,
  #kycBanner,
  .trade-status-dot,
  #tradeClock {
    display: none !important;
  }

  .top-left,
  .top-right {
    width: 48px;
  }

  .top-center {
    width: auto;
  }

  .top-right .icon-btn {
    margin-right: 0;
  }

  .top {
    height: auto;
    min-height: 96px;
    padding: 10px 14px 6px;
    background: transparent;
    border-bottom: 0;
  }

  .top-cell {
    padding: 0;
  }

  .brand-mark {
    height: 78px;
    max-width: min(68vw, 260px);
  }

  .icon-btn {
    width: 40px;
    height: 40px;
    line-height: 38px;
    border-radius: 50%;
    border: 1px solid #f6e7c0;
    background: transparent;
    color: #dee3ee;
    box-shadow: none;
  }

  #viewLive.show {
    display: block;
  }

  /* White market panel — title + tabs + cards */
  .live-market-panel {
    position: relative;
    width: calc(100% - 28px) !important;
    max-width: none;
    margin: 52px 14px 0 !important;
    padding: 10px 8px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 0 8px 1px rgba(225, 220, 220, 0.7);
    border: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .live-market-panel .live-head {
    display: block;
    margin: 0;
    padding: 2px 4px 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  /* App TradeInfo — dark green lock pill under logo (above white panel) */
  .live-head .trade-info,
  .trade-info {
    position: absolute !important;
    top: -42px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: inline-flex !important;
    width: auto;
    min-width: 190px;
    max-width: 92vw;
    margin: 0;
    padding: 6px 16px;
    justify-content: center;
    align-items: center;
    gap: 8px;
    border-radius: 30px;
    border: 1.2px solid #238b53;
    background: linear-gradient(135deg, #062d1b 0%, #0b4327 50%, #062d1b 100%);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.28);
  }

  .trade-info.closed {
    border-color: #b52b46;
    background: linear-gradient(135deg, #390008 0%, #650011 50%, #390008 100%);
    box-shadow: 0 4px 12px rgba(255, 23, 68, 0.28);
  }

  .trade-lock {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    color: #75f0a0;
    flex-shrink: 0;
  }

  .trade-info.closed .trade-lock {
    color: #ff4568;
  }

  .trade-info-text {
    text-align: center;
  }

  .trade-info-text strong {
    display: block;
    color: #75f0a0 !important;
    font-size: 12px;
    letter-spacing: 0.7px;
    font-weight: 700;
  }

  .trade-info.closed .trade-info-text strong {
    color: #ff4568 !important;
  }

  .live-head-left {
    width: 100%;
  }

  .live-head-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0;
    color: #690d1d !important;
  }

  .live-head-title svg {
    width: 22px;
    height: 22px;
    color: #710f20;
    flex-shrink: 0;
  }

  .live-head-title .live-dot {
    display: none !important;
  }

  .live-head-sub {
    margin: 0 0 0 28px;
    font-size: 10px;
    font-weight: 500;
    color: #666 !important;
    letter-spacing: 0.1px;
  }

  .live-head-sub .live-sub-mob::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 7px;
    border-radius: 50%;
    background: #f20d3a;
    vertical-align: middle;
  }

  .live-market-panel .tabs,
  .tabs,
  .tabs.tabs-one {
    width: 100% !important;
    max-width: none;
    margin: 0 !important;
    padding: 3px;
    border: 0;
    border-radius: 28px;
    background: rgba(239, 239, 239, 0.9);
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .tabs::-webkit-scrollbar {
    display: none;
  }

  .tab {
    flex: 1 1 0;
    min-width: 0;
    padding: 10px 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #1b2744;
    background: transparent;
    border-radius: 24px;
    white-space: nowrap;
  }

  .tab.on {
    background: linear-gradient(90deg, #560404, #8c0b18);
    color: #d4af37;
    box-shadow: none;
    position: relative;
  }

  .tab.on::after {
    content: "";
    display: block;
    width: 18%;
    height: 1px;
    margin: 3px auto 0;
    background: #d4af37;
  }

  /* Horizontal rate cards like app */
  .live-market-panel .cards,
  #viewLive .cards {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 6px;
    padding: 2px 2px 4px;
    margin: 0;
    scrollbar-width: none;
  }

  #viewLive .cards::-webkit-scrollbar {
    display: none;
  }

  #viewLive .card,
  .live-market-panel .card {
    flex: 1 1 0 !important;
    min-width: 64px !important;
    max-width: none !important;
    padding: 6px 4px;
    border-radius: 6px;
    border: 0 !important;
    background: #fff !important;
    box-shadow: 0 0 10px 1px rgba(174, 172, 172, 0.2);
  }

  .card-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2px;
  }

  .card-icon {
    width: 78%;
    margin: 0 auto 2px;
  }

  .metal-icon {
    width: 100% !important;
    height: 36px !important;
    object-fit: contain !important;
    border-radius: 0 !important;
  }

  .card-info {
    width: 100%;
    text-align: center;
  }

  .card-title {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.2px;
    text-align: center;
    color: #1b2744 !important;
  }

  .card-price,
  .card-price.white,
  .card-price.red,
  .card-price.green {
    margin-top: 1px;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    color: #3e0303 !important;
  }

  .card-price.red {
    color: #dc2626 !important;
  }

  .card-price.green {
    color: #16a34a !important;
  }

  .card-hl {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2px;
    margin-top: 2px;
    padding-top: 0;
    border-top: 0 !important;
    font-size: 6px;
    font-weight: 700;
    color: #a19f9f;
  }

  .card-hl b {
    display: none;
  }

  .card-hl i,
  .card-hl .hl-low,
  .card-hl .hl-high {
    font-size: 6px !important;
    font-weight: 700;
    font-style: normal;
    color: #a19f9f !important;
    margin: 0;
  }

  .card-hl .hl-mid {
    display: inline-block;
    width: 1px;
    height: 8px;
    background: #a19f9f;
    margin: 0 2px;
  }

  .card-spark {
    display: block !important;
    width: 92%;
    margin: 2px auto 0;
    height: 18px;
  }

  .card-spark svg {
    width: 100%;
    height: 18px;
    display: block;
  }

  .card-spark path {
    stroke: #dc2626;
  }

  .card.card-blue .card-spark path,
  .card.card-lavender .card-spark path {
    stroke: #dc2626;
  }

  .layout {
    padding: 10px 14px 110px !important;
  }

  .products-head {
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    margin: 0;
    padding: 8px 8px 4px;
    background: #fff;
    border-radius: 10px 10px 0 0;
    box-shadow: 0 0 8px 1px rgba(225, 220, 220, 0.7);
  }

  .products-badges {
    display: none !important;
  }

  .products-head-left {
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .products-head-left,
  .products-head-left span,
  .products-head-left svg,
  .prod-title-mob {
    font-size: 16px !important;
    font-weight: 700;
    color: #690d1d !important;
    letter-spacing: 0;
  }

  .products-head-left svg {
    width: 28px;
    height: 28px;
    color: #b87324 !important;
  }

  .products-wrap,
  #products {
    background: #fff;
    border-radius: 0 0 10px 10px;
    border: 0;
    box-shadow: 0 4px 8px 1px rgba(225, 220, 220, 0.55);
    padding: 0 8px 6px;
    margin-top: 0;
  }

  .prod-row {
    background: transparent !important;
    border-radius: 0 !important;
    border: 0 !important;
    border-bottom: 1px solid #efeeee !important;
    margin-bottom: 0 !important;
    padding: 12px 4px !important;
  }

  .prod-name b {
    color: #560404;
    font-size: 13px;
  }

  .prod-name small {
    color: #c45c5c !important;
    font-size: 11px !important;
  }

  .buy-val,
  .sell-val {
    color: #560404;
    font-size: 15px;
  }

  /* Login sheet closer to app */
  .login-card {
    background: #fff !important;
    border: 1px solid rgba(196, 139, 40, 0.45);
    border-radius: 18px;
    color: #1a1a1a;
  }

  .login-logo {
    max-width: 200px;
    max-height: 88px;
  }

  .login-title {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 22px;
    color: #560404 !important;
  }

  .login-submit,
  .gold-btn.login-submit {
    background: linear-gradient(90deg, #560404, #8c0b18) !important;
    color: #fff !important;
    border-radius: 12px;
  }
}
