:root {
  --bg: #02040a;
  --ink: #eef1f6;
  --mute: #9aa3b5;
  --faint: #5f687a;
  --gold: #f7931a;
  --gold-soft: #ffc46b;
  --card: rgba(10, 14, 24, 0.72);
  --line: rgba(255, 255, 255, 0.08);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--ink);
  font: 14px/1.45 Inter, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
canvas#c { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
canvas#c.dragging { cursor: grabbing; }
canvas#fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
b { font-weight: 600; font-variant-numeric: tabular-nums; }
button { font: inherit; cursor: pointer; }

.label { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); font-weight: 600; }
.small { font-size: 12.5px; color: var(--mute); }
.card, #legend, #plotcard, #toast, #hint {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}

#loading { position: fixed; inset: 0; display: grid; place-content: center; justify-items: center; gap: 16px;
  color: var(--mute); z-index: 20; background: var(--bg); transition: opacity .8s; }
#loading.done { opacity: 0; pointer-events: none; }
.spinner { width: 36px; height: 36px; border-radius: 50%; border: 2px solid rgba(247,147,26,.2); border-top-color: var(--gold);
  animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

#brand { position: fixed; top: 22px; left: 24px; max-width: 360px; pointer-events: none;
  text-shadow: 0 1px 2px rgba(0,0,0,.9), 0 0 18px rgba(0,0,0,.85), 0 0 36px rgba(0,0,0,.6); }
#brand .eyebrow { color: var(--gold); font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; }
#brand h1 { font-size: 30px; line-height: 1.1; font-weight: 600; margin: 6px 0 8px; letter-spacing: -.01em; }
#brand p { margin: 0; color: var(--mute); font-size: 13.5px; }
#brand #fair { margin-top: 6px; color: var(--gold-soft); font-size: 12.5px; }

#panel { position: fixed; left: 24px; top: var(--top, 196px); width: 300px; display: flex; flex-direction: column; gap: 12px;
  max-height: calc(100% - var(--top, 196px) - 12px); overflow: auto; scrollbar-width: none; }
.card { padding: 14px 16px; }
#supply .big { font-size: 28px; font-weight: 300; margin: 4px 0 8px; }
#supply .big b { font-weight: 600; color: var(--gold-soft); }
#supply .big span { font-size: 14px; color: var(--mute); }
.bar { height: 6px; border-radius: 4px; background: rgba(255,255,255,.07); overflow: hidden; margin-bottom: 8px; }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #c76a00, var(--gold), var(--gold-soft)); border-radius: 4px; transition: width 1s; }

.build-row { display: flex; gap: 14px; align-items: center; margin: 10px 0 8px; }
#b-house { width: 84px; flex: none; overflow: visible; transition: transform 1s; transform-origin: 50% 100%; }
#b-house .outline { fill: rgba(255,255,255,.03); stroke: rgba(247,147,26,.55); stroke-width: 2; stroke-dasharray: 4 3; }
#b-house .scaffold path { stroke: rgba(200,210,230,.35); stroke-width: 1.5; fill: none; }
#b-fill { transition: y 1s linear; }
.build-stats { display: grid; gap: 3px; font-size: 13px; color: var(--mute); }
.build-stats b { color: var(--ink); }

#r-list { display: grid; gap: 4px; margin-top: 8px; }
.blk { display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: end; padding: 6px 6px; margin: 0 -6px;
  border-radius: 8px; cursor: pointer; border: 0; background: none; color: inherit; text-align: left; }
.blk:hover { background: rgba(255,255,255,.05); }
.blk svg { width: 30px; height: 30px; overflow: visible; }
.blk .h { font-weight: 600; font-variant-numeric: tabular-nums; }
.blk .sub { font-size: 11.5px; color: var(--faint); }
.blk .plots { font-size: 12px; color: var(--gold-soft); white-space: nowrap; align-self: center; }
.blk.fresh { animation: fresh 2s ease-out; }
@keyframes fresh { from { background: rgba(247,147,26,.3); } to { background: none; } }

