:root {
  --ink: #0b0b0b;
  --page: #000;
  --panel: #d6d5cf;
  --panel-2: #c4c3bc;
  --panel-3: #9d9c96;
  --stroke: #121212;
  --gap: #2b2b2b;
  --green: #3ecf7a;
  --green-hi: #7dffa6;
  --term-bg: #060906;
  --term-ink: #8fa293;
  --term-hi: #e4f5e7;
  --term-line: #1d2a20;
  --cell: 21px; /* imd.fun's grid is ~24px a cell */
  --gutter: clamp(16px, 4vw, 34px); /* imd.fun's */
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --pixel: "Silkscreen", "IBM Plex Mono", monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--page); color: #e9e9e4; font-family: var(--mono); }
html { scrollbar-width: none; } /* scrolls, no bar */
html::-webkit-scrollbar, body::-webkit-scrollbar { display: none; }
a { color: inherit; }
.dim { color: #6f7a71; }

/* ── header ─────────────────────────────────────────────── */
.bar { /* imd.fun's proportions: 40px pills, 12px caps */
  display: flex; align-items: center; gap: 30px;
  padding: 16px var(--gutter);
}
.brand { display: flex; text-decoration: none; background: #f4f4ef; color: var(--ink); height: 40px; }
.brand-mark { display: grid; place-items: center; width: 40px; font-size: 13px; border-right: 1.5px solid var(--page); }
.brand-word { display: grid; place-items: center; padding: 0 18px; font-size: 13px; font-weight: 600; letter-spacing: 0.34em; }
.nav { display: flex; gap: 26px; font-size: 12px; letter-spacing: 0.12em; }
.nav a { text-decoration: none; opacity: 0.8; transition: opacity 0.15s; }
.nav a:hover { opacity: 1; color: var(--green-hi); }
.buy {
  margin-left: auto; display: flex; align-items: center; height: 40px; padding: 0 18px; border: 1.5px solid #f4f4ef;
  text-decoration: none; font-size: 12px; letter-spacing: 0.12em; transition: background 0.15s, color 0.15s;
}
.buy:hover { background: #f4f4ef; color: var(--ink); }
.ca { /* the contract address, same on both chains; click copies it */
  margin-left: auto; display: flex; align-items: center; height: 40px; padding: 0; border: 1.5px solid #3a3a37;
  background: transparent; color: #d9dcd4; font: inherit; font-size: 12px; letter-spacing: 0.06em; cursor: pointer;
  transition: border-color 0.15s;
}
.ca:hover { border-color: var(--green); }
.ca-tag { display: grid; place-items: center; height: 100%; padding: 0 10px; border-right: 1.5px solid #3a3a37; color: var(--green-hi); letter-spacing: 0.12em; }
#ca-addr { padding: 0 12px; min-width: 13ch; text-align: center; }
.ca:not([hidden]) + .buy { margin-left: 0; }
.bridge-btn { margin-left: 0; background: transparent; color: var(--green-hi); border-color: var(--green); font-family: inherit; cursor: pointer; }
.bridge-btn:hover { background: var(--green); color: var(--ink); }
.bridge-btn:not([hidden]) + .buy { margin-left: 0; }

/* ── machine wall ───────────────────────────────────────── */
.room { width: 100%; overflow-x: clip; } /* the desk strip is wider than a phone; never let it widen the page */
.wall-frame { padding: 0 var(--gutter); }
.wall { position: relative; margin: 0 auto; background: #7d7d79; }
.wall-canvas, .wall-over { position: absolute; left: 0; top: 0; display: block; }
.wall-over { z-index: 3; }
.led { display: inline-block; width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid #121212; background: #3b3b3b; }
.led.on { background: var(--green); box-shadow: 0 0 8px var(--green); }
.led.warm { background: #e0c44a; }

/* hover tooltip, as on imd.fun */
.tip {
  position: absolute; z-index: 6; width: max-content; min-width: 120px; max-width: 360px; padding: 12px 16px 14px;
  background: #090909; border: 2px solid #141414; box-shadow: 0 0 0 1px rgba(214, 214, 210, 0.55), inset 0 0 0 1px rgba(201, 236, 191, 0.1);
  color: #56a063; font-size: 15px; line-height: 1.55; pointer-events: none; opacity: 0; transition: opacity 0.12s;
}
.tip.on { opacity: 1; }
.tip::after {
  content: ""; position: absolute; left: var(--arrow-x, 20px); bottom: -8px; margin-left: -8px;
  border: 8px solid transparent; border-bottom: 0; border-top-color: #141414;
}
.tip.below::after { top: -8px; bottom: auto; border: 8px solid transparent; border-top: 0; border-bottom-color: #141414; }
.tip-name { color: #a8eab3; font-weight: 600; margin-bottom: 8px; white-space: nowrap; }
.tip-mine { margin-left: 8px; font-weight: 400; color: #e0a92a; }
.tip-group { margin-top: 4px; white-space: nowrap; }
.tip-group b { color: #a8eab3; font-weight: 600; }
.tip-lamp { display: inline-block; width: 8px; height: 8px; margin-right: 10px; border-radius: 50%; background: var(--green); box-shadow: 0 0 5px var(--green); vertical-align: 1px; }
.tip-lamp.off { background: transparent; box-shadow: none; border: 1.5px solid #7c887c; }
.tip-group.live .tip-lamp { animation: lamp 0.9s steps(1) infinite; }
@keyframes lamp { 50% { background: #7c887c; box-shadow: none; } }
.tip-ids { padding-left: 18px; color: #56a063; }
.tip-art { display: flex; gap: 6px; margin: 10px 0 4px; }
.tip-art img { width: 34px; height: 34px; border: 1px solid #1f2a20; image-rendering: pixelated; }
.tip-pot { margin-top: 8px; color: #7c887c; font-size: 13px; }
.tip-pot b { color: #a8eab3; }

/* ── desk scene under the wall (imd.fun's own art and proportions) ── */
.desk { position: relative; margin-top: -1px; clip-path: inset(-100vh 0 0 0); }
.desk-scene { position: relative; width: 100%; }
.desk-img { display: block; width: 100%; height: auto; background: #fff; }
.fallen { position: absolute; left: 42.25%; bottom: -4%; width: 22.5%; height: auto; pointer-events: none; z-index: 3; }
.floor { height: clamp(26px, 3vw, 60px); background: linear-gradient(#fff, #f4f4f2); }
.pepe { /* 8-frame idle loop (reading, one blink); frames normalised to one height and anchored on the shirt */
  position: absolute; left: 33%; bottom: -22%; width: 6%; aspect-ratio: 1890 / 2400; z-index: 4;
  background: url("assets/pepe-idle.webp") no-repeat 0 0 / 800% 100%; border: 0; padding: 0; cursor: pointer;
} /* frames are picked by app.js: idle poses, random double blinks */
.pepe::after { /* shadow */
  content: ""; position: absolute; left: 22%; right: 22%; bottom: 1.5%; height: 7%; border-radius: 50%; z-index: -1;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.22), transparent 70%);
}


/* ── terminal, set into the wall ────────────────────────── */
.terminal {
  position: absolute; display: grid; grid-template-rows: auto 1fr auto auto; z-index: 4;
  background: var(--term-bg); border: 3px solid var(--panel-3); box-shadow: 0 0 0 3px var(--stroke);
  color: var(--term-ink); font-size: 13px; line-height: 1.45; padding: 2px 14px 4px; min-width: 0;
}
.term-status {
  display: flex; gap: 0.5ch; align-items: center; white-space: nowrap; overflow: hidden;
  border-bottom: 1px solid var(--term-line); padding: 5px 0;
}
.term-status b { color: var(--term-hi); font-weight: 600; }
.grip { color: #c0473a; }
.swarm { margin-left: auto; }
.term-log {
  list-style: none; margin: 0; padding: 8px 0 0; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; min-height: 0;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 48px); mask-image: linear-gradient(to bottom, transparent, #000 48px);
}
.term-log li {
  display: grid; grid-template-columns: 2ch 6ch 8ch 16ch 11ch 1fr; column-gap: 1ch; white-space: nowrap;
  animation: type 0.35s steps(6) both;
}
.term-log li > span { overflow: hidden; text-overflow: ellipsis; }
.term-log li.new, .term-log li:last-child { color: var(--term-hi); }
.term-log li:last-child .gt { color: #e8703a; }
.term-log .ok { color: var(--green); }
.term-log .ico { display: inline-block; width: 16px; height: 16px; vertical-align: -3px; margin-right: 0.8ch; image-rendering: pixelated; }
@keyframes type { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.term-prompt {
  display: flex; align-items: center; gap: 1ch; margin: 7px 0 6px; padding: 3px 12px;
  border: 1.5px solid #2e4a34; border-radius: 8px;
}
.caret { color: #52735a; }
.term-prompt input {
  flex: 1; background: transparent; border: 0; outline: 0; color: var(--term-hi); font: inherit;
  caret-color: #c0473a; caret-shape: block;
}
.term-prompt input::placeholder { color: #4d5f51; }
.term-foot { display: flex; justify-content: space-between; gap: 2ch; border-top: 1px solid var(--term-line); padding: 5px 0 2px; white-space: nowrap; overflow: hidden; }
.term-foot b { color: var(--term-hi); font-weight: 600; }
.bar-fill { color: var(--green); }
.foot-l { display: flex; align-items: center; gap: 1.2ch; min-width: 0; }
.floor-btn { /* the pot's buy key: dim until the pot can pay for the floor */
  flex: none; font: 9px var(--pixel); letter-spacing: 0.14em; text-transform: uppercase; cursor: pointer;
  color: #7c887c; background: transparent; border: 1px solid #2c3a2f; border-radius: 2px; padding: 3px 7px;
}
.floor-btn:hover { color: var(--green-hi); border-color: var(--green); }
.floor-btn.ready { color: #06120a; background: var(--green); border-color: var(--green); box-shadow: 0 0 10px rgba(62, 207, 122, 0.7); animation: floor-ready 1.2s ease-in-out infinite; }
@keyframes floor-ready { 50% { box-shadow: 0 0 2px rgba(62, 207, 122, 0.3); } }

/* ── swap panel: the IMDSTR machine's twin, pulled off the wall ── */
.swap-wrap {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 12px;
  background: radial-gradient(ellipse at 50% 45%, rgba(8, 14, 10, 0.55), rgba(0, 0, 0, 0.88)); backdrop-filter: blur(2px);
}
.swap-wrap[hidden] { display: none; }
.swap {
  --face: #d7dcd3; --ink: #121212; --lit: #3ecf7a; --glass: #eeeee9; --amber: #e0a92a; --well: #b9bdb4;
  position: relative; width: min(440px, calc(100vw - 24px)); padding: 16px 20px 12px;
  color: var(--ink); font-family: var(--mono);
  background-color: var(--face);
  background-image: repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.022) 0 1px, transparent 1px 3px);
  border: 3px solid var(--lit); border-radius: 4px;
  box-shadow: 0 0 0 3px var(--ink), 0 0 26px rgba(62, 207, 122, 0.25), 0 24px 60px rgba(0, 0, 0, 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.55), inset 0 -3px 0 rgba(0, 0, 0, 0.1);
  animation: swap-in 0.32s cubic-bezier(0.2, 0.9, 0.3, 1.25) both;
}
@keyframes swap-in { from { transform: translateY(14px) scale(0.96); opacity: 0; } }
.screw { position: absolute; width: 9px; height: 9px; border-radius: 50%; background: #3b3b39; box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.25); }
.screw::after { content: ""; position: absolute; left: 1.5px; right: 1.5px; top: 4px; height: 1.2px; background: #cfcfca; transform: rotate(35deg); }
.screw.tl { top: 7px; left: 7px; } .screw.tr { top: 7px; right: 7px; } .screw.bl { bottom: 7px; left: 7px; } .screw.br { bottom: 7px; right: 7px; }
.screw.tr::after, .screw.bl::after { transform: rotate(-20deg); }

.swap-head { display: flex; align-items: center; gap: 10px; margin: 0 4px 14px 10px; }
.swap-bar { width: 38px; height: 3px; background: var(--ink); border-radius: 2px; }
.swap-title { font-family: var(--pixel); font-size: 10px; letter-spacing: 0.14em; white-space: nowrap; }
.swap-dots { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.swap-dots i { width: 7px; height: 7px; border-radius: 50%; border: 1.4px solid var(--ink); }
.swap-dots .swap-lamp { width: 8px; height: 8px; border: 0; background: var(--ink); transition: background 0.2s, box-shadow 0.2s; }
.swap-wrap.is-connected .swap-lamp { background: var(--lit); box-shadow: 0 0 6px var(--lit); }
.swap-wrap.is-taxed .swap-lamp { background: var(--amber); box-shadow: 0 0 6px var(--amber); animation: lamp-blink 0.9s steps(1) infinite; }
@keyframes lamp-blink { 50% { background: var(--ink); box-shadow: none; } }
.swap-x {
  width: 24px; height: 24px; display: grid; place-items: center; font: 12px var(--mono); color: var(--ink); cursor: pointer;
  background: var(--glass); border: 2px solid var(--ink); border-radius: 50%; box-shadow: 0 2px 0 var(--ink);
}
.swap-x:active { transform: translateY(2px); box-shadow: none; }

/* two-position slide switch */
.swap-toggle {
  position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 3px; margin-bottom: 12px;
  background: var(--well); border: 2px solid var(--ink); border-radius: 3px; box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.25);
}
.swap-toggle::before {
  content: ""; position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc((100% - 6px) / 2); border-radius: 2px;
  background: var(--glass) repeating-linear-gradient(90deg, transparent 0 calc(50% - 7px), rgba(0, 0, 0, 0.28) calc(50% - 7px) calc(50% - 6px), transparent calc(50% - 6px) calc(50% - 2px), rgba(0, 0, 0, 0.28) calc(50% - 2px) calc(50% - 1px), transparent calc(50% - 1px) calc(50% + 3px), rgba(0, 0, 0, 0.28) calc(50% + 3px) calc(50% + 4px), transparent calc(50% + 4px));
  border: 2px solid var(--ink); box-shadow: 0 2px 0 rgba(0, 0, 0, 0.3), inset 0 1px 0 #fff;
  transition: transform 0.2s cubic-bezier(0.3, 1.4, 0.5, 1);
}
.swap-toggle:has([data-side="sell"].on)::before, .swap-toggle:has([data-chain="robinhood"].on)::before,
.swap-toggle:has([data-from="robinhood"].on)::before { transform: translateX(100%); }
.swap-net { margin-bottom: 8px; }
.swap-net button { height: 28px; font-size: 9px; letter-spacing: 0.14em; }
.swap-toggle button:disabled { opacity: 0.4; cursor: default; }
.swap-toggle button {
  position: relative; z-index: 1; height: 34px; background: transparent; border: 0; cursor: pointer;
  font-family: var(--pixel); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: #5d605a;
}
.swap-toggle button.on { color: var(--ink); }
.swap-toggle button.on::before {
  content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 8px; border-radius: 50%; vertical-align: 1px;
  background: var(--lit); box-shadow: 0 0 6px var(--lit);
}

/* the LCD */
.swap-screen {
  position: relative; overflow: hidden; padding: 10px 12px 8px; border-radius: 3px; background: #090909;
  box-shadow: 0 0 0 2px var(--ink), inset 0 0 0 1.5px #3a3a38, inset 0 0 30px rgba(62, 207, 122, 0.07);
  transform-origin: center; animation: crt-on 0.5s ease-out both 0.08s;
}
.swap-screen::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 3px);
}
@keyframes crt-on {
  0% { transform: scaleY(0.02); filter: brightness(4); }
  45% { transform: scaleY(1); filter: brightness(1.8); }
  100% { transform: scaleY(1); filter: none; }
}
.swap-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.swap-k { font-family: var(--pixel); font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--term-ink); }
.swap-bal { font-size: 11px; color: #6f8474; }
.swap-big { min-height: 42px; }
#swap-in, #bridge-in, .swap-out {
  flex: 1; min-width: 0; font-family: var(--pixel); font-size: 25px; line-height: 1.2; background: transparent; border: 0; outline: 0; padding: 2px 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#swap-in, #bridge-in { color: var(--term-hi); caret-color: var(--lit); text-shadow: 0 0 8px rgba(228, 245, 231, 0.22); }
#swap-in::placeholder, #bridge-in::placeholder { color: #34423a; }
.swap-out { color: var(--lit); text-shadow: 0 0 10px rgba(62, 207, 122, 0.45); }
.swap-unit { font-family: var(--pixel); font-size: 10px; letter-spacing: 0.12em; color: var(--term-ink); font-weight: 400; }
.swap-max {
  font-family: var(--pixel); font-size: 8px; letter-spacing: 0.14em; text-transform: uppercase; cursor: pointer;
  color: var(--term-ink); background: transparent; border: 1px solid #3a3a38; padding: 3px 6px;
}
.swap-max:hover { color: var(--lit); border-color: var(--lit); }
.swap-rule { position: relative; height: 16px; margin: 4px 0 2px; border-top: 1px dashed #1f2d23; }
.swap-rule span { position: absolute; left: 50%; top: -7px; transform: translateX(-50%); padding: 0 8px; background: #090909; color: var(--lit); font-size: 10px; }
.swap-status { min-height: 1.5em; margin-top: 4px; padding-top: 5px; border-top: 1px solid #16211a; font-size: 11px; color: var(--term-ink); word-break: break-all; }
.swap-status:not(:empty)::before { content: "> "; color: #e8703a; }
.swap-status.ok { color: var(--lit); }
.swap-status.bad { color: #e8703a; }
.swap-status a { color: inherit; }

/* glass indicator strip: the fee, and the launch tax lamp */
.swap-fee {
  display: flex; align-items: flex-start; gap: 10px; margin: 12px 0 10px; padding: 8px 10px;
  font-size: 11.5px; line-height: 1.45; color: var(--ink); background: var(--glass); border: 2px solid var(--ink); border-radius: 3px;
}
.swap-fee::before {
  content: ""; flex: none; width: 10px; height: 10px; margin-top: 2px; border-radius: 50%; border: 1.5px solid var(--ink);
  background: var(--lit); box-shadow: 0 0 6px var(--lit);
}
.swap-fee.warn { background: #f4ecd8; }
.swap-fee.warn::before { background: var(--amber); box-shadow: 0 0 8px var(--amber); animation: lamp-blink 0.9s steps(1) infinite; }
.swap-fee b { font-weight: 600; }
#bridge .swap-fee, #floor .swap-fee { margin-bottom: 14px; }
.floor-art { flex: none; width: 34px; height: 34px; image-rendering: pixelated; border: 1px solid #2c3a2f; background: #111; }
.floor-price, .floor-pot { font-family: var(--pixel); font-size: 25px; line-height: 1.2; color: var(--term-hi); text-shadow: 0 0 8px rgba(228, 245, 231, 0.22); }
.floor-pot { flex: 1; }
.floor-meter { height: 8px; margin: 4px 0 2px; border-radius: 2px; background: #16211a; box-shadow: inset 0 0 0 1px #2c3a2f; overflow: hidden; }
.floor-meter i { display: block; height: 100%; width: 0; background: repeating-linear-gradient(90deg, var(--lit) 0 6px, #2fae63 6px 8px); box-shadow: 0 0 8px rgba(62, 207, 122, 0.5); transition: width 0.4s; }
#floor.is-ready .swap-lamp { background: var(--lit); box-shadow: 0 0 6px var(--lit); animation: lamp-blink 0.9s steps(1) infinite; }

/* slippage fader, in the wall's own slider style, and a grille */
.swap-controls { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.swap-fader { flex: 1; display: flex; align-items: center; gap: 10px; }
.swap-k2 { font-family: var(--pixel); font-size: 8px; letter-spacing: 0.16em; text-transform: uppercase; }
#swap-slip {
  --p: 26.3%; flex: 1; min-width: 0; height: 22px; margin: 0; background: transparent; cursor: pointer; -webkit-appearance: none; appearance: none;
}
#swap-slip::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, var(--lit) 0 var(--p), var(--ink) var(--p) 100%); }
#swap-slip::-webkit-slider-thumb {
  -webkit-appearance: none; width: 16px; height: 16px; margin-top: -6px; border-radius: 50%;
  background: var(--lit); border: 2px solid var(--ink); box-shadow: 0 2px 0 rgba(0, 0, 0, 0.3);
}
#swap-slip::-moz-range-track { height: 4px; border-radius: 2px; background: var(--ink); }
#swap-slip::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--lit); }
#swap-slip::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--lit); border: 2px solid var(--ink); }
#swap-slip:focus-visible { outline: 2px solid var(--lit); outline-offset: 3px; }
.swap-mini {
  min-width: 5.2ch; padding: 2px 6px; text-align: right; font-family: var(--pixel); font-size: 10px; color: var(--lit);
  background: #090909; border-radius: 2px; box-shadow: inset 0 0 0 1px #3a3a38;
}
.swap-grille {
  flex: none; width: 58px; height: 30px; border-radius: 2px;
  background-image: radial-gradient(circle, #2b2b2a 1.1px, transparent 1.5px); background-size: 6px 6px; background-position: 1px 1px;
}

/* the big mechanical key */
.swap-well { padding: 5px 5px 9px; background: var(--well); border: 2px solid var(--ink); border-radius: 4px; box-shadow: inset 0 3px 4px rgba(0, 0, 0, 0.3); }
.swap-go {
  position: relative; display: block; width: 100%; height: 50px; cursor: pointer;
  font-family: var(--pixel); font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink);
  background: linear-gradient(#5be394, var(--lit)); border: 2px solid var(--ink); border-radius: 3px;
  box-shadow: 0 5px 0 var(--ink), inset 0 2px 0 rgba(255, 255, 255, 0.45), inset 0 -3px 0 rgba(0, 0, 0, 0.18);
  transition: transform 0.06s, box-shadow 0.06s, filter 0.15s;
}
.swap-go:hover:not(:disabled) { filter: brightness(1.05); }
.swap-go:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink), inset 0 2px 0 rgba(255, 255, 255, 0.35), inset 0 -1px 0 rgba(0, 0, 0, 0.18); }
.swap-go:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.swap-go:disabled { cursor: default; color: #6d706a; background: linear-gradient(#cfd2cb, #bfc2bb); box-shadow: 0 5px 0 #6d706a, inset 0 2px 0 rgba(255, 255, 255, 0.4); }

.swap-plate {
  margin: 10px 18px 0; padding-top: 7px; border-top: 1.5px solid rgba(18, 18, 18, 0.35); text-align: center;
  font-family: var(--pixel); font-size: 8px; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(18, 18, 18, 0.55);
}

@media (max-width: 480px) {
  .swap { padding: 14px 14px 10px; }
  .swap-title { font-size: 9px; letter-spacing: 0.1em; }
  #swap-in, #bridge-in, .swap-out, .floor-price, .floor-pot { font-size: 21px; }
  .swap-grille { width: 36px; }
}

/* ── ledger below the wall ──────────────────────────────── */
.ledger { padding: 44px var(--gutter) 90px; }
.ledger h2 { font-size: 15px; letter-spacing: 0.2em; text-transform: uppercase; font-weight: 600; margin: 0 0 16px; }
.ledger table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ledger th { text-align: left; font-weight: 400; color: #6f7a71; letter-spacing: 0.12em; text-transform: uppercase; font-size: 11px; padding: 6px 12px; border-bottom: 1px solid #262626; }
.ledger td { padding: 10px 12px; border-bottom: 1px solid #161616; white-space: nowrap; }
.ledger td img { width: 22px; height: 22px; vertical-align: middle; margin-right: 10px; image-rendering: pixelated; }
.ledger .how { max-width: 76ch; margin-top: 28px; line-height: 1.75; color: #a9aea8; font-size: 14px; }
.ledger .contracts { font-size: 12px; line-height: 2; word-break: break-all; }

@media (max-width: 900px) {
  :root { --cell: 20px; }
  .bar { padding: 12px var(--gutter); gap: 10px 14px; flex-wrap: wrap; }
  .brand, .buy { height: 36px; }
  .brand-mark { width: 36px; font-size: 12px; }
  .brand-word { font-size: 12px; padding: 0 12px; letter-spacing: 0.28em; }
  .nav { order: 3; width: 100%; gap: 18px; font-size: 11px; }
  .buy { padding: 0 12px; font-size: 11px; letter-spacing: 0.08em; }
  .ca { height: 36px; font-size: 11px; }
  .ledger table { font-size: 12.5px; }
  .ledger th, .ledger td { padding: 8px 6px; }
  .ledger th:nth-child(3), .ledger td:nth-child(3), .ledger th:nth-child(6), .ledger td:nth-child(6) { display: none; }
  .desk-scene { width: 260%; margin-left: -81%; } /* frames pepe (32.6%) through the fallen figure's hand (~68%) */
  .terminal { font-size: 12px; padding: 2px 10px 4px; }
  .tip { font-size: 12.5px; max-width: 280px; }
  .term-log li { grid-template-columns: 2ch 6ch 7ch 13ch 1fr; }
  .term-log li > span:nth-child(5) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; }
}
