@property --a { syntax: '<color>'; inherits: true; initial-value: #ff6a00; }
:root {
  --bg: #07080a; --ink: #ece8df; --dim: #98958c; --line: #ffffff1c; --a: #ff6a00; --hot: #ff2d1a;
  --sans: Geist, system-ui, sans-serif; --mono: 'IBM Plex Mono', ui-monospace, monospace; --disp: 'Big Shoulders Display', Geist, sans-serif;
  --gut: 28px;
  transition: --a .8s ease-out;
}
* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; background: var(--bg); color: var(--ink); font: 400 14px/1.45 var(--sans); -webkit-font-smoothing: antialiased; overflow: hidden; }
::selection { background: var(--a); color: #000; }
ol { list-style: none; padding: 0; }
em, i { font-style: normal; }
a { color: inherit; }
button, input { font: inherit; color: inherit; background: none; border: 0; }
button { cursor: pointer; }
:focus-visible { outline: 1.5px solid var(--a); outline-offset: 2px; }
h2 { font: 500 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }

#stage { position: fixed; inset: 0; }
#globe { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; outline: 0; }
#globe.drag { cursor: grabbing; }
#globe.over { cursor: none; }
#dial { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#dial line { stroke: #ffffff26; stroke-width: 1.5; transition: stroke .3s ease-out; }
#dial line.on { stroke: var(--a); stroke-width: 2.5; }
#reticle { position: fixed; left: 0; top: 0; pointer-events: none; z-index: 5; will-change: transform; }
#reticle i { position: absolute; left: -17px; top: -17px; width: 34px; height: 34px; background:
  linear-gradient(var(--ink),var(--ink)) 50% 0/1.5px 10px no-repeat, linear-gradient(var(--ink),var(--ink)) 50% 100%/1.5px 10px no-repeat,
  linear-gradient(var(--ink),var(--ink)) 0 50%/10px 1.5px no-repeat, linear-gradient(var(--ink),var(--ink)) 100% 50%/10px 1.5px no-repeat; }
#reticle i::after { content: ''; position: absolute; left: 16px; top: 16px; width: 2px; height: 2px; background: var(--a); }
#reticle span { position: absolute; left: 24px; top: 8px; white-space: nowrap; font: 400 11px/1 var(--mono); color: var(--ink); font-variant-numeric: tabular-nums; text-shadow: 0 1px 3px #000; }
#reticle.wait i { opacity: .35; }