#legend { position: fixed; right: 24px; top: 22px; padding: 14px 16px; display: grid; gap: 7px; width: 220px; }
.key { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--mute); }
.key i { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.key input { margin: 0; accent-color: var(--gold); }
.est { font-size: 10px; color: var(--faint); text-transform: uppercase; letter-spacing: .08em; }
#legend button { margin-top: 6px; padding: 9px 12px; border-radius: 10px; border: 1px solid rgba(247,147,26,.5);
  background: rgba(247,147,26,.14); color: var(--gold-soft); font-weight: 600; }
#legend button.ghost { margin-top: 0; border-color: var(--line); background: transparent; color: var(--mute); font-weight: 500; }
#legend button:hover { filter: brightness(1.2); }

#hint { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); padding: 10px 18px; text-align: center;
  max-width: min(620px, calc(100% - 32px)); pointer-events: none; }
#hint-text { font-size: 14px; }
#scale { font-size: 12px; color: var(--faint); margin-top: 3px; font-variant-numeric: tabular-nums; }

#plotcard { position: fixed; right: 24px; bottom: 22px; width: 300px; padding: 14px 16px; }
#plotcard .x { position: absolute; top: 6px; right: 8px; background: none; border: 0; color: var(--faint); font-size: 22px; line-height: 1; }
.pc-status { font-size: 18px; font-weight: 600; margin: 6px 0; }
#pc-detail { display: grid; gap: 4px; }

#toast { position: fixed; top: 22px; left: 50%; transform: translateX(-50%); padding: 12px 14px 12px 18px; display: flex; gap: 14px;
  align-items: center; border-color: rgba(247,147,26,.45); max-width: calc(100% - 32px); animation: drop .5s ease-out; }
#toast-text { font-size: 13.5px; }
#toast button { padding: 7px 12px; border-radius: 9px; border: 0; background: var(--gold); color: #1a0e00; font-weight: 600; white-space: nowrap; }
@keyframes drop { from { opacity: 0; transform: translate(-50%, -12px); } }

#nogl { position: fixed; inset: 0; display: grid; place-content: center; text-align: center; padding: 24px; background: var(--bg); z-index: 30; }
[hidden] { display: none !important; }

@media (max-width: 1100px) {
  #brand h1 { font-size: 24px; }
  #panel { width: 270px; top: var(--top, 150px); }
}
@media (max-width: 760px) {
  #brand { top: 14px; left: 16px; right: 16px; }
  #brand .eyebrow { font-size: 10.5px; }
  #brand h1 { font-size: 21px; margin: 4px 0; }
  #brand p { display: none; }
  #panel { top: 92px; left: 16px; right: 16px; width: auto; max-height: none; gap: 8px; }
  #panel #recent, #panel #build { display: none; }
  .card { padding: 10px 12px; }
  #supply .big { font-size: 20px; margin: 2px 0 6px; }
  #s-left { font-size: 11.5px; }
  #legend { top: auto; bottom: 122px; left: 16px; right: 16px; width: auto; padding: 0; gap: 8px;
    background: none; border: 0; backdrop-filter: none; -webkit-backdrop-filter: none; grid-template-columns: 1fr 1fr; }
  #legend .label, #legend .key { display: none; }
  #legend button, #legend button.ghost { margin: 0; background: var(--card); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
  #hint { bottom: 14px; padding: 8px 12px; width: calc(100% - 32px); }
  #hint-text { font-size: 12.5px; }
  #scale { font-size: 11px; }
  #plotcard { left: 16px; right: 16px; bottom: 236px; width: auto; }
  #toast { top: 78px; }
}

