:root {
  --daylight: #e4eee8;
  --ink: #17211c;
  --ink-soft: #3c4a43;
  --slip: #fffdf8;
  --glass: #f4e7c8;
  --coffee: #3c2415;
  --foam: #e7b84a;
  --pandan: #085c46;
  --chili: #c4321a;
  --chili-deep: #8e2414;
  --steel: #b7c4bc;
  --purple: #3d348b;
  --display: "Darker Grotesque", "Arial Narrow", sans-serif;
  --body: "Atkinson Hyperlegible", "Segoe UI", sans-serif;
  --mono: "Fragment Mono", ui-monospace, monospace;
  color-scheme: light;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: auto; }

body {
  margin: 0;
  background: var(--daylight);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.45;
  overflow-x: clip;
}

h1, h2, h3, p, blockquote, dl, dd, figure { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; }
img, svg { display: block; }

::selection { background: var(--foam); color: var(--ink); }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--ink);
  color: white;
  padding: 8px 12px;
  z-index: 80;
}
.skip:focus { top: 8px; }

.top {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 16px 10px;
  border-bottom: 2px solid var(--ink);
  background: var(--daylight);
}

.mark {
  font-family: var(--display);
  font-weight: 800;
  font-size: 42px;
  line-height: 0.8;
  letter-spacing: -0.045em;
  text-decoration: none;
}

.desk-nav { display: none; }
.desk-nav a {
  text-decoration: none;
  font-size: 17px;
  padding: 6px 0;
}
.desk-nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--ink); }

.wallet-btn {
  margin-left: auto;
  border: 1.5px solid var(--ink);
  background: var(--slip);
  border-radius: 2px;
  min-height: 44px;
  padding: 8px 12px;
  font-size: 15px;
}

.demo-line {
  margin: 0;
  padding: 8px 16px 0;
  color: var(--ink-soft);
  font-size: 14px;
  max-width: 1120px;
}

main {
  padding: 16px 16px calc(78px + env(safe-area-inset-bottom));
  max-width: 1120px;
  margin: 0 auto;
}

.slot-label {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 0.9;
}
h1.slot-label { font-size: clamp(36px, 9vw, 52px); margin: 8px 0 12px; }
p.slot-label { font-size: 26px; margin: 4px 0 8px; }
.slot-label label { cursor: pointer; }

.slot-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
}

.slots {
  position: relative;
  height: 64px;
  flex: 1 1 240px;
  max-width: 460px;
}
.slots input {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  color: transparent;
  caret-color: transparent;
  font-size: 16px;
}
.wells {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  pointer-events: none;
}
.wells i {
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-style: normal;
  font-size: 26px;
  background: var(--slip);
  border: 1.5px solid var(--ink);
  border-bottom-width: 4px;
  border-radius: 3px;
  position: relative;
}
.wells i.on::after {
  content: "";
  width: 2px;
  height: 26px;
  background: var(--ink);
  position: absolute;
}
.slots.bad .wells i { border-color: var(--chili-deep); }

.open-btn {
  min-height: 64px;
  min-width: 132px;
  padding: 0 16px;
  border: 1.5px solid var(--ink);
  border-radius: 2px;
  background: transparent;
  font-family: var(--display);
  font-weight: 800;
  font-size: 26px;
  line-height: 1;
  white-space: nowrap;
}
.open-btn.ready {
  background: var(--chili);
  border-color: var(--chili);
  color: white;
}
.open-btn.ready:active { background: var(--chili-deep); }

@media (max-width: 560px) {
  .open-btn { flex: 1 1 100%; }
}

.help, .quiet {
  color: var(--ink-soft);
  font-size: 15px;
  margin-top: 8px;
  max-width: 62ch;
}
.msg {
  color: var(--chili-deep);
  font-size: 15px;
  min-height: 0;
  margin-top: 6px;
}
.msg:empty { display: none; }

.lede {
  margin-top: 18px;
  max-width: 62ch;
}
.lede p + p { margin-top: 8px; }

.tries {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 14px;
}
.try {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "code pct" "meta pct";
  column-gap: 10px;
  align-items: center;
  text-decoration: none;
  background: var(--slip);
  border: 1.5px solid var(--ink);
  border-radius: 2px;
  padding: 8px 12px;
  min-height: 52px;
}
.try-code { grid-area: code; font-family: var(--mono); font-size: 15px; }
.try-meta { grid-area: meta; color: var(--ink-soft); font-size: 14px; }
.try-pct {
  grid-area: pct;
  font-family: var(--display);
  font-weight: 800;
  font-size: 28px;
  line-height: 0.9;
}
.up { color: var(--pandan); }
.down { color: var(--chili-deep); }

