/* Gearz site: near-black workshop with brass rim light. One accent (brass), light display type, lots of space.
   Shape rule: buttons, tabs, chips and badges are full pills; panels and tables 16px; inputs 10px.
   Layout: the home page scrolls (hero + three chapters); every other page is one tab, one screen. */
:root {
  --bg: #080706;
  --s1: #0f0d0b;
  --s2: #15120f;
  --s3: #1e1a15;
  --line: #201c17;
  --line-2: #2e2821;
  --ink: #ece6da;
  --ink-2: #b8af9f;
  --ink-3: #857c6e;
  --ink-4: #5d564b;
  --acc: #c9a15a;
  --acc-hi: #dcb871;
  --acc-ink: #15100a;
  --acc-soft: rgba(201, 161, 90, .36);
  --err: #d98a6a;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in: cubic-bezier(.7, 0, .84, 0);
  --display: "Segoe UI Variable Display", "SF Pro Display", -apple-system, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --sans: "Segoe UI Variable Text", "SF Pro Text", -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  --serif: Georgia, "Times New Roman", serif;
  --nav: 64px;
  --r: 10px;
  --r-lg: 16px;
}
* { box-sizing: border-box; margin: 0; padding: 0 }
html { background: var(--bg); color-scheme: dark; -webkit-text-size-adjust: 100% }
html, body { min-height: 100% }
body {
  font: 400 16px/1.6 var(--sans);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}
a { color: inherit; text-decoration: none }
button, input, select { font: inherit; color: inherit }
button { background: none; border: 0; cursor: pointer; text-align: inherit }
img { display: block; max-width: 100% }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 32px }
.num { font-variant-numeric: tabular-nums }
.mono { font-family: var(--mono) }
.dim { color: var(--ink-4) }
[hidden] { display: none !important }
:focus-visible { outline: 2px solid rgba(201, 161, 90, .7); outline-offset: 2px }

/* ── Navigation ── */
.nav { position: sticky; top: 0; z-index: 20; height: var(--nav); border-bottom: 1px solid rgba(255, 240, 210, .05); background: rgba(8, 7, 6, .74); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px) }
.nav .wrap { display: flex; align-items: center; height: 100%; gap: 32px }
.mark { display: flex; align-items: center; gap: 10px; font: 400 16px/1 var(--serif); letter-spacing: .24em; color: var(--ink) }
.mark img { transition: transform .6s var(--ease-out) }
.mark:hover img { transform: rotate(30deg) }
.tabs { position: relative; display: flex; gap: 2px; isolation: isolate }
.tab { position: relative; height: 34px; padding: 0 13px; border-radius: 999px; font-size: 14px; color: var(--ink-3); transition: color .15s }
.tab:hover, .tab[aria-selected="true"] { color: var(--ink) }
.tabs .pill { position: absolute; top: 0; left: 0; height: 34px; border-radius: 999px; background: rgba(255, 240, 210, .06); border: 1px solid rgba(255, 240, 210, .07); transition: transform .35s var(--ease-out), width .35s var(--ease-out); z-index: -1 }
.nav .right { margin-left: auto; display: flex; gap: 8px }
.unit { display: inline-flex; height: 32px; padding: 3px; gap: 2px; border: 1px solid rgba(255, 240, 210, .14); border-radius: 999px }
.unit button { padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 500; color: var(--ink-3); transition: background .15s, color .15s }
.unit button:hover:not(:disabled) { color: var(--ink) }
.unit button[aria-checked="true"] { background: var(--s2); color: var(--ink) }
.unit button:disabled { opacity: .4; cursor: not-allowed }