/* beachfront version */
.key i.line { height: 4px; border-radius: 2px; }
.keysub { display: block; font-size: 11.5px; color: var(--faint); }
.key i.unmined { background: repeating-linear-gradient(90deg, #6b758f 0 3px, transparent 3px 5px); }
.key i.ghost { width: 14px; height: 14px; border-radius: 0; align-self: flex-start; margin-top: 2px; }
.key i.ghost svg { display: block; width: 14px; height: 14px; }
.tiers { display: flex; flex-wrap: wrap; gap: 4px; margin: 2px 0 2px; }
.tiers span { font-size: 11px; color: var(--mute); background: rgba(255,255,255,.05); border-radius: 6px; padding: 2px 6px; }
.blk { grid-template-columns: 30px 1fr; }
.blk .tier { font-size: 11px; color: var(--gold-soft); margin-left: 4px; }
#pc-detail a { color: var(--gold-soft); text-decoration: none; }
#pc-detail a:hover { text-decoration: underline; }
.pc-links { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.linkbtn { padding: 5px 10px; min-height: 32px; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: var(--mute); font-size: 12.5px; }
.linkbtn:hover { color: var(--ink); border-color: rgba(255,255,255,.2); }
#b-tier { color: var(--gold-soft); margin-bottom: 4px; }
#b-pool { margin-bottom: 6px; }
#b-pool b { color: var(--ink); }
#halving { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.hv-bar { height: 4px; border-radius: 3px; background: rgba(255,255,255,.07); overflow: hidden; margin-bottom: 6px; }
.hv-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #6b758f, #c9d0dc); border-radius: 3px; }
#hv-text b { color: var(--ink); }
@media (max-width: 760px) {
  #legend .tiers { display: none; }
  #legend #fly-genesis { display: none; }
}

/* labels over whale transactions floating above the site */
#tags { position: fixed; inset: 0; pointer-events: none; z-index: 4; }
#tags .tag { position: absolute; left: 0; top: 0; pointer-events: auto; cursor: pointer; display: flex; flex-direction: column; align-items: center;
  padding: 4px 9px 5px; border-radius: 10px; border: 1px solid rgba(255, 196, 92, .7); background: rgba(20, 14, 4, .78); color: #ffd27a;
  font: 600 13px/1.15 Inter, system-ui, sans-serif; white-space: nowrap; backdrop-filter: blur(4px); }
#tags .tag span { font-weight: 400; font-size: 10.5px; color: #e9d6ae; }
#tags .tag::after { content: ""; position: absolute; left: 50%; bottom: -7px; width: 1px; height: 7px; background: rgba(255, 196, 92, .7); }

/* names over the story stretches, seen from space */
#zonetags { position: fixed; inset: 0; pointer-events: none; z-index: 3; }
#zonetags button { position: absolute; left: 0; top: 0; pointer-events: auto; padding: 4px 10px; min-height: 28px; border-radius: 999px;
  border: 1px solid rgba(199,155,255,.65); background: rgba(16,10,28,.78); color: #e4d2ff; font: 500 12px/1.2 Inter, system-ui, sans-serif;
  white-space: nowrap; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); transition: opacity .3s; }
#zonetags button.estate { border-color: rgba(158,199,255,.7); background: rgba(8,16,30,.8); color: #d6e8ff; }
#zonetags button span { color: var(--mute); margin-left: 5px; font-weight: 400; }
#zonetags button:hover { filter: brightness(1.2); }

/* rotating facts, lower right */
#facts { position: fixed; right: 24px; bottom: 22px; width: 300px; padding: 12px 16px 14px; cursor: pointer; overflow: hidden;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  opacity: 0; transform: translateY(6px); transition: opacity .35s, transform .35s; }
#facts.show { opacity: 1; transform: none; }
#facts .label { color: var(--gold); }
#facts.live .label::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #3ddc84;
  margin-right: 6px; vertical-align: 1px; box-shadow: 0 0 6px #3ddc84; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
#f-head { font-weight: 600; font-size: 15px; margin: 3px 0 3px; }
#f-text { line-height: 1.45; }
#f-text b { color: var(--gold-soft); }
#f-timer { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--gold); opacity: .55; transform-origin: left;
  animation: facttimer 15s linear forwards; }