.layout {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.book-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}
.book-head h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: 34px;
  line-height: 0.9;
  letter-spacing: -0.03em;
}
.toggle {
  border: 1.5px solid var(--ink);
  min-height: 40px;
  padding: 6px 10px;
  border-radius: 2px;
  background: transparent;
  font-size: 15px;
}
.toggle[aria-pressed="true"] {
  background: var(--ink);
  color: white;
}

.row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "code name pct" "sub sub pct";
  gap: 0 12px;
  align-items: center;
  padding: 11px 2px;
  border-bottom: 1px solid var(--steel);
  text-decoration: none;
}
.row-code { grid-area: code; font-family: var(--mono); font-size: 14px; }
.row-name { grid-area: name; font-size: 16px; min-width: 0; }
.row-sub { grid-area: sub; color: var(--ink-soft); font-size: 14px; }
.row-pct {
  grid-area: pct;
  font-family: var(--display);
  font-weight: 800;
  font-size: 30px;
  line-height: 0.85;
  justify-self: end;
}
.follow-tag { font-size: 14px; }

.more { max-width: 68ch; }
.more h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(32px, 7vw, 46px);
  line-height: 0.92;
  letter-spacing: -0.03em;
  max-width: 16ch;
  margin-bottom: 12px;
}
.steps li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 8px;
  margin: 0 0 12px;
  max-width: 62ch;
}
.steps b {
  font-family: var(--display);
  font-weight: 800;
  font-size: 26px;
  line-height: 1;
}

.slip {
  position: relative;
  background: var(--slip);
  border: 1.5px solid var(--ink);
  border-radius: 2px;
  box-shadow: 5px 5px 0 var(--ink);
  width: calc(100% - 6px);
  padding: 16px 16px 18px;
  margin-top: 16px;
}
.slip::before {
  content: "";
  display: block;
  height: 12px;
  margin: 0 0 12px;
  background: radial-gradient(circle, var(--daylight) 4.5px, transparent 5px) left center / 18px 12px repeat-x;
}
.slip-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.tok-name { color: var(--ink-soft); font-size: 15px; }
.tok {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(48px, 14vw, 76px);
  line-height: 0.82;
  letter-spacing: -0.04em;
}
.tok.long { font-size: clamp(32px, 8vw, 48px); }
.by { margin-top: 6px; }
.by a { font-weight: 700; }

.chop {
  flex: 0 0 auto;
  margin-top: 8px;
  transform: rotate(-8deg);
  border: 2px solid currentColor;
  outline: 1px solid currentColor;
  outline-offset: 3px;
  padding: 4px 8px 2px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 22px;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.chop-live, .chop-hit { color: var(--pandan); }
.chop-stopped { color: var(--chili-deep); }
.chop-closed { color: var(--ink); }

.range {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 14px;
  align-items: center;
  margin: 18px 0 8px;
}
.glass-col { display: grid; justify-items: center; gap: 6px; }
.glass {
  width: 58px;
  height: 210px;
  border: 2px solid var(--ink);
  border-radius: 6px 6px 16px 16px;
  background: var(--glass);
  position: relative;
  overflow: hidden;
}
.fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--coffee);
}
.foam {
  position: absolute;
  left: 0;
  right: 0;
  height: 8px;
  background: var(--foam);
}
.glass-pct {
  font-family: var(--display);
  font-weight: 800;
  font-size: 26px;
  line-height: 0.9;
}
.levels { display: grid; gap: 7px; }
.levels div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: baseline;
  border-bottom: 1px solid var(--steel);
  padding-bottom: 4px;
}
.levels dt { font-size: 15px; }
.levels dd {
  margin: 0;
  font-family: var(--mono);
  font-size: 14px;
}
.levels .paid dt::after {
  content: " paid";
  color: var(--pandan);
}

.note {
  margin: 16px 0;
  padding-left: 12px;
  border-left: 3px solid var(--ink);
  max-width: 62ch;
  font-size: 18px;
}

.mint-line { margin-top: 8px; font-size: 15px; }
.mint {
  display: block;
  width: 100%;
  margin-top: 6px;
  text-align: left;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  border: 1.5px solid var(--ink);
  border-radius: 2px;
  background: transparent;
  padding: 10px;
  min-height: 44px;
}

.stat {
  margin-top: 12px;
  font-size: 15px;
  max-width: 62ch;
}

.spend { margin-top: 16px; }
.spend h3 {
  font-family: var(--display);
  font-weight: 800;
  font-size: 28px;
  line-height: 1;
  margin-bottom: 8px;
}
.presets { display: flex; flex-wrap: wrap; gap: 8px; }
.presets button {
  min-width: 52px;
  min-height: 44px;
  padding: 6px 10px;
  border: 1.5px solid var(--ink);
  border-radius: 2px;
  background: transparent;
}
.presets button[aria-pressed="true"] {
  background: var(--ink);
  color: white;
}
.amt {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
}
.amt input {
  width: 100%;
  min-height: 48px;
  border: 1.5px solid var(--ink);
  border-radius: 2px;
  background: white;
  padding: 8px 10px;
  font-size: 18px;
  font-family: var(--mono);
}
.fee { margin-top: 10px; max-width: 62ch; }
.fee li { margin: 4px 0; }