/* ── Buttons ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 999px; font-weight: 500; font-size: 14px; white-space: nowrap; border: 1px solid var(--line-2); background: var(--s1); color: var(--ink); transition: background .15s, border-color .15s, transform .1s }
.btn:hover { background: var(--s2); border-color: #40382d }
.btn:active { transform: scale(.97) }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none }
.btn.p { background: var(--acc); border-color: transparent; color: var(--acc-ink); font-weight: 600 }
.btn.p:hover { background: var(--acc-hi) }
.btn.ghost { background: transparent; border-color: rgba(255, 240, 210, .14) }
.btn.ghost:hover { border-color: rgba(255, 240, 210, .28); background: rgba(255, 240, 210, .03) }
.btn.lg { height: 50px; padding: 0 26px; font-size: 15px }
.btn.sm { height: 32px; padding: 0 14px; font-size: 13px }
.link { color: var(--acc); text-decoration: underline; text-underline-offset: 3px; font-size: inherit }
.link:hover { color: var(--acc-hi) }

/* ── Pages ── */
main { flex: 1 0 auto; display: grid }
.page { grid-area: 1 / 1; display: flex; align-items: flex-start; padding: 72px 0 96px }
.page.leaving { opacity: 0; transition: opacity .16s var(--ease-in) }
.page .in-1, .page .in-2, .page .in-3, .page .in-4 { opacity: 0; transform: translateY(18px) }
.page.shown .in-1, .page.shown .in-2, .page.shown .in-3, .page.shown .in-4 { opacity: 1; transform: none; transition: opacity .7s var(--ease-out), transform .7s var(--ease-out) }
.page.shown .in-2 { transition-delay: 70ms }
.page.shown .in-3 { transition-delay: 140ms }
.page.shown .in-4 { transition-delay: 210ms }

h1, h2 { font-family: var(--display); font-weight: 400; color: var(--ink); text-wrap: balance }
h1 { font-size: clamp(44px, 6.2vw, 88px); line-height: 1.02; letter-spacing: -.045em; white-space: pre-line }
h2 { font-size: clamp(32px, 3.6vw, 50px); line-height: 1.08; letter-spacing: -.035em }
h3 { font-weight: 500; font-size: 16px; letter-spacing: -.005em }
:lang(zh-Hans) h1 { letter-spacing: -.01em; line-height: 1.12 }
:lang(zh-Hans) h2 { letter-spacing: 0; line-height: 1.2 }
.lead { margin-top: 22px; max-width: 32em; font-size: 17px; line-height: 1.7; color: var(--ink-2) }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px }
.split { display: grid; grid-template-columns: 1fr minmax(0, 470px); gap: 72px; align-items: start }
/* Grid and flex items default to min-width: auto; without this a wide tab row stretches the page on phones */
.page > .wrap, .split > *, .panel { min-width: 0 }
.phase { color: var(--ink-2) }
.note { font-size: 13px; line-height: 1.65; color: var(--ink-3); margin-top: 10px }
.msg { font-size: 14px; color: var(--ink-2); margin-top: 10px }
.msg:empty { display: none }
.msg.err { color: var(--err) }
.msg a { color: var(--acc); text-decoration: underline; text-underline-offset: 3px }
.sub-h { font-size: 12px; font-weight: 500; letter-spacing: .04em; color: var(--ink-3); margin: 24px 0 8px }

/* ── Home: full-bleed hero ── */
.page#p-home { display: block; padding: 0 }
.hero { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: flex-end; min-height: calc(100dvh - var(--nav)) }
.hero-bg { position: absolute; inset: 0 0 0 18%; z-index: -1; overflow: hidden }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 66% 50% }
.hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--bg) 0%, rgba(8, 7, 6, .9) 14%, rgba(8, 7, 6, .35) 36%, rgba(8, 7, 6, 0) 58%), linear-gradient(0deg, var(--bg) 0%, rgba(8, 7, 6, 0) 40%) }
.page.shown .hero-bg img { animation: settle 2.4s var(--ease-out) both }
@keyframes settle { from { transform: scale(1.06); opacity: .4 } to { transform: none; opacity: 1 } }
.hero-in { padding-top: 140px; padding-bottom: 56px }
.hero h1 { max-width: 9em }
.hero .lead { max-width: 26em }
:lang(en) .hero h1 { max-width: 10em }
.live { margin-top: 64px; max-width: 780px; padding-top: 22px; border-top: 1px solid rgba(255, 240, 210, .09) }
.live dl { display: grid; grid-template-columns: 1fr 1fr 1.5fr; gap: 24px }
.live dt { font-size: 12px; letter-spacing: .06em; color: var(--ink-3) }
.live dd { margin-top: 6px; font: 400 22px/1.3 var(--display); letter-spacing: -.01em }
.live dd small { font: 400 13px var(--sans); color: var(--ink-3) }
.live #homePhase { font-size: 17px; line-height: 1.5; color: var(--ink-2); padding-top: 3px }
.live .gauge { max-width: none; margin-top: 18px }