@keyframes facttimer { from { transform: scaleX(0); } to { transform: scaleX(1); } }
body.carded #facts { opacity: 0; pointer-events: none; }
@media (max-width: 1300px) { #facts { bottom: 112px; width: 280px; } }
@media (max-width: 760px) {
  #facts { left: 16px; right: 16px; bottom: 236px; width: auto; padding: 9px 12px 11px; }
  #f-head { font-size: 13.5px; }
  #f-text { font-size: 12px; }
}

/* sound toggle */
#legend button.sound { display: flex; align-items: center; justify-content: center; gap: 7px; font-size: 13px; }
#legend button.sound svg { width: 17px; height: 17px; }
#legend button.sound.on { color: var(--gold-soft); border-color: rgba(247,147,26,.5); }

/* whale highlight */
#tags .tag.hot { border-color: #ffd27a; box-shadow: 0 0 0 0 rgba(255, 196, 92, .8); animation: hot 1.2s ease-out infinite; color: #fff; }
@keyframes hot { 0% { box-shadow: 0 0 0 0 rgba(255, 196, 92, .8); } 100% { box-shadow: 0 0 0 14px rgba(255, 196, 92, 0); } }

/* abandoned note on a block card */
#pc-detail .lost { color: #dce8f2; background: rgba(214,232,247,.06); border-left: 2px solid #9db6cc; padding: 5px 8px; margin: 4px 0; border-radius: 4px; }

/* the replay overlay */
#replay { position: fixed; top: 22px; left: 50%; transform: translateX(-50%); text-align: center; pointer-events: none; z-index: 5;
  text-shadow: 0 1px 3px rgba(0,0,0,.9), 0 0 24px rgba(0,0,0,.8); width: min(620px, calc(100% - 32px)); }
#replay-date { font-size: 44px; font-weight: 600; letter-spacing: -.01em; color: #fff; font-variant-numeric: tabular-nums; }
#replay-sub { font-size: 15px; color: var(--ink); margin-top: 2px; }
#replay-sub b { color: var(--gold-soft); }
#replay-event { margin-top: 10px; font-size: 20px; font-weight: 600; color: var(--gold); min-height: 26px; }
#replay-event.pop { animation: pop 2.6s ease-out forwards; }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 12% { transform: scale(1.15); opacity: 1; } 25% { transform: scale(1); } 80% { opacity: 1; } 100% { opacity: .0; } }
@media (max-width: 760px) {
  #replay { top: 200px; }
  #replay-date { font-size: 30px; }
  #replay-sub { font-size: 12.5px; }
  #replay-event { font-size: 16px; }
}

/* the replay timeline */
#scrub { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); width: min(760px, calc(100% - 32px)); z-index: 6;
  display: grid; grid-template-columns: 44px 1fr 44px; gap: 6px 12px; align-items: center; padding: 12px 14px 8px;
  background: var(--card); border: 1px solid rgba(247,147,26,.35); border-radius: 14px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
#scrub > button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(247,147,26,.5); background: rgba(247,147,26,.16); color: var(--gold-soft);
  display: grid; place-items: center; font-size: 22px; line-height: 1; }
#scrub > button svg { width: 16px; height: 16px; fill: currentColor; }
#sc-close { background: transparent !important; border-color: var(--line) !important; color: var(--mute) !important; }
.sc-track { position: relative; padding-bottom: 22px; }
#sc-range { width: 100%; height: 28px; margin: 0; background: none; -webkit-appearance: none; appearance: none; cursor: pointer; }
#sc-range::-webkit-slider-runnable-track { height: 6px; border-radius: 4px; background: linear-gradient(90deg, var(--gold) var(--k, 0%), rgba(255,255,255,.12) var(--k, 0%)); }
#sc-range::-moz-range-track { height: 6px; border-radius: 4px; background: linear-gradient(90deg, var(--gold) var(--k, 0%), rgba(255,255,255,.12) var(--k, 0%)); }
#sc-range::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -8px; border-radius: 50%; background: #fff; border: 3px solid var(--gold); box-shadow: 0 0 10px rgba(247,147,26,.6); }
#sc-range::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 3px solid var(--gold); }
#sc-range:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: 6px; }
#sc-marks { position: absolute; left: 11px; right: 11px; top: 24px; height: 22px; pointer-events: none; }
#sc-marks .mark { position: absolute; transform: translateX(-50%); pointer-events: auto; border: 0; background: none; padding: 0 2px; min-width: 24px;
  display: flex; flex-direction: column; align-items: center; gap: 1px; color: var(--mute); font-size: 10.5px; cursor: pointer; }
