:root {
  --bg: #080a0c;
  --card1: #17191c;
  --card2: #0d0f11;
  --border: #292b2e;
  --gold: #d4aa48;
  --gold-soft: #b8933b;
  --txt: #f4f4f4;
  --txt2: #aaadb0;
  --green: #28c65b;
  --red: #e74c52;
  --radius: 12px;
}
[data-theme="light"] {
  --bg: #f3f4f6;
  --card1: #ffffff;
  --card2: #f7f8fa;
  --border: #e2e4e8;
  --txt: #14171a;
  --txt2: #6b7075;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--txt);
  font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  padding-top: env(safe-area-inset-top);
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
#appMain {
  padding: 12px 18px calc(96px + env(safe-area-inset-bottom));
  animation: pageIn .45s ease both;
}
@keyframes pageIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
#appHeader {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px 10px;
  background: linear-gradient(180deg, var(--bg), rgba(8,10,12,.85));
  backdrop-filter: blur(8px);
}
.hdr-btn {
  background: none; border: none; color: var(--gold);
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%;
  transition: background .2s, transform .2s;
}
.hdr-btn:active { transform: scale(.9); background: rgba(212,170,72,.12); }
.brand { display: flex; align-items: center; gap: 10px; flex: 1; }
.brand-emblem { flex: none; filter: drop-shadow(0 0 6px rgba(212,170,72,.35)); }
.brand-txt { display: flex; flex-direction: column; line-height: 1; }
.brand-gldn { font-family: Georgia, "Times New Roman", serif; font-size: 26px; color: var(--gold); letter-spacing: 3px; }
.brand-sub { font-size: 10px; color: var(--txt); letter-spacing: 6px; margin-top: 3px; }
.page-title { flex: 1; text-align: center; font-size: 16px; font-weight: 600; letter-spacing: 1px; }
.ico { width: 24px; height: 24px; }
.ico.flip { transform: rotate(180deg); }
.anim-swing { animation: swing 3s ease-in-out infinite; transform-origin: top center; }
@keyframes swing { 0%,88%,100% { transform: rotate(0); } 92% { transform: rotate(12deg); } 96% { transform: rotate(-10deg); } }
.spin { animation: spin .7s linear; }
@keyframes spin { to { transform: rotate(360deg); } }
.metal-ico { filter: drop-shadow(0 2px 4px rgba(0,0,0,.5)); }
.metal-ico.gold { filter: drop-shadow(0 0 6px rgba(212,170,72,.4)); }
.status-strip {
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(145deg, var(--card1), var(--card2));
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 14px; margin-bottom: 10px; animation: fadeUp .5s both;
}
.status-left { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 14px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(40,198,91,.6); animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(40,198,91,.55); } 70% { box-shadow: 0 0 0 8px rgba(40,198,91,0); } 100% { box-shadow: 0 0 0 0 rgba(40,198,91,0); } }
.status-right { display: flex; align-items: center; gap: 8px; color: var(--txt2); font-size: 11.5px; }
.status-right .ico { width: 18px; height: 18px; color: var(--gold); }
.top-boxes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.tbox {
  background: linear-gradient(145deg, var(--card1), var(--card2));
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 10px 8px; text-align: center; animation: fadeUp .5s both;
  transition: background .5s;
}
.tbox .tname { font-size: 10.5px; color: var(--gold); font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 4px; }
.tbox .tval { font-size: 17px; font-weight: 700; margin-top: 6px; }
.tbox .tsub { font-size: 10px; color: var(--txt2); margin-top: 3px; }
.tbox .metal-ico { width: 20px; height: 20px; }
.section-title { font-size: 12px; letter-spacing: 1.5px; color: var(--txt2); margin: 14px 4px 8px; text-transform: uppercase; }
.rate-card {
  background: linear-gradient(145deg, var(--card1), var(--card2));
  border: 1px solid var(--border); border-radius: var(--radius);
  margin-bottom: 9px; overflow: hidden; animation: fadeUp .5s both;
  transition: transform .18s, box-shadow .3s, background .5s;
}
.rate-card:active { transform: scale(.99); }
.rc-top { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.rc-icon { flex: none; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 10px; background: rgba(255,255,255,.03); }
.rc-name { flex: 1; min-width: 0; }
.rc-title { font-size: 16px; font-weight: 600; }
.rc-title.gold { color: var(--gold); }
.rc-title.silver, .rc-title.platinum { color: #cfd3d8; }
.rc-purity { font-size: 12px; color: var(--txt2); margin-top: 2px; }
.rc-spark { width: 84px; height: 34px; flex: none; }
.rc-change { text-align: right; flex: none; min-width: 62px; font-size: 13px; }
.rc-change .chg { font-weight: 600; }
.rc-chev { color: var(--txt2); }
.rc-chev .ico { width: 18px; }
.rc-bottom { display: flex; border-top: 1px solid var(--border); }
.rc-cell { flex: 1; padding: 10px 14px; transition: background .5s; border-radius: 8px; }
.rc-cell + .rc-cell { border-left: 1px solid var(--border); }
.rc-lbl { font-size: 11px; color: var(--txt2); letter-spacing: 1px; }
.rc-price { font-size: 20px; font-weight: 600; margin-top: 3px; }
.up { background: rgba(40,198,91,.16) !important; }
.down { background: rgba(231,79,82,.16) !important; }
.up .rc-price, .up.tbox .tval, .txt-up { color: var(--green); }
.down .rc-price, .down.tbox .tval, .txt-down { color: var(--red); }
.pos { color: var(--green); }
.neg { color: var(--red); }
.mkt-card {
  background: linear-gradient(145deg, var(--card1), var(--card2));
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px; margin-top: 4px; animation: fadeUp .5s both;
}
.mkt-head { display: flex; align-items: center; gap: 8px; }
.mkt-head .ico { color: var(--gold); }
.mkt-title { color: var(--gold); font-weight: 700; letter-spacing: 1px; font-size: 15px; flex: 1; }
.mkt-sub { color: var(--txt2); font-size: 11px; }
.mkt-body { display: flex; align-items: flex-end; justify-content: space-between; margin: 10px 0; gap: 10px; }
.mkt-usd-lbl { font-size: 12px; color: var(--txt2); }
.mkt-usd-val { font-size: 24px; font-weight: 700; }
.mkt-usd-chg { font-size: 13px; margin-top: 2px; }
.mkt-spark { width: 150px; height: 56px; flex: none; }
.mkt-foot { display: flex; border-top: 1px solid var(--border); padding-top: 10px; }
.mkt-col { flex: 1; text-align: center; }
.mkt-col + .mkt-col { border-left: 1px solid var(--border); }
.mkt-col .l { font-size: 11px; color: var(--txt2); letter-spacing: 1px; }
.mkt-col .v { font-size: 16px; font-weight: 600; margin-top: 3px; }
.qa-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.qa {
  background: linear-gradient(160deg, rgba(212,170,72,.08), var(--card2));
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 4px; text-align: center; color: var(--gold);
  transition: transform .15s, box-shadow .25s; animation: fadeUp .5s both;
}
.qa:active { transform: translateY(2px) scale(.97); box-shadow: 0 0 0 1px var(--gold) inset; }
.qa .ico { width: 26px; height: 26px; }
.qa span { display: block; font-size: 10.5px; letter-spacing: 1px; margin-top: 6px; }
.news-strip {
  display: flex; align-items: center; gap: 10px; margin-top: 12px;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  padding: 10px 4px; animation: fadeUp .5s both;
}
.news-badge { background: rgba(212,170,72,.16); color: var(--gold); font-size: 10px; font-weight: 700; padding: 5px 9px; border-radius: 6px; letter-spacing: .5px; white-space: nowrap; }
.news-text { flex: 1; color: var(--txt2); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.news-strip .ico { color: var(--txt2); width: 18px; }
.marquee { overflow: hidden; background: var(--gold); color: #111; white-space: nowrap; }
.marquee-inner { display: inline-block; padding: 6px 0; animation: marquee 22s linear infinite; }
.marquee-inner * { color: #111 !important; }
@keyframes marquee { from { transform: translateX(20%); } to { transform: translateX(-100%); } }
#appFooter {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; background: rgba(6,7,9,.96); border-top: 1px solid var(--border);
  padding: 8px 4px calc(6px + env(safe-area-inset-bottom));
  backdrop-filter: blur(10px);
}
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--txt2); font-size: 10px; letter-spacing: .5px; padding: 4px 0; transition: color .2s, transform .2s; }
.tab .ico { width: 22px; height: 22px; }
.tab.active { color: var(--gold); }
.tab:active { transform: translateY(2px); }
#sideNav { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
#sideNav.open { pointer-events: auto; }
.nav-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.55); opacity: 0; transition: opacity .3s; }
#sideNav.open .nav-backdrop { opacity: 1; }
.nav-panel {
  position: absolute; top: 0; bottom: 0; left: 0; width: 84%; max-width: 340px;
  background: var(--card2); border-right: 1px solid var(--border);
  transform: translateX(-102%); transition: transform .32s cubic-bezier(.22,1,.36,1);
  display: flex; flex-direction: column;
}
#sideNav.open .nav-panel { transform: none; }
.nav-head { display: flex; align-items: center; gap: 10px; padding: 18px 14px calc(16px + env(safe-area-inset-top)); padding-top: calc(18px + env(safe-area-inset-top)); border-bottom: 1px solid var(--border); }
.nav-user { font-weight: 600; }
.nav-role { font-size: 12px; color: var(--txt2); }
.nav-head .hdr-btn { margin-left: auto; }
.nav-scroll { overflow-y: auto; padding: 12px; flex: 1; }
.mgroup { margin-bottom: 16px; }
.mgroup-t { font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--gold); margin: 0 4px 8px; }
.mgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mi { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px; border: 1px solid var(--border); border-radius: 10px; color: var(--txt); font-size: 11px; text-align: center; transition: transform .15s, border-color .2s, background .2s; }
.mi .ico { color: var(--gold); width: 22px; height: 22px; }
.mi:active { transform: scale(.95); background: rgba(212,170,72,.08); border-color: var(--gold); }
.mi.logout .ico { color: var(--red); }
#appFab { position: fixed; z-index: 25; left: 0; right: 0; bottom: calc(78px + env(safe-area-inset-bottom)); pointer-events: none; }
.fab { pointer-events: auto; position: fixed; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: #fff; bottom: calc(80px + env(safe-area-inset-bottom)); box-shadow: 0 6px 16px rgba(0,0,0,.4); animation: float 3s ease-in-out infinite; }
.fab .ico { width: 24px; height: 24px; }
.fab.wa { left: 16px; background: #25d366; }
.fab.call { right: 16px; background: var(--gold); color: #111; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.modal-wrap { position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.6); display: grid; place-items: center; padding: 24px; animation: fadeIn .25s both; }
.modal-card { background: var(--card1); border: 1px solid var(--border); border-radius: 16px; padding: 22px; width: 100%; max-width: 340px; }
.modal-title { font-size: 18px; font-weight: 700; color: var(--gold); margin-bottom: 8px; }
.modal-msg { color: var(--txt2); font-size: 14px; line-height: 1.5; }
.modal-actions { display: flex; justify-content: flex-end; gap: 18px; margin-top: 18px; }
.lnk { background: none; border: none; color: var(--txt2); font-size: 13px; font-weight: 600; letter-spacing: 1px; }
.lnk.gold { color: var(--gold); }
.anim-pop { animation: pop .3s cubic-bezier(.22,1.4,.4,1) both; }
@keyframes pop { from { transform: scale(.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.fix-msg { position: fixed; left: 12px; right: 12px; bottom: calc(80px + env(safe-area-inset-bottom)); z-index: 40; background: var(--card1); border: 1px solid var(--gold); border-radius: 12px; padding: 12px 40px 12px 14px; box-shadow: 0 8px 24px rgba(0,0,0,.5); transform: translateY(160%); transition: transform .4s cubic-bezier(.22,1,.36,1); font-size: 13px; }
.fix-msg.open { transform: none; }
.fix-close { position: absolute; top: 6px; right: 8px; background: none; border: none; color: var(--txt2); font-size: 20px; line-height: 1; }
.toast { position: fixed; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom)); transform: translate(-50%, 30px); background: #1c1e22; color: #fff; padding: 11px 18px; border-radius: 10px; font-size: 13px; z-index: 90; opacity: 0; transition: .3s; border: 1px solid var(--border); max-width: 86%; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.card {
  background: linear-gradient(145deg, var(--card1), var(--card2));
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; margin-bottom: 12px; animation: fadeUp .5s both;
}
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12px; color: var(--txt2); margin-bottom: 6px; letter-spacing: .5px; }
.input, select.input, textarea.input {
  width: 100%; background: transparent; color: var(--txt);
  border: none; border-bottom: 2px solid var(--border); padding: 10px 2px; font-size: 15px; outline: none;
  transition: border-color .25s;
}
.input:focus { border-color: var(--gold); }
textarea.input { border: 1px solid var(--border); border-radius: 10px; padding: 10px; }
select.input option { background: var(--card1); }
.btn { display: block; width: 100%; border: none; border-radius: 10px; padding: 14px; font-size: 15px; font-weight: 700; letter-spacing: 1px; transition: transform .15s, filter .2s; }
.btn:active { transform: scale(.98); filter: brightness(1.08); }
.btn.gold { background: linear-gradient(135deg, #e6c46a, var(--gold)); color: #17130a; }
.btn.buy { background: var(--green); color: #fff; }
.btn.sell { background: var(--red); color: #fff; }
.btn.dark { background: #111; color: #fff; border: 1px solid var(--border); }
.btn.ghost { background: transparent; color: var(--gold); border: 1px solid var(--gold); }
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { flex: 1; }
.banner-title { background: linear-gradient(135deg, var(--gold-soft), var(--gold)); color: #17130a; font-weight: 700; letter-spacing: 1px; text-align: center; padding: 12px; border-radius: 12px; margin-bottom: 14px; }
.seg { display: flex; border: 2px solid var(--gold); border-radius: 12px; overflow: hidden; margin-bottom: 16px; }
.seg button { flex: 1; background: transparent; color: var(--txt); border: none; padding: 12px; font-weight: 600; letter-spacing: 1px; }
.seg button.on { background: linear-gradient(135deg, #e6c46a, var(--gold)); color: #17130a; box-shadow: 0 0 12px rgba(212,170,72,.4); }
.trade { border-radius: 12px; margin-bottom: 10px; color: #fff; overflow: hidden; animation: fadeUp .4s both; }
.trade.buy { background: linear-gradient(135deg, #1f4fb0, #123072); }
.trade.sell { background: linear-gradient(135deg, #c0343a, #7d2024); }
.trade-r1 { display: flex; align-items: center; gap: 8px; padding: 12px 14px; font-weight: 600; }
.trade-r1 .sym { flex: 1; display: flex; align-items: center; gap: 8px; }
.trade-r1 .metal-ico { width: 22px; height: 22px; }
.trade-r2 { display: flex; align-items: center; justify-content: space-between; padding: 8px 14px; font-size: 12px; border-top: 1px solid rgba(255,255,255,.15); }
.tds-btn { background: #f6ae2d; color: #111; border: none; border-radius: 8px; padding: 7px 12px; font-weight: 700; font-size: 12px; }
.empty-state { text-align: center; color: var(--txt2); padding: 60px 20px; font-size: 15px; }
.price-table { display: flex; border: 2px solid var(--gold); border-radius: 12px; overflow: hidden; margin-bottom: 16px; }
.price-table .pc { flex: 1; text-align: center; padding: 16px; }
.price-table .pc + .pc { border-left: 2px solid var(--gold); }
.price-table .pc .l { font-size: 12px; color: var(--txt2); letter-spacing: 1px; }
.price-table .pc .v { font-size: 30px; font-weight: 700; margin-top: 6px; }
.content-html { line-height: 1.6; font-size: 14px; }
.content-html img { max-width: 100%; height: auto; border-radius: 8px; }
.content-html table { width: 100%; border-collapse: collapse; }
.content-html td, .content-html th { border: 1px solid var(--border); padding: 8px; }
.list-card { background: linear-gradient(145deg, var(--card1), var(--card2)); border: 1px solid var(--border); border-radius: 12px; padding: 14px; margin-bottom: 10px; animation: fadeUp .4s both; }
.list-card .lc-title { font-weight: 600; }
.list-card .lc-date { font-size: 12px; color: var(--txt2); margin-top: 4px; }
.spinner { width: 34px; height: 34px; border: 3px solid var(--border); border-top-color: var(--gold); border-radius: 50%; margin: 50px auto; animation: spin2 .8s linear infinite; }
@keyframes spin2 { to { transform: rotate(360deg); } }
.kv { display: flex; justify-content: space-between; padding: 12px 4px; border-bottom: 1px solid var(--border); }
.kv .k { color: var(--txt2); text-transform: uppercase; font-size: 12px; letter-spacing: 1px; }
.kv .v { font-weight: 600; }
.gauge-wrap { text-align: center; margin: 10px 0; }
.gauge { width: 130px; height: 130px; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.stagger > * { animation: fadeUp .5s both; }
.stagger > *:nth-child(2) { animation-delay: .05s; }
.stagger > *:nth-child(3) { animation-delay: .1s; }
.stagger > *:nth-child(4) { animation-delay: .15s; }
.stagger > *:nth-child(5) { animation-delay: .2s; }
.stagger > *:nth-child(6) { animation-delay: .25s; }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ============================================================
   RESPONSIVE WEBSITE LAYER
   Mobile-first app UI above stays as-is on phones (<600px).
   Below adapts the same markup into a responsive website for
   tablet and desktop. Driven entirely from the shared stylesheet
   so every page (which reuses the same shell) responds together.
   ============================================================ */

/* ---------- Pointer / hover polish (desktop & mouse users) ---------- */
@media (hover: hover) and (pointer: fine) {
  .rate-card { cursor: pointer; }
  .rate-card:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0, 0, 0, .38); }
  .tbox:hover { border-color: var(--gold); }
  .qa:hover { box-shadow: 0 0 0 1px var(--gold) inset; transform: translateY(-2px); }
  .btn:hover { filter: brightness(1.07); }
  .hdr-btn:hover { background: rgba(212, 170, 72, .14); }
  .tab:hover { color: var(--gold); }
  .mi:hover { border-color: var(--gold); background: rgba(212, 170, 72, .1); }
  .news-strip:hover .news-text { color: var(--txt); }
  .list-card:hover, .trade:hover { transform: translateY(-1px); }
  .fab:hover { filter: brightness(1.08); }
}

/* ---------- TABLET (600px - 999px): centered column, 2-col grids ---------- */
@media (min-width: 600px) and (max-width: 999px) {
  #appHeader { max-width: 720px; margin-left: auto; margin-right: auto; }
  #appMain { max-width: 720px; margin-left: auto; margin-right: auto; padding-left: 22px; padding-right: 22px; }

  #products { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
  #products .rate-card { margin-bottom: 0; }

  .card, .banner-title, .trade, .list-card, .price-table, .seg, .btn-row, .gauge-wrap, .kv-wrap {
    max-width: 560px; margin-left: auto; margin-right: auto;
  }

  #appFooter { justify-content: center; gap: 8px; }
  #appFooter .tab { flex: 0 1 128px; }

  .fab.wa { left: 24px; }
  .fab.call { right: 24px; }
}

/* ---------- DESKTOP (>=1000px): permanent sidebar + content column ---------- */
@media (min-width: 1000px) {
  :root { --sidebar-w: 268px; --page-max: 1080px; }

  /* Shift the normal-flow shell (sticky header + main) past the sidebar */
  body { padding-left: var(--sidebar-w); }

  /* Side navigation becomes a permanent left rail */
  #sideNav { right: auto; width: var(--sidebar-w); pointer-events: auto; z-index: 40; }
  #sideNav .nav-backdrop { display: none; }
  #sideNav .nav-panel {
    transform: none; width: var(--sidebar-w); max-width: none;
    background: linear-gradient(180deg, var(--card1), var(--card2));
  }
  #navClose, #menuBtn { display: none !important; }

  /* Sidebar nav rendered as a vertical list instead of an icon grid */
  .nav-scroll .mgrid { grid-template-columns: 1fr; gap: 4px; }
  .nav-scroll .mi {
    flex-direction: row; justify-content: flex-start; align-items: center;
    gap: 12px; padding: 10px 12px; border: none; border-radius: 8px;
    text-align: left; font-size: 13px;
  }
  .nav-scroll .mi .ico { width: 20px; height: 20px; }
  .mgroup { margin-bottom: 12px; }

  /* Header: centered top bar over the content column */
  #appHeader {
    max-width: var(--page-max); margin-left: auto; margin-right: auto;
    padding-top: 18px; padding-bottom: 14px;
  }

  /* Main content: centered, comfortable width, no bottom-nav clearance needed */
  #appMain {
    max-width: var(--page-max); margin-left: auto; margin-right: auto;
    padding: 20px 36px 84px;
  }

  /* Bottom tab bar not needed on desktop (sidebar replaces it) */
  #appFooter { display: none; }

  /* Dashboard grids use the extra width */
  #products { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; align-items: start; }
  #products .rate-card { margin-bottom: 0; }
  .top-boxes { max-width: 720px; }

  /* Forms / content / list items read best at a constrained, centered width */
  .card, .banner-title, .trade, .list-card {
    max-width: 640px; margin-left: auto; margin-right: auto;
  }

  /* Fixed overlays live within the content area, clear of the sidebar */
  #tickerBar { left: var(--sidebar-w) !important; right: 0 !important; bottom: 0 !important; }
  #appFab { left: var(--sidebar-w); }
  .fab { bottom: 48px; }
  .fab.wa { left: calc(var(--sidebar-w) + 24px); }
  .fab.call { right: 28px; }
  .fix-msg { left: calc(var(--sidebar-w) + 24px); right: 28px; max-width: 420px; bottom: 84px; }
  .toast { bottom: 96px; }
}

/* ---------- LARGE DESKTOP (>=1440px): a touch more breathing room ---------- */
@media (min-width: 1440px) {
  :root { --page-max: 1180px; }
}
