:root {
  --black: #000000;
  --vault: #15120d;
  --vault-2: #1e1a13;
  --seam: #2b261d;
  --text: #f2ecdf;
  --muted: #8f877a;
  --gold: #fdb603;
  --gold-soft: rgba(253, 182, 3, 0.14);
  --up: #34c77b;
  --down: #f0564a;
  --up-soft: rgba(52, 199, 123, 0.16);
  --down-soft: rgba(240, 86, 74, 0.16);
  --r-panel: 18px;
  --r-ctl: 10px;
  --nav-h: 64px;
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--black); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--black);
  color: var(--text);
  font: 400 15px/1.5 var(--font);
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
#app {
  max-width: 520px;
  margin: 0 auto;
  padding: max(14px, env(safe-area-inset-top)) 16px calc(var(--nav-h) + 28px + env(safe-area-inset-bottom));
}
a { color: inherit; }
code { font: 13px/1.4 ui-monospace, Menlo, Consolas, monospace; background: var(--vault-2); padding: 1px 5px; border-radius: 5px; color: var(--text); }
strong { font-weight: 600; }
.num { font-variant-numeric: tabular-nums; }
.up { color: var(--up); }
.down { color: var(--down); }
.flat { color: var(--text); }
.muted { color: var(--muted); }
.bad { color: var(--down); }
.buy { color: var(--up); }
.sell { color: var(--down); }
.pad { padding: 0 2px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

/* ---------- brand ---------- */
.brand { display: flex; align-items: center; gap: 12px; padding: 6px 0 16px; }
.brand-logo { border-radius: 50%; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.wordmark { font-weight: 700; font-stretch: 125%; font-size: 22px; letter-spacing: -0.01em; color: var(--text); }
.wordmark sup { font-size: 0.42em; font-weight: 500; color: var(--gold); vertical-align: 1.35em; margin-left: 1px; }
.wordmark.big { font-size: 34px; margin: 14px 0 2px; }
.tagline { color: var(--gold); font-size: 13px; font-weight: 500; font-stretch: 112%; margin-top: 3px; }
.status {
  margin-left: auto; display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 500; color: var(--muted);
  padding: 6px 11px 6px 9px; border-radius: 999px; background: var(--vault); white-space: nowrap;
}
.status i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.status.live { color: var(--text); }
.status.live i { background: var(--up); box-shadow: 0 0 0 0 rgba(52, 199, 123, 0.6); }
.status.paused i { background: var(--gold); }
@media (prefers-reduced-motion: no-preference) {
  .status.live i { animation: beat 2s ease-out infinite; }
  @keyframes beat { 0% { box-shadow: 0 0 0 0 rgba(52, 199, 123, 0.55); } 70%, 100% { box-shadow: 0 0 0 7px rgba(52, 199, 123, 0); } }
}

/* ---------- panels ---------- */
.panel { background: var(--vault); border-radius: var(--r-panel); padding: 14px; margin-bottom: 14px; }
.panel.quiet { color: var(--muted); }
.panel.quiet p { margin: 0; }
.flat-state .lead { color: var(--text); font-weight: 600; font-size: 16px; margin-bottom: 4px; }
.block { margin: 22px 0 6px; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 2px 10px; }
.block-head h2 { margin: 0; font-size: 17px; font-weight: 600; font-stretch: 112%; }
.hint { color: var(--muted); font-size: 12.5px; text-align: right; }
.hint.under { text-align: left; margin: 8px 2px 0; }
.empty { color: var(--muted); list-style: none; padding: 14px 2px; margin: 0; }
.fine { color: var(--muted); font-size: 12.5px; }
.alert { background: var(--vault-2); color: var(--text); padding: 11px 14px; border-radius: var(--r-ctl); font-size: 14px; margin: 0 0 14px; }
.alert.bad { background: var(--down-soft); color: #ffd3cf; }
.alert.muted { color: var(--muted); }

/* ---------- price chart ---------- */
.chart-panel { padding: 14px 6px 8px 14px; }
.chart-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-right: 8px; flex-wrap: wrap; }
.quote { display: flex; align-items: baseline; gap: 10px; }
.sym { color: var(--muted); font-size: 13px; font-weight: 500; }
.bid { font-size: 24px; font-weight: 600; font-stretch: 125%; letter-spacing: -0.01em; }
.tf { display: inline-flex; background: var(--black); border-radius: 999px; padding: 3px; }
.tf button, .seg button {
  font: 500 12.5px/1 var(--font); color: var(--muted); background: none; border: 0;
  padding: 7px 10px; border-radius: 999px; cursor: pointer; min-width: 40px;
}
.tf button[aria-pressed="true"], .seg button[aria-pressed="true"] { background: var(--gold); color: #000; }
.chart { height: 290px; margin-top: 10px; position: relative; }
.gchart { height: 210px; background: var(--vault); border-radius: var(--r-panel); padding: 10px 4px 4px 10px; position: relative; }
.chart-msg { color: var(--muted); margin: 0; padding: 40px 10px; text-align: center; font-size: 13.5px; }
.chart-note { color: var(--muted); font-size: 12.5px; margin: 6px 8px 4px 0; }

/* ---------- live trade ---------- */
.trade { background: var(--vault); border-radius: var(--r-panel); padding: 16px 16px 12px; margin-bottom: 14px; }
.trade-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.trade-id { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.side { font-weight: 700; font-stretch: 125%; font-size: 18px; }
.trade.buy .side { color: var(--up); }
.trade.sell .side { color: var(--down); }
.tsym { font-weight: 600; font-size: 16px; }
.lots { color: var(--muted); font-size: 13px; }
.pl { text-align: right; display: flex; flex-direction: column; line-height: 1.15; }
.pl > .num { font-size: 26px; font-weight: 600; font-stretch: 125%; letter-spacing: -0.015em; }
.pl small { font-size: 13px; font-weight: 500; opacity: 0.85; margin-top: 2px; }

.ruler { margin: 22px 2px 4px; }
.track { position: relative; height: 30px; }
.track i { position: absolute; bottom: 6px; width: 1px; height: 7px; background: var(--seam); transform: translateX(-0.5px); }
.track i.major { height: 12px; background: #4a4234; }
.track::before { content: ""; position: absolute; left: 0; right: 0; bottom: 6px; height: 1px; background: #4a4234; }
.fill { position: absolute; bottom: 4px; height: 5px; border-radius: 3px; }
.fill.up { background: var(--up); }
.fill.down { background: var(--down); }
.fill.flat { background: transparent; }
.entry-mark { position: absolute; bottom: 0; width: 2px; height: 22px; background: var(--gold); transform: translateX(-1px); border-radius: 1px; }
.needle { position: absolute; bottom: 0; width: 2px; height: 30px; background: var(--text); transform: translateX(-1px); }
.needle b {
  position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
  font: 600 12px/1 var(--font); font-variant-numeric: tabular-nums; white-space: nowrap;
  background: var(--text); color: #000; padding: 4px 6px; border-radius: 6px;
}
@media (prefers-reduced-motion: no-preference) {
  .needle, .fill { transition: left 0.6s ease, width 0.6s ease; }
}
.ruler-labels { position: relative; height: 18px; font-size: 11.5px; color: var(--muted); margin-top: 4px; font-variant-numeric: tabular-nums; }
.ruler-labels span { position: absolute; top: 0; white-space: nowrap; }
.ruler-labels .at-c { transform: translateX(-50%); }
.ruler-labels .at-r { transform: translateX(-100%); }
.ruler-labels .sl { color: var(--down); }
.ruler-labels .tp { color: var(--up); }
.ruler-labels .mid { color: var(--gold); }
.needle.edge-r b { left: auto; right: -2px; transform: none; }
.needle.edge-l b { left: -2px; transform: none; }
.no-sl { color: var(--muted); font-size: 13px; margin: 14px 0 4px; }

.levels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0 0; }
.levels div { min-width: 0; }
.levels dt { color: var(--muted); font-size: 11.5px; }
.levels dd { margin: 1px 0 0; font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.opened { color: var(--muted); font-size: 12.5px; margin: 12px 0 0; padding-top: 10px; border-top: 1px solid var(--seam); }

/* ---------- money + stats ---------- */
.money-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 4px 2px 6px; }
.money-strip > div { display: flex; flex-direction: column; min-width: 0; }
.money-strip .num { font-size: 16px; font-weight: 600; font-stretch: 112%; overflow: hidden; text-overflow: ellipsis; }
.stat-label { color: var(--muted); font-size: 12px; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--seam); border-radius: var(--r-panel); overflow: hidden; }
.stat { background: var(--vault); padding: 13px 14px; display: flex; flex-direction: column; min-width: 0; }
.stat-value { font-size: 22px; font-weight: 600; font-stretch: 125%; letter-spacing: -0.01em; line-height: 1.25; }
.stat-sub { color: var(--muted); font-size: 12px; }

/* ---------- lists ---------- */
.hist-list, .pos-list, .acc-list { list-style: none; margin: 0; padding: 0; }
.hist, .pos { display: flex; justify-content: space-between; gap: 12px; padding: 11px 2px; border-bottom: 1px solid var(--seam); }
.hist:last-child, .pos:last-child { border-bottom: 0; }
.hist-l, .pos-l { display: flex; flex-direction: column; min-width: 0; }
.hist-r, .pos-r { display: flex; flex-direction: column; align-items: flex-end; text-align: right; flex: none; }
.hist-sym, .pos-sym { font-weight: 600; font-size: 14.5px; }
.hist-px, .pos-px, .pos-lv { color: var(--muted); font-size: 12.5px; }
.pos-lv { white-space: pre; }
.hist-r > .num, .pos-r > .num { font-weight: 600; font-size: 15px; }
.hist-time { color: var(--muted); font-size: 12px; }
.small { font-size: 12.5px; font-weight: 500 !important; }
.more-btn { margin: 6px 2px 0; }

.acc-list { display: flex; flex-direction: column; gap: 8px; }
.acc-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--vault); border: 1px solid transparent; text-decoration: none; }
.acc-row:active { filter: brightness(1.15); }
.acc-row.is-main { background: rgba(253, 182, 3, 0.17); border-color: rgba(253, 182, 3, 0.45); }
.acc-row.is-own { background: #0E3121; border-color: rgba(52, 199, 123, 0.45); }
.acc-logo { border-radius: 50%; flex: none; }
.acc-initial {
  width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--vault-2); color: var(--gold); font-weight: 700; font-stretch: 125%;
}
.acc-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.acc-name { font-weight: 600; font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-row.is-main .acc-name { font-stretch: 125%; }
.acc-meta { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-fig { display: flex; flex-direction: column; align-items: flex-end; flex: none; }
.acc-fig > .num:first-child { font-weight: 600; font-size: 15.5px; }

/* ---------- account page ---------- */
.page-head { padding: 8px 2px 14px; }
.page-head h1 { margin: 0; font-size: 26px; font-weight: 700; font-stretch: 125%; letter-spacing: -0.01em; line-height: 1.15; }
.page-head .sub { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.acc-head { display: flex; align-items: flex-start; gap: 6px; }
.acc-head > div { min-width: 0; }
.acc-head h1 { overflow-wrap: anywhere; }
.back { display: grid; place-items: center; width: 40px; height: 40px; margin: -4px 0 0 -10px; border-radius: 50%; flex: none; }
.back svg { width: 24px; height: 24px; fill: none; stroke: var(--text); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.open-pl { display: flex; flex-direction: column; padding: 16px; }
.open-pl .big { font-size: 34px; font-weight: 600; font-stretch: 125%; letter-spacing: -0.02em; line-height: 1.15; }
.rows { margin: 0; padding: 0 2px; }
.rows > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--seam); }
.rows > div:last-child { border-bottom: 0; }
.rows dt { color: var(--muted); }
.rows dd { margin: 0; font-weight: 500; text-align: right; }
.legend { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.key { display: inline-block; width: 16px; height: 0; border-top: 2px solid var(--gold); margin-left: 6px; }
.key:first-child { margin-left: 0; }
.key.dash { border-top: 2px dashed rgba(242, 236, 223, 0.6); }

/* ---------- forms + buttons ---------- */
.login { min-height: calc(100vh - 60px); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px 4px; }
.login-logo { border-radius: 50%; }
.h-msg { font-size: 22px; font-weight: 700; font-stretch: 112%; margin: 18px 0 6px; }
.form { width: 100%; max-width: 340px; margin-top: 28px; display: flex; flex-direction: column; gap: 12px; text-align: left; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.field input {
  font: 400 16px/1.3 var(--font); color: var(--text); background: var(--vault); border: 1px solid var(--seam);
  border-radius: var(--r-ctl); padding: 13px 14px; outline: none;
}
.field input:focus { border-color: var(--gold); }
.form-error { color: var(--down); font-size: 13.5px; margin: 0; }
.form-ok { color: var(--up); font-size: 13.5px; margin: 0; }
.btn {
  display: inline-flex; justify-content: center; align-items: center; gap: 8px;
  font: 600 16px/1 var(--font); font-stretch: 112%; color: #000; background: var(--gold);
  border: 0; border-radius: var(--r-ctl); padding: 15px 20px; cursor: pointer; text-decoration: none; margin-top: 4px;
}
.btn:disabled { opacity: 0.6; }
.btn.ghost { background: var(--vault); color: var(--text); }
.btn.wide { width: 100%; }
.link { background: none; border: 0; color: var(--gold); font: 500 14px/1.4 var(--font); cursor: pointer; padding: 6px 0; align-self: center; }
.notice { max-width: 360px; background: var(--vault); border-radius: var(--r-panel); padding: 14px 16px; margin: 26px 0 18px; text-align: left; font-size: 14px; }
.notice p { margin: 0 0 8px; }
.notice p:last-child { margin: 0; }
.login .fine { margin-top: 22px; }
.seg { display: inline-flex; flex-wrap: wrap; background: var(--vault); border-radius: 999px; padding: 3px; }
.seg button { padding: 10px 14px; }
#install .btn { margin-top: 12px; }

/* ---------- bottom nav ---------- */
#nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: flex; justify-content: center;
  background: rgba(0, 0, 0, 0.92); border-top: 1px solid var(--seam);
  padding-bottom: env(safe-area-inset-bottom);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.nav-item {
  flex: 1; max-width: 174px; height: var(--nav-h); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  color: var(--muted); text-decoration: none; font-size: 11.5px; font-weight: 500;
}
.nav-item svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav-item.is-active { color: var(--gold); }

@media (min-width: 560px) {
  #app { padding-top: 28px; }
}
@media (max-width: 360px) {
  .levels { grid-template-columns: repeat(2, 1fr); }
  .bid { font-size: 21px; }
  .pl > .num { font-size: 22px; }
}

/* ---------- chat ---------- */
:root { --mine: #33270a; }
.nav-item { max-width: 130px; }
.nav-icon { position: relative; display: inline-flex; }
.badge {
  position: absolute; top: -6px; left: 14px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: var(--gold); color: #000;
  font: 700 11px/18px var(--font); text-align: center; font-variant-numeric: tabular-nums;
}
body.in-chat #app { padding-bottom: calc(var(--nav-h) + 92px + env(safe-area-inset-bottom)); }
.chat-top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 6; background: var(--black);
  margin: 0 -16px; padding: 4px 16px 6px;
}
.chat-head { display: flex; align-items: center; gap: 12px; padding: 4px 0 8px; }
.chat-title { min-width: 0; }
.chat-title h1 { margin: 0; font-size: 19px; font-weight: 700; font-stretch: 125%; line-height: 1.2; }
.chat-title .sub { margin: 1px 0 0; color: var(--muted); font-size: 12.5px; }
.pinned { display: flex; align-items: stretch; background: var(--vault); border-radius: 12px; margin-bottom: 4px; }
.pinned-main {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; text-align: left;
  background: none; border: 0; color: var(--text); padding: 9px 4px 9px 12px; cursor: pointer; font: inherit;
}
.pinned-main svg, .pinned-x svg, .icon-btn svg, .jump svg {
  width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.pinned-main svg { color: var(--gold); }
.pinned-main > span { min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.pinned-main b { color: var(--gold); font-size: 12.5px; font-weight: 600; }
.pinned-main span span { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pinned-x, .icon-btn { background: none; border: 0; color: var(--muted); padding: 0 12px; cursor: pointer; display: grid; place-items: center; }
.chat-earlier { text-align: center; padding: 6px 0; }

.msgs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.day { align-self: center; margin: 14px 0 6px; }
.day span { display: inline-block; background: var(--vault-2); color: var(--muted); font-size: 12px; padding: 4px 11px; border-radius: 999px; }
.msg { display: flex; align-items: flex-end; gap: 8px; }
.msg:not(.cont) { margin-top: 8px; }
.msg.mine { justify-content: flex-end; }
.avatar { width: 32px; flex: none; align-self: flex-end; }
.avatar img { display: block; border-radius: 50%; }
.ini {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--vault-2); font-weight: 700; font-stretch: 125%; font-size: 14px;
}
.bubble {
  position: relative; min-width: 0; max-width: min(80%, 380px); background: var(--vault);
  padding: 7px 11px 8px; border-radius: 16px; cursor: pointer; overflow-wrap: anywhere;
}
.msg.theirs.last .bubble { border-bottom-left-radius: 5px; }
.msg.mine .bubble { background: var(--mine); }
.msg.mine.last .bubble { border-bottom-right-radius: 5px; }
.msg.admin .bubble { box-shadow: inset 0 0 0 1px rgba(253, 182, 3, 0.4); }
.bubble:focus-visible { outline-offset: 1px; }
.who { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.tag { font-size: 10.5px; font-weight: 700; color: #000; background: var(--gold); border-radius: 4px; padding: 1px 5px; line-height: 1.4; }
.text { white-space: pre-wrap; font-size: 15px; line-height: 1.42; }
.text::after { content: ""; display: inline-block; width: 64px; height: 1px; }
.text a { color: var(--gold); text-decoration: underline; text-underline-offset: 2px; }
.meta { position: absolute; right: 10px; bottom: 5px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.rq {
  display: block; background: rgba(242, 236, 223, 0.06); border-left: 2px solid var(--gold); border-radius: 0;
  padding: 4px 9px; margin: 2px 0 6px; font-size: 13px; cursor: pointer;
}
.rq b { display: block; font-weight: 600; font-size: 12.5px; }
.rq span { color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.chat-empty { list-style: none; color: var(--muted); text-align: center; padding: 48px 12px; }
@media (prefers-reduced-motion: no-preference) {
  .msg.flash .bubble { animation: flash 1.4s ease; }
  @keyframes flash { 0%, 35% { background: rgba(253, 182, 3, 0.32); } }
}

.composer {
  position: fixed; left: 0; right: 0; z-index: 9; max-width: 520px; margin: 0 auto;
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + var(--kb, 0px));
  padding: 8px 12px; background: rgba(0, 0, 0, 0.96); border-top: 1px solid var(--seam);
}
body.typing #nav { display: none; }
body.typing .composer { bottom: calc(env(safe-area-inset-bottom) + var(--kb, 0px)); }
.composer-row { display: flex; align-items: flex-end; gap: 8px; }
.composer textarea {
  flex: 1; min-width: 0; resize: none; font: 400 16px/1.35 var(--font); color: var(--text);
  background: var(--vault); border: 1px solid var(--seam); border-radius: 21px; padding: 9px 15px; max-height: 132px; outline: none;
}
.composer textarea:focus { border-color: rgba(253, 182, 3, 0.6); }
.send { width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--gold); display: grid; place-items: center; flex: none; cursor: pointer; }
.send svg { width: 20px; height: 20px; fill: none; stroke: #000; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.send:disabled { background: var(--vault-2); cursor: default; }
.send:disabled svg { stroke: var(--muted); }
.replybar { display: flex; align-items: center; gap: 4px; padding: 0 0 8px; }
.replybar .rq { flex: 1; min-width: 0; margin: 0; cursor: default; }
.composer-note { margin: 2px 4px; font-size: 13px; color: var(--muted); text-align: center; }
.composer-note.bad { color: var(--down); text-align: left; margin-top: 6px; }
.jump {
  position: fixed; z-index: 8; width: 40px; height: 40px; border-radius: 50%; border: 0;
  right: max(16px, calc(50% - 244px)); bottom: calc(var(--nav-h) + 76px + env(safe-area-inset-bottom) + var(--kb, 0px));
  background: var(--vault-2); color: var(--text); display: grid; place-items: center; cursor: pointer;
}
body.typing .jump { bottom: calc(76px + env(safe-area-inset-bottom) + var(--kb, 0px)); }
.toast {
  position: fixed; z-index: 30; left: 50%; transform: translateX(-50%); max-width: calc(100% - 32px);
  bottom: calc(var(--nav-h) + 90px + env(safe-area-inset-bottom) + var(--kb, 0px));
  background: var(--text); color: #000; padding: 8px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 500; text-align: center;
}
.sheet-backdrop { position: fixed; inset: 0; z-index: 20; background: rgba(0, 0, 0, 0.6); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 520px; background: var(--vault); border-radius: 18px 18px 0 0; padding: 8px 10px calc(12px + env(safe-area-inset-bottom)); }
.sheet-preview { color: var(--muted); font-size: 13.5px; padding: 8px 10px 12px; margin: 0 0 4px; border-bottom: 1px solid var(--seam); overflow-wrap: anywhere; }
.sheet-preview b { font-weight: 600; margin-right: 4px; }
.sheet-btn {
  display: block; width: 100%; text-align: left; background: none; border: 0; color: var(--text);
  font: 500 16px/1.2 var(--font); padding: 14px 10px; border-radius: 10px; cursor: pointer;
}
.sheet-btn:active { background: var(--vault-2); }
.sheet-btn.danger { color: var(--down); }
.sheet-btn.confirm { background: var(--down-soft); }
.sheet-btn.cancel { color: var(--muted); text-align: center; margin-top: 4px; }


/* ---------- 1.3: guests, VIP, memberships, tablets ---------- */
:root { --tg: #1C8ADB; --guest: #0F2740; --guest-line: #2A5F96; --guest-text: #A9CFF5; }

/* locked chart and levels */
.chart-panel.locked { position: relative; padding: 0; overflow: hidden; }
.chart.fake { margin: 0; height: 300px; }
.chart.fake svg { width: 100%; height: 100%; display: block; filter: blur(3px); opacity: 0.5; }
.lock-over {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  text-align: center; padding: 16px 22px; background: linear-gradient(180deg, rgba(21, 18, 13, 0.55), rgba(21, 18, 13, 0.85));
}
.lock-over b { font-size: 16px; font-weight: 700; font-stretch: 112%; max-width: 30ch; text-wrap: balance; }
.lock-over p { margin: 0 0 6px; color: #CFC7B7; font-size: 13.5px; max-width: 38ch; }
.lock-ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--gold-soft); color: var(--gold); }
.lock-ico svg, .pos-lock svg, .banner > svg, .guest-bar > svg, .mc-ico svg, .vip-ico svg, .guest-btn svg, .tg-ico svg, .tg-out svg, .ll-ico svg, .link-list > a > svg {
  width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none;
}
.lock-over .btn { margin-top: 2px; padding: 11px 22px; font-size: 15px; }
.btn.small { padding: 8px 14px; font-size: 13.5px; margin: 0; border-radius: 9px; }
.levels-lock { position: relative; margin-top: 14px; border-radius: 12px; overflow: hidden; min-height: 104px; background: var(--vault-2); }
.levels-lock .levels { margin: 0; padding: 14px 12px; }
.levels.fake { filter: blur(4px); opacity: 0.35; }
.lock-over.small { gap: 6px; padding: 10px 12px; font-size: 13px; color: var(--text); font-weight: 500; background: rgba(21, 18, 13, 0.55); }
.lock-over.small .lock-ico { width: 26px; height: 26px; }
.lock-over.small .lock-ico svg { width: 15px; height: 15px; }
.pos-lock { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12.5px; }
.pos-lock svg { width: 13px; height: 13px; }

/* membership banners and VIP card */
.banner { display: flex; align-items: center; gap: 10px; border-radius: 12px; padding: 10px 12px; margin: 0 0 14px; font-size: 13.5px; }
.banner p { margin: 0; flex: 1; min-width: 0; }
.banner.gold { background: rgba(253, 182, 3, 0.14); color: #FFE6A6; }
.banner.gold > svg { color: var(--gold); }
.banner.warn { background: var(--down-soft); color: #FFD3CF; }
.banner-btn { flex: none; font-weight: 700; font-size: 13.5px; color: #000; background: var(--gold); border-radius: 8px; padding: 7px 12px; text-decoration: none; }
.vip-card { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; align-items: center; margin: 22px 0 8px; padding: 16px; border-radius: 18px; background: rgba(253, 182, 3, 0.1); border: 1px solid rgba(253, 182, 3, 0.35); }
.vip-card b { font-size: 15.5px; font-stretch: 112%; display: block; margin-bottom: 2px; }
.vip-card p { margin: 0; color: #CFC7B7; font-size: 13.5px; }
.vip-card .btn { grid-column: 1 / -1; margin-top: 6px; }
.vip-ico, .mc-ico { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold); }
.vip-ico svg, .mc-ico svg { width: 21px; height: 21px; }

/* guests */
.guest-bar { display: flex; align-items: flex-start; gap: 10px; background: var(--guest); border: 1px solid var(--guest-line); color: var(--guest-text); border-radius: 12px; padding: 10px 12px; margin: 0 0 12px; font-size: 13.5px; }
.guest-bar p { margin: 0; }
.guest-bar b { color: #DCEBFB; }
.guest-bar > svg { margin-top: 2px; }
.guest-bar.vip { background: rgba(253, 182, 3, 0.1); border-color: rgba(253, 182, 3, 0.4); color: #E9DCC0; }
.guest-bar.vip b { color: var(--gold); }
.acc-row.is-vip { cursor: default; }
.mc-renew.two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.btn.ghost-gold { background: transparent; color: var(--gold); box-shadow: inset 0 0 0 1px rgba(253, 182, 3, 0.6); }
.or { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 340px; color: var(--muted); font-size: 12.5px; margin: 16px 0 12px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--seam); }
.btn.guest-btn { width: 100%; max-width: 340px; background: var(--guest); color: var(--guest-text); border: 1px solid var(--guest-line); margin: 0; }
/* sign-in: Member / Guest switch */
.usertype { display: grid; grid-template-columns: 1fr 1fr; width: 100%; max-width: 340px; margin-top: 28px; background: var(--vault); border-radius: 999px; padding: 4px; }
.usertype button { font: 600 15px/1 var(--font); color: var(--muted); background: none; border: 0; border-radius: 999px; padding: 11px 10px; cursor: pointer; }
.usertype button[aria-selected="true"] { background: var(--gold); color: #000; }
.usertype + .form, .usertype ~ .guest-pane { margin-top: 20px; }
.form .fine { text-align: center; margin: 10px 0 0; }
.guest-info { display: flex; gap: 10px; align-items: flex-start; background: var(--guest); border: 1px solid var(--guest-line); color: var(--guest-text); border-radius: 12px; padding: 12px 14px; font-size: 14px; }
.guest-info b { color: #DCEBFB; }
.guest-info p { margin: 0; }
.guest-info svg { width: 18px; height: 18px; flex: none; margin-top: 2px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.guest-pane .btn.guest-btn { max-width: none; }
.guest-pane { min-height: 302px; }          /* same height as the Member form, so the logo doesn't jump */
.alert.warn { background: rgba(253, 182, 3, 0.14); color: #FFE6A6; }
.login-notice { max-width: 340px; margin: 18px 0 0; text-align: left; }

/* accounts list extras */
.acc-name { display: flex; align-items: center; gap: 7px; min-width: 0; }
.acc-name .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill { flex: none; font-size: 11px; font-weight: 700; line-height: 1; padding: 4px 7px; border-radius: 999px; font-stretch: 100%; }
.pill.you { background: var(--up); color: #04220F; }
.pill.green { background: rgba(52, 199, 123, 0.18); color: #8FE3B6; }
.pill.amber { background: rgba(253, 182, 3, 0.2); color: #FFD979; }
.pill.red { background: var(--down-soft); color: #FFB3AC; }
.pill.grey { background: var(--vault-2); color: var(--muted); }
.acc-logo { background: #000; }

/* Live trade / Last trade label under "Buy XAUUSD" */
.trade-left { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.trade-kind { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; letter-spacing: 0.01em; color: var(--muted); white-space: nowrap; }
.trade-kind.live { color: var(--up); }
.trade-kind.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--up); }
.trade-kind.last { color: var(--gold); }
.trade-kind .lots { font-weight: 500; letter-spacing: 0; }
.trade-id { flex-wrap: nowrap; white-space: nowrap; }
.pl { flex: none; }
.pl > .num { white-space: nowrap; }
@media (max-width: 400px) { .pl > .num { font-size: 22px; } .side { font-size: 17px; } .tsym { font-size: 15px; } .trade-kind { font-size: 11.5px; } .trade .trade-top { gap: 8px; } }
.lw-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 12px; flex-wrap: wrap; }
.lw-none { color: var(--muted); font-size: 12.5px; }
.chip { font-size: 11.5px; font-weight: 700; padding: 4px 9px; border-radius: 999px; }
.chip.gold { background: var(--gold); color: #000; }
.levels.three { grid-template-columns: repeat(3, 1fr); }

/* locked chat */
.chat-locked { position: relative; min-height: 380px; border-radius: 18px; overflow: hidden; margin-top: 6px; }
.msgs.fake { filter: blur(3px); opacity: 0.5; padding: 10px 4px; }
.msgs.fake .text { height: 30px; }
.chat-locked .lock-over { background: linear-gradient(180deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.85)); }

/* More page */
.member-card { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 12px; align-items: center; padding: 14px 16px; border-radius: 18px; margin-bottom: 14px; background: rgba(253, 182, 3, 0.1); border: 1px solid rgba(253, 182, 3, 0.35); }
.member-card.soon { border-color: rgba(253, 182, 3, 0.7); }
.member-card.ended { background: var(--down-soft); border-color: rgba(240, 86, 74, 0.45); }
.member-card.ended .mc-ico { background: rgba(240, 86, 74, 0.2); color: #FFB3AC; }
.member-card.guest { background: var(--guest); border-color: var(--guest-line); }
.member-card.guest .mc-ico { background: rgba(169, 207, 245, 0.15); color: var(--guest-text); }
.member-card.admin { grid-template-columns: auto 1fr; }
.mc-body { display: flex; flex-direction: column; min-width: 0; }
.mc-body b { font-size: 16px; font-weight: 700; font-stretch: 112%; }
.mc-body span { color: #CFC7B7; font-size: 13px; }
.mc-left { text-align: right; line-height: 1.05; }
.mc-left .num { display: block; font-size: 28px; font-weight: 700; font-stretch: 125%; color: var(--gold); }
.mc-left small { color: var(--muted); font-size: 11.5px; }
.mc-renew { grid-column: 1 / -1; margin-top: 8px; }
.mc-renew .btn { width: 100%; }
.tg-card { display: flex; align-items: center; gap: 14px; background: var(--tg); color: #fff; text-decoration: none; border-radius: 16px; padding: 14px 16px; }
.tg-ico { width: 42px; height: 42px; border-radius: 12px; background: rgba(255, 255, 255, 0.18); display: grid; place-items: center; flex: none; }
.tg-ico svg { width: 20px; height: 20px; }
.tg-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.tg-text b { font-size: 16px; font-weight: 700; }
.tg-text span { font-size: 13px; color: rgba(255, 255, 255, 0.78); }
.tg-out { opacity: 0.85; }
.link-list { display: flex; flex-direction: column; margin-top: 14px; }
.link-list > a { display: flex; align-items: center; gap: 14px; padding: 12px 2px; text-decoration: none; color: var(--text); font-size: 15.5px; border-bottom: 1px solid var(--seam); }
.link-list > a:last-child { border-bottom: 0; }
.link-list > a > span:nth-child(2) { flex: 1; min-width: 0; }
.link-list > a > svg { color: var(--muted); }
.ll-ico { width: 34px; height: 34px; border-radius: 10px; background: var(--vault); display: grid; place-items: center; color: var(--muted); flex: none; }
.ll-two { display: flex; flex-direction: column; }
.ll-two small { color: var(--muted); font-size: 12.5px; }

/* Terms and Privacy */
.doc { max-width: 68ch; font-size: 15px; line-height: 1.65; color: #E4DDCE; padding: 0 2px; }
.doc h2 { font-size: 16.5px; font-weight: 700; font-stretch: 112%; color: var(--text); margin: 22px 0 6px; }
.doc p { margin: 0 0 10px; }
.doc ul { margin: 0 0 10px; padding-left: 20px; }
.doc li { margin-bottom: 6px; }
.doc li::marker { color: var(--gold); }
.doc strong { color: var(--text); }

/* ---------- tablets and wider screens ---------- */
/* Portrait tablets: one wide column. Landscape tablets and computers: two columns. */
@media (min-width: 768px) {
  #app { max-width: 760px; padding-left: 28px; padding-right: 28px; }
  .nav-item { max-width: 160px; }
  .chart, .chart.fake { height: 300px; }
  .gchart { height: 240px; }
  .composer, .sheet { max-width: 760px; }
  .lock-over b { font-size: 18px; }
  .acc-row { padding: 14px 18px; }
}
/* Account page: one column like the old version. Phones keep the old order;
   tablets and computers move the Growth chart up to the top. */
.ac { display: flex; flex-direction: column; }
.ac-pl { order: 1; } .ac-rows { order: 2; } .ac-perf { order: 3; } .ac-pos { order: 4; } .ac-growth { order: 5; } .ac-recent { order: 6; }
@media (min-width: 768px) {
  .ac-growth { order: 0; }
  .ac-growth { margin-bottom: 16px; }
  .ac-growth .block { margin-top: 0; }
}
@media (min-width: 1000px) {
  body[data-page="golddit"] #app { max-width: 1120px; }
  .chart, .chart.fake { height: 360px; }
  /* Signals: chart across the top, then the trade, then Performance and Growth side by side */
  .gd { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "chart chart" "trade trade" "perf growth" "recent recent"; column-gap: 24px; align-items: start; }
  .gd-chart { grid-area: chart; }
  .gd-trade { grid-area: trade; }
  .gd-perf { grid-area: perf; }
  .gd-growth { grid-area: growth; }
  .gd-recent { grid-area: recent; }
  .gd-perf .block, .gd-growth .block { margin-top: 10px; }
  .gd-growth .gchart { height: 214px; }
}
@media (min-width: 1200px) {
  .chart, .chart.fake { height: 400px; }
}

/* ---------- 1.5: Renew page ---------- */
.renew-sum { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; background: rgba(253, 182, 3, 0.1); border: 1px solid rgba(253, 182, 3, 0.35); }
.renew-sum.ended { background: var(--down-soft); border-color: rgba(240, 86, 74, 0.45); }
.renew-sum > div { display: flex; flex-direction: column; min-width: 0; }
.renew-sum b { font-size: 15.5px; font-weight: 600; }
.renew-price { text-align: right; }
.renew-price b { font-size: 20px; font-stretch: 112%; color: var(--gold); }
.pay-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pay-opt { display: flex; align-items: center; gap: 10px; text-align: left; background: var(--vault); color: var(--text); border: 1px solid var(--seam); border-radius: 12px; padding: 12px; font: 500 14.5px/1.3 var(--font); cursor: pointer; }
.pay-opt[aria-checked="true"] { border-color: var(--gold); background: rgba(253, 182, 3, 0.1); }
.pay-dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--muted); flex: none; }
.pay-opt[aria-checked="true"] .pay-dot { border-color: var(--gold); box-shadow: inset 0 0 0 3px var(--vault), inset 0 0 0 8px var(--gold); }
.pay-details { margin-top: 10px; background: var(--vault); border-radius: 12px; padding: 12px 14px; }
.pay-details p { margin: 0; font-size: 13.5px; }
.pay-text { margin: 0 0 10px; white-space: pre-wrap; font: 500 14px/1.55 var(--font); color: var(--text); overflow-wrap: anywhere; user-select: all; }
.renew-note { color: #CFC7B7; font-size: 14px; margin: 0 2px 12px; }
#sendreq svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 360px) { .pay-list { grid-template-columns: 1fr; } }

/* ---------- 1.6 ---------- */
/* Live chart header on one line: symbol and price (smaller), timeframes on the right */
.chart-head { flex-wrap: nowrap; }
.quote { min-width: 0; gap: 8px; }
.sym { font-size: 12px; white-space: nowrap; }
.bid { font-size: 17px; font-stretch: 112%; white-space: nowrap; }
.tf { flex: none; }
@media (max-width: 400px) {
  .tf button { padding: 6px 8px; min-width: 34px; font-size: 12px; }
}
@media (max-width: 360px) { .bid { font-size: 16px; } }

/* "Buy XAUUSD 0.58 lots" on the top line */
.trade-id .lots { font-size: 13px; font-weight: 500; color: var(--muted); }
.trade-id { overflow: hidden; min-width: 0; }
.trade.tight .pl > .num { font-size: 19px; }
.trade.tight .side { font-size: 16px; }
.trade.tight .tsym { font-size: 14px; }
.trade.tight .trade-id .lots { font-size: 11.5px; }
.trade.tight .trade-id { gap: 4px 5px; }
.trade.tighter .pl > .num { font-size: 16.5px; }
.trade.tighter .pl small { font-size: 12px; }
.trade.tighter .side { font-size: 15px; }
.trade.tighter .tsym { font-size: 13px; }
@media (max-width: 400px) { .trade-id { gap: 4px 6px; } .trade-id .lots { font-size: 12px; } }

/* Performance chart */
.perf-card { margin-top: 10px; background: var(--vault); border-radius: var(--r-panel); padding: 12px 12px 10px; }
.perf-top { display: flex; }
.perf-tf { display: grid; grid-template-columns: repeat(4, 1fr); width: 100%; background: var(--black); border: 1px solid var(--seam); }
.perf-tf button { padding: 8px 6px; min-width: 0; font-weight: 600; letter-spacing: 0.02em; }
.perf-legend { display: flex; gap: 16px; margin: 12px 2px 2px; font-size: 12px; color: var(--muted); }
.perf-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.lg-bar i { width: 4px; height: 11px; border-radius: 1px; display: inline-block; }
.lg-bar i + i { margin-left: -4px; }
.lg-bar i.up { background: var(--up); }
.lg-bar i.down { background: var(--down); height: 7px; align-self: flex-end; margin-bottom: 2px; }
.lg-line i { width: 14px; height: 2px; border-radius: 1px; background: var(--gold); display: inline-block; }
.perf-plot { position: relative; height: 200px; margin-top: 4px; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.perf-plot svg { display: block; }
.perf-plot .pg { stroke: rgba(242, 236, 223, 0.07); stroke-width: 1; }
.perf-plot .pg.zero { stroke: rgba(242, 236, 223, 0.22); stroke-dasharray: 3 3; }
.perf-plot text { font: 500 10.5px var(--font); fill: var(--muted); font-variant-numeric: tabular-nums; }
.perf-plot .pl-r { fill: #C9A24A; }
.perf-plot .pb.up { fill: var(--up); }
.perf-plot .pb.down { fill: var(--down); }
.perf-plot .pb.flat { fill: var(--muted); }
.perf-plot .pb.dim { opacity: 0.35; }
.perf-plot .phalo { fill: none; stroke: var(--vault); stroke-width: 5; stroke-linejoin: round; stroke-linecap: round; opacity: 0.9; }
.perf-plot .pline { fill: none; stroke: var(--gold); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.perf-plot .pdot { fill: var(--gold); stroke: var(--vault); stroke-width: 2; }
.perf-plot .pcross { stroke: rgba(253, 182, 3, 0.35); stroke-width: 1; }
.ptip {
  position: absolute; top: 0; transform: translateX(-50%); pointer-events: none; z-index: 2;
  display: flex; flex-direction: column; gap: 1px; min-width: 132px; padding: 7px 10px; border-radius: 10px;
  background: #2A251C; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45); font-size: 12px; line-height: 1.35; white-space: nowrap;
}
.ptip b { font-weight: 600; color: var(--text); }
.ptip .num { font-weight: 600; font-size: 13.5px; }
.ptip small { font-weight: 500; font-size: 12px; opacity: 0.85; }
.ptip .pg-txt { color: #E3C27A; }
.perf-sum { margin: 6px 2px 0; color: var(--muted); font-size: 12.5px; }
.perf-sum .num { font-weight: 600; }
.up { color: var(--up); }
.down { color: var(--down); }

/* Copier tab: every copier's ID and server */
.acc-id { color: #B9B0A1; font-size: 12px; line-height: 1.4; min-width: 0; }
.acc-id > span { display: inline-block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: top; }

/* Chat for free members: the free community chat (blue), live chat locked */
.free-chat {
  display: flex; align-items: center; gap: 12px; margin: 4px 0 12px; padding: 13px 14px; border-radius: 16px;
  background: var(--tg); color: #fff; text-decoration: none;
}
.fc-ico { width: 40px; height: 40px; border-radius: 12px; background: rgba(255, 255, 255, 0.18); display: grid; place-items: center; flex: none; }
.fc-ico svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.fc-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.fc-text b { font-size: 15.5px; font-weight: 700; }
.fc-text span { font-size: 12.5px; color: rgba(255, 255, 255, 0.82); line-height: 1.35; }
.fc-go { flex: none; background: #fff; color: #1C6FB0; font-weight: 700; font-size: 13.5px; padding: 8px 14px; border-radius: 999px; }
.chat-locked { min-height: 330px; margin-top: 0; }
.chat-locked .lock-ico { background: rgba(42, 171, 238, 0.16); color: #7CCBF5; }
.chat-locked .lock-over { background: linear-gradient(180deg, rgba(4, 16, 28, 0.45), rgba(4, 16, 28, 0.9)); }
.chat-locked .msgs.fake .bubble { background: rgba(42, 171, 238, 0.18); }

/* Refer & earn (copiers) */
.refer-card {
  display: flex; align-items: center; gap: 12px; margin: 0 0 14px; padding: 14px 16px; border-radius: 18px; text-decoration: none;
  background: linear-gradient(135deg, rgba(52, 199, 123, 0.16), rgba(253, 182, 3, 0.12)); border: 1px solid rgba(52, 199, 123, 0.4);
}
.rc-ico { width: 40px; height: 40px; border-radius: 12px; background: rgba(52, 199, 123, 0.2); color: #8FE3B6; display: grid; place-items: center; flex: none; }
.rc-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.rc-text b { font-size: 15.5px; font-weight: 700; }
.rc-text span { color: #CFC7B7; font-size: 12.5px; line-height: 1.35; }
.refer-card > svg, .rc-ico svg, .rh-ico svg, .ref-actions .btn svg {
  width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none;
}
.refer-card > svg { width: 18px; height: 18px; color: var(--muted); }
.ref-hero { text-align: center; padding: 20px 18px 18px; border-radius: 20px; background: linear-gradient(160deg, rgba(52, 199, 123, 0.18), rgba(253, 182, 3, 0.1)); border: 1px solid rgba(52, 199, 123, 0.35); }
.rh-ico { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: rgba(52, 199, 123, 0.2); color: #8FE3B6; }
.rh-amt { display: block; margin-top: 8px; font-size: 34px; font-weight: 700; font-stretch: 125%; color: var(--up); letter-spacing: -0.01em; }
.ref-hero p { margin: 4px auto 0; max-width: 34ch; color: #E4DCCD; font-size: 14px; }
.ref-link { background: var(--vault); border: 1px dashed #4a4234; border-radius: 12px; padding: 12px 14px; font-size: 13.5px; overflow-wrap: anywhere; user-select: all; }
.ref-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0 8px; }
.ref-actions .btn { margin: 0; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.ref-steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ref-steps li { counter-increment: step; display: grid; grid-template-columns: 30px 1fr; column-gap: 12px; }
.ref-steps li::before { content: counter(step); grid-row: span 2; width: 30px; height: 30px; border-radius: 50%; background: var(--gold-soft); color: var(--gold); display: grid; place-items: center; font-weight: 700; }
.ref-steps b { font-size: 14.5px; font-weight: 600; }
.ref-steps span { color: var(--muted); font-size: 13px; }
.ref-row .acc-fig .num:first-child { font-size: 14.5px; }
.ref-total { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--seam); border-radius: var(--r-panel); overflow: hidden; margin-bottom: 4px; }
.ref-total > div { background: var(--vault); padding: 13px 14px; display: flex; flex-direction: column; }
.ref-total b { font-size: 22px; font-weight: 600; font-stretch: 125%; }
.muted { color: var(--muted); }
.btn > svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.btn.wide:has(> svg) { display: flex; align-items: center; justify-content: center; gap: 8px; }

/* ---------- 1.6.1 ---------- */
/* Live Trade (green) and Close Trade (red): outlined, highlighted badges */
.trade-kind {
  align-self: flex-start; gap: 0; padding: 3px 8px; border-radius: 6px; border: 1.5px solid currentColor;
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; line-height: 1.2;
}
.trade-kind.live { color: #3FE08A; background: rgba(52, 199, 123, 0.14); border-color: #2DBE6C; box-shadow: 0 0 10px rgba(52, 199, 123, 0.18); }
.trade-kind.last { color: #FF7468; background: rgba(240, 86, 74, 0.14); border-color: #E5483B; box-shadow: 0 0 10px rgba(240, 86, 74, 0.16); }
.trade-kind.live i { display: none; }
@media (max-width: 400px) { .trade-kind { font-size: 11px; padding: 2px 7px; } }

/* Performance chart (account pages): axis titles and the growth-now tag */
.perf-plot { height: 230px; }
.perf-plot .pt { font: 600 10.5px var(--font); fill: var(--muted); }
.perf-plot .pbadge { fill: var(--gold); }
.perf-plot .pbadge-t { font: 700 10.5px var(--font); fill: #1A1405; }
@media (min-width: 768px) {
  .ac-perf { order: 0; margin-bottom: 4px; }
  .ac-perf .block { margin-top: 0; }
  .perf-plot { height: 260px; }
}

/* Chat for free members: fills the page down to the bottom bar, in any window size */
body.chat-free #app { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
body.chat-free .chat-locked { flex: 1; min-height: 260px; margin-bottom: 0; }
.chat-locked .msgs.fake { position: absolute; inset: 0; padding: 14px 12px; gap: 8px; filter: blur(2px); opacity: 0.8; overflow: hidden; }
.chat-locked .msgs.fake .msg { display: flex; }
.chat-locked .msgs.fake .msg.mine { justify-content: flex-end; }
.chat-locked .msgs.fake .bubble { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 14px; max-width: 82%; background: rgba(42, 171, 238, 0.16); }
.chat-locked .msgs.fake .mine .bubble { background: rgba(42, 171, 238, 0.26); }
.chat-locked .msgs.fake .fk { display: block; height: 8px; border-radius: 4px; background: rgba(169, 207, 245, 0.35); }
.chat-locked .msgs.fake .fk.who { width: 40%; height: 7px; background: rgba(124, 203, 245, 0.6); }
.chat-locked .msgs.fake .fk:last-child:not(:first-child) { width: 70%; }
.chat-locked .lock-over { background: radial-gradient(ellipse at center, rgba(4, 16, 28, 0.88) 0%, rgba(4, 16, 28, 0.72) 45%, rgba(4, 16, 28, 0.35) 100%); }
/* Short windows (split screen, a phone on its side): keep the lock and the button above the bottom bar */
@media (max-height: 600px) {
  body.chat-free .chat-head { padding: 0 0 4px; }
  body.chat-free .chat-head .brand-logo { width: 30px; height: 30px; }
  body.chat-free .chat-title h1 { font-size: 16px; }
  body.chat-free .free-chat { padding: 8px 12px; margin: 2px 0 8px; }
  body.chat-free .fc-ico { width: 32px; height: 32px; }
  body.chat-free .fc-text span { display: none; }
  body.chat-free .chat-locked { min-height: 170px; }
  body.chat-free .chat-locked .lock-over { gap: 4px; padding: 10px 16px; }
  body.chat-free .chat-locked .lock-over p { display: none; }
  body.chat-free .chat-locked .lock-over b { font-size: 15px; }
  body.chat-free .chat-locked .lock-ico { width: 28px; height: 28px; }
  body.chat-free .chat-locked .lock-over .btn { padding: 8px 18px; font-size: 14px; }
  body.chat-free #app { padding-bottom: calc(var(--nav-h) + 12px + env(safe-area-inset-bottom)); }
}
.perf-tf { grid-template-columns: repeat(5, 1fr); }

/* ---------- 1.6.2 ---------- */
/* Price above the chart: a touch smaller on phones, larger on wider screens,
   where the chart is also a little taller. */
@media (max-width: 400px) { .bid { font-size: 15.5px; } }
@media (min-width: 401px) { .bid { font-size: 20px; } .chart { height: 315px; } }
@media (min-width: 768px) { .chart, .chart.fake { height: 330px; } }
@media (min-width: 1000px) { .chart, .chart.fake { height: 390px; } }
@media (min-width: 1200px) { .chart, .chart.fake { height: 430px; } }
/* Trade result a little smaller */
.trade .pl > .num { font-size: 23px; }
.trade .pl small { font-size: 12.5px; }
@media (max-width: 400px) { .trade .pl > .num { font-size: 20px; } }
.trade.tight .pl > .num { font-size: 18px; }
.trade.tighter .pl > .num { font-size: 16px; }
.ref-actions.one { grid-template-columns: 1fr; }

/* ---------- 1.6.3 ---------- */
/* CLOSED / LIVE a little closer to "Sell XAUUSD", and a shorter pips marker,
   so its tag sits clear of the badge */
.trade-left { gap: 3px; }
.ruler { margin: 28px 2px 4px; }
.track { height: 24px; }
.needle { height: 20px; }
.needle b { bottom: 22px; }
.entry-mark { height: 16px; }
/* The price above the chart on phones: between 1.6.1 (17px) and 1.6.2 (15.5px) */
@media (max-width: 400px) { .bid { font-size: 16.25px; } }
.ref-group + .ref-group { margin-top: 16px; }
.ref-group .block-head h3 { margin: 0; font-size: 15.5px; font-weight: 600; }
.link-list .ll-two { display: flex; flex-direction: column; }
.link-list .ll-two small { color: var(--muted); font-size: 12.5px; line-height: 1.35; }

/* ---------- 1.6.4 ---------- */
/* Account page as it was: Growth (with Golddit) on top, on every screen */
.ac-growth { order: 0; margin-bottom: 16px; }
.ac-growth .block { margin-top: 0; }
.ac-perf { order: 3; margin-bottom: 0; }
.ac-perf .block { margin-top: 22px; }
/* The price above the chart: Janaka's sizes. (The chart keeps the 1.6.3
   heights: 290px on phones, 315px up to 767px, then 330 / 390 / 430px.) */
@media (max-width: 400px) { .bid { font-size: 20px; } }
@media (min-width: 401px) { .bid { font-size: 24px; } }

/* ---------- 1.7.0 ---------- */
/* Copier tab: How It Works card */
.guide-card {
  display: flex; align-items: center; gap: 12px; margin: 14px 0 6px; padding: 13px 16px; border-radius: 16px; text-decoration: none;
  background: var(--vault); border: 1px solid var(--seam);
}
.guide-card:hover { border-color: rgba(253, 182, 3, 0.45); }
.gc-ico { width: 40px; height: 40px; border-radius: 12px; background: var(--gold-soft); color: var(--gold); display: grid; place-items: center; flex: none; }
.gc-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.gc-text b { font-size: 15px; font-weight: 700; }
.gc-text span { color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.guide-card > svg, .gc-ico svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.guide-card > svg { width: 18px; height: 18px; color: var(--muted); }

/* How It Works page */
.guide-dl { margin: 4px 0 6px; }
.guide-dl svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.doc.guide { max-width: none; }
.guide .g-sec { padding: 2px 0 4px; }
.guide .g-sec + .g-sec { border-top: 1px solid var(--seam); margin-top: 8px; }
.guide .g-note { color: var(--muted); font-size: 13.5px; }
.g-steps { list-style: none; counter-reset: step; margin: 6px 0 12px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.g-steps li { counter-increment: step; display: grid; grid-template-columns: 30px 1fr; column-gap: 12px; margin: 0; }
.g-steps li::before { content: counter(step); grid-row: span 2; width: 30px; height: 30px; border-radius: 50%; background: var(--gold-soft); color: var(--gold); display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.g-steps b { font-size: 14.5px; font-weight: 600; color: var(--text); }
.g-steps span { color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.g-table { width: 100%; border-collapse: collapse; margin: 6px 0 10px; font-size: 14px; }
.g-table th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12.5px; padding: 0 10px 6px 0; }
.g-table th:last-child, .g-table td:last-child { text-align: right; padding-right: 0; }
.g-table td { padding: 7px 10px 7px 0; border-top: 1px solid var(--seam); }
.g-table td.num { color: var(--gold); font-weight: 600; }
/* The guide card sits at the end of the Copier tab and scrolls with the page. */
.acc-list + .guide-card, .fine + .guide-card { margin-top: 18px; }

/* ---------- 1.7.8 ---------- */
/* Sizes only (same fonts and styles): the price above the chart, the trade's result and the
   Performance figures a little smaller so they sit in proportion. */
@media (min-width: 401px) { .bid { font-size: 22px; } }
.trade .pl > .num { font-size: 21px; }
@media (max-width: 400px) { .trade .pl > .num { font-size: 19px; } }
.stat-value { font-size: 20px; }
@media (max-width: 400px) { .stat-value { font-size: 19px; } }

/* ---------- 1.7.11 ---------- */
/* Sizes only: "Buy XAUUSD" on the trade cards a little bigger (same font and style).
   On a narrow phone or with a long result it still steps down to fit (tight / tighter). */
.trade .trade-id .side { font-size: 21px; }
.trade .trade-id .tsym { font-size: 18px; }
@media (max-width: 400px) { .trade .trade-id .side { font-size: 19px; } .trade .trade-id .tsym { font-size: 16.5px; } }
.trade.tight .trade-id .side { font-size: 18px; }
.trade.tight .trade-id .tsym { font-size: 15.5px; }
.trade.tighter .trade-id .side { font-size: 16px; }
.trade.tighter .trade-id .tsym { font-size: 14px; }
/* 1.7.12: admin Referrals - the referrer's name on its own line, the details under it */
.ref-group .block-head { display: block; }
.ref-group .block-head h3 { margin: 0; }
.ref-group .block-head .hint { display: block; margin-top: 3px; text-align: left; }
/* ---------- 1.7.19 (owner): chat in a clean messenger look ----------
   others on the left (initials + dark bubble + name), you on the right (gold bubble),
   Golddit Desk with a gold frame and ADMIN badge, time inside the bubble, compact groups */
#msgs { gap: 0; padding-inline: 2px; }
#msgs .msg.row { display: flex; align-items: flex-start; justify-content: flex-start; gap: 8px; margin: 0; padding: 1.5px 0; background: none; box-shadow: none; border-radius: 0; }
#msgs .msg.row:not(.cont) { margin-top: 10px; }
#msgs .msg.row.mine { justify-content: flex-end; }
#msgs .msg.row .avatar { width: 32px; flex: none; align-self: flex-start; }
#msgs .msg.row .ini { width: 32px; height: 32px; font-size: 12px; font-weight: 700; letter-spacing: .02em; }
#msgs .msg.row .ini.adm { background: var(--gold); color: #000; }
#msgs .msg.row .bubble {
  position: relative; flex: 0 1 auto; min-width: 64px; max-width: min(78%, 480px); text-align: left;
  padding: 6px 11px 6px; border-radius: 16px; box-shadow: none;
  background: #1a1712; border: 1px solid rgba(242, 236, 223, 0.07);
}
#msgs .msg.row.theirs:not(.cont) .bubble { border-top-left-radius: 5px; }
#msgs .msg.row.mine:not(.cont) .bubble { border-top-right-radius: 5px; }
#msgs .msg.row.mine .bubble { background: #3a2d0b; border-color: rgba(253, 182, 3, 0.22); }
#msgs .msg.row.admin.theirs .bubble { background: linear-gradient(160deg, rgba(253, 182, 3, 0.16), rgba(253, 182, 3, 0.05)), #1a1712; border-color: rgba(253, 182, 3, 0.55); }
#msgs .mhead { display: flex; align-items: center; gap: 6px; margin-bottom: 1px; min-width: 0; }
#msgs .mhead .who { display: block; margin: 0; font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#msgs .adm-tag { flex: none; font-size: 9.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #000; background: var(--gold); border-radius: 4px; padding: 0 5px; line-height: 15px; }
#msgs .msg.row .text { font-size: 15px; line-height: 1.4; color: var(--text); overflow-wrap: anywhere; }
#msgs .msg.row .text::after { content: ""; display: inline-block; width: 52px; height: 1px; }
#msgs .msg.row .tm { position: absolute; right: 10px; bottom: 5px; font-size: 10.5px; color: rgba(242, 236, 223, 0.5); font-variant-numeric: tabular-nums; }
#msgs .msg.row.mine .tm { color: rgba(253, 220, 150, 0.6); }
#msgs .rq { display: block; background: rgba(0, 0, 0, 0.25); border-left: 3px solid var(--gold); border-radius: 6px; padding: 3px 8px; margin: 2px 0 5px; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#msgs .rq b { display: inline; font-weight: 700; font-size: 12.5px; color: var(--gold); }
#msgs .rq span { display: inline; -webkit-line-clamp: unset; }
#msgs .day { align-self: stretch; display: flex; align-items: center; gap: 10px; margin: 16px 0 4px; }
#msgs .day::before, #msgs .day::after { content: ""; flex: 1; height: 1px; background: rgba(242, 236, 223, 0.1); }
#msgs .day span { background: none; padding: 0; font-size: 11.5px; }
@media (min-width: 900px) { #msgs .msg.row .bubble { max-width: min(64%, 560px); } }
@media (prefers-reduced-motion: no-preference) { #msgs .msg.row.flash .bubble { animation: flash 1.4s ease; } }
/* GD initials: gold letters on a soft gold highlight (owner 1.7.19) */
#msgs .msg.row .ini.adm, #msgs .ini.adm { background: rgba(253, 182, 3, 0.16); color: var(--gold); box-shadow: none; }
/* 1.7.19 (owner: check the look) - trade card prices in plain white (the card used to make them all
   green on a buy); "Closed at" shows the result colour. */
.trade .levels dd { color: var(--text); }
.trade .levels dd.up { color: var(--up); }
.trade .levels dd.down { color: var(--down); }
/* 1.7.19 (owner): gold is only for Golddit Desk. Your own messages: a lighter grey bubble with your name;
   Golddit Desk's own messages keep the gold frame */
#msgs .msg.row.mine .bubble { background: #2a2620; border-color: rgba(242, 236, 223, 0.12); }
#msgs .msg.row.mine .tm { color: rgba(242, 236, 223, 0.5); }
#msgs .msg.row.admin .bubble, #msgs .msg.row.admin.mine .bubble { background: linear-gradient(160deg, rgba(253, 182, 3, 0.16), rgba(253, 182, 3, 0.05)), #1a1712; border-color: rgba(253, 182, 3, 0.55); }
#msgs .msg.row.mine .mhead { justify-content: flex-start; }
/* 1.7.19 (owner: guest chat colours) - the Telegram community banner stays blue; the locked live chat under
   it now looks like the real app chat (dark bubbles, gold lock) instead of blue */
.chat-locked { background: var(--vault); }
.chat-locked .lock-ico { background: var(--gold-soft); color: var(--gold); }
.chat-locked .msgs.fake .bubble { background: #1f1b15; border: 1px solid rgba(242, 236, 223, 0.06); }
.chat-locked .msgs.fake .mine .bubble { background: #2a2620; }
.chat-locked .msgs.fake .fk { background: rgba(242, 236, 223, 0.18); }
.chat-locked .msgs.fake .fk.who { background: rgba(253, 182, 3, 0.45); }
.chat-locked .lock-over { background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.7) 45%, rgba(0, 0, 0, 0.3) 100%); }
/* 1.7.19 app check-up: easier to tap on phones, a little clearer text */
@media (max-width: 600px) {
  .btn.small { min-height: 38px; padding: 9px 14px; }
  .more-btn { min-height: 40px; padding-inline: 6px; }
}
#msgs .msg.row .tm { color: rgba(242, 236, 223, 0.6); }
.acc-meta { color: #a59d90; }
.fc-text span { color: rgba(255, 255, 255, 0.95); }
/* 1.7.21 (owner): chart timeframe buttons just a little smaller than 1.7.19 (1.7.20 was too small) */
.tf { padding: 3px; }
.tf button { padding: 5px 8px; min-width: 34px; font-size: 11.75px; }   /* 1.7.24: smaller (between 1.7.20 and 1.7.21) */
@media (max-width: 600px) { .tf button { min-height: 26px; } }
@media (max-width: 400px) { .tf button { padding: 5px 7.5px; min-width: 32px; font-size: 11.75px; } }


/* ================= 1.7.25 (owner): text sizes for computers only =================
   Same layout as before; from 1024 px wide the text is a little bigger so it reads well on a
   computer screen. Phones and tablets are unchanged. */
@media (min-width: 1024px) {
  body { font-size: 16.5px; }
  #app { max-width: 820px; }
  .page-head h1 { font-size: 30px; }
  .block-head h2 { font-size: 19px; }
  .fine, .opened, .hist-px, .pos-px, .pos-lv, .pos-lock { font-size: 13.5px; }
  .stat-label, .stat-sub, .hist-time { font-size: 13px; }
  .stat-value { font-size: 25px; }
  .side { font-size: 20px; }
  .tsym { font-size: 17.5px; }
  .lots { font-size: 14px; }
  .levels dt { font-size: 12.5px; }
  .levels dd { font-size: 15.5px; }
  .money-strip .num { font-size: 17.5px; }
  .hist-sym, .pos-sym { font-size: 15.5px; }
  .hist-r > .num, .pos-r > .num { font-size: 16px; }
  .acc-name { font-size: 16.5px; }
  .acc-meta { font-size: 13.5px; }
  .rows > div { padding: 11px 0; }
  .link-list > a { font-size: 16.5px; }
  .nav-item { font-size: 12.5px; }
  .tf button { font-size: 12.5px; }
  /* chat */
  #msgs .msg.row .text { font-size: 16px; }
  #msgs .mhead .who { font-size: 14px; }
  #msgs .msg.row .tm { font-size: 11.5px; }
  #msgs .rq, #msgs .rq b { font-size: 13.5px; }
  #msgs .day span { font-size: 12.5px; }
  .composer, .sheet { max-width: 820px; }
}
/* 1.7.26 (owner): live trade card - Entry / Stop loss / Take profit / Now in the card colour again,
   like the earlier versions (green on a Buy, red on a Sell). The closed-trade card keeps 1.7.19. */
.trade:not(.last-trade) .levels dd { color: inherit; }