#sc-marks .mark i { width: 2px; height: 6px; background: var(--gold-soft); border-radius: 1px; }
#sc-marks .mark.halving i { background: #9ec7ff; }
#sc-marks .mark:hover { color: var(--ink); }
#sc-marks .mark.up { top: -36px; flex-direction: column-reverse; }
#sc-marks .mark:first-child { transform: none; align-items: flex-start; }
#sc-marks .mark:last-child { transform: translateX(-85%); }
.sc-track { margin-top: 14px; }
.sc-note { grid-column: 1 / -1; text-align: center; font-size: 10.5px; color: var(--faint); margin-top: -4px; }
body.replaying #hint { display: none; }
@media (max-width: 760px) {
  #scrub { bottom: 14px; grid-template-columns: 44px 1fr 44px; padding: 10px; gap: 4px 8px; }
  #sc-marks .mark span { display: none; }
  #sc-marks .mark.halving span, #sc-marks .mark:first-child span { display: none; }
  body.replaying #facts, body.replaying #legend, body.replaying #panel, body.replaying #brand { display: none; }
  body.replaying #replay { top: 40px !important; }
  body.replaying #replay { top: 96px; }
  .sc-track { margin-top: 0; }
}

/* Screensaver mode (body.calm): left alone on the big globe, only the planet, the
   meteors, the price and the facts stay. The boxes' slow wander is done in app.js. */
#brand, #panel, #legend, #hint, #tags, #zonetags, #sheet, #mtags { transition: opacity 1.6s ease; }
body.calm #brand, body.calm #panel, body.calm #legend, body.calm #hint, body.calm #tags, body.calm #zonetags, body.calm #sheet {
  opacity: 0; pointer-events: none; }

/* labels on the biggest meteors */
#mtags { position: fixed; inset: 0; pointer-events: none; z-index: 3; }
#mtags .mtag { position: absolute; left: 0; top: 0; pointer-events: auto; padding: 4px 10px; border-radius: 999px; white-space: nowrap;
  border: 1px solid rgba(255, 210, 122, .55); background: rgba(10, 12, 20, .72); color: #ffe7b8; font-size: 12px; cursor: pointer;
  backdrop-filter: blur(4px); }
#mtags .mtag b { color: #ffd27a; font-weight: 600; }
#mtags .mtag[hidden] { display: none; }

/* Close-up: the panels and the legend fold away into small pills so the beach
   can be seen; tap a pill to open it. They come back on their own in globe view. */
.pill { display: none; }
.fold { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .4s ease, opacity .3s ease; }
.fold > div { min-height: 0; overflow: hidden; }
.legend-body { display: grid; gap: 7px; }
#brand { transition: opacity .4s ease, transform .4s ease; }
#panel, #legend { transition: width .4s ease, top .4s ease; }
.card, #legend { transition: padding .4s ease, width .4s ease, top .4s ease, background-color .3s; }
body.close #brand { opacity: 0; transform: translateY(-12px); }
body.close #panel { top: 22px; width: 250px; }
body.close #panel:has(.card.open) { width: 300px; }
body.close #legend { width: 210px; }
body.close #legend.open { width: 220px; }
body.close .card, body.close #legend { padding: 0; }
body.close .card.open, body.close #legend.open { padding: 0 16px 14px; }
body.close .pill { display: flex; }
body.close .card:not(.open) .fold, body.close #legend:not(.open) .fold { grid-template-rows: 0fr; opacity: 0; pointer-events: none; }
.pill { align-items: center; gap: 9px; width: 100%; min-height: 40px; padding: 8px 14px; border: 0; background: none; color: var(--ink);
  font-size: 13px; text-align: left; border-radius: 14px; animation: pillin .35s ease-out; }
