/* Keep scroll gestures and keyboard navigation while hiding scrollbar tracks. */
* {scrollbar-width:none;}
*::-webkit-scrollbar {display:none;}
:root {
  color-scheme:dark;
  --bg:#10151c;
  --surface:#19212c;
  --line:#2c3745;
  --text:#e8edf4;
  --muted:#9aa9bb;
  --green:#18865d;
  --red:#bd424d;
  --violet:#7960c4;
  --blue:#4e79d8;
  font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  font-synthesis:none;
}
* {
  box-sizing:border-box;
}
body {
  margin:0;
  background:var(--bg);
  color:var(--text);
  -webkit-font-smoothing:antialiased;
}
button {
  font:inherit;
  cursor:pointer;
}
button,a {
  -webkit-tap-highlight-color:transparent;
}
a {
  color:inherit;
  text-decoration:none;
}
[hidden] {
  display:none!important;
}
button:disabled {
  cursor:not-allowed;
  opacity:.5;
}
button:focus-visible,a:focus-visible,[tabindex]:focus-visible {
  outline:none;
}
button {
  transition:background .16s,box-shadow .16s;
}
button:not(:disabled):active {
  transform:translateY(1px);
}
.site-header {
  height:76px;
  padding:0 32px;
  max-width:2200px;
  margin:auto;
  display:flex;
  align-items:center;
  gap:48px;
  border-bottom:1px solid var(--line);
  background:var(--surface);
}
.brand {
  display:flex;
  align-items:center;
  gap:10px;
  font-size:22px;
  letter-spacing:-.8px;
  font-weight:800;
}
.brand svg {
  width:29px;
  height:29px;
  fill:none;
  stroke:var(--green);
  stroke-width:2.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.market-label {
  display:flex;
  gap:15px;
  align-items:center;
  font-size:14px;
  font-weight:500;
}
.market-label>span {
  font-size:10px;
  padding:5px 8px;
  border:1px solid var(--line);
  border-radius:5px;
  color:var(--muted);
  font-weight:400;
}
.wallet {
  margin-left:auto;
  display:flex;
  align-items:center;
  gap:2px;
}
.wallet>span {
  grid-column:1 / -1;
  font-size:11px;
  color:var(--muted);
}
.wallet strong {
  font-size:17px;
  font-weight:600;
  font-variant-numeric:tabular-nums;
}
.wallet strong {white-space:nowrap;}
.wallet>.mode-control {margin-right:14px;}
.header-icon {display:grid;place-items:center;width:28px;height:36px;padding:3px;border:0;border-radius:7px;background:transparent;color:var(--muted);flex-shrink:0;}
.header-icon .lucide {width:21px;height:21px;}
.header-icon:hover,.header-icon:focus-visible {background:#eef4f0;color:var(--green);}
.lucide {display:inline-block;vertical-align:middle;flex-shrink:0;}
.history-nav button {display:inline-flex;align-items:center;justify-content:center;gap:4px;}
.history-nav .lucide {width:12px;height:12px;}
.mode-control {position:relative;display:inline-flex;align-items:center;}
.mode-select {white-space:nowrap;text-align:left;}
.mode-control>.lucide {position:absolute;right:6px;width:12px;height:12px;pointer-events:none;color:var(--muted);}
.mode-select {
  appearance:none;
  max-width:88px;
  height:28px;
  padding:3px 23px 3px 7px;
  border:1px solid var(--line);
  border-radius:6px;
  background:#f5f8f6;
  color:var(--text);
  font:inherit;
  font-size:12px;
  cursor:pointer;
}
.history-size {max-width:108px;min-width:100px;font-size:11px;}
.token-chart {touch-action:pan-y;user-select:none;cursor:grab;}
.token-chart.is-panning {cursor:grabbing;}
.token-chart.is-account {cursor:crosshair;touch-action:auto;}
.site-header {position:sticky;top:0;z-index:45;}
.chart-toolbar {position:relative;z-index:12;}
.select-menu {position:absolute;top:calc(100% + 6px);right:0;z-index:50;min-width:134px;max-width:calc(100vw - 24px);padding:5px;border:1px solid var(--line);border-radius:9px;background:#fff;box-shadow:0 8px 28px #26394f1a;animation:select-open .13s ease-out;}
.mode-control .select-menu button {display:block;width:100%;min-height:38px;padding:9px 11px;border:0;border-radius:6px;background:#fff;color:var(--text);font:inherit;font-size:13px;text-align:left;white-space:nowrap;}
.select-menu button[aria-selected="true"] {background:#eaf5ee;color:var(--green);font-weight:600;}
.select-menu button:hover,.select-menu button:focus-visible {outline:none;background:#f0f5f2;}
.mode-select[aria-expanded="true"] {border-color:#b6d3c2;background:#eef6f1;}
@keyframes select-open {from {opacity:0;transform:translateY(-4px);}to {opacity:1;transform:translateY(0);}}
.mode-select:focus-visible {outline:none;background:#eaf3ee;}
.usdc-preview {
  min-height:min(68svh,540px);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:30px 16px;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:14px;
}
.usdc-symbol {font-size:15px;font-weight:650;color:#3c72c1;background:#edf4fe;border:1px solid #d9e6f9;border-radius:50%;width:76px;height:76px;display:grid;place-items:center;}
.usdc-preview h1 {font-size:25px;font-weight:550;margin:20px 0 8px;letter-spacing:-.6px;}
.usdc-preview p {color:var(--muted);font-size:13px;margin:0 0 22px;}
.usdc-preview button {padding:11px 18px;border:1px solid var(--line);border-radius:7px;background:#f3f7f4;color:var(--green);font-weight:550;font-size:13px;}
main {
  max-width:2200px;
  margin:auto;
  padding:24px 32px 16px;
}
.terminal {
  display:grid;
  grid-template-columns:minmax(0,1fr) 360px;
  grid-template-rows:minmax(0,1fr);
  gap:20px;
  height:clamp(690px,calc(100svh - 160px),1100px);
}
.market-panel {
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:14px;
  min-width:0;
  min-height:0;
  display:flex;
  flex-direction:column;
  overflow:hidden;
}
.chart-toolbar {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:12px;
  align-items:center;
  justify-content:space-between;
  padding:0 25px;
  border-bottom:1px solid var(--line);
  height:64px;
  flex-shrink:0;
}
.history-nav {
  grid-column:2;
  grid-row:1;
  align-self:center;
  display:flex;
  gap:6px;
  margin-left:auto;
  margin-right:0;
}
.history-nav button {
  padding:6px 8px;
  border:1px solid var(--line);
  border-radius:5px;
  background:#fff;
  color:var(--muted);
  font-size:10px;
}
.history-nav button:not(:disabled):hover {
  background:#f1f5f8;
  color:var(--text);
}
.chart-tabs {
  grid-column:1;
  grid-row:1;
  min-width:0;
  display:flex;
  height:100%;
  gap:30px;
}
.chart-tabs button {
  border:0;
  background:none;
  color:var(--muted);
  font-size:14px;
  padding:0;
  position:relative;
  white-space:nowrap;
  font-weight:500;
}
.chart-tabs button[aria-selected="true"] {
  color:var(--text);
}
.chart-tabs button[aria-selected="true"]:after {
  content:"";
  height:2px;
  position:absolute;
  bottom:-1px;
  left:0;
  right:0;
  background:var(--green);
}
.chart-tabs button:focus-visible {
  background:#f1f6f3;
}
.coin-button:focus-visible {
  filter:brightness(.94);
}
.chart-tabs button:hover {
  color:var(--text);
}
.market-unit {
  color:var(--muted);
  font-size:11px;
  letter-spacing:.5px;
}
.chart-panel {
  display:flex;
  flex-direction:column;
  flex:1;
  min-height:0;
  padding:27px 25px 0;
}
.quote-strip {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  min-height:115px;
  flex-shrink:0;
}
.label {
  font-size:12px;
  color:var(--muted);
  margin:0 0 7px;
}
.portfolio-value {
  font-size:48px;
  letter-spacing:-2px;
  line-height:1.12;
  font-weight:550;
  font-variant-numeric:tabular-nums;
}
.value-change {
  font-size:12px;
  color:var(--green);
  display:block;
  min-height:17px;
  margin-top:7px;
}
.value-change.negative {
  color:var(--red);
}
.token-state {
  font-size:10px;
  background:#f0f5f2;
  color:#4b6c5a;
  border:1px solid #dfebe2;
  border-radius:5px;
  padding:6px 9px;
  margin-top:4px;
  white-space:nowrap;
}
.account-summary {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
  min-height:115px;
  padding:4px 0 18px;
  flex-shrink:0;
}
.account-summary>div {
  display:flex;
  flex-direction:column;
  gap:12px;
  min-width:0;
}
.account-summary>div>span {
  font-size:11px;
  color:var(--muted);
  line-height:1.4;
}
.account-summary strong {
  font-size:24px;
  font-weight:550;
  letter-spacing:-.6px;
  font-variant-numeric:tabular-nums;
}
.positive {
  color:var(--green)!important;
}
.negative {
  color:var(--red)!important;
}
.chart-heading {
  display:flex;
  justify-content:space-between;
  gap:12px;
  font-size:11px;
  color:var(--muted);
  margin:8px 0 12px;
  flex-shrink:0;
}
.chart-stage {
  flex:1;
  min-height:0;
  position:relative;
}
.token-chart {
  height:100%;
  min-height:0;
  color:var(--green);
  position:relative;
  border-radius:5px;
  overflow:hidden;
}
.token-chart.is-account {
  color:var(--blue);
}
.token-chart svg {
  display:block;
  width:100%;
  height:100%;
}
.chart-grid {
  stroke:#eaf0f5;
  stroke-width:1;
  vector-effect:non-scaling-stroke;
}
.chart-zero {
  stroke:#b9c6d6;
  stroke-dasharray:4 5;
}
.chart-axis {
  fill:#758399;
  font-size:11px;
  font-family:inherit;
}
.chart-line {
  fill:none;
  stroke:currentColor;
  stroke-width:2.4;
  stroke-linecap:round;
  stroke-linejoin:round;
  vector-effect:non-scaling-stroke;
}
.chart-dot {
  fill:currentColor;
  stroke:#fff;
  stroke-width:2;
  vector-effect:non-scaling-stroke;
}
.series-token,.series-received {
  color:var(--green);
}
.token-chart.is-negative,.is-negative .series-token {
  color:var(--red);
}
.series-max {
  color:#ad782b;
}
.series-min {
  color:#6a86ac;
}
.chart-line.series-max,.chart-line.series-min {
  stroke-width:1.6;
  stroke-dasharray:5 5;
  opacity:.85;
}
.series-balance {
  color:var(--blue);
}
.series-result {
  color:var(--violet);
}
.chart-cursor {
  stroke:#a7b5c8;
  stroke-width:1;
  stroke-dasharray:4 4;
  pointer-events:none;
}
.chart-empty {
  height:100%;
  margin:0;
  display:flex;
  flex-direction:column;
  gap:9px;
  align-items:center;
  justify-content:center;
  text-align:center;
  color:var(--muted);
  font-size:13px;
  padding:25px;
  background:radial-gradient(#dfe7ee .8px,transparent .8px);
  background-size:18px 18px;
  border-radius:6px;
}
.chart-empty strong {
  font-size:18px;
  font-weight:500;
  color:#5d7186;
}
.chart-tooltip {
  position:absolute;
  z-index:2;
  top:14px;
  left:20px;
  min-width:180px;
  max-width:260px;
  padding:13px 15px;
  background:#fff;
  border:1px solid #dce4ed;
  box-shadow:0 8px 25px #20334c12;
  border-radius:9px;
  pointer-events:none;
  font-size:11px;
  line-height:1.7;
}
.chart-tooltip>strong {
  display:block;
  color:var(--muted);
  font-size:10px;
  font-weight:500;
  margin-bottom:5px;
}
.chart-tooltip p {
  display:flex;
  justify-content:space-between;
  gap:18px;
  margin:1px 0;
}
.chart-tooltip small {
  display:block;
  font-size:9px;
  font-weight:400;
  color:var(--muted);
  text-align:right;
}
.chart-tooltip b {
  font-weight:600;
  font-variant-numeric:tabular-nums;
}
.chart-legend {
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:24px;
  padding:18px 0 21px;
  font-size:11px;
  color:var(--muted);
  min-height:53px;
  flex-shrink:0;
}
.chart-legend>span {
  display:flex;
  align-items:center;
  gap:7px;
}
.chart-legend i {
  width:16px;
  height:3px;
  border-radius:2px;
  background:currentColor;
}

.trading-column {
  min-width:0;
  min-height:0;
  display:grid;
  grid-template-rows:auto minmax(0,1fr);
  gap:16px;
}
.order-panel {
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:14px;
  padding:21px 22px;
}
.pulse-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  font-size:13px;
  font-weight:550;
}
.phase-badge {
  color:var(--green);
  background:#edf7f1;
  border:1px solid #d9ecdf;
  font-weight:400;
  font-size:10px;
  padding:4px 7px;
  border-radius:4px;
}
.phase-badge.is-locked {
  color:#946211;
  background:#fff3d5;
  border-color:#edcf8e;
}
.phase-badge.is-paused {
  color:#657184;
  background:#f0f2f5;
  border-color:#dce1e8;
}
.pulse-timing {
  display:flex;
  align-items:baseline;
  gap:11px;
  margin:14px 0;
}
.pulse-timing strong {
  font-size:36px;
  font-weight:500;
  letter-spacing:-1.2px;
  font-variant-numeric:tabular-nums;
}
.pulse-timing>span {
  font-size:10px;
  color:var(--muted);
}
.progress-track {
  height:4px;
  overflow:hidden;
  border-radius:5px;
  background:#edf0f6;
}
.progress-track>span {
  display:block;
  width:100%;
  height:100%;
  background:var(--violet);
  border-radius:5px;
  transition:width .1s linear;
}





.token-actions {
  margin-top:20px;
  display:grid;
  gap:9px;
}
.coin-button {
  border:0;
  width:100%;
  border-radius:7px;
  min-height:48px;
  padding:12px 14px;
  font-size:14px;
  font-weight:600;
}
.coin-buy,.coin-cashout.profit {
  color:#fff;
  background:var(--green);
}
.coin-buy:not(:disabled):hover,.coin-cashout.profit:not(:disabled):hover {
  background:#10774f;
}
.coin-cashout.loss {
  background:#fbe3e4;
  color:#aa3441;
}
.coin-cashout.small-profit {
  background:#fff0c7;
  color:#775716;
}
.coin-cashout.loss:not(:disabled):hover {
  background:#f7d3d6;
}
.coin-cashout.small-profit:not(:disabled):hover {
  background:#f6e3ad;
}

.resume-button {
  border:1px solid var(--line);
  background:#fff;
  color:var(--text);
  padding:8px;
  border-radius:6px;
}


.activity-panel {
  height:100%;
  min-height:0;
  contain:size;
  display:flex;
  flex-direction:column;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:14px;
  overflow:hidden;
}
.activity-heading {
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:18px 20px 12px;
  flex-shrink:0;
}
.activity-heading h2 {
  font-size:14px;
  font-weight:550;
  margin:0;
  letter-spacing:-.2px;
}
.activity-live {
  display:flex;
  align-items:center;
  gap:5px;
  color:var(--muted);
  font-size:9px;
}
.activity-live i {
  width:5px;
  height:5px;
  background:var(--green);
  border-radius:50%;
}
.trade-scroll {
  height:0;
  min-height:0;
  flex:1 1 0;
  --trade-row-height:43px;
  overflow:hidden;
  position:relative;
  margin:0 10px 0 20px;
}
table {
  width:100%;
  border-collapse:collapse;
  table-layout:fixed;
  text-align:left;
}
thead {
  position:sticky;
  top:0;
  background:#fff;
  z-index:1;
}
th {
  height:29px;
  border-bottom:1px solid var(--line);
  font-size:9px;
  color:var(--muted);
  font-weight:400;
  padding:0 6px 8px 0;
}
th:first-child {
  width:46%;
}
th:nth-child(2) {
  width:21%;
}
th:last-child {
  width:33%;
  text-align:right;
  padding-right:10px;
}
td {
  height:var(--trade-row-height);
  border-bottom:1px solid #eef1f5;
  font-size:11px;
  white-space:nowrap;
  text-overflow:ellipsis;
  overflow:hidden;
  padding:7px 6px 7px 0;
}
td:first-child {
  color:#42536a;
}
.trade-row {
  background:var(--surface);
}
.trade-ghost {
  position:absolute;
  left:0;
  width:100%;
  pointer-events:none;
  z-index:2;
  background:var(--surface);
}
.trade-row.is-own {background:#edf7f1;}
.trade-row.is-own td {background:#edf7f1;}
.trade-row.is-own td:first-child:after {content:"Your trade";display:inline-block;vertical-align:middle;margin-left:7px;padding:2px 5px;border-radius:4px;background:#d5ebdd;color:#276844;font-size:8px;font-weight:600;}
.is-own td:first-child {
  font-weight:600;
  color:var(--green);
}
.trade-kind {
  font-size:10px;
  color:var(--green);
}
.exit .trade-kind {
  color:var(--red);
}
.trade-amount {
  text-align:right;
  font-variant-numeric:tabular-nums;
  padding-right:10px;
  font-weight:500;
}
.empty-trades {
  text-align:center;
  color:var(--muted);
  height:100px;
}
.empty-trades:before {
  display:none;
}

.message {
  min-height:16px;
  font-size:11px;
  color:var(--green);
  margin:10px 0 6px;
}
.message.error {
  color:var(--red);
}
.message:empty {
  visibility:hidden;
}
.site-footer {
  display:flex;
  justify-content:space-between;
  color:var(--muted);
  font-size:10px;
}
.pulse-updated .portfolio-value {
  animation:pulse-value .65s ease-out;
}
@keyframes pulse-value {
  0% {
    color:var(--green);
  }
  100% {
    color:var(--text);
  }
}
@media(min-width:1700px) {
  .trade-scroll {--trade-row-height:49px;}

  .terminal {
    grid-template-columns:minmax(0,1fr) 420px;
    gap:24px;
  }
  .site-header {
    padding:0 42px;
    height:84px;
  }
  main {
    padding:28px 42px 18px;
  }
  .chart-toolbar {
    height:72px;
    padding:0 32px;
  }
  .chart-tabs button {
    font-size:16px;
  }
  .chart-panel {
    padding:32px 32px 0;
  }
  .portfolio-value {
    font-size:60px;
  }
  .quote-strip,.account-summary {
    min-height:138px;
  }
  .account-summary strong {
    font-size:30px;
  }
  .account-summary>div>span {
    font-size:13px;
  }
  .chart-heading,.chart-legend {
    font-size:13px;
  }

  .order-panel {
    padding:25px 26px;
  }
  .pulse-heading {
    font-size:15px;
  }
  .pulse-timing strong {
    font-size:42px;
  }
  .pulse-timing>span {
    font-size:12px;
  }

  .coin-button {
    font-size:16px;
    min-height:54px;
  }
  .activity-heading h2 {
    font-size:16px;
  }
  .activity-heading {
    padding:20px 24px 14px;
  }
  td {
    font-size:13px;
  }
  .trade-kind,th {
    font-size:11px;
  }
  .trade-scroll {
    margin-left:24px;
  }

  .activity-live {
    font-size:10px;
  }
}
@media(max-width:1100px) {
  .terminal {
    grid-template-columns:minmax(0,1fr) 310px;
    gap:15px;
  }
  .site-header {
    padding:0 22px;
  }
  main {
    padding:20px 22px 16px;
  }
  .chart-toolbar {
    padding:0 20px;
  }
  .chart-panel {
    padding:24px 20px 0;
  }
  .account-summary {
    grid-template-columns:repeat(3,minmax(0,1fr));
    row-gap:17px;
    min-height:115px;
  }
  .account-summary strong {
    font-size:20px;
  }
  .account-summary>div {
    gap:6px;
  }

  .order-panel {
    padding:19px;
  }
  .pulse-timing>span {
    font-size:9px;
  }
  .trade-scroll {
    margin-left:15px;
  }
  .activity-heading {
    padding-left:15px;
  }

}
@media(max-width:800px) {
  .site-header {
    height:68px;
    gap:24px;
    padding:0 18px;
  }
  .brand {
    font-size:19px;
  }
  .market-label {
    font-size:12px;
  }
  .market-label>span {
    display:none;
  }
  .wallet {display:flex;gap:2px;}
  .wallet>span {
    font-size:9px;
  }
  .wallet strong {
    font-size:14px;
  }
  main {
    padding:16px;
  }
  .terminal {
    height:auto;
    grid-template-columns:minmax(0,1fr);
    grid-template-rows:auto auto;
    gap:16px;
  }
  .market-panel {
    height:580px;
  }
  .chart-toolbar {
    height:57px;
  }
  .chart-panel {
    padding-top:20px;
  }
  .quote-strip {
    min-height:105px;
  }
  .portfolio-value {
    font-size:43px;
  }
  .trading-column {
    grid-template-columns:1fr 1fr;
    grid-template-rows:minmax(0,1fr);
    gap:16px;
    min-height:430px;
  }
  .activity-panel {
    contain:size;
    height:100%;
  }
  .order-panel {
    padding:20px;
  }

  .pulse-timing {
    display:block;
  }
  .pulse-timing>span {
    display:block;
    margin-top:4px;
  }

  .chart-legend {
    gap:16px;
    font-size:10px;
  }
  .account-summary {
    grid-template-columns:repeat(3,minmax(0,1fr));
    min-height:105px;
  }
  .account-summary strong {
    font-size:22px;
  }
  .account-summary>div>span {
    font-size:10px;
  }
}
.mobile-nav,.how-to-launcher {display:none;}
:root {--mobile-nav-height:60px;--mobile-safe-bottom:min(8px,env(safe-area-inset-bottom,0px));}
@media(display-mode:standalone){:root{--mobile-safe-bottom:env(safe-area-inset-bottom,0px);}}
.secondary-panel {min-height:min(68svh,540px);padding:40px 20px;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;border:1px solid var(--line);border-radius:14px;background:var(--surface);}
.secondary-panel h1 {font-size:25px;font-weight:550;margin:0 0 10px;}
.secondary-panel p {font-size:13px;color:var(--muted);}
/* Small phones: compact chart, then trade controls, then the full activity feed. */
@media(max-width:540px), (max-width:800px) and (max-height:540px) {
  body {overflow:auto;}
  .site-header {height:48px;padding:0 12px;gap:14px;}
  .brand {font-size:18px;gap:7px;}
  .brand svg {width:24px;height:24px;}
  .market-label {display:none;}
  .wallet {gap:2px;}
  .wallet>.mode-control {margin-right:12px;}
  .mode-select {height:24px;font-size:11px;padding:2px 21px 2px 5px;}
  .wallet>span {font-size:9px;}
  .wallet strong {font-size:14px;}
  .header-icon {width:26px;height:34px;padding:3px;}
  .header-icon .lucide {width:20px;height:20px;}
  main {height:auto;min-height:calc(100svh - 48px);padding:8px 10px calc(130px + env(safe-area-inset-bottom,0px));}
  .terminal {height:auto;min-height:0;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto;gap:12px;}
  .market-panel {height:100%;min-height:0;border-radius:11px;}
  .chart-toolbar {display:grid;grid-template-columns:minmax(0,1fr) auto;padding:0 12px;height:46px;min-height:46px;gap:8px;}
  .chart-tabs {height:46px;gap:18px;}
  .chart-tabs button {font-size:12px;}
  .history-nav {order:0;width:auto;height:auto;align-items:center;justify-content:flex-end;margin:0;gap:5px;}
  .history-size {min-width:94px;max-width:100px;font-size:10px;}
  .history-nav button {padding:5px 7px;font-size:9px;min-height:27px;}
  .market-unit {margin-left:auto;font-size:9px;}
  .chart-panel {padding:9px 10px 0;}
  .quote-strip {min-height:61px;gap:10px;}
  .label {font-size:10px;margin-bottom:3px;}
  .portfolio-value {font-size:31px;letter-spacing:-1.3px;}
  .value-change {font-size:10px;margin-top:3px;min-height:12px;}
  .token-state {font-size:9px;padding:4px 6px;margin-top:0;}
  .chart-heading {display:none;}
  .chart-legend {gap:12px;padding:7px 0 8px;font-size:9px;min-height:26px;}
  .chart-legend i {width:12px;}
  .account-summary {grid-template-columns:repeat(3,minmax(0,1fr));min-height:61px;gap:8px;padding:0 0 7px;}
  .account-summary>div {gap:5px;}
  .account-summary>div>span {font-size:9px;}
  .account-summary strong {font-size:18px;letter-spacing:-.5px;}
  .trading-column {display:contents;}
  .order-panel {position:static;grid-row:2;display:grid;grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr);grid-template-rows:auto auto auto;column-gap:12px;row-gap:2px;padding:10px 12px;border-radius:10px;box-shadow:none;}
  .pulse-heading {grid-column:1;grid-row:1;font-size:10px;gap:5px;}
  .phase-badge {font-size:9px;padding:2px 5px;}
  .pulse-timing {grid-column:1;grid-row:2;display:block;margin:1px 0 0;}
  .pulse-timing strong {font-size:26px;letter-spacing:-.8px;}
  .pulse-timing>span {display:none;}
  .progress-track {grid-column:1;grid-row:3;height:3px;align-self:end;}
  .token-actions {grid-column:2;grid-row:1 / 4;margin:0;align-self:center;gap:5px;}
  .coin-button {min-height:44px;padding:10px 9px;font-size:14px;border-radius:7px;}
  .resume-button {padding:5px;font-size:11px;}










  .how-to-launcher {position:fixed;left:0;right:0;bottom:calc(var(--mobile-nav-height) + var(--mobile-safe-bottom));z-index:26;display:flex;align-items:center;justify-content:center;gap:8px;min-height:40px;padding:9px 14px;border:0;border-top:1px solid var(--line);background:#f4f8f5;color:#315f48;font-size:12px;font-weight:500;}
  .how-to-launcher .lucide {width:17px;height:17px;}
  .how-to-launcher .lucide-arrow-up {margin-left:3px;}
  .mobile-nav {height:calc(var(--mobile-nav-height) + var(--mobile-safe-bottom));position:fixed;left:0;right:0;bottom:0;z-index:25;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));padding:4px 8px calc(4px + var(--mobile-safe-bottom));background:#fff;border-top:1px solid var(--line);}
  .mobile-nav button {display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-height:49px;border:0;background:transparent;color:var(--muted);font-size:11px;font-weight:500;}
  .mobile-nav button[aria-current="page"] {color:var(--green);}
  .mobile-nav svg {width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;}
  .mobile-nav button:focus-visible {background:#f0f6f2;}
  #demo-terminal[data-section="market"] .activity-panel {display:none;}
  #demo-terminal[data-section="trades"] {grid-template-rows:auto;}
  #demo-terminal[data-section="trades"] .market-panel,#demo-terminal[data-section="trades"] .order-panel {display:none;}
  #demo-terminal[data-section="trades"] .activity-panel {grid-row:1;}
  #arena,#activity {scroll-margin-top:10px;}
  .activity-panel {grid-row:3;height:462px;min-height:0;margin-top:0;border-radius:10px;}
  .activity-heading {height:44px;min-height:44px;padding:12px 14px;}
  .activity-heading h2 {font-size:14px;}
  .activity-live {font-size:10px;}
  .trade-scroll {--trade-row-height:43px;margin:0 10px 0 14px;}
  th {height:29px;font-size:10px;padding-bottom:8px;}
  td {font-size:12px;padding-top:7px;padding-bottom:7px;}
  .trade-kind {font-size:10px;}
  .message:empty {display:none;}
  .site-footer {display:none;}
  .chart-tooltip {min-width:140px;max-width:220px;font-size:10px;padding:9px;top:4px;}
}
/* Roomier phones use the same vertical trading card as desktop. */
@media(min-width:390px) and (max-width:540px) and (min-height:700px), (min-width:360px) and (max-width:540px) and (min-height:780px) {
  #demo-terminal[data-section="trades"] {grid-template-rows:auto;}
  .order-panel {display:block;padding:16px;}
  .pulse-heading {font-size:13px;}
  .phase-badge {font-size:10px;padding:3px 7px;}
  .pulse-timing {display:flex;align-items:baseline;gap:10px;margin:10px 0 12px;}
  .pulse-timing strong {font-size:34px;}
  .pulse-timing>span {display:inline;font-size:10px;margin:0;}
  .progress-track {height:4px;}
  .token-actions {margin-top:15px;}
  .coin-button {min-height:46px;font-size:15px;}
}
.howto-sheet {position:fixed;inset:auto 0 0;margin:0 auto;width:100%;max-width:540px;height:min(79svh,640px);max-height:calc(100svh - 12px);padding:13px 22px calc(20px + env(safe-area-inset-bottom,0px));border:0;border-radius:24px 24px 0 0;background:#fff;color:var(--text);box-shadow:0 -10px 60px #182e3c16;overflow:auto;overscroll-behavior:contain;}
.howto-sheet:not([open]) {display:none;}
.howto-sheet[open] {display:flex;flex-direction:column;animation:help-slide-up .32s cubic-bezier(.2,.75,.2,1);}
.howto-sheet::backdrop {background:#15243866;animation:help-backdrop .25s ease-out;}
body.help-open {overflow:hidden;}
.help-sheet-top {position:relative;height:32px;min-height:32px;display:flex;justify-content:center;align-items:flex-start;}
.help-sheet-handle {width:38px;height:4px;border-radius:5px;background:#e0e5e9;margin-top:1px;}
.help-close {display:grid;place-items:center;position:absolute;right:-5px;top:-5px;width:32px;height:32px;border:0;border-radius:50%;background:#f3f5f6;color:#697687;font-size:23px;line-height:1;}
.help-close .lucide {width:18px;height:18px;}
.help-art {flex:1;min-height:100px;max-height:270px;display:grid;place-items:center;overflow:hidden;}
.help-art svg {width:min(100%,320px);height:100%;max-height:260px;}
.help-scene {display:none;}
.help-art[data-step="0"] .help-scene-buy,.help-art[data-step="1"] .help-scene-pulse,.help-art[data-step="2"] .help-scene-sell {display:block;animation:help-illustration .25s ease-out;}
.help-copy {padding-top:15px;}
.help-step-label {color:var(--green);font-size:11px;font-weight:550;margin:0 0 8px;}
.help-copy h2 {font-size:23px;line-height:1.25;letter-spacing:-.6px;margin:0 0 13px;font-weight:600;}
.help-copy>p:not(.help-step-label) {font-size:13px;line-height:1.65;color:var(--muted);margin:0;}
.help-note-box {display:flex;align-items:flex-start;gap:9px;padding:11px 12px;margin-top:13px;background:#f0f7f3;border:1px solid #dcebe2;border-radius:9px;color:#426451;}
.help-note-box>.lucide {width:17px;height:17px;flex-shrink:0;margin-top:1px;}
.help-note-box .help-note {font-size:12px;line-height:1.5;margin:0;font-weight:500;}
.help-note-box[data-tone="warning"] {background:#fff7e8;border-color:#eddfbd;color:#805e28;}
.help-note-box[data-tone="neutral"] {background:#f3f5f8;border-color:#e1e7ef;color:#57677d;}
.help-step-dots {display:flex;gap:5px;justify-content:center;padding:19px 0 15px;}
.help-step-dots i {width:20px;height:3px;border-radius:3px;background:#e8edf0;}
.help-step-dots i.is-active {background:var(--green);}
.help-sheet-actions {display:flex;gap:10px;flex-shrink:0;}
.help-next {flex:1;min-height:46px;border:0;border-radius:8px;background:var(--green);color:#fff;font-size:14px;font-weight:600;}
.help-back {min-width:65px;min-height:46px;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--muted);font-size:13px;}
@keyframes help-slide-up {from {transform:translateY(100%);}to {transform:translateY(0);}}
@keyframes help-backdrop {from {background:#15243800;}to {background:#15243866;}}
@keyframes help-illustration {from {opacity:0;transform:translateY(8px);}to {opacity:1;transform:translateY(0);}}
@media(max-height:600px) {.howto-sheet {height:calc(100svh - 14px);padding:10px 17px calc(14px + env(safe-area-inset-bottom,0px));}.help-art {max-height:155px;min-height:80px;}.help-copy {padding-top:5px;}.help-copy h2 {font-size:20px;margin-bottom:9px;}.help-copy>p:not(.help-step-label) {font-size:12px;line-height:1.5;}.help-step-dots {padding:12px 0;}}
/* Fill the Market viewport down to the fixed tutorial/nav bars. */
@media(max-width:540px), (max-width:800px) and (max-height:540px) {
  #app-main[data-screen="market"] {position:relative;height:calc(100svh - 48px);min-height:0;padding:8px 10px calc(var(--mobile-nav-height) + 48px + var(--mobile-safe-bottom));}
  #app-main[data-screen="market"] .terminal {height:100%;min-height:0;grid-template-rows:minmax(0,1fr) auto;}
  #app-main[data-screen="market"] .market-panel {min-height:0;height:100%;}
  #app-main[data-screen="market"] .order-panel {align-self:end;}
}
@media(max-width:360px) {
  .site-header {gap:8px;padding:0 10px;}
  .brand {font-size:16px;gap:5px;}
  .brand svg {width:22px;height:22px;}
  .wallet {gap:2px;}
  .wallet>.mode-control {margin-right:10px;}
  .wallet strong {font-size:13px;}
}
/* Room activity sits between the action panel and feed on desktop. */
.trading-column {grid-template-rows:auto auto minmax(0,1fr);}
.room-stats {display:grid;grid-template-columns:max-content minmax(0,1fr);align-items:center;min-height:46px;padding:0;background:linear-gradient(100deg,#edf7f2 0%,#fff 65%);border:1px solid #dfe8e4;border-radius:11px;color:var(--muted);font-size:11px;}
.room-stats>span {display:flex;align-items:center;justify-content:center;gap:5px;white-space:nowrap;padding:6px 9px;min-width:0;}
.room-stats>span+span {border-left:1px solid #e0e9e4;}
.room-trades-icon {width:15px;height:15px;color:#7d8c9d;margin-right:3px;flex-shrink:0;}
.room-stats strong {color:var(--text);font-weight:600;font-variant-numeric:tabular-nums;}
.room-online-dot {width:6px;height:6px;border-radius:50%;background:var(--green);box-shadow:0 0 0 3px #18865d12; margin-right:3px;}
@media(min-width:541px) and (max-width:800px) and (min-height:541px) {
  .trading-column {grid-template-rows:auto auto minmax(0,1fr);}
  .order-panel {grid-column:1;grid-row:1;}
  .room-stats {grid-column:1;grid-row:2;}
  .activity-panel {grid-column:2;grid-row:1 / 4;}
}
@media(max-width:540px), (max-width:800px) and (max-height:540px) {
  #app-main[data-screen="market"] .terminal {grid-template-rows:minmax(0,1fr) auto auto;gap:8px;}
  .room-stats {grid-row:2;min-height:36px;padding:0;font-size:10px;border-radius:9px;}
  .room-stats>span {padding:5px 6px;gap:4px;}
  .room-trades-icon {width:13px;height:13px;margin-right:2px;}
  .order-panel {grid-row:3;}
  #demo-terminal[data-section="trades"] .room-stats {display:none;}
}
/* Shared trade cards on desktop and mobile. */
#demo-terminal .activity-panel {background:transparent;border:0;border-radius:0;}
#demo-terminal .activity-heading {height:44px;min-height:44px;padding:4px 3px 12px;}
#demo-terminal .activity-heading h2 {font-size:16px;}
#demo-terminal .trade-scroll {--trade-row-height:56px;--trade-row-gap:8px;margin:0;}
#demo-terminal .trade-scroll table {display:block;border-collapse:separate;}
#demo-terminal .trade-scroll thead {position:absolute;width:0;height:0;overflow:hidden;clip-path:inset(50%);}
#demo-terminal .trade-scroll tbody {display:grid;gap:8px;}
#demo-terminal .trade-row {display:grid;grid-template-columns:minmax(0,1fr) 38px 76px;align-items:center;gap:8px;height:56px;min-height:56px;padding:8px 12px;border:1px solid #e0e6ed;border-radius:11px;background:#fff;}
#demo-terminal td {display:block;width:auto!important;height:auto;border:0;padding:0;font-size:12px;background:transparent;}
#demo-terminal .trade-kind {font-size:11px;}
#demo-terminal .trade-amount {font-size:13px;padding:0;}
#demo-terminal .trade-row.is-own {background:#edf7f1;border-color:#a8d4bb;box-shadow:inset 3px 0 #18865d;}
#demo-terminal .trade-row.is-own td:first-child:after {font-size:8px;margin-left:5px;padding:2px 4px;}
#demo-terminal .empty-trades {height:auto;min-height:90px;padding:28px 12px;background:#fff;border-radius:11px;}

/* Mobile Trades is a viewport-sized list of independent cards. */
@media(max-width:540px), (max-width:800px) and (max-height:540px) {
  #app-main[data-screen="trades"] {height:calc(100svh - 48px);min-height:0;padding:8px 10px calc(var(--mobile-nav-height) + 48px + var(--mobile-safe-bottom));}
  #demo-terminal[data-section="trades"] {height:100%;display:block;}
  #demo-terminal[data-section="trades"] .activity-panel {height:100%;min-height:0;}
  #arena,#activity {scroll-margin-top:56px;}
}
@media(prefers-reduced-motion:reduce) {
  *,*:before,*:after {
    transition:none!important;
    animation:none!important;
  }
}

.desktop-nav {gap:6px;}
.desktop-nav button {border:0;background:transparent;padding:9px 12px;border-radius:7px;color:#4b5563;font-size:12px;font-weight:500;white-space:nowrap;}
.desktop-nav button:hover,.desktop-nav button:focus-visible {background:transparent;color:#111;}
@media(max-width:1100px) {.desktop-nav {gap:2px;margin-left:0;}.desktop-nav button {padding:8px;font-size:11px;}}
/* Full game reference; the quick-start sheet remains mobile-only. */
.wiki-page {width:100%;min-width:0;max-width:1120px;margin:0 auto;scroll-margin-top:95px;}
.wiki-heading {display:flex;align-items:center;justify-content:space-between;gap:24px;padding:14px 0 28px;}
.wiki-eyebrow {color:var(--green);font-size:10px;font-weight:650;letter-spacing:1.5px;}
.wiki-heading h1 {font-size:32px;letter-spacing:-1px;margin:10px 0;}
.wiki-heading p {font-size:15px;line-height:1.6;color:var(--muted);margin:0;}
.wiki-heading button {border:1px solid #d9e6de;background:#fff;color:var(--green);border-radius:8px;padding:11px 16px;font-size:12px;white-space:nowrap;}
.wiki-layout {display:grid;grid-template-columns:190px minmax(0,1fr);gap:30px;align-items:start;}
.wiki-contents {position:sticky;top:100px;display:flex;flex-direction:column;gap:4px;padding:10px 0;}
.wiki-contents>span {font-size:10px;font-weight:600;color:var(--muted);text-transform:uppercase;letter-spacing:1px;margin:0 12px 10px;}
.wiki-contents a {font-size:14px;padding:10px 12px;border-radius:7px;color:var(--muted);}
.wiki-contents a:hover,.wiki-contents a:focus-visible {background:#e8f3ed;color:var(--green);}
.wiki-articles {display:grid;grid-template-columns:minmax(0,1fr);min-width:0;gap:16px;}
.wiki-articles article {min-width:0;overflow-wrap:anywhere;background:#fff;border:1px solid var(--line);border-radius:14px;padding:28px;scroll-margin-top:100px;}
.wiki-number {color:var(--green);font-size:9px;letter-spacing:1px;font-weight:650;}
.wiki-articles h2 {font-size:22px;letter-spacing:-.5px;margin:10px 0 16px;}
.wiki-articles p,.wiki-articles dd {font-size:15px;line-height:1.8;color:#5d6d82;margin:12px 0 0;}
.wiki-callout {padding:15px 17px;border-radius:9px;background:#eef7f2;border:1px solid #dcebe2;color:#365e49;font-size:14px;line-height:1.7;margin:18px 0;}
.wiki-warning {background:#fff7e8;border-color:#f1e1bd;color:#856124;}
.wiki-cycle,.wiki-fee-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:18px 0;}
.wiki-cycle>div,.wiki-fee-grid>div {display:flex;flex-direction:column;gap:8px;border-radius:9px;background:#f5f7fa;padding:16px;}
.wiki-cycle strong {font-size:27px;letter-spacing:-1px;color:var(--text);}
.wiki-cycle span,.wiki-fee-grid span {font-size:11px;color:var(--muted);}
.wiki-fee-grid {grid-template-columns:repeat(3,minmax(0,1fr));}
.wiki-fee-grid strong {font-size:20px;}
.wiki-articles dl {margin:0;}.wiki-articles dt {font-size:15px;font-weight:600;margin-top:20px;}.wiki-articles dd {margin:5px 0 0;}
.desktop-nav button[aria-current="page"] {background:transparent;color:#111;}
@media(max-width:800px){.wiki-layout {grid-template-columns:minmax(0,1fr);gap:16px;}.wiki-contents {position:static;display:flex;flex-direction:row;flex-wrap:wrap;gap:5px;padding:0;}.wiki-contents>span {display:none;}.wiki-contents a {background:#fff;border:1px solid var(--line);padding:9px 11px;font-size:13px;}.wiki-heading {padding:12px 4px 20px;gap:12px;}.wiki-heading h1 {font-size:27px;}.wiki-heading p {font-size:15px;}.wiki-heading button {font-size:11px;padding:9px;}.wiki-articles article {padding:20px;scroll-margin-top:65px;}.wiki-page {scroll-margin-top:60px;}.wiki-articles h2 {font-size:22px;line-height:1.3;}.wiki-articles p,.wiki-articles dd {font-size:15px;}.wiki-cycle>div,.wiki-fee-grid>div {padding:12px;}.wiki-fee-grid {gap:6px;}.wiki-fee-grid strong {font-size:17px;}}

/* Each historical token keeps the color of its own net result. */
.token-chart .token-profit {color:var(--green);}
.token-chart .token-loss {color:var(--red);}

/* Original Pulseflip brand mark, independent of the Lucide control icons. */
.brand {font-weight:750;letter-spacing:-.8px;white-space:nowrap;flex-shrink:0;}
.brand .brand-mark {width:32px;height:32px;stroke:none;flex-shrink:0;}
@media(max-width:540px), (max-width:800px) and (max-height:540px){.brand {font-size:17px;gap:6px;}.brand .brand-mark {width:26px;height:26px;}.site-header {gap:10px;}}
@media(max-width:360px){.site-header {padding:0 8px;gap:6px;}.brand {font-size:15px;letter-spacing:-.6px;gap:5px;}.brand .brand-mark {width:23px;height:23px;}.wallet>.mode-control {margin-right:7px;}}
/* Device-local appearance settings. */
:root[data-theme="dark"] {
 color-scheme:dark;--bg:#10151c;--surface:#19212c;--line:#2c3745;--text:#e8edf4;--muted:#9aa9bb;--green:#4ec89a;--red:#f0808b;--violet:#a28ce8;--blue:#85a8ff;
}
:root[data-theme="dark"] .mode-select,
:root[data-theme="dark"] .select-menu,
:root[data-theme="dark"] .mode-control .select-menu button,
:root[data-theme="dark"] .chart-tooltip,
:root[data-theme="dark"] .mobile-nav,
:root[data-theme="dark"] .howto-sheet,
:root[data-theme="dark"] .message,
:root[data-theme="dark"] .resume-button,
:root[data-theme="dark"] .wiki-articles article,
:root[data-theme="dark"] .wiki-contents a,
:root[data-theme="dark"] .wiki-heading button {background:var(--surface);border-color:var(--line);color:var(--text);}
:root[data-theme="dark"] .header-icon:hover,
:root[data-theme="dark"] .header-icon:focus-visible,
:root[data-theme="dark"] .mode-select:focus-visible,
:root[data-theme="dark"] .mode-select[aria-expanded="true"],
:root[data-theme="dark"] .mode-control .select-menu button:hover,
:root[data-theme="dark"] .mode-control .select-menu button:focus-visible,
:root[data-theme="dark"] .mode-control .select-menu button[aria-selected="true"],
:root[data-theme="dark"] .mobile-nav button:focus-visible {background:#223b34;color:var(--green);}
:root[data-theme="dark"] .desktop-nav button {color:#a8b4c3;}
:root[data-theme="dark"] .desktop-nav button:hover,
:root[data-theme="dark"] .desktop-nav button:focus-visible,
:root[data-theme="dark"] .desktop-nav button[aria-current="page"] {background:transparent;color:#fff;}
:root[data-theme="dark"] .chart-tabs button[aria-selected="true"] {color:var(--text);}
:root[data-theme="dark"] .chart-tabs button:hover {background:#212c39;}
:root[data-theme="dark"] .chart-grid {stroke:#2b3746;}
:root[data-theme="dark"] .chart-zero {stroke:#516279;}
:root[data-theme="dark"] .chart-axis {fill:#9aaac0;}
:root[data-theme="dark"] .chart-dot {stroke:var(--surface);}
:root[data-theme="dark"] .series-max {color:#e6b66a;}
:root[data-theme="dark"] .series-min {color:#91afd3;}
:root[data-theme="dark"] .chart-tooltip {box-shadow:0 10px 30px #0004;}
:root[data-theme="dark"] .chart-cursor {stroke:#71849c;}
:root[data-theme="dark"] .token-state,
:root[data-theme="dark"] .phase-badge {background:#203d32;border-color:#335b49;color:#8dd9b5;}
:root[data-theme="dark"] .phase-badge.is-locked {background:#423821;border-color:#695532;color:#e8c57b;}
:root[data-theme="dark"] .phase-badge.is-paused {background:#293340;border-color:#465367;color:#b7c2d0;}
:root[data-theme="dark"] .progress-track {background:#2b3444;}
:root[data-theme="dark"] .coin-buy,
:root[data-theme="dark"] .coin-cashout.profit,
:root[data-theme="dark"] .help-next {background:#269b70;color:#fff;}
:root[data-theme="dark"] .coin-buy:not(:disabled):hover,
:root[data-theme="dark"] .coin-cashout.profit:not(:disabled):hover {background:#2cae7f;}
:root[data-theme="dark"] .coin-cashout.loss {background:#492a33;color:#ffadb5;}
:root[data-theme="dark"] .coin-cashout.loss:not(:disabled):hover {background:#58303b;}
:root[data-theme="dark"] .coin-cashout.small-profit {background:#493d22;color:#f0d080;}
:root[data-theme="dark"] .coin-cashout.small-profit:not(:disabled):hover {background:#584a29;}
:root[data-theme="dark"] .room-stats {background:linear-gradient(100deg,#1c302b,#19212c);border-color:#2d433b;}
:root[data-theme="dark"] .room-stats>span+span {border-color:#32443f;}
:root[data-theme="dark"] .room-trades-icon {color:var(--muted);}
:root[data-theme="dark"] #demo-terminal .trade-row {background:var(--surface);border-color:var(--line);}
:root[data-theme="dark"] #demo-terminal td {color:var(--text);}
:root[data-theme="dark"] #demo-terminal .trade-row.entry .trade-kind {color:var(--green);}
:root[data-theme="dark"] #demo-terminal .trade-row.exit .trade-kind {color:var(--red);}
:root[data-theme="dark"] #demo-terminal .trade-row.is-own {background:#1c352d;border-color:#39735a;box-shadow:inset 3px 0 var(--green);}
:root[data-theme="dark"] #demo-terminal .trade-row.is-own td:first-child:after {background:#2a5140;color:#a5e1bd;}
:root[data-theme="dark"] #demo-terminal .empty-trades {background:var(--surface);color:var(--muted);}
:root[data-theme="dark"] .trade-ghost {background:transparent;}
:root[data-theme="dark"] .how-to-launcher {background:#182a24;color:#a1d6ba;}
:root[data-theme="dark"] .help-close {background:#283442;color:#b1bece;}
:root[data-theme="dark"] .help-sheet-handle {background:#435065;}
:root[data-theme="dark"] .howto-sheet::backdrop {background:#0009;}
:root[data-theme="dark"] .help-note-box,
:root[data-theme="dark"] .wiki-callout {background:#1d352c;border-color:#325243;color:#b3d7c3;}
:root[data-theme="dark"] .help-note-box[data-tone="warning"],
:root[data-theme="dark"] .wiki-warning {background:#3e3523;border-color:#615033;color:#e4cc95;}
:root[data-theme="dark"] .help-note-box[data-tone="neutral"] {background:#222e3c;border-color:#38485d;color:#b7c8dd;}
:root[data-theme="dark"] .help-back {background:var(--surface);border-color:var(--line);color:var(--text);}
:root[data-theme="dark"] .help-art [fill="#fff"] {fill:#202c38;}
:root[data-theme="dark"] .help-art text[fill="#fff"] {fill:#fff;}
:root[data-theme="dark"] .help-art [fill="#e5f4eb"],
:root[data-theme="dark"] .help-art [fill="#e3f4e9"] {fill:#254539;}
:root[data-theme="dark"] .help-art [fill="#f0eaf9"] {fill:#39304d;}
:root[data-theme="dark"] .help-art [stroke="#dfe9e3"],
:root[data-theme="dark"] .help-art [stroke="#edf2ee"] {stroke:#3a4d56;}
:root[data-theme="dark"] .wiki-cycle>div,
:root[data-theme="dark"] .wiki-fee-grid>div {background:#222d3b;}
:root[data-theme="dark"] .wiki-articles p,
:root[data-theme="dark"] .wiki-articles dd {color:#acb9c9;}
:root[data-theme="dark"] .wiki-contents a:hover,
:root[data-theme="dark"] .wiki-contents a:focus-visible {background:#203a30;color:var(--green);}
:root[data-theme="dark"] .chart-tabs button:focus-visible {background:#22342e;}
:root[data-theme="dark"] .chart-empty {background:radial-gradient(#354252 .8px,transparent .8px);background-size:18px 18px;}
:root[data-theme="dark"] .chart-empty strong {color:var(--text);}
:root[data-theme="dark"] .help-step-dots i:not(.is-active) {background:#3b4858;}
/* Inline result of the latest pulse; no overlay or extra panel. */
.value-change.pulse-feedback {display:inline-flex;align-items:center;max-width:100%;padding:0 5px;margin-left:-5px;border-radius:4px;background:#18865d10;color:var(--green);font-weight:550;white-space:nowrap;font-variant-numeric:tabular-nums;}
.value-change.pulse-feedback.negative {background:#bd424d0d;color:var(--red);}
:root[data-theme="dark"] .value-change.pulse-feedback {background:#4ec89a14;}
:root[data-theme="dark"] .value-change.pulse-feedback.negative {background:#f0808b14;}
.account-control {position:relative;display:flex;align-items:center;}
.account-menu {position:absolute;right:0;top:calc(100% + 8px);z-index:55;width:260px;max-width:calc(100vw - 16px);padding:7px;border:1px solid var(--line);border-radius:12px;background:var(--surface);box-shadow:0 12px 36px #172b4420;animation:select-open .13s ease-out;color:var(--text);}
.account-settings {display:flex;align-items:center;gap:10px;width:100%;min-height:40px;padding:9px 10px;border:0;border-radius:7px;background:transparent;color:var(--text);font-size:13px;text-align:left;}
.account-settings .lucide {width:18px;height:18px;color:var(--muted);}
.account-settings:hover,.account-settings:focus-visible {background:var(--bg);}
.account-preference {display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 10px;border-top:1px solid var(--line);font-size:12px;}
.account-segment {display:flex;gap:2px;border-radius:7px;padding:3px;background:var(--bg);}
.account-segment button {border:0;border-radius:5px;padding:6px 9px;min-height:30px;font-size:11px;background:transparent;color:var(--muted);}
.account-segment button[aria-pressed="true"] {background:var(--surface);color:var(--text);box-shadow:0 1px 4px #15233c18;}
.account-segment button:hover,.account-segment button:focus-visible {color:var(--text);}
.header-icon[aria-expanded="true"] {background:#18865d0d;color:var(--green);}
:root[data-theme="dark"] .account-menu {box-shadow:0 12px 36px #0006;}
:root[lang="ru"] .trade-row.is-own td:first-child:after {content:"Ваша сделка";}
@media(max-width:540px), (max-width:800px) and (max-height:540px){
 :root[lang="ru"] .chart-tabs {gap:9px;}
 :root[lang="ru"] .chart-tabs button {font-size:11px;}
 :root[lang="ru"] #demo-terminal .trade-kind {font-size:9px;}
 :root[lang="ru"] #demo-terminal .trade-row.is-own td:first-child:after {font-size:7px;margin-left:3px;}
}
:root[lang="ru"] #demo-terminal .trade-row {grid-template-columns:minmax(0,1fr) 58px 76px;}
@media(max-width:540px), (max-width:800px) and (max-height:540px){:root[lang="ru"] #demo-terminal .trade-row {grid-template-columns:minmax(0,1fr) 46px 76px;}}
/* Scripted rule illustrations, separate from the live ledger. */
.wiki-example {margin:20px 0;border:1px solid var(--line);border-radius:12px;padding:16px;background:var(--bg);color:var(--green);}
.wiki-example[data-outcome="loss"] {color:var(--red);}
.wiki-example-top {display:flex;justify-content:space-between;align-items:center;gap:12px;color:var(--muted);font-size:12px;}
.wiki-example-top button {padding:7px 10px;border:1px solid var(--line);border-radius:6px;background:var(--surface);color:var(--text);font-size:12px;}
.wiki-example-quote {display:flex;align-items:center;justify-content:space-between;gap:12px;margin:14px 0 5px;}
.wiki-example-quote>div {display:flex;flex-direction:column;gap:6px;}
.wiki-example-quote>div>span {color:var(--muted);font-size:10px;}
.wiki-example-quote strong {font-size:29px;line-height:1.15;letter-spacing:-.7px;font-variant-numeric:tabular-nums;}
.wiki-example-stage {padding:5px 9px;background:var(--surface);border:1px solid var(--line);border-radius:6px;font-size:10px;}
.wiki-example-chart {display:block;width:100%;height:110px;overflow:visible;}
.wiki-example-grid {stroke:var(--line);stroke-width:1;vector-effect:non-scaling-stroke;}
.wiki-example-trail {stroke:var(--muted);stroke-width:1.5;stroke-dasharray:3 5;fill:none;opacity:.2;}
.wiki-example-line {stroke:currentColor;stroke-width:2.5;fill:none;stroke-linecap:round;stroke-linejoin:round;}
.wiki-example-dot {fill:currentColor;stroke:var(--surface);stroke-width:2;}
.wiki-example-steps {display:flex;gap:6px;margin:6px 0 12px;}
.wiki-example-steps span {flex:1;padding:6px 3px;border-radius:5px;background:var(--surface);color:var(--muted);font-size:10px;text-align:center;border:1px solid var(--line);}
.wiki-example-steps span.is-current {border-color:currentColor;color:var(--green);font-weight:600;}
.wiki-example[data-outcome="loss"] .wiki-example-steps span.is-current {color:var(--red);}
.wiki-example-steps span.is-complete {color:var(--text);}
.wiki-articles .wiki-example-result {min-height:22px;margin:0;color:inherit;font-size:12px;font-weight:550;}
.wiki-articles .wiki-example-caption {font-size:12px;line-height:1.6;color:var(--muted);margin:8px 0 0;}
.wiki-allocation-example {margin:20px 0;}.wiki-allocation-example h3 {font-size:16px;margin:0 0 10px;}
.wiki-example-table-wrap {max-width:100%;min-width:0;overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;margin:16px 0;border:1px solid var(--line);border-radius:9px;}
.wiki-example-table {table-layout:auto;min-width:350px;background:var(--surface);}
.wiki-example-table thead {position:static;background:var(--bg);}
.wiki-example-table th,.wiki-example-table td {width:auto!important;height:auto;padding:12px 10px;font-size:11px;text-align:right;white-space:nowrap;border-bottom:1px solid var(--line);color:var(--text);font-variant-numeric:tabular-nums;}
.wiki-example-table th:first-child {text-align:left;color:var(--muted);font-weight:500;}
.wiki-example-table thead th {font-size:10px;font-weight:500;color:var(--muted);}
.wiki-example-table tfoot th,.wiki-example-table tfoot td {font-weight:600;background:var(--bg);border-bottom:0;}
.wiki-example-table .wiki-cell-zero {color:var(--red);}
@media(max-width:540px){.wiki-example {padding:12px;}.wiki-example-quote strong {font-size:26px;}.wiki-example-chart {height:100px;}.wiki-example-table th,.wiki-example-table td {padding:10px 8px;font-size:12px;}.wiki-example-table {min-width:330px;}.wiki-example-table thead th {font-size:12px;}}
.wiki-play-steps {list-style:none;padding:0;margin:20px 0;display:grid;gap:10px;counter-reset:play-step;}
.wiki-play-steps li {counter-increment:play-step;position:relative;padding:14px 14px 14px 52px;border:1px solid var(--line);border-radius:9px;display:flex;flex-direction:column;gap:6px;}
.wiki-play-steps li:before {content:counter(play-step);position:absolute;left:14px;top:14px;width:25px;height:25px;display:grid;place-items:center;background:var(--bg);color:var(--green);border-radius:7px;font-size:12px;font-weight:600;}
.wiki-play-steps strong {font-size:16px;}.wiki-play-steps span {font-size:15px;line-height:1.65;color:var(--muted);}
.wiki-room-example {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:20px 0;}
.wiki-room-example>div {display:flex;flex-direction:column;gap:9px;padding:15px;background:var(--bg);border:1px solid var(--line);border-radius:9px;}
.wiki-room-example span {font-size:12px;color:var(--muted);line-height:1.5;}.wiki-room-example strong {font-size:24px;letter-spacing:-.5px;}
.wiki-allocation-details>summary {cursor:pointer;color:var(--green);font-size:14px;padding:10px 0;}
.wiki-bank-flow {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:20px 0;}
.wiki-bank-flow>div {display:flex;flex-direction:column;gap:10px;padding:17px;border:1px solid var(--line);border-radius:10px;background:var(--bg);}
.wiki-bank-flow strong {font-size:16px;color:var(--green);}
.wiki-bank-flow span {font-size:14px;line-height:1.7;color:var(--muted);}
@media(max-width:650px){.wiki-bank-flow{grid-template-columns:minmax(0,1fr);gap:8px;}.wiki-bank-flow>div{padding:15px;}}
#wiki-allocation .wiki-example-table th:first-child {white-space:normal;min-width:105px;}
#wiki-allocation .wiki-example-table {min-width:420px;}
@media(max-width:540px){.wiki-room-example {gap:6px;}.wiki-room-example>div {padding:10px;}.wiki-room-example strong {font-size:18px;}.wiki-room-example span {font-size:12px;}}

/* Whole desktop cards share leftover height so both columns end on one line. */
@media(min-width:801px){
 #demo-terminal .trade-scroll[data-fill="true"]>table:not(.trade-ghost) {height:100%;}
 #demo-terminal .trade-scroll[data-fill="true"]>table:not(.trade-ghost)>tbody {height:100%;grid-auto-rows:minmax(var(--trade-row-height),1fr);}
 #demo-terminal .trade-scroll[data-fill="true"]>table:not(.trade-ghost)>tbody>.trade-row {height:100%;min-height:var(--trade-row-height);}
}
.footer-links {display:flex;align-items:center;gap:18px;}
.footer-links button {border:0;padding:0;background:transparent;font-size:inherit;color:var(--muted);}
.footer-links button:hover,.footer-links button:focus-visible {color:var(--text);}
.footer-dialog {width:min(480px,calc(100vw - 32px));max-height:calc(100svh - 40px);padding:24px;border:1px solid var(--line);border-radius:14px;background:var(--surface);color:var(--text);box-shadow:0 20px 70px #0003;}
.footer-dialog::backdrop {background:#0007;}
.footer-dialog-heading {display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:18px;}
.footer-dialog h2 {font-size:20px;letter-spacing:-.4px;margin:0;font-weight:600;}
.footer-dialog p {font-size:13px;color:var(--muted);line-height:1.8;margin:12px 0 0;}
#footer-info {overflow-y:auto;overscroll-behavior:contain;}
#disclaimer-copy section + section {margin-top:18px;}
#disclaimer-copy h3 {margin:0;font-size:14px;font-weight:600;}
#disclaimer-copy h3 + p {margin-top:5px;}
#disclaimer-copy .disclaimer-lead {color:var(--text);}
.footer-info-close {display:grid;place-items:center;flex-shrink:0;width:30px;height:30px;padding:5px;border:0;border-radius:7px;background:var(--bg);color:var(--muted);}
.footer-info-close svg {width:18px;height:18px;}
body.info-open {overflow:hidden;}
/* Keep a little breathing room for a three-digit room count. */
.room-stats>span:first-child {padding-left:14px;padding-right:14px;}
#room-online {min-width:3ch;flex-shrink:0;text-align:right;}
@media(max-width:540px), (max-width:800px) and (max-height:540px){.room-stats>span:first-child {padding-left:10px;padding-right:10px;}}
.signed-out #wallet,.signed-out #header-wallet,.signed-out .account-control {display:none!important;}
.auth-screen {width:min(440px,calc(100vw - 32px));max-height:calc(100dvh - 32px);padding:0;border:1px solid var(--line);border-radius:16px;background:var(--surface);color:var(--text);overflow:auto;box-shadow:0 24px 80px #0006;}
.auth-screen::backdrop {background:#0009;backdrop-filter:blur(4px);}
.auth-screen .auth-card {width:100%;border:0;}
.auth-heading-actions {display:flex;gap:8px;align-items:center;}
.auth-heading-actions #auth-close {font-size:22px;line-height:1;padding:3px 8px;}
.sign-in-button {background:var(--accent);border:1px solid transparent;color:#fff;border-radius:7px;padding:8px 16px;font-size:12px;font-weight:600;white-space:nowrap;}
.sign-in-button:hover {background:var(--accent-hover);}
.auth-card {width:min(100%,390px);padding:28px;background:var(--surface);border:1px solid var(--line);border-radius:16px;}
.auth-heading {display:flex;justify-content:space-between;align-items:center;gap:16px;}.auth-heading h1 {font-size:26px;letter-spacing:-.7px;margin:0;}
.auth-heading button {background:var(--bg);border:1px solid var(--line);border-radius:6px;color:var(--muted);padding:6px 8px;font-size:11px;}
.auth-card>p {color:var(--muted);font-size:13px;line-height:1.6;margin:10px 0 22px;}
.auth-tabs {display:flex;gap:5px;padding:4px;background:var(--bg);border-radius:8px;margin:0 0 24px;}
.auth-tabs button {flex:1;padding:9px;border:0;border-radius:5px;background:transparent;color:var(--muted);font-size:13px;}
.auth-tabs button[aria-selected="true"] {background:var(--surface);color:var(--text);box-shadow:0 1px 5px #0001;}
#auth-form {display:flex;flex-direction:column;gap:8px;}#auth-form label {font-size:12px;color:var(--muted);}
#auth-form input {width:100%;min-height:44px;margin:0 0 9px;border:1px solid var(--line);border-radius:7px;background:var(--bg);color:var(--text);font:inherit;font-size:16px;padding:10px 12px;}
#auth-form input:focus {outline:none;border-color:var(--green);}
.auth-submit {min-height:44px;border:0;border-radius:7px;background:#18865d;color:#fff;font-size:14px;font-weight:550;}
.auth-message {font-size:12px;color:var(--red);line-height:1.6;margin:0 0 6px;min-height:0;}.auth-message:empty {display:none;}
.account-username {font-size:12px;font-weight:600;color:var(--text);margin:8px 10px 12px;overflow:hidden;text-overflow:ellipsis;}
.account-logout {width:100%;padding:10px;text-align:left;border:0;border-top:1px solid var(--line);background:transparent;color:var(--muted);font-size:12px;}
.account-logout:hover {color:var(--red);}
@media(max-width:540px){.auth-card {padding:24px;}.sign-in-button {padding:6px 10px;font-size:11px;}}

.auth-email-fields:not([hidden]){display:grid;gap:8px}
#auth-code-back,.auth-secondary{align-self:start;justify-self:start;padding:0;background:none;border:0;color:var(--muted);font:inherit;font-size:12px;cursor:pointer}
#auth-code-back:hover,#auth-code-back:focus-visible,.auth-secondary:hover,.auth-secondary:focus-visible{color:var(--text)}