/* ── Mint countdown: brass odometer. Reel motion from transitions.dev "Spinning counter", one cell per tick ── */
:root {
  --reel-dur: 450ms;
  --reel-cell: 46px;
  --reel-spin-blur: 3px;
  --reel-stagger: 90ms;
  --reel-ease: cubic-bezier(0.16, 1, 0.3, 1);
}
.t-reel { display: inline-flex; align-items: center; height: var(--reel-cell); font-variant-numeric: tabular-nums; }
.t-reel-col {
  position: relative; height: var(--reel-cell); overflow: hidden;
  /* Soft-fade the window edges instead of hard-cropping. */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 22%, #000 78%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 22%, #000 78%, transparent 100%);
}
.t-reel-strip { display: flex; flex-direction: column; will-change: transform, filter; }
.t-reel-digit { height: var(--reel-cell); display: flex; align-items: center; justify-content: center; }
@media (prefers-reduced-motion: reduce) {
  .t-reel-strip { transition: none !important; filter: none !important; }
}
.cd { margin-bottom: 24px }
.live .cd { margin-bottom: 26px }
.cd-k { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font-size: 12px; letter-spacing: .06em; color: var(--ink-3) }
.cd-at { letter-spacing: 0; color: var(--ink-2) }
.cd-plate { position: relative; display: inline-flex; margin-top: 10px; padding: 14px 20px 10px; border: 1px solid #5c3f17; border-radius: var(--r); background: radial-gradient(120% 150% at 30% 0%, #2a1e12 0%, #17110b 58%, #0e0a06 100%); box-shadow: inset 0 1px 0 rgba(230, 189, 102, .2), inset 0 -10px 18px rgba(0, 0, 0, .45), 0 10px 28px rgba(0, 0, 0, .5) }
.cd-plate::before { content: ""; position: absolute; inset: 5px; pointer-events: none; background: radial-gradient(circle, #e6bd66 0 1.1px, #7a5520 1.7px, transparent 2.3px) left top / 6px 6px no-repeat, radial-gradient(circle, #e6bd66 0 1.1px, #7a5520 1.7px, transparent 2.3px) right top / 6px 6px no-repeat, radial-gradient(circle, #e6bd66 0 1.1px, #7a5520 1.7px, transparent 2.3px) left bottom / 6px 6px no-repeat, radial-gradient(circle, #e6bd66 0 1.1px, #7a5520 1.7px, transparent 2.3px) right bottom / 6px 6px no-repeat }
.cd-u { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0 10px }
.cd-u + .cd-u { border-left: 1px solid rgba(201, 161, 90, .14) }
.cd .t-reel { gap: 3px; font: 400 calc(var(--reel-cell) * .7)/1 var(--display); color: #e6bd66 }
.cd .t-reel-col { width: calc(var(--reel-cell) * .62); border-radius: 4px; background: linear-gradient(180deg, #0a0705 0%, #1d150d 50%, #0a0705 100%); box-shadow: inset 0 0 0 1px rgba(92, 63, 23, .7) }
.cd .t-reel-strip { transition: transform var(--reel-dur) var(--reel-ease) }
.cd-u small { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: #8e6526 }

/* ── Home: chapters ── */
.chapters { display: grid; gap: 150px; padding-top: 140px; padding-bottom: 150px }
.ch { display: grid; grid-template-columns: 1.05fr 1fr; gap: 80px; align-items: center }
.ch.flip .ch-img { order: 2 }
.ch-img { width: 100%; max-width: 560px; justify-self: center; aspect-ratio: 1 }
.ch-img img { width: 100%; height: 100%; object-fit: cover; -webkit-mask-image: radial-gradient(closest-side, #000 70%, transparent 100%); mask-image: radial-gradient(closest-side, #000 70%, transparent 100%) }
.ch-text { max-width: 30em }
.eyebrow { display: flex; align-items: center; gap: 14px; font-size: 13px; letter-spacing: .08em; color: var(--ink-3) }
.eyebrow .num { color: var(--acc) }
.eyebrow .num::after { content: ""; display: inline-block; width: 36px; height: 1px; margin-left: 14px; vertical-align: middle; background: var(--acc-soft) }
.ch h2 { margin-top: 20px }
.ch-text > p:not(.eyebrow) { margin-top: 20px; font-size: 17px; line-height: 1.75; color: var(--ink-2) }
.tlink { display: inline-flex; align-items: center; gap: 10px; margin-top: 30px; padding-bottom: 5px; font-size: 15px; color: var(--ink); border-bottom: 1px solid var(--acc-soft); transition: border-color .2s }
.tlink::after { content: "→"; color: var(--acc); transition: transform .25s var(--ease-out) }
.tlink:hover { border-color: var(--acc) }
.tlink:hover::after { transform: translateX(4px) }
.ch .ch-img, .ch .ch-text { opacity: 0; transform: translateY(36px) }
.ch.seen .ch-img, .ch.seen .ch-text { opacity: 1; transform: none; transition: opacity .9s var(--ease-out), transform .9s var(--ease-out) }
.ch.seen .ch-text { transition-delay: 120ms }

/* ── Mint ── */
.meter { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin-top: 30px }
.meter .big { font: 400 clamp(56px, 7vw, 100px)/1 var(--display); letter-spacing: -.05em }
.meter .of { font: 400 clamp(18px, 2vw, 26px) var(--display); color: var(--ink-3) }
.meter .unit { font-size: 15px; color: var(--ink-3) }
.gauge { position: relative; height: 3px; border-radius: 2px; background: var(--s3); margin-top: 22px; max-width: 520px }
.gauge i { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 2px; background: linear-gradient(90deg, #8e6a2e, var(--acc)); transition: width 1.2s var(--ease-out) }
.gauge b.team { position: absolute; inset: 0 0 0 auto; width: 5%; border-radius: 0 2px 2px 0; background: var(--acc-soft) }
.gauge-note { display: flex; justify-content: space-between; gap: 16px; max-width: 520px; margin-top: 10px; font-size: 13px; color: var(--ink-3) }
.gauge-legend { display: flex; align-items: center; gap: 8px; max-width: 520px; margin-top: 8px; font-size: 12px; color: var(--ink-3) }
.gauge-legend i { flex: none; width: 14px; height: 3px; border-radius: 2px; background: var(--acc-soft) }
.live .gauge-legend { max-width: none }
.rules { list-style: none; margin-top: 38px; display: grid; gap: 12px; max-width: 34em; color: var(--ink-2); font-size: 15px }
.rules li { padding-left: 18px; position: relative }
.rules li::before { content: ""; position: absolute; left: 0; top: .78em; width: 6px; height: 1px; background: var(--acc) }
.rules.small { font-size: 14px; gap: 8px; margin-top: 14px }
.panel { background: var(--s1); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px; box-shadow: inset 0 1px 0 rgba(255, 236, 200, .03) }
.panel h3 { margin-bottom: 10px }
.field { display: grid; gap: 8px; margin-top: 18px }
.field:first-child { margin-top: 0 }
.field > span:first-child { font-size: 13px; color: var(--ink-3) }
.row { display: flex; gap: 8px }
.row .input { flex: 1; min-width: 0 }
.input { height: 44px; width: 100%; padding: 0 13px; border-radius: var(--r); background: var(--bg); border: 1px solid var(--line-2); color: var(--ink); font-size: 14px; transition: border-color .15s }
.input:focus { outline: none; border-color: var(--acc) }
.input::placeholder { color: var(--ink-4) }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%); background-position: calc(100% - 18px) 19px, calc(100% - 13px) 19px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px }
.seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); justify-self: start }
.seg button { min-width: 42px; height: 34px; padding: 0 14px; border-radius: 999px; font-size: 14px; text-align: center; color: var(--ink-3); transition: background .15s, color .15s }
.seg button:hover { color: var(--ink) }
.seg button[aria-checked="true"], .seg button[aria-selected="true"] { background: var(--s3); color: var(--ink) }
.seg button:disabled { opacity: .3; cursor: not-allowed }
.big-seg { margin-top: 26px }
.ways { display: flex; gap: 24px; margin: 24px 0 18px; border-bottom: 1px solid var(--line) }
.panel > .ways:first-child { margin-top: 0 }
.ways button { padding: 10px 0; margin-bottom: -1px; font-size: 14px; color: var(--ink-3); border-bottom: 2px solid transparent; transition: color .15s, border-color .15s; white-space: nowrap }
.ways button:hover { color: var(--ink) }
.ways button[aria-selected="true"] { color: var(--ink); border-color: var(--acc) }
.amount { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 4px 12px }
.amount > span { grid-column: 1 / -1; font-size: 13px; color: var(--ink-3) }
.amount b { font: 400 36px/1.1 var(--display); letter-spacing: -.03em }
.amount .usd { grid-column: 1 / -1; font-size: 13px; color: var(--ink-3) }
.amount .usd[hidden] { display: none }
.kv-line { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; margin-top: 16px }
.kv-line > span { grid-column: 1 / -1; font-size: 13px; color: var(--ink-3) }
.kv-line code { font-size: 13px; color: var(--ink-2); overflow-wrap: anywhere }
.copy { font-size: 13px; color: var(--ink-3); padding: 4px 0; transition: color .15s }
.copy:hover { color: var(--ink) }
.copy.done, .btn.done { color: var(--acc) }
.copy:disabled { opacity: .4; cursor: not-allowed }
.prompt { padding: 16px; border-radius: var(--r); background: var(--bg); border: 1px solid var(--line); font-size: 14px; line-height: 1.75; color: var(--ink-2); margin: 14px 0; overflow-wrap: anywhere }
.xfer .btn + .btn { margin-left: 8px }
#mintState { margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--line) }
#mintState .state { font-size: 15px; line-height: 1.7; color: var(--ink) }
#mintState .btn { margin-top: 14px }
.after { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; line-height: 1.65; color: var(--ink-3) }

/* Activity lists */
.feed { margin-top: 48px; max-width: 540px }
.feed h3 { font-size: 13px; font-weight: 500; letter-spacing: .04em; color: var(--ink-3); margin-bottom: 6px }
.feed .r { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-2) }
.feed .r a.mono { color: var(--ink) }
.feed .r a:last-child { color: var(--ink-4); text-align: right }
.feed .r a:hover { color: var(--acc) }

/* Developer-mode fields */
.tx { margin-top: 16px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden }
.tx > h4 { font-weight: 500; font-size: 13px; color: var(--ink-2); padding: 10px 14px; background: var(--s2); border-bottom: 1px solid var(--line) }
.tx dl { padding: 4px 14px 12px }
.tx dl > div { display: grid; grid-template-columns: 64px 1fr auto; gap: 10px; align-items: start; padding-top: 8px }
.tx dt { font-size: 12px; color: var(--ink-4); padding-top: 2px }
.tx dd { font: 12px/1.55 var(--mono); color: var(--ink-2); overflow-wrap: anywhere; max-height: 96px; overflow: auto }
.tx .btn { margin: 0 14px 14px }

/* ── My gears ── */
.mine-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 20px }
.lookup { display: flex; gap: 8px; flex: 0 1 560px }
.lookup .input { flex: 1 1 auto; width: auto; min-width: 0 }
.empty { display: grid; justify-items: center; gap: 18px; padding: 64px 0 24px; text-align: center }
.empty img { width: 200px; height: 200px; border-radius: 16px; opacity: .9 }
.empty p { max-width: 30em; color: var(--ink-3) }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 20px 24px; margin-top: 32px; padding: 22px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line) }
.stats dt { font-size: 12px; color: var(--ink-3) }
.stats dd { margin-top: 5px; font: 400 22px/1.3 var(--display); letter-spacing: -.015em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere }
.stats dd.acc { color: var(--acc) }
.stats.tight { margin-top: 24px; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 18px 0 }
.stats.three { grid-template-columns: repeat(3, minmax(0, 1fr)) }
.panel .stats.tight { border-bottom: 0; padding-bottom: 4px; margin-top: 18px }
.mine-body { display: grid; grid-template-columns: 1fr 360px; gap: 40px; margin-top: 32px; align-items: start }
.mine-body h3 { color: var(--ink-2); margin: 0 0 14px }
.mine-body h3 small { font-size: 13px; font-weight: 400; color: var(--ink-3); margin-left: 8px }
.mine-body h3 ~ h3 { margin-top: 32px }
#mineReveal:empty { display: none }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(116px, 1fr)); gap: 14px }
.card img { width: 100%; height: auto; aspect-ratio: 1; border-radius: 12px }
.card figcaption { display: flex; justify-content: space-between; gap: 6px; margin-top: 6px; font-size: 12px; color: var(--ink-3) }
.card figcaption b { font-weight: 500; color: var(--ink-2) }
.card figcaption em { font-style: normal }
.card.f1 figcaption em { color: #dfe3e7 }
.card.f2 figcaption em { color: #ffd84d }
.grid .more { grid-column: 1 / -1; font-size: 13px; color: var(--ink-4) }
.side { display: grid; gap: 16px; position: sticky; top: calc(var(--nav) + 20px) }
.side .panel { padding: 20px }
.side .panel .btn { margin-top: 12px }

/* ── Assemble ── */
.recipe { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; margin-top: 34px }
.recipe figure { display: grid; justify-items: center; gap: 8px; text-align: center }
.recipe img { width: 84px; height: 84px; border-radius: 12px }
.recipe figcaption { display: grid; font-size: 12px; color: var(--ink-3) }
.recipe figcaption b { font-weight: 500; font-size: 13px; color: var(--ink-2) }
.rcp-arrow { display: grid; justify-items: center; gap: 8px; padding: 0 4px 26px; font-size: 13px; color: var(--acc) }
.rcp-arrow i { position: relative; width: 56px; height: 1px; background: linear-gradient(90deg, transparent, var(--acc)) }
.rcp-arrow i::after { content: ""; position: absolute; right: -6px; top: -3.5px; border: 4px solid transparent; border-left-color: var(--acc) }
.rcp-out img { width: 112px; height: 112px }
.have { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px }
.have b { font: 400 32px/1.1 var(--display); letter-spacing: -.03em }
.have span { font-size: 13px; color: var(--ink-3) }
.strip { display: flex; flex-wrap: wrap; gap: 6px }
.strip img { width: 44px; height: 44px; border-radius: 8px }

/* ── Market ── */
.soon { margin-top: 36px; max-width: 540px; padding: 28px; border: 1px solid var(--line); border-radius: var(--r-lg); background: linear-gradient(180deg, var(--s1), rgba(15, 13, 11, 0)) }
.badge { display: inline-flex; align-items: center; height: 26px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--acc-soft); color: var(--acc); font-size: 12px; letter-spacing: .06em }
.soon p { margin-top: 16px; font-size: 16px; line-height: 1.7; color: var(--ink-2) }
.warn { max-width: 44em; margin-top: 22px; padding: 14px 18px; border: 1px solid var(--line-2); border-radius: var(--r-lg); background: var(--s1); font-size: 13px; line-height: 1.7; color: var(--ink-2) }
.mk-stats { grid-template-columns: repeat(4, minmax(0, 1fr)) }
.mk-stats dd { font-size: 18px }
.ways.sub { margin: 30px 0 0 }
.view { margin-top: 6px }
.tbl .head, .tbl .r { display: grid; gap: 12px; align-items: center; padding: 11px 0; font-size: 14px }
.tbl .head { font-size: 12px; color: var(--ink-4); border-bottom: 1px solid var(--line) }
.tbl .r { width: 100%; border-bottom: 1px solid var(--line); color: var(--ink-2) }
.tbl .r b { font-weight: 500; color: var(--ink) }
.tbl button.r { transition: background .15s }
.tbl button.r:hover { background: var(--s1) }
.tbl.book .head, .tbl.book .r { grid-template-columns: 1.2fr .7fr 1fr .5fr }
.tbl.book .r.top b { color: var(--acc) }
.tbl.book .head span:last-child, .tbl.book .r span:last-child { text-align: right }
.tbl.rank .head, .tbl.rank .r { grid-template-columns: 34px 1.3fr 1fr .8fr .7fr .7fr }
.tbl.rank .head > :nth-child(n+4), .tbl.rank .r > :nth-child(n+4) { text-align: right }
.tbl.rank .r.me { background: rgba(201, 161, 90, .06) }
.tbl.mybids .r { grid-template-columns: .6fr 1fr 1fr 1fr }
.tag i { font-style: normal; font-size: 12px; color: var(--acc); padding: 2px 9px; border: 1px solid var(--acc-soft); border-radius: 999px; white-space: nowrap }
.sort { font-size: 12px; color: inherit }
.sort[aria-pressed="true"] { color: var(--ink) }
.sort[aria-pressed="true"]::after { content: " ↓"; color: var(--acc) }
.rank-sum { display: flex; justify-content: space-between; gap: 16px; margin: 18px 0 4px; font-size: 13px; color: var(--ink-3) }
.rank-sum b { font-weight: 500; color: var(--ink) }
.empty-row { padding: 18px 0; color: var(--ink-4); font-size: 14px }
.tr-head, details.tr > summary { display: grid; grid-template-columns: .9fr 2fr 1fr; gap: 12px; align-items: center }
.tr-head { padding: 11px 0; font-size: 12px; color: var(--ink-4); border-bottom: 1px solid var(--line) }
.tr-head span:last-child, details.tr > summary b { text-align: right }
details.tr > summary { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--ink-2); cursor: pointer; list-style: none; transition: background .15s }
details.tr > summary::-webkit-details-marker { display: none }
details.tr > summary:hover { background: var(--s1) }
details.tr > summary b { font-weight: 500; color: var(--ink) }
details.tr > summary .when { color: var(--ink-3) }
details.tr[open] > summary { color: var(--ink) }
.detail { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; padding: 14px 16px; background: var(--s1); border-bottom: 1px solid var(--line); font-size: 13px }
.detail dt { font-size: 12px; color: var(--ink-4) }
.detail dd { color: var(--ink-2); overflow-wrap: anywhere }
.detail a { color: var(--ink) }
.detail a:hover { color: var(--acc) }
.more-btn { margin-top: 14px; padding-bottom: 2px; font-size: 13px; color: var(--ink-3); border-bottom: 1px solid var(--line-2) }
.more-btn:hover { color: var(--ink) }
#mkMine { margin-top: 4px }
.view[data-view="mine"] > .row { margin-top: 18px; max-width: 520px }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; max-height: 168px; overflow: auto }
.chip { height: 30px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 12px; color: var(--ink-2); transition: background .15s, color .15s }
.chip.f1 { border-color: #6f7780 }
.chip.f2 { border-color: #a07a1c }
.chip[aria-pressed="true"] { background: var(--acc); border-color: transparent; color: var(--acc-ink) }
.row3 { display: grid; grid-template-columns: 1fr .7fr 1fr; gap: 12px }
.row3.two { grid-template-columns: .6fr 1.4fr }
.row3 .field { margin-top: 0 }
.fee { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line) }
#sellInfo:empty { display: none }

/* ── Mining ── */
.stack { display: grid; gap: 16px }
.chart { margin-top: 30px; max-width: 600px }
.chart figcaption { font-size: 13px; color: var(--ink-3); margin-bottom: 10px }
.chart svg { width: 100%; height: auto; display: block }
/* On entering the mining page, the 30 bars grow left to right once, showing the three falling steps */
.chart rect { transform-box: fill-box; transform-origin: 50% 100% }
.page .chart rect { transform: scaleY(0) }
.page.shown .chart rect { transform: none; transition: transform .7s var(--ease-out) calc(var(--i) * 14ms) }
.chart-legend { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 10px; font-size: 13px; color: var(--ink-3) }
.chart-legend b { font-weight: 400; margin-right: 6px }
.chart-legend em { font-style: normal; color: var(--ink-2) }
.alloc { display: flex; gap: 3px; height: 8px; border-radius: 4px; overflow: hidden; margin-top: 6px }
.alloc i { display: block }
.alloc i:nth-child(1) { background: var(--acc) }
.alloc i:nth-child(2) { background: #8a6a33 }
.alloc i:nth-child(3) { background: #4f3d22 }
.alloc-legend { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 20px; margin-top: 16px }
.alloc-legend dt { font-size: 12px; color: var(--ink-3) }
.alloc-legend dd { font: 400 19px var(--display) }
#mnPhase { margin-top: 10px }

/* ── Contracts ── */
.facts { margin-top: 34px; display: grid; gap: 22px; max-width: 34em }
.facts dt { font-weight: 500; font-size: 16px }
.facts dd { margin-top: 4px; color: var(--ink-2); font-size: 15px }
.page#p-contracts .facts ~ h3 { margin-top: 38px }
.addr-list { list-style: none; display: grid; margin-top: 6px }
.addr-list li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 0; border-bottom: 1px solid var(--line) }
.addr-list li:last-child { border-bottom: 0 }
.addr-list b { font-weight: 500; font-size: 14px }
.addr-list small { grid-column: 1; font-size: 12px; color: var(--ink-3) }
.addr-list code { grid-column: 1 / -1; font-size: 12px; color: var(--ink-2); overflow-wrap: anywhere }
.addr-list .acts { grid-column: 2; grid-row: 1 / 3; display: flex; gap: 12px; align-items: center }
.addr-list .acts a { font-size: 13px; color: var(--ink-3) }
.addr-list .acts a:hover { color: var(--ink) }
#srcLink { margin-top: 16px }

/* ── Footer pager ── */
.pager { border-top: 1px solid var(--line) }
.pager .wrap { display: flex; align-items: center; gap: 18px; min-height: 56px; font-size: 13px; color: var(--ink-4) }
.dots { display: flex; gap: 6px }
.dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--line-2); transition: width .3s var(--ease-out), background .3s }
.dots i.on { width: 18px; background: var(--ink-3) }
.next { margin-left: auto; font-size: 13px; color: var(--ink-2) }
.next:hover { color: var(--ink) }
.bottom { display: none }

/* ── Phone ── */
@media (max-width: 900px) {
  .wrap { padding: 0 16px }
  .tabs { display: none }
  .nav .wrap { gap: 16px }
  .page { padding: 32px 0 calc(92px + env(safe-area-inset-bottom)) }
  .page#p-home { padding: 0 0 calc(72px + env(safe-area-inset-bottom)) }
  .hero { min-height: calc(100svh - var(--nav) - 64px) }
  .hero-bg { inset: 0 }
  .hero-bg img { object-position: 64% 50% }
  .hero-bg::after { background: linear-gradient(0deg, var(--bg) 0%, rgba(8, 7, 6, .9) 34%, rgba(8, 7, 6, .25) 70%, rgba(8, 7, 6, .1) 100%) }
  .hero-in { padding-top: 200px; padding-bottom: 28px }
  .live { margin-top: 40px }
  :root { --reel-cell: 38px }
  .cd-plate { padding: 12px 12px 8px }
  .cd-u { padding: 0 8px }
  .live dl { grid-template-columns: 1fr 1fr; gap: 16px }
  .live dl > div:last-child { grid-column: 1 / -1 }
  .live dd { font-size: 19px }
  .chapters { gap: 88px; padding-top: 72px; padding-bottom: 88px }
  .ch { grid-template-columns: 1fr; gap: 20px }
  .ch.flip .ch-img { order: 0 }
  .ch-img { max-width: 340px }
  .lookup { flex: 1 1 100%; flex-wrap: wrap }
  .lookup .input { flex-basis: 100% }
  .split, .mine-body { grid-template-columns: 1fr; gap: 36px }
  .side { position: static }
  .stats, .stats.three, .mk-stats { grid-template-columns: repeat(2, minmax(0, 1fr)) }
  .row3 { grid-template-columns: 1fr 1fr }
  .row3 .field:last-child { grid-column: 1 / -1 }
  .row3.two { grid-template-columns: 1fr }
  .ways { gap: 18px; overflow-x: auto; scrollbar-width: none }
  .tbl.rank .head, .tbl.rank .r { grid-template-columns: 26px 1.3fr .9fr .7fr .7fr .6fr; gap: 8px; font-size: 13px }
  .detail { grid-template-columns: 1fr }
  .recipe { gap: 10px }
  .recipe img { width: 64px; height: 64px }
  .rcp-out img { width: 84px; height: 84px }
  .rcp-arrow i { width: 32px }
  .pager { display: none }
  .bottom { display: grid; grid-template-columns: repeat(6, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: rgba(8, 7, 6, .92); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--line) }
  .bottom button { height: 46px; border-radius: 12px; font-size: 12px; text-align: center; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
  :lang(en) .bottom button { font-size: 11px }
  .bottom button[aria-selected="true"] { color: var(--ink); background: var(--s2) }
}
@media (max-width: 420px) {
  .lookup .btn { flex: 1 }
  .tbl.rank .head > :nth-child(3), .tbl.rank .r > :nth-child(3) { display: none }
  .tbl.rank .head, .tbl.rank .r { grid-template-columns: 24px 1.4fr .7fr .7fr .6fr }
}
@media (prefers-reduced-motion: reduce) {
  .page .in-1, .page .in-2, .page .in-3, .page .in-4, .ch .ch-img, .ch .ch-text { opacity: 1; transform: none }
  .page.shown *, .page.leaving { transition: none !important; animation: none !important }
  .tabs .pill, .gauge i, .mark img { transition: none }
  .page .chart rect { transform: none }
}