body.close .open > .pill { padding: 10px 0 6px; }
.pill:hover { background: rgba(255,255,255,.04); }
.pill:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.pill .ptext { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--mute); }
.pill .ptext b { color: var(--gold-soft); }
.pill .chev { width: 8px; height: 8px; flex: none; border-right: 1.5px solid var(--faint); border-bottom: 1.5px solid var(--faint);
  transform: rotate(45deg) translate(-2px, -2px); transition: transform .3s; }
.open > .pill .chev { transform: rotate(-135deg) translate(-2px, -2px); }
.pdot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--gold); box-shadow: 0 0 8px rgba(247,147,26,.6); }
.pdot.build { border-radius: 2px; background: repeating-linear-gradient(0deg, #f7931a 0 3px, #8a4b05 3px 4px); }
.pdot.house { border-radius: 1px; background: #f6ead2; clip-path: polygon(50% 0, 100% 45%, 100% 100%, 0 100%, 0 45%); box-shadow: none; }
@keyframes pillin { from { opacity: 0; } }
#legend button.pill { margin: 0; border: 0; background: none; color: var(--ink); font-weight: 400; padding: 8px 14px; border-radius: 14px; }
body.close #legend { gap: 0; }
body.close .fold > div > .label:first-child { display: none; }  /* the pill already says it */
body.close #legend.open > button.pill { padding: 10px 0 6px; }
@media (max-width: 760px) {
  #legend { grid-template-columns: 1fr; }
  #legend .legend-body { grid-template-columns: 1fr 1fr; gap: 8px; }
  #legend button.pill { background: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
}
@media (prefers-reduced-motion: reduce) { .fold, #brand, #panel, #legend, .card { transition: none; } .pill { animation: none; } }
@media (max-width: 760px) {
  body.close #panel, body.close #panel:has(.card.open) { top: 14px; width: auto; }
  body.close #legend, body.close #legend.open { top: auto; bottom: 122px; left: auto; right: 16px; width: 220px; background: var(--card);
    border: 1px solid var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); display: block; }
  body.close #legend.open .legend-body { grid-template-columns: 1fr; }
}

/* Find my lot */
#mylot { position: fixed; right: 24px; top: 22px; width: 340px; z-index: 7; padding: 16px 18px 14px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px;
  background: var(--card); border: 1px solid rgba(247,147,26,.4); border-radius: 14px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 12px 40px rgba(0,0,0,.45); animation: drop .35s ease-out; }
#mylot .x { position: absolute; top: 6px; right: 8px; background: none; border: 0; color: var(--faint); font-size: 22px; line-height: 1; width: 36px; height: 36px; }
#mylot h2 { margin: -4px 0 0; font-size: 19px; font-weight: 600; }
#mylot .label { color: var(--gold); }
.my-row { display: flex; gap: 8px; }
#my-amount { flex: 1; min-width: 0; height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,.14); background: rgba(0,0,0,.35);
  color: var(--ink); font: 500 17px Inter, system-ui, sans-serif; font-variant-numeric: tabular-nums; }
#my-amount:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(247,147,26,.25); }
.seg { display: flex; border: 1px solid rgba(255,255,255,.14); border-radius: 10px; overflow: hidden; flex: none; }
.seg button { height: 42px; padding: 0 12px; border: 0; background: none; color: var(--mute); font-weight: 500; }
.seg button[aria-pressed="true"] { background: rgba(247,147,26,.18); color: var(--gold-soft); }
#mylot .go, .my-actions button { height: 44px; padding: 0 14px; border-radius: 10px; border: 1px solid rgba(247,147,26,.5); background: rgba(247,147,26,.16);
  color: var(--gold-soft); font-weight: 600; }