.fine {
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 14px;
  max-width: 62ch;
}

.buybar { margin-top: 14px; }
.buy {
  width: 100%;
  min-height: 54px;
  border-radius: 2px;
  background: var(--chili);
  color: white;
  font-family: var(--display);
  font-weight: 800;
  font-size: 30px;
  line-height: 1;
}
.buy:active { background: var(--chili-deep); }
.buy:disabled {
  background: transparent;
  color: var(--ink-soft);
  border: 1.5px solid var(--steel);
}

.receipt {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--steel);
}
.receipt h3 {
  font-family: var(--display);
  font-weight: 800;
  font-size: 26px;
  line-height: 1;
}
.sig {
  font-family: var(--mono);
  font-size: 13px;
  overflow-wrap: anywhere;
  margin: 6px 0;
}
.linkish {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  min-height: 44px;
  padding: 8px 0;
}

.actions { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 12px; }

.miss {
  margin-top: 16px;
  max-width: 52ch;
}
.miss strong { font-family: var(--mono); font-weight: 400; }

.page-head { margin: 8px 0 14px; max-width: 62ch; }
.page-head h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(40px, 10vw, 64px);
  line-height: 0.88;
  letter-spacing: -0.035em;
}
.page-head p { margin-top: 8px; }

.caller-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--steel);
  text-decoration: none;
}
.caller-row .who { font-weight: 700; }
.caller-row .place { color: var(--ink-soft); font-size: 15px; }
.caller-row .count { font-size: 15px; grid-column: 1; }
.caller-row .ticks { grid-column: 1 / -1; margin: 6px 0 2px; }
.rate {
  font-family: var(--display);
  font-weight: 800;
  font-size: 42px;
  line-height: 0.8;
  grid-row: 1 / span 2;
  grid-column: 2;
  align-self: center;
}
.ticks { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 8px; }
.ticks i {
  width: 9px;
  height: 16px;
  background: var(--steel);
  display: block;
  font-style: normal;
}
.ticks i.hit { background: var(--pandan); }
.ticks i.stopped { background: var(--chili); }
.ticks i.closed { background: var(--ink); }

.profile .style { max-width: 62ch; margin: 8px 0; }
.follow {
  min-height: 44px;
  padding: 8px 12px;
  border: 1.5px solid var(--ink);
  border-radius: 2px;
  margin: 8px 0 16px;
}
.follow[aria-pressed="true"] { background: var(--ink); color: white; }

.form-slip .field { margin: 14px 0; }
.form-slip label, .legend {
  display: block;
  margin-bottom: 6px;
  font-size: 16px;
}
.form-slip input,
.form-slip textarea {
  width: 100%;
  border: 1.5px solid var(--ink);
  border-radius: 2px;
  background: white;
  padding: 12px;
  font-size: 16px;
}
.form-slip textarea { min-height: 110px; resize: vertical; }
.token-picks { display: flex; flex-wrap: wrap; gap: 8px; }
.token-picks button {
  min-height: 44px;
  padding: 6px 10px;
  border: 1.5px solid var(--ink);
  border-radius: 2px;
}
.token-picks button[aria-pressed="true"] { background: var(--ink); color: white; }
.target-row { display: flex; gap: 8px; margin-bottom: 8px; }
.target-row input { flex: 1; }
.text-btn { text-decoration: underline; text-underline-offset: 3px; min-height: 44px; padding: 8px 0; }
.form-error {
  color: var(--chili-deep);
  margin: 8px 0;
}
.form-error:empty { display: none; }
.stamp {
  width: 100%;
  min-height: 54px;
  background: var(--ink);
  color: white;
  font-family: var(--display);
  font-weight: 800;
  font-size: 30px;
  border-radius: 2px;
  margin-top: 8px;
}

.desk-block { margin: 18px 0; max-width: 68ch; }
.desk-block h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: 32px;
  line-height: 0.95;
  margin-bottom: 6px;
}
.addr {
  font-family: var(--mono);
  font-size: 14px;
  overflow-wrap: anywhere;
}
.balance {
  font-family: var(--display);
  font-weight: 800;
  font-size: 48px;
  line-height: 0.9;
  margin: 6px 0;
}

