/* BLEB: a flat page with one lime accent; the linocut lives in the blebs. So over swaps paper and ink. */
:root {
  --paper: #fbfbf8;
  --ink: #0d0d0d;
  --ink-2: rgba(13, 13, 13, 0.6);
  --rule: rgba(13, 13, 13, 0.16);
  --lime: #ccff00;
  --display: 'Archivo', 'Arial Black', system-ui, sans-serif;
  --text: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Martian Mono', ui-monospace, Menlo, monospace;
}
html.over {
  --paper: #0d0d0d;
  --ink: #fbfbf8;
  --ink-2: rgba(251, 251, 248, 0.62);
  --rule: rgba(251, 251, 248, 0.18);
}
* { box-sizing: border-box; }
html { background: var(--paper); color: var(--ink); transition: background-color 0.4s, color 0.4s; }
body { margin: 0; font: 400 15px/1.45 var(--text); font-variant-numeric: tabular-nums lining-nums; }
h2 { margin: 0 0 10px; font: 800 20px/1.1 var(--display); font-stretch: 125%; }
p, ul, dl, ol { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:disabled { cursor: default; opacity: 0.4; }
img[data-pic]:not([src]) { visibility: hidden; } /* until its picture comes from tokenURI */
.eth { width: 0.6em; height: 1em; margin-right: 0.12em; vertical-align: -0.1em; fill: currentColor; }
@media (prefers-reduced-motion: reduce) { *, html { transition: none !important; animation: none !important; } }

/* the bar */
.top { grid-area: top; display: flex; align-items: center; gap: 24px; height: 64px; }
.mark { font: 800 28px/1 var(--display); font-stretch: 125%; text-decoration: none; margin-right: auto; }
.link { text-decoration: underline; text-underline-offset: 3px; font-size: 14px; }
.pill { height: 36px; padding: 0 18px; border: 2px solid var(--ink); border-radius: 999px; font-weight: 600; }
.pill:hover { background: var(--ink); color: var(--paper); }

/* the stage: the bubble of blebs over the steps of the price */
.stage { grid-area: stage; position: relative; min-height: 0; overflow: hidden; }
.tank { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: manipulation; }
.now { position: absolute; top: 8px; left: 0; z-index: 2; pointer-events: none; }
.price { font: 800 clamp(44px, 5.8vw, 96px)/0.92 var(--display); font-stretch: 125%; letter-spacing: -0.03em;
  white-space: nowrap; }
.then { margin-top: 10px; font-size: 18px; }
.legend { margin-top: 8px; max-width: 30ch; font-size: 13px; color: var(--ink-2); }
.mood { position: absolute; top: 12px; right: 0; z-index: 2; max-width: 30%; text-align: right; pointer-events: none; }
.mood-line { font: 800 clamp(22px, 2.3vw, 34px)/1 var(--display); font-stretch: 125%; }
.mood-why { margin-top: 6px; font-size: 13px; color: var(--ink-2); }

.step-done { fill: var(--lime); }
.step-ahead { fill: none; stroke: var(--lime); stroke-width: 3; stroke-linejoin: miter; }
.step-now { fill: url(#hatch); }
.hatch-line { stroke: var(--ink); stroke-width: 1.5; }
.step-label { font: 600 12px var(--mono); fill: var(--ink); }
.floor { stroke: var(--rule); stroke-width: 1; }
.tick { stroke: var(--ink); stroke-width: 1; }
.mark-label { font: 400 11px var(--mono); fill: var(--ink-2); }
.rim { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; }
.dot { fill: var(--ink); transform-box: fill-box; transform-origin: center; }
.dot.mine { fill: var(--lime); stroke: var(--ink); stroke-width: 1.5; }
.dot.rise { animation: rise 0.6s cubic-bezier(0.3, 1.5, 0.5, 1) both; }
.burst { fill: none; stroke: var(--ink); stroke-width: 1.5; transform-box: fill-box; transform-origin: center;
  animation: burst 0.8s ease-out both; pointer-events: none; }
.ring { fill: none; stroke: var(--ink); stroke-width: 1.5; pointer-events: none; }
.ring.on { stroke-width: 2.5; }
.tag { font: 600 11px var(--mono); fill: var(--ink); paint-order: stroke; stroke: var(--paper); stroke-width: 4px;
  stroke-linejoin: round; pointer-events: none; }
@keyframes rise { from { transform: scale(0); } to { transform: none; } }
@keyframes burst { from { transform: scale(0.6); opacity: 1; } to { transform: scale(2.6); opacity: 0; } }

.card {
  position: absolute; z-index: 3; width: 236px; padding: 12px; background: var(--paper); border: 2px solid var(--ink);
}
.card[hidden] { display: none; }
.card img { width: 100%; aspect-ratio: 1; display: block; margin-bottom: 10px; }
.card b { font: 800 18px/1 var(--display); font-stretch: 125%; }
.card p { font-size: 13px; margin-top: 4px; }
.card .row { display: flex; gap: 6px; margin-top: 10px; }
.card .row .outline { height: 34px; padding: 0 10px; font-size: 13px; white-space: nowrap; }

/* the panel */
.panel {
  grid-area: panel; display: flex; flex-direction: column; gap: 20px; margin: 0 0 24px; padding: 24px;
  border: 2px solid var(--ink); overflow-y: auto; min-height: 0;
}
.next { padding: 10px 12px; border-left: 3px solid var(--lime); font-size: 14px; line-height: 1.4; }
.next-k { margin-right: 8px; padding: 2px 6px; background: var(--ink); color: var(--paper);
  font: 600 11px var(--mono); }
.block { padding-bottom: 20px; border-bottom: 1px solid var(--rule); }
.block:last-of-type { border-bottom: 0; }
.claim p { font-size: 14px; margin-bottom: 12px; }
.claim-art { width: 72px; height: 72px; display: block; margin-bottom: 10px; }
.claim-art[hidden] { display: none; }
.outline { height: 40px; padding: 0 16px; border: 2px solid var(--ink); font-weight: 600; }
.outline:hover:not(:disabled) { background: var(--ink); color: var(--paper); }

.qty-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.qty { display: flex; align-items: center; border: 2px solid var(--ink); }
.qty button { width: 44px; height: 44px; font-size: 22px; }
.qty output { min-width: 56px; text-align: center; font: 600 20px var(--mono); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips button { height: 32px; padding: 0 12px; border: 1px solid var(--rule); border-radius: 999px; font-size: 13px; }
.chips button:hover, .chips button.on { border-color: var(--ink); }
.lines { list-style: none; padding: 0; display: grid; gap: 4px; font-size: 14px; color: var(--ink-2); }
.lines b { color: var(--ink); font-weight: 600; }
.through { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-top: 12px;
  padding: 8px 10px; border-left: 3px solid var(--lime); font-size: 14px; }
.through[hidden] { display: none; }
.x { font-size: 20px; line-height: 1; }
.total { display: flex; justify-content: space-between; align-items: baseline; margin: 16px 0 12px; }
.total b { font: 800 32px/1 var(--display); font-stretch: 125%; }
.go { width: 100%; height: 56px; background: var(--lime); color: #0d0d0d; font: 800 22px/1 var(--display);
  font-stretch: 125%; }
.go:hover { outline: 2px solid var(--ink); outline-offset: 2px; }
.status { min-height: 1.5em; margin-top: 10px; font: 400 12px/1.5 var(--mono); }

.mine { max-height: 240px; overflow-y: auto; display: grid; gap: 10px; }
.mine .quiet { color: var(--ink-2); font-size: 14px; }
.mine-row { display: grid; grid-template-columns: 48px 1fr auto; gap: 10px; align-items: center; }
.mine-row img { width: 48px; height: 48px; display: block; }
.mine-row b { display: block; font-weight: 700; }
.mine-row span { display: block; font-size: 13px; color: var(--ink-2); }
.mine-row .acts { display: flex; gap: 6px; }
.mine-row .acts button { height: 30px; padding: 0 10px; border: 1px solid var(--ink); font-size: 13px; }
.mine-row .acts .pop { background: var(--ink); color: var(--paper); }
.links { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; margin-top: auto; }
.keep { display: grid; gap: 14px; }
.keep h2 { margin-bottom: 0; }
.keep[hidden], .keep-row[hidden] { display: none; }
.keep-row { display: grid; gap: 10px; justify-items: start; }
.keep-row p { font-size: 14px; }

/* the strip */
.strip { grid-area: strip; display: grid; grid-template-rows: auto auto; gap: 14px; align-content: center; min-width: 0;
  border-top: 1px solid var(--rule); }
.stats { display: flex; }
.stats div { padding: 0 24px; border-left: 1px solid var(--rule); }
.stats div:first-child { padding-left: 0; border-left: 0; }
.stats dt { font-size: 12px; color: var(--ink-2); }
.stats dd { margin: 4px 0 0; font: 800 24px/1 var(--display); font-stretch: 125%; white-space: nowrap; }
.events { list-style: none; padding: 0; display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; }
.events::-webkit-scrollbar { display: none; }
.events li, .post-list li { flex: 0 0 auto; scroll-snap-align: start; border: 1px solid var(--rule); font-size: 12px; }
.events li { white-space: nowrap; }
.events li > a, .events li > span, .post-list li > a, .post-list li > span { display: block; padding: 6px 10px;
  text-decoration: none; }
.events li > a:hover, .post-list li > a:hover { text-decoration: underline; text-underline-offset: 2px; }
.events li.pop, .post-list li.pop { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.events li.big, .post-list li.big { border: 2px solid var(--ink); font-weight: 600; }
.events li.more, .events li.quiet { border: 0; }
.events li.more button { padding: 6px 4px; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.events li.quiet span { color: var(--ink-2); padding-left: 0; }
.sig { font-weight: 600; }
.events .t, .post-list .t { color: var(--ink-2); margin-left: 6px; }
.events li.pop .t, .post-list li.pop .t { color: inherit; opacity: 0.7; }

/* dialogs */
.sheet { max-width: 560px; padding: 28px; border: 2px solid var(--ink); background: var(--paper); color: var(--ink); }
.sheet::backdrop { background: rgba(13, 13, 13, 0.4); }
.sheet ul { padding-left: 18px; display: grid; gap: 10px; margin-bottom: 20px; }
.sheet-note { font-size: 13px; color: var(--ink-2); margin-bottom: 14px; }
.post-list { list-style: none; padding: 0; display: grid; gap: 6px; max-height: min(60svh, 560px); overflow-y: auto;
  margin-bottom: 20px; }
.post-list li { font-size: 13px; }
.wallet-list { display: grid; gap: 8px; margin-bottom: 20px; }
.wallet-list button, .wallet-list a { display: block; padding: 12px 14px; border: 2px solid var(--ink);
  text-align: left;
  text-decoration: none; font-weight: 600; }

/* the dock, phones only */
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; gap: 10px;
  padding: 10px 14px calc(14px + env(safe-area-inset-bottom)); background: var(--paper);
  border-top: 2px solid var(--ink); }
.dock[hidden] { display: none; }
.dock .go { height: 48px; font-size: 18px; }
.small-qty button { width: 40px; height: 44px; }
.small-qty output { min-width: 40px; }

/* wide: one screen */
@media (min-width: 1024px) {
  body {
    display: grid; height: 100svh; overflow: hidden; padding: 0 32px; column-gap: 32px;
    grid-template-columns: minmax(0, 1fr) clamp(360px, 27vw, 420px);
    grid-template-rows: 64px minmax(0, 1fr) 132px;
    grid-template-areas: "top top" "stage panel" "strip panel";
  }
  .dock { display: none !important; }
}

/* tablet: the stage over the panel */
@media (min-width: 760px) and (max-width: 1023px) {
  body { padding: 0 24px 24px; }
  .stage { height: 62svh; }
  .panel { margin-top: 20px; }
  .strip { grid-template-columns: 1fr; padding-top: 16px; }
  .dock { display: none !important; }
}

/* phones: one column */
@media (max-width: 759px) {
  body { padding: 0 16px 96px; overflow-x: hidden; }
  .top { height: 56px; gap: 16px; }
  .stage { display: flex; flex-direction: column; overflow: visible; }
  .mood { position: static; max-width: none; text-align: left; order: 1; margin-top: 6px; }
  .now { position: static; order: 2; margin: 14px 0 10px; }
  .price { font-size: clamp(36px, 12.6vw, 56px); }
  .tank { position: relative; order: 3; height: 48svh; touch-action: pan-y; }
  .panel { margin: 20px 0 0; padding: 18px; overflow: visible; }
  .mine { max-height: none; }
  .strip { grid-template-columns: 1fr; gap: 16px; padding-top: 18px; border-top: 0; }
  .stats { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px 0; }
  .stats div:nth-child(odd), .stats div:nth-child(n+3) { padding-left: 0; border-left: 0; }
  .stats div:nth-child(n+3) { grid-column: 1 / -1; }
  .events { flex-direction: column; overflow: visible; }
  .events li { white-space: normal; }
  .events li:nth-child(n+7):not(.more) { display: none; }
}