#mylot .go { width: 100%; }
#mylot button:hover { filter: brightness(1.15); }
#my-error:empty { display: none; }
#my-error { color: #ffb38a; }
.my-big { font-size: 15px; color: var(--mute); }
.my-big b { font-size: 30px; font-weight: 600; color: var(--gold-soft); margin-right: 4px; }
#my-detail { display: grid; gap: 6px; line-height: 1.45; }
#my-detail b { color: var(--ink); }
.my-actions { display: flex; gap: 8px; margin-top: 4px; }
.my-actions button { flex: 1; padding: 0 8px; font-size: 13px; }
.my-actions button.ghost { border-color: var(--line); background: transparent; color: var(--mute); font-weight: 500; }
.my-private { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--faint); }
.my-private svg { width: 12px; height: 12px; flex: none; }
body.mylot-open #legend { opacity: 0; pointer-events: none; }
@media (max-width: 760px) {
  #mylot { top: auto; bottom: 14px; left: 16px; right: 16px; width: auto; max-height: calc(100% - 100px); overflow: auto; }
  body.mylot-open #hint, body.mylot-open #facts, body.mylot-open #plotcard { display: none; }
}

/* the key and trips can outgrow a laptop screen: keep them inside it, scrolling if need be */
@media (min-width: 761px) {
  #legend { max-height: calc(100vh - 44px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.15) transparent; }
  #legend button { padding: 7px 12px; }
  #legend .keysub { font-size: 11px; }
}
@media (min-width: 761px) and (max-height: 820px) {
  #legend .tiers, #legend .keysub { display: none; }
}

/* ───────── Phones: the globe fills the screen, everything else is in a bottom sheet ───────── */
#sheet { display: none; }
@media (max-width: 760px) {
  :root { --peek: calc(104px + env(safe-area-inset-bottom)); }
  #panel, #legend, #hint { display: none; }
  #sh-body #panel, #sh-body #legend { display: flex; }
  #sheet { display: flex; flex-direction: column; position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; max-height: 78vh;
    background: rgba(8, 11, 20, .9); border-top: 1px solid rgba(247,147,26,.3); border-radius: 18px 18px 0 0;
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 -10px 30px rgba(0,0,0,.4);
    transform: translateY(calc(100% - var(--peek))); transition: transform .38s cubic-bezier(.2,.8,.2,1); padding-bottom: env(safe-area-inset-bottom); }
  #sheet.open { transform: none; }
  body.mylot-open #sheet, body.replaying #sheet { transform: translateY(100%); }
  #sh-handle { flex: none; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; min-height: 44px; padding: 8px 16px 4px;
    border: 0; background: none; color: var(--mute); font-size: 12.5px; touch-action: none; }
  #sh-handle i { width: 40px; height: 4px; border-radius: 3px; background: rgba(255,255,255,.28); }
  #sh-handle b { color: var(--gold-soft); }
  #sh-quick { flex: none; display: flex; gap: 8px; overflow-x: auto; padding: 4px 16px 10px; scrollbar-width: none; }
  #sh-quick::-webkit-scrollbar { display: none; }
  #sh-quick button { flex: none; min-height: 44px; padding: 0 14px; border-radius: 22px; border: 1px solid var(--line); background: rgba(255,255,255,.04);
    color: var(--ink); font-weight: 500; font-size: 13.5px; white-space: nowrap; }
  #sh-quick button.gold { border-color: rgba(247,147,26,.5); background: rgba(247,147,26,.16); color: var(--gold-soft); font-weight: 600; }
  #sh-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 16px 20px; display: grid; gap: 10px; }
  #sh-body #panel, #sh-body #legend, #sh-body #facts { position: static; inset: auto; width: auto; max-height: none; transform: none; translate: none;
    animation: none; opacity: 1; flex-direction: column; }
  #sh-body #panel { gap: 10px; overflow: visible; }
  #sh-body #panel #recent, #sh-body #panel #build { display: block; }
  #sh-body #legend { display: grid; padding: 14px 16px; background: var(--card); border: 1px solid var(--line); backdrop-filter: none; }
  #sh-body #legend .legend-body { grid-template-columns: 1fr; }
  #sh-body #legend .label, #sh-body #legend .key, #sh-body #legend .tiers, #sh-body #legend #fly-genesis { display: flex; }
  #sh-body #legend .label { display: block; }
  #sh-body #legend .pill, #sh-body .card > .pill { display: none !important; }
  #sh-body .fold { grid-template-rows: 1fr !important; opacity: 1 !important; pointer-events: auto !important; }
  #sh-body .fold > div > .label:first-child { display: block !important; }
  #sh-body #facts { cursor: pointer; }
  body.carded #sh-body #facts { opacity: 1; pointer-events: auto; }
  /* a tapped house or lot floats just above the sheet */
  #plotcard { left: 12px; right: 12px; bottom: calc(var(--peek) + 10px); width: auto; max-height: 46vh; overflow-y: auto; z-index: 6; }
  body.sheet-open #plotcard { display: none; }
  #brand { transition: opacity .35s, transform .35s; }
  body.closeup #brand { opacity: 0; transform: translateY(-10px); pointer-events: none; }
  #toast { top: 12px; z-index: 8; }
  #marklabel #ml-c { display: none; }
  /* everything you can tap is at least 44 px */
  #legend button, .blk, .linkbtn, #mylot .x, #pc-close, #plotcard .x, .seg button, #tags .tag, #zonetags button, #toast button { min-height: 44px; }
  #plotcard .x, #pc-close { min-width: 44px; top: 0; right: 0; }
  .seg button { height: 44px; }
  .blk { align-items: center; }
}