.shade {
  position: fixed;
  inset: 0;
  background: rgba(23, 33, 28, 0.38);
  z-index: 40;
}
.sheet {
  position: fixed;
  z-index: 41;
  left: 0;
  right: 0;
  bottom: 0;
  background: white;
  border-top: 2px solid var(--ink);
  padding: 18px 16px calc(16px + env(safe-area-inset-bottom));
  max-height: min(88vh, 680px);
  overflow: auto;
}
.sheet h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: 36px;
  line-height: 0.9;
  letter-spacing: -0.03em;
}
.sheet p { margin-top: 8px; max-width: 48ch; }
.wallet-list { margin-top: 14px; }
.wallet-list button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 0;
  border-top: 1px solid var(--steel);
  min-height: 56px;
}
.wallet-list button:last-child { border-bottom: 1px solid var(--steel); }
.wallet-list strong { display: block; font-size: 18px; }
.wallet-list span { color: var(--ink-soft); font-size: 15px; }
.sheet-wallet { border-top: 6px solid var(--purple); }
.wallet-name {
  font-family: var(--display);
  font-weight: 800;
  font-size: 36px;
  line-height: 0.9;
  color: var(--purple);
}
.approve-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}
.reject, .approve {
  min-height: 52px;
  border-radius: 2px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 26px;
}
.reject { border: 1.5px solid var(--ink); background: white; }
.approve { background: var(--purple); color: white; }
.kv { margin-top: 12px; }
.kv div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid var(--steel);
}
.kv dt { font-size: 15px; }
.kv dd { margin: 0; text-align: right; }

#toasts:not(:empty) {
  position: fixed;
  z-index: 70;
  left: 16px;
  bottom: calc(74px + env(safe-area-inset-bottom));
  max-width: min(340px, calc(100% - 32px));
  background: var(--ink);
  color: white;
  padding: 10px 12px;
  font-size: 15px;
}

.tabbar {
  position: fixed;
  z-index: 30;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--daylight);
  border-top: 1.5px solid var(--ink);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 54px;
  text-decoration: none;
  font-size: 13px;
  color: var(--ink-soft);
}
.tabbar a[aria-current="page"] {
  color: var(--ink);
  box-shadow: inset 0 2px 0 var(--ink);
}
.noscript { padding: 16px; }

@media (prefers-reduced-motion: no-preference) {
  .wells i.on::after { animation: blink 1.05s steps(1) infinite; }
  .slip { animation: slipin 360ms cubic-bezier(.2, .8, .2, 1); }
  .sheet { animation: rise 220ms cubic-bezier(.2, .7, .2, 1); }
}
@keyframes blink { 50% { opacity: 0; } }
@keyframes slipin {
  from { transform: translateY(-8px) rotate(-1deg); }
  to { transform: none; }
}
@keyframes rise {
  from { transform: translateY(12px); }
  to { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .slip, .sheet, .wells i.on::after { animation: none; }
}

@media (max-width: 979px) {
  body.has-buy .buybar {
    position: fixed;
    z-index: 25;
    left: 0;
    right: 0;
    bottom: calc(54px + env(safe-area-inset-bottom));
    margin: 0;
    padding: 10px 16px;
    background: var(--daylight);
    border-top: 1.5px solid var(--ink);
  }
  body.has-buy .slip { margin-bottom: 88px; }
  body.has-buy #toasts:not(:empty) { bottom: calc(128px + env(safe-area-inset-bottom)); }
  body.sheet-open { overflow: hidden; }
}

@media (min-width: 720px) {
  .tries { grid-template-columns: repeat(3, 1fr); }
  .sheet {
    left: 50%;
    right: auto;
    bottom: auto;
    top: 10vh;
    width: min(460px, calc(100% - 48px));
    border: 2px solid var(--ink);
    box-shadow: 6px 6px 0 var(--ink);
    transform: translateX(-50%);
  }
  .sheet-wallet { border-top: 6px solid var(--purple); }
}

@media (min-width: 980px) {
  .top { position: sticky; top: 0; z-index: 20; padding: 14px 32px 12px; }
  .demo-line { padding: 10px 32px 0; }
  .desk-nav { display: flex; gap: 22px; align-items: center; }
  .tabbar { display: none; }
  main { padding: 22px 32px 72px; }
  .layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.78fr);
    grid-template-areas: "hero book" "more book";
    column-gap: 48px;
    row-gap: 28px;
    align-items: start;
  }
  .hero { grid-area: hero; min-width: 0; }
  .book {
    grid-area: book;
    position: sticky;
    top: 84px;
    max-height: calc(100vh - 104px);
    overflow: auto;
  }
  .more { grid-area: more; }
  #toasts:not(:empty) { bottom: 24px; }
  body.has-buy .buybar { position: static; border: 0; padding: 0; background: transparent; }
}

@media (min-width: 720px) and (prefers-reduced-motion: no-preference) {
  .sheet { animation-name: pop; }
}
@keyframes pop {
  from { transform: translateX(-50%) translateY(10px); }
  to { transform: translateX(-50%); }
}
