:root {
  --ink: #0b0b0b;
  --bar: #0b0b0b;
  --bar-2: #1b1b1b;
  --bar-line: #2c2c2c;
  --paper: #ffffff;
  --paper-2: #faf8f2;
  --rule: #ece8dc;
  --text: #121212;
  --grey: #9a9d97;
  --grey-2: #6c6f6a;
  --gold: #f5b800;
  --gold-ink: #946500;
  --red: #f0342f;
  --up: #2fbf5b;
  --up-ink: #1c8a3e;
  --amber: #ff8a3d;
  --blue: #2f7df6;
  --font: "Inter Tight", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  font-family: var(--font);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { background: var(--gold); }
body { margin: 0; color: var(--text); -webkit-font-smoothing: antialiased; font-feature-settings: "tnum" 1; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[hidden] { display: none !important; }

.frame { max-width: 1440px; margin: 0 auto; min-height: 100vh; background: var(--paper); display: flex; flex-direction: column; box-shadow: 0 40px 120px -40px rgba(30, 70, 0, .45); }
@media (min-width: 1500px) { .frame { margin: 32px auto; min-height: calc(100vh - 64px); } }

/* ================================================= command bar */
.bar { background: var(--bar); color: #fff; padding: 22px 36px; position: sticky; top: 0; z-index: 30; }
.bar-row { display: flex; align-items: center; gap: 12px; }
.bar-row.sub { margin-top: 18px; }
.spacer { flex: 1; }
.logo { display: flex; align-items: center; gap: 12px; margin-right: 34px; font-weight: 700; letter-spacing: .08em; font-size: 15px; }
.logo svg { width: 34px; height: 34px; stroke: none; }
.logo .t { fill: var(--gold); }
.logo .b { fill: var(--ink); }
.logo .k { fill: none; stroke: var(--ink); stroke-linecap: round; stroke-linejoin: round; }
.links { display: flex; gap: 40px; }
.links a { color: #a9a9a9; font-size: 15px; }
.links a:hover, .links a.on { color: #fff; }
.search { margin-left: auto; display: flex; align-items: center; gap: 10px; width: min(440px, 38vw); height: 46px; padding: 0 5px 0 16px; border: 1px solid var(--bar-line); }
.search:focus-within { border-color: #5a5a5a; }
.search input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: #fff; font-size: 14.5px; }
.search input::placeholder { color: #8a8a8a; }
.search .go { height: 34px; padding: 0 14px; background: var(--gold); color: var(--ink); font-weight: 600; font-size: 13.5px; }
.sq { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 46px; padding: 0 18px; border: 1px solid var(--bar-line); color: #cfcfcf; font-size: 14.5px; white-space: nowrap; }
.sq:hover:not(:disabled) { border-color: #5a5a5a; color: #fff; }
.sq:disabled { opacity: .4; cursor: default; }
.sq.txt { background: var(--bar-2); border-color: var(--bar-2); color: #fff; }
.sq.on { color: #fff; }
.sq.on svg { color: var(--gold); }
.sq.light { border-color: var(--rule); color: var(--text); height: 44px; background: var(--paper); }
.sq.light:hover:not(:disabled) { border-color: #c9ccc5; color: var(--text); }
.sq.solid { background: var(--ink); border-color: var(--ink); color: #fff; height: 44px; font-weight: 500; }
.sq.solid:hover:not(:disabled) { background: #262626; color: #fff; }
.sq.wide { width: 100%; }

.tabs { display: inline-flex; gap: 4px; }
.tabs button { height: 44px; padding: 0 22px; background: var(--bar-2); color: #a9a9a9; font-size: 14.5px; white-space: nowrap; }
.tabs button:hover { color: #fff; }
.tabs button.on { background: #fff; color: var(--ink); }
.tabs.light button { background: var(--paper); border: 1px solid var(--rule); color: var(--grey-2); height: 38px; padding: 0 16px; font-size: 13.5px; }
.tabs.light button:hover { color: var(--text); }
.tabs.light button.on { background: var(--ink); border-color: var(--ink); color: #fff; }

.sel { position: relative; display: inline-flex; }
.sel select { appearance: none; height: 46px; padding: 0 44px 0 18px; background: transparent; border: 1px solid var(--bar-line); color: #fff; font-size: 14.5px; cursor: pointer; }
.sel select:hover { border-color: #5a5a5a; }
.sel option { background: var(--bar); }
.sel::after { content: ""; position: absolute; right: 18px; top: 50%; width: 7px; height: 7px; border-right: 1.6px solid #fff; border-bottom: 1.6px solid #fff; transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.back { color: #a9a9a9; font-size: 14.5px; white-space: nowrap; }
.back:hover { color: #fff; }

/* ================================================= heat panels */
.view { flex: 1; }
.heat { display: grid; grid-template-columns: 1fr 1.6fr 1.6fr; min-height: 760px; border-bottom: 1px solid var(--rule); }
.pane { position: relative; overflow: hidden; background: var(--paper); }
.pane + .pane { border-left: 1px solid var(--rule); }
#home .heat { height: clamp(640px, calc(100vh - 186px), 920px); min-height: 0; }
#home .pane.list { display: flex; flex-direction: column; }
#home .rows { flex: 1; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #d9dcd5 transparent; }
.pane::before { content: ""; position: absolute; inset: -40px; pointer-events: none; z-index: 0; background: var(--wash, none); filter: blur(30px); }
.pane > * { position: relative; z-index: 1; }
.pane-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 26px 24px 22px 28px; }
.pane-h h2 { margin: 0; font-size: 38px; font-weight: 400; letter-spacing: -.02em; line-height: 1; display: flex; align-items: center; gap: 12px; white-space: nowrap; min-width: 0; }
.pane-h h2 > span { overflow: hidden; text-overflow: ellipsis; }
.cap { margin: 0; font-size: 14px; color: #3a3a3a; text-align: right; line-height: 1.2; }
.tok-price .cap, .you .cap, .sheet .cap, .v-head .cap { text-align: left; }

.dir { width: 24px; height: 24px; border-radius: 50%; border: 1.6px solid var(--grey); display: inline-grid; place-items: center; flex: none; }
.dir::after { content: ""; border: 5px solid transparent; }
.dir:not(.up):not(.down) { visibility: hidden; }
.dir.up { border-color: var(--up-ink); }
.dir.up::after { border-bottom: 6px solid var(--up-ink); border-top: 0; margin-top: -1px; }
.dir.down { border-color: var(--red); }
.dir.down::after { border-top: 6px solid var(--red); border-bottom: 0; margin-top: 2px; }

.price { font-weight: 400; letter-spacing: -.02em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.price .d { color: var(--grey); font-weight: 300; }
.price.xl { font-size: clamp(44px, 4.4vw, 64px); line-height: 1; }

.pill { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border-radius: 99px; font-size: 11px; font-weight: 600; color: #fff; background: var(--grey); white-space: nowrap; }
.pill::before { content: ""; border: 3.5px solid transparent; }
.pill.up { background: var(--up); }
.pill.up::before { border-bottom: 4.5px solid #fff; border-top: 0; }
.pill.down { background: var(--red); }
.pill.down::before { border-top: 4.5px solid #fff; border-bottom: 0; }
.pill.flat::before { display: none; }

/* featured */
.feat { display: flex; flex-direction: column; }
.feat-body { margin-top: auto; padding: 0 24px 26px 28px; display: flex; flex-direction: column; gap: 22px; }
.spark { width: 100%; height: 150px; display: block; }
.spark .vol { stroke: #cdd2c8; stroke-width: 1.5; }
.spark .ln { stroke: var(--ink); stroke-width: 1.3; fill: none; vector-effect: non-scaling-stroke; }
.line-btn { align-self: flex-start; font-size: 15px; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.line-btn:hover { color: var(--gold-ink); }

/* key/value lists */
.kv { margin: 0; }
.kv > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.kv > div:first-child { border-top: 1px solid var(--rule); }
.kv dt { color: var(--grey-2); font-size: 14px; }
.kv dd { margin: 0; font-size: 16px; font-variant-numeric: tabular-nums; text-align: right; }

/* rows */
.rows { display: flex; flex-direction: column; }
.r { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 64px minmax(120px, auto); grid-template-rows: auto 1fr; column-gap: 18px; padding: 18px 24px 16px 32px; border-top: 1px solid var(--rule); cursor: pointer; min-height: var(--h, 64px); transition: background .12s; }
.r::before { content: ""; position: absolute; left: 0; top: -1px; bottom: 0; width: 8px; background: var(--rule); }
.r.up::before { background: var(--up); }
.r.down::before { background: var(--red); }
.r:hover { background: rgba(0, 0, 0, .025); }
.r .nm { display: flex; align-items: center; gap: 12px; min-width: 0; font-size: 21px; line-height: 1.2; }
.r .nm b { font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r .ic { width: 22px; height: 22px; border-radius: 50%; flex: none; object-fit: cover; background: var(--paper-2); display: inline-grid; place-items: center; font-size: 9px; font-weight: 700; color: var(--grey-2); border: 1px solid var(--rule); }
.r .sub { grid-column: 1; grid-row: 2; display: flex; gap: 16px; font-size: 12.5px; color: var(--grey-2); padding: 6px 0 0 34px; white-space: nowrap; overflow: hidden; }
.r .pill { grid-column: 2; grid-row: 1; justify-self: start; margin-top: 3px; }
.r .price { grid-column: 3; grid-row: 1 / span 2; text-align: right; font-size: 26px; line-height: 1.05; }
.rows.big .r .price { font-size: 34px; }
.rows-empty { padding: 30px 28px; color: var(--grey-2); border-top: 1px solid var(--rule); }
.skel { display: block; height: 16px; background: linear-gradient(90deg, #f0f1ee, #e6e8e3, #f0f1ee); background-size: 200% 100%; animation: sh 1.2s infinite; }
@keyframes sh { to { background-position: -200% 0; } }

/* about */
.about { display: grid; grid-template-columns: 1fr 1.6fr; gap: 40px; padding: 56px 28px 64px; scroll-margin-top: 170px; }
.about h2 { margin: 0; font-size: 44px; font-weight: 300; letter-spacing: -.025em; line-height: 1.05; max-width: 420px; }
.about p { margin: 0 0 16px; font-size: 17px; line-height: 1.55; color: #2e2e2e; max-width: 640px; }
.about .fine { color: var(--grey-2); font-size: 14px; }

/* ================================================= replay */
.heat.replay { grid-template-columns: minmax(300px, 1fr) 1.7fr minmax(300px, 1fr); }
.tok { display: flex; flex-direction: column; padding-bottom: 26px; }
.tok-price { padding: 8px 24px 8px 28px; display: flex; flex-direction: column; gap: 10px; }
.ca { margin: 16px 24px 20px 28px; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 14px; border: 1px solid var(--rule); background: rgba(255,255,255,.75); font-family: var(--mono); font-size: 12px; color: var(--grey-2); text-align: left; }
.ca .cp { font-family: var(--font); font-size: 12.5px; color: var(--text); }
.ca:hover { border-color: #c9ccc5; }
.tok .kv { margin: 0 24px 0 28px; }
.verdict { margin: 28px 24px 0 28px; }
.v-head { display: flex; justify-content: space-between; align-items: center; }
.mini { font-size: 12px; color: var(--grey-2); border: 1px solid var(--rule); padding: 4px 8px; background: #fff; }
.mini:hover { color: var(--text); border-color: #c9ccc5; }
.v-word { margin: 12px 0 14px; padding: 4px 0 4px 16px; border-left: 8px solid var(--grey); font-size: 34px; letter-spacing: -.01em; line-height: 1.1; }
.v-word.rug { border-color: var(--red); }
.v-word.runner, .v-word.pumping { border-color: var(--up); }
.v-word.round { border-color: var(--amber); }
.risk { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--grey-2); white-space: nowrap; }
.risk-track { flex: 1; height: 4px; background: #ebede8; }
.risk-track i { display: block; height: 100%; width: 0; background: var(--ink); transition: width .6s; }
.flags { list-style: none; margin: 16px 0 0; padding: 0; }
.flags li { display: grid; grid-template-columns: 10px 1fr; gap: 12px; padding: 9px 0; border-top: 1px solid var(--rule); font-size: 14px; line-height: 1.35; }
.flags li::before { content: ""; width: 10px; height: 10px; margin-top: 4px; background: var(--amber); }
.flags li.high::before { background: var(--red); }
.flags li.ok::before { background: var(--up); }

.stagepane { padding: 26px 28px 24px; display: flex; flex-direction: column; background: var(--paper-2); }
.stage { position: relative; display: flex; justify-content: center; min-height: 300px; }
#canvas { display: block; height: min(70vh, 860px); width: auto; max-width: 100%; background: #000; box-shadow: 0 30px 60px -30px rgba(0,0,0,.45); cursor: pointer; }
#canvas.landscape { width: 100%; height: auto; }
#canvas.square { height: min(62vh, 680px); }
.loader { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 26px; background: var(--paper-2); transition: opacity .35s; }
.loader.done { opacity: 0; pointer-events: none; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; font-size: 17px; min-width: 290px; }
.steps li { color: #b9bcb5; display: flex; align-items: center; gap: 14px; }
.steps li::before { content: ""; width: 8px; height: 22px; background: #dfe1dc; flex: none; }
.steps li.on { color: var(--text); }
.steps li.on::before { background: var(--ink); animation: blink .8s infinite; }
.steps li.ok { color: var(--grey-2); }
.steps li.ok::before { background: var(--gold); }
.steps em { font-style: normal; color: var(--grey-2); font-size: 14px; }
@keyframes blink { 50% { opacity: .25; } }
.ld-bar { width: 290px; height: 2px; background: #dfe1dc; }
.ld-bar i { display: block; height: 100%; width: 0; background: var(--ink); transition: width .25s; }
.error-state { position: absolute; inset: 0; background: var(--paper-2); display: flex; flex-direction: column; justify-content: center; padding: 40px; gap: 12px; }
.error-state h3 { margin: 0; font-size: 32px; font-weight: 400; letter-spacing: -.02em; border-left: 8px solid var(--red); padding-left: 16px; }
.error-state p { margin: 0 0 8px; color: var(--grey-2); font-size: 16px; line-height: 1.5; max-width: 440px; }

.player { display: flex; align-items: center; gap: 14px; margin-top: 18px; }
.play { width: 44px; height: 44px; background: var(--ink); color: #fff; display: grid; place-items: center; flex: none; }
.play svg { fill: currentColor; stroke: none; width: 18px; height: 18px; }
.play:disabled { opacity: .3; }
.clock { font-size: 13px; color: var(--grey-2); min-width: 34px; }
input[type=range] { flex: 1; appearance: none; height: 2px; background: #d7dad3; outline: 0; }
input[type=range]::-webkit-slider-thumb { appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--ink); }
input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: var(--ink); }
.stage-actions { display: flex; align-items: center; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
#liveBtn.on { border-color: var(--red); color: var(--red); }
#liveBtn.on .live-dot { animation: blink 1s infinite; }

.side { display: flex; flex-direction: column; }
.moments { list-style: none; margin: 0; padding: 0; }
.moments li { position: relative; display: grid; grid-template-columns: 44px 1fr; gap: 12px; padding: 14px 24px 14px 32px; border-top: 1px solid var(--rule); cursor: pointer; font-size: 15px; line-height: 1.35; }
.moments li::before { content: ""; position: absolute; left: 0; top: -1px; bottom: 0; width: 8px; background: var(--edge, var(--rule)); }
.moments li:hover { background: rgba(0,0,0,.025); }
.moments li.on { background: var(--paper-2); }
.moments time { color: var(--grey); font-size: 13px; padding-top: 2px; }
.moments .k { display: block; font-size: 12px; color: var(--grey-2); margin-bottom: 2px; }
.moments .empty { cursor: default; display: block; color: var(--grey-2); }
.moments .empty::before { display: none; }
.e-snipers, .e-cluster, .e-exit { --edge: var(--amber); }
.e-dump, .e-crash, .e-lp_remove { --edge: var(--red); }
.e-ath, .e-lp_add { --edge: var(--up); }
.e-you { --edge: var(--blue); }

.you { margin-top: auto; padding: 22px 24px 26px 28px; border-top: 1px solid var(--rule); background: var(--paper-2); display: flex; flex-direction: column; gap: 10px; }
.you h3 { margin: 0; font-size: 20px; font-weight: 500; }
.you-row { display: flex; gap: 8px; }
.you-row input { flex: 1; min-width: 0; height: 44px; padding: 0 12px; border: 1px solid var(--rule); background: #fff; outline: 0; font-family: var(--mono); font-size: 12px; }
.you-row input:focus { border-color: #c9ccc5; }
.you .kv { margin-top: 6px; }
.up-t { color: var(--up-ink); } .down-t { color: var(--red); }

/* ================================================= footer */
.foot { display: flex; gap: 32px; padding: 22px 28px; font-size: 13px; color: var(--grey-2); }
.foot span:first-child { color: var(--text); font-weight: 600; letter-spacing: .08em; }
.foot a { color: var(--text); border-bottom: 1px solid currentColor; }
.foot .r { margin-left: auto; }

/* ================================================= share sheet */
.sheet { border: 0; padding: 0; background: var(--paper); color: var(--text); width: min(1000px, calc(100% - 24px)); max-height: calc(100vh - 24px); box-shadow: 0 40px 120px rgba(0,0,0,.4); }
.sheet::backdrop { background: rgba(11, 11, 11, .6); }
.sheet[open] { animation: rise .2s ease-out; }
@keyframes rise { from { transform: translateY(14px); opacity: 0; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; background: var(--bar); }
.sheet-head .tabs button { height: 38px; padding: 0 18px; font-size: 13.5px; background: var(--bar-2); border: 0; color: #a9a9a9; }
.sheet-head .tabs button.on { background: #fff; color: var(--ink); }
.sheet .x { color: #cfcfcf; font-size: 14px; border: 1px solid var(--bar-line); height: 38px; padding: 0 14px; }
.sheet .x:hover { color: #fff; }
.sheet-body { display: grid; grid-template-columns: auto 1fr; }
.preview { position: relative; background: var(--paper-2); display: flex; justify-content: center; align-items: center; padding: 22px; }
.preview canvas, .preview video, .preview img { display: block; max-height: 68vh; max-width: min(460px, 55vw); width: auto; height: auto; box-shadow: 0 20px 50px -25px rgba(0,0,0,.5); }
.preview.landscape canvas, .preview.landscape video, .preview.landscape img { max-width: min(540px, 58vw); }
.rec-badge { position: absolute; left: 50%; bottom: 34px; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; background: #fff; padding: 8px 14px; font-size: 13px; box-shadow: 0 6px 20px rgba(0,0,0,.2); white-space: nowrap; }
.rec-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); animation: blink 1s infinite; }
.sheet-side { padding: 26px 26px 26px 28px; display: flex; flex-direction: column; gap: 12px; min-width: 0; border-left: 1px solid var(--rule); }
.sheet-title { margin: 0; font-size: 30px; font-weight: 400; letter-spacing: -.02em; }
.rec-progress { height: 2px; background: var(--rule); }
.rec-progress i { display: block; height: 100%; width: 0; background: var(--ink); }
.cap-h { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.sheet textarea { border: 1px solid var(--rule); padding: 12px 14px; font-size: 14.5px; line-height: 1.45; resize: vertical; outline: 0; background: #fff; }
.sheet textarea:focus { border-color: #c9ccc5; }
.share-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* ================================================= toasts */
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--ink); color: #fff; padding: 12px 18px; font-size: 14px; border-left: 6px solid var(--grey); box-shadow: 0 10px 30px rgba(0,0,0,.25); animation: rise .2s ease-out; max-width: 92vw; }
.toast.ok { border-left-color: var(--gold); }
.toast.err { border-left-color: var(--red); }

/* ================================================= responsive */
@media (max-width: 1180px) {
  .heat, .heat.replay { grid-template-columns: 1fr 1fr; }
  .feat, .stagepane { grid-column: 1 / -1; }
  .stagepane { order: -1; }
  .heat > .pane { border-left: 0; border-top: 1px solid var(--rule); }
  .heat > .pane:nth-child(3) { border-left: 1px solid var(--rule); }
  .links { gap: 24px; }
  .feat { min-height: 400px; }
  #home .heat { height: auto; }
  #home .rows { max-height: 720px; }
}
@media (max-width: 760px) {
  .bar { padding: 14px 16px; }
  .links { display: none; }
  .logo { margin-right: 0; }
  .logo span { display: none; }
  .search { width: auto; flex: 1; height: 42px; }
  .sq { height: 42px; padding: 0 12px; }
  #walletLabel { display: none; }
  .bar-row.sub { margin-top: 12px; overflow-x: auto; scrollbar-width: none; }
  .tabs button { height: 40px; padding: 0 14px; }
  .sel select { height: 40px; }
  #replayControls { flex-wrap: wrap; overflow: visible; gap: 8px; }
  #replayControls #winSeg { order: 3; width: 100%; overflow-x: auto; scrollbar-width: none; }
  #replayControls #winSeg button { flex: none; }
  .heat, .heat.replay { grid-template-columns: 1fr; min-height: 0; }
  .heat > .pane:nth-child(3) { border-left: 0; }
  .pane-h h2 { font-size: 30px; }
  .about { grid-template-columns: 1fr; padding: 40px 20px; }
  .about h2 { font-size: 34px; }
  .r { grid-template-columns: minmax(0, 1fr) auto; padding: 14px 16px 14px 24px; column-gap: 10px; }
  .r .pill { grid-column: 1; grid-row: 2; margin: 6px 0 0 34px; }
  .r .sub { display: none; }
  .r .price, .rows.big .r .price { grid-column: 2; font-size: 24px; }
  .r .nm { font-size: 18px; }
  .stagepane { padding: 16px; }
  #canvas, #canvas.square { height: auto; width: 100%; }
  .sheet-body { grid-template-columns: 1fr; }
  .sheet-side { border-left: 0; }
  .preview canvas, .preview video, .preview img { max-height: 44vh; max-width: 100%; }
  .foot { flex-wrap: wrap; gap: 10px 20px; }
  .foot .r { margin-left: 0; }
}