/* the bitcoin price, top and centre */
#price { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 4; display: flex; align-items: baseline; gap: 10px;
  padding: 7px 16px 8px; border-radius: 999px; background: var(--card); border: 1px solid rgba(247,147,26,.45);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); white-space: nowrap; }
#price .pr-label { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); font-weight: 600; }
#price b { font-size: 20px; font-weight: 600; color: var(--gold-soft); font-variant-numeric: tabular-nums; transition: color .6s; }
#price b.up { color: #5fe0a0; } #price b.down { color: #ff8f7a; }
#toast { top: 70px; }
body.replaying #price { display: none; }
@media (max-width: 760px) {
  #price { top: 10px; left: 16px; transform: none; padding: 5px 12px 6px; gap: 8px; }
  #price b { font-size: 16px; }
  #price .pr-label { font-size: 10px; }
  #brand { top: 50px; }
  #brand .eyebrow { display: none; }
  #toast { top: 50px; }
}

/* hide the mouse pointer when nobody has moved it for a while */
body.idle, body.idle * { cursor: none !important; }

/* the floating label over the lot a camera trip lands on */
#marklabel { position: fixed; left: 0; top: 0; z-index: 4; pointer-events: none; padding: 7px 12px 8px; border-radius: 11px; text-align: center;
  background: rgba(14, 10, 3, .82); border: 1px solid rgba(255, 196, 92, .75); color: var(--ink); white-space: nowrap;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); box-shadow: 0 6px 24px rgba(0,0,0,.45), 0 0 18px rgba(247,147,26,.25);
  visibility: hidden; transition: visibility 0s .3s; }
#marklabel.show { visibility: visible; transition: none; animation: mlin .45s ease-out; }
#marklabel::after { content: ""; position: absolute; left: 50%; bottom: -12px; width: 1px; height: 12px; background: rgba(255, 196, 92, .8); }
#ml-a { font-weight: 600; font-size: 14px; color: #ffd27a; }
#ml-b { font-size: 13px; }
#ml-c { font-size: 11.5px; color: var(--mute); }
@keyframes mlin { from { opacity: 0; margin-top: 8px; } }