#veil { position: fixed; inset: 0; pointer-events: none; opacity: 0; transition: opacity 1.2s ease-out;
  background: radial-gradient(closest-side at 50% 50%, #0000 62%, #ff2d1a33 100%); }

#hud { position: fixed; inset: 0; pointer-events: none; }
#hud section { position: absolute; }
#hud a, #hud button, #hud input, #hud label { pointer-events: auto; }

#tl { left: var(--gut); top: 24px; width: 300px; }
#brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
#brand img { width: 30px; height: 30px; display: block; }
#brand b { font: 900 30px/1 var(--disp); letter-spacing: .02em; }
#tl h1 { margin-top: 26px; font: 700 44px/.98 var(--disp); letter-spacing: -.005em; text-wrap: balance; }
#tl p { margin-top: 10px; color: #c9c6bd; max-width: 34ch; text-wrap: pretty; }

#ml { left: var(--gut); top: 50%; transform: translateY(-34%); width: 270px; }
#num { display: flex; align-items: flex-start; color: var(--a); font-family: var(--disp); font-weight: 900; line-height: .84; }
#num b { font-size: 132px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
#num i { font-size: 44px; margin: 4px 0 0 4px; }
#num.hot b { animation: alarm 1.2s steps(2, jump-none) infinite; }
@keyframes alarm { 50% { opacity: .62; } }
#st { margin-top: 12px; display: grid; gap: 3px; font: 400 12px/1.4 var(--mono); color: var(--dim); }
#st b { color: var(--a); font-weight: 500; letter-spacing: .06em; margin-bottom: 3px; }
#st span { display: flex; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 4px; }
#st em { color: var(--ink); font-variant-numeric: tabular-nums; }
#flow { margin-top: 14px; font: 400 12px/1.45 var(--mono); color: var(--dim); }
#flowLive span { display: flex; justify-content: space-between; padding: 2px 0; }
#flowLive em { color: var(--ink); font-variant-numeric: tabular-nums; }
.sell { color: var(--hot); } .buy { color: #6fd08c; }
#tape { margin-top: 6px; display: grid; gap: 1px; font-size: 11px; }
#tape li { display: flex; justify-content: space-between; font-variant-numeric: tabular-nums; }

#tr { right: var(--gut); top: 24px; bottom: 96px; width: 310px; display: flex; flex-direction: column; }
#top { display: flex; justify-content: flex-end; gap: 8px; }
#coin { height: 34px; padding: 0 12px; background: var(--ink); color: #000; font: 500 12px/1 var(--mono); max-width: 262px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; transition: background-color .15s ease-out; }
#coin:hover { background: var(--a); }
#coin:active, #ask button:active { scale: .96; }
.x { display: grid; place-items: center; width: 34px; height: 34px; box-shadow: inset 0 0 0 1px var(--line); transition: color .15s ease-out; }
.x:hover { color: var(--a); }
.x[hidden] { display: none; }
#kface { position: relative; margin-top: 14px; height: 168px; overflow: hidden; background: #000; }
#kface img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%; display: block; transition: filter .8s ease-out; }
#kface figcaption { position: absolute; left: 10px; bottom: 8px; right: 10px; display: flex; justify-content: space-between; align-items: baseline; text-shadow: 0 1px 4px #000; }
#kface b { font: 900 26px/1 var(--disp); }
#kface span { font: 400 11px/1 var(--mono); color: var(--a); }
#tr h2 { margin-top: 14px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
#feed { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; padding: 10px 0;
  -webkit-mask-image: linear-gradient(#0000, #000 56px); mask-image: linear-gradient(#0000, #000 56px); }
#feed li { font: 400 13px/1.42 var(--mono); }
#feed li time { display: block; font-size: 10.5px; color: var(--dim); font-variant-numeric: tabular-nums; }
#feed li.new { animation: decode .5s cubic-bezier(.2,0,0,1); }
@keyframes decode { from { opacity: 0; filter: blur(4px); transform: translateY(6px); } }
#ask { display: flex; height: 40px; box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .15s ease-out; }
#ask:focus-within { box-shadow: inset 0 0 0 1px var(--a); }
#ask input { flex: 1; min-width: 0; padding: 0 12px; font: 400 13px/1 var(--mono); outline: 0; }
#ask input::placeholder, #who input::placeholder { color: var(--dim); }
#ask button { width: 40px; display: grid; place-items: center; color: var(--a); }
#reply { margin-top: 8px; font: 400 13px/1.42 var(--mono); color: var(--a); min-height: 18px; }

#bl { left: var(--gut); bottom: 24px; width: 270px; }
#bl h2 { padding-bottom: 7px; border-bottom: 1px solid var(--line); }
#board { margin-top: 5px; font: 400 12px/1.6 var(--mono); }
#board li { display: flex; justify-content: space-between; }
#board li em { color: var(--a); font-variant-numeric: tabular-nums; }
#board:empty::before { content: 'Nobody yet.'; color: var(--dim); }
#lastC { margin-top: 3px; font: 400 11.5px/1.4 var(--mono); color: var(--dim); }

#bc { left: 50%; bottom: 24px; width: 380px; transform: translateX(-50%); text-align: center; }
#result b { display: block; font: 700 30px/1 var(--disp); font-variant-numeric: tabular-nums; }
#result span { display: block; margin-top: 4px; font: 400 12px/1.3 var(--mono); color: #c9c6bd; }
#charge { height: 2px; margin-top: 10px; background: var(--line); overflow: hidden; }
#charge i { display: block; height: 100%; width: 100%; background: var(--a); transform-origin: left; }
#who { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 8px; font: 400 12px/1 var(--mono); color: var(--dim); }
#who input { width: 112px; height: 26px; color: var(--ink); text-align: left; font: 400 12px/1 var(--mono); outline: 0; box-shadow: inset 0 -1px 0 var(--line); }
#who input:focus { box-shadow: inset 0 -1px 0 var(--a); }

#br { right: var(--gut); bottom: 24px; width: 310px; display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 10px; font: 400 10.5px/1.25 var(--mono); color: var(--dim); }
#br em { display: block; font: 700 22px/1 var(--disp); color: var(--ink); margin-bottom: 3px; font-variant-numeric: tabular-nums; }

#flash { position: fixed; inset: 0; z-index: 6; display: grid; place-content: center; justify-items: center; text-align: center; pointer-events: none; animation: flashIn .35s cubic-bezier(.2,0,0,1); }
#flash[hidden] { display: none; }
#flash b { font: 900 clamp(84px, 15vw, 210px)/.86 var(--disp); color: var(--a); text-shadow: 0 6px 40px #000c; }
#flash p { margin-top: 12px; font: 500 15px/1.4 var(--mono); text-shadow: 0 2px 10px #000; }
#flash a { pointer-events: auto; margin-top: 14px; padding: 10px 14px; background: var(--ink); color: #000; text-decoration: none; font: 500 12px/1 var(--mono); }
@keyframes flashIn { from { opacity: 0; transform: scale(1.04); filter: blur(6px); } }
#legal { position: fixed; left: 50%; bottom: 6px; transform: translateX(-50%); font: 400 10px/1 var(--mono); color: #77746c; pointer-events: none; }

@media (max-width: 1180px) { #tl h1 { font-size: 36px; } #num b { font-size: 104px; } #tr, #br { width: 270px; } #bc { width: 300px; } }
@media (max-height: 760px) and (min-width: 821px) { #kface { height: 96px; } #tl p { display: none; } #tl h1 { margin-top: 14px; font-size: 34px; } #num b { font-size: 96px; } #ml { transform: translateY(-46%); } #tape { display: none; } }
@media (max-width: 820px) {
  html, body { overflow: auto; height: auto; }
  :root { --gut: 16px; }
  #stage { position: absolute; top: 96px; left: 0; right: 0; bottom: auto; height: 100vw; }
  #hud { position: relative; inset: auto; display: flex; flex-direction: column; padding: 14px var(--gut) 34px; gap: 18px; pointer-events: auto; }
  #hud section { position: static; width: auto; transform: none; }
  #tl { order: 0; display: grid; grid-template-columns: 1fr; }
  #tl h1 { margin-top: 10px; font-size: 26px; } #tl p { display: none; }
  #bc { order: 1; margin-top: calc(100vw + 2px); }
  #ml { order: 2; } #num b { font-size: 92px; }
  #tr { order: 3; height: auto; } #top { position: absolute; top: 14px; right: var(--gut); } #coin { max-width: 170px; }
  #feed { height: 210px; flex: none; }
  #tr h2 { margin-top: 0; }
  #bl { order: 4; } #br { order: 5; }
  #reticle { display: none; } #veil { display: none; }
  #legal { position: static; transform: none; text-align: center; padding-bottom: 12px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; } }
