/* High Noon. Tokens and the one look: a frontier broadsheet on sun-bleached paper, pixel art, one red. */
:root {
  --ground: #F1E6CC;
  --surface: #E8D9B6;
  --surface-2: #DCC89E;
  --paper: #F7EEDA;
  --line: rgba(42, 31, 23, .12);
  --line-2: rgba(42, 31, 23, .2);
  --line-3: rgba(42, 31, 23, .32);
  --ink: #2A1F17;
  --ink-2: #584536;
  --muted: #6E5845;
  --accent: #B83A24;      /* the action, and you */
  --accent-ink: #FFF6E6;
  --them: #2F5266;        /* the other side, only */
  --good: #3C6E36;
  --warn: #9A6A0E;
  --display: 'Jersey 10', 'DM Mono', monospace;
  --text: 'DM Sans', system-ui, sans-serif;
  --mono: 'DM Mono', ui-monospace, monospace;
  --r: 4px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --gutter: clamp(16px, 4vw, 40px);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 16px/1.55 var(--text); }
[hidden] { display: none !important; }
img, svg { display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.still *, .still *::before, .still *::after { animation: none !important; transition: none !important; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.fine { font-size: 13px; color: var(--muted); margin: 8px 0 0; }
.row { display: flex; align-items: center; flex-wrap: wrap; }
.gap { gap: 10px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--ground); padding: 8px 12px; z-index: 60; }
.skip:focus { left: 8px; }

/* ---------- type ---------- */
.display, h1, h2 { font-family: var(--display); font-weight: 400; letter-spacing: .01em; line-height: .9; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(48px, 7vw, 104px); }
h2 { font-size: clamp(36px, 4.4vw, 60px); }
h3 { font: 700 20px/1.25 var(--text); margin: 0 0 6px; }
h1 em, h2 em { font-style: normal; color: var(--accent); }
.kicker { font: 500 12px/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); display: flex; align-items: center; gap: 8px; margin: 0 0 14px; }
.kicker::before { content: ''; width: 8px; height: 8px; background: var(--accent); flex: none; }
.label { font: 500 11px/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.lede { font-size: 18px; line-height: 1.5; max-width: 36em; color: var(--ink-2); margin: 14px 0 0; }
.lede b { color: var(--ink); }

/* ---------- strip, header ---------- */
.strip { background: var(--ink); color: var(--ground); font: 400 13px/1.4 var(--text); text-align: center; padding: 7px var(--gutter); }
.strip b { color: #F4C542; font-weight: 600; }
header.top { position: sticky; top: 0; z-index: 30; background: var(--ground); border-bottom: 3px double var(--line-3); }
.top-row { display: flex; align-items: center; gap: 22px; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.nav { display: flex; gap: 2px; margin-right: auto; }
.nav a { text-decoration: none; font-weight: 600; font-size: 15px; padding: 8px 10px; border-radius: var(--r); color: var(--ink-2); }
.nav a:hover { color: var(--ink); background: var(--surface); }
.nav a.on { color: var(--ink); box-shadow: inset 0 -3px 0 var(--accent); border-radius: 0; }
.top-right { display: flex; align-items: center; gap: 10px; }

/* ---------- buttons and chips ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border: 2px solid var(--ink); border-radius: var(--r); background: transparent; font: 600 15px/1 var(--text); text-decoration: none; cursor: pointer; white-space: nowrap; transition: transform .1s, background .2s; }
.btn:hover { background: var(--surface); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 3px 0 #7E2414; }
.btn.primary:hover { background: #A63320; }
.btn.primary:active { transform: translateY(2px); box-shadow: 0 1px 0 #7E2414; }
.btn.ghost { border-color: transparent; }
.btn.ghost:hover { border-color: var(--line-2); }
.btn.sm { height: 36px; padding: 0 12px; font-size: 14px; }
.btn.lg { height: 52px; padding: 0 24px; font-size: 16px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn.wallet { height: 40px; padding: 0 12px; font-family: var(--mono); font-weight: 500; font-size: 13px; }
.btn.wallet .dot { width: 8px; height: 8px; background: var(--good); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border: 1px solid var(--line-3); border-radius: 2px; font: 500 12px/1 var(--mono); letter-spacing: .04em; background: transparent; white-space: nowrap; }
.chip b { color: var(--warn); font-weight: 500; }
.chip.red { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip.slate { border-color: var(--them); color: var(--them); }
.chip.ok { border-color: var(--good); color: var(--good); }
.chip.soon { border-color: var(--warn); color: var(--warn); }
.chip.sample { border-style: dashed; color: var(--ink-2); }
button.chip { cursor: pointer; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; text-decoration: underline; cursor: pointer; color: var(--ink); }

/* ---------- broadsheet pieces ---------- */
.section { padding: 72px 0; border-top: 3px double var(--line-3); }
.section:first-child { border-top: 0; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.sec-head p { margin: 10px 0 0; max-width: 40em; color: var(--ink-2); }
.masthead { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font: 500 12px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); border-bottom: 1px solid var(--line-3); padding: 18px 0 10px; }
.hero { padding: 26px 0 64px; }
.hero h1 { font-size: clamp(56px, 7.4vw, 112px); max-width: 22ch; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(280px, 1fr); gap: 36px; margin-top: 30px; align-items: start; }
.photo { margin: 0; border: 2px solid var(--ink); background: var(--paper); }
.photo figcaption { display: flex; gap: 10px; align-items: baseline; padding: 10px 12px; border-top: 2px solid var(--ink); font-size: 14px; color: var(--ink-2); min-height: 62px; }
.photo figcaption .label { flex: none; }
.side-col .lede { margin-top: 0; font-size: 17px; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin: 22px 0 18px; }
.checks { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 6px; font-size: 14px; color: var(--ink-2); }
.checks li { display: flex; gap: 8px; align-items: baseline; }
.checks li::before { content: ''; width: 7px; height: 7px; background: var(--good); flex: none; transform: translateY(-1px); }
.wire { border: 1px solid var(--line-3); }
.wire h3 { font: 500 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; margin: 0; padding: 10px 12px; border-bottom: 1px solid var(--line-3); background: var(--surface); display: flex; justify-content: space-between; }
.wire dl { margin: 0; display: grid; grid-template-columns: auto 1fr; }
.wire dt, .wire dd { margin: 0; padding: 8px 12px; border-bottom: 1px solid var(--line); font-size: 14px; }
.wire dt { color: var(--muted); font: 500 12px/1.4 var(--mono); letter-spacing: .04em; text-transform: uppercase; padding-top: 10px; }
.wire dd { font-family: var(--mono); text-align: right; }
.wire dl > :nth-last-child(-n + 2) { border-bottom: 0; }

/* the four moves */
.moves { display: grid; grid-template-columns: repeat(4, 1fr); border: 2px solid var(--ink); }
.move { padding: 20px 18px 22px; border-right: 1px solid var(--line-3); background: var(--paper); }
.move:last-child { border-right: 0; }
.move .num { font: 500 12px/1 var(--mono); color: var(--muted); display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.move .num .ico { color: var(--accent); }
.move h3 { font-family: var(--display); font-weight: 400; font-size: 34px; line-height: .9; margin-bottom: 8px; }
.move p { margin: 0; color: var(--ink-2); font-size: 15px; }
.round-note { margin: 18px 0 0; color: var(--ink-2); max-width: 60em; }

/* wanted posters */
.posters { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.poster { position: relative; background: var(--paper); border: 2px solid var(--ink); padding: 14px 14px 16px; text-align: center; box-shadow: 4px 4px 0 var(--line-2); text-decoration: none; display: block; }
.poster .wanted { font: 400 44px/.8 var(--display); letter-spacing: .04em; }
.poster .sub { font: 500 11px/1.2 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 6px 0 10px; }
.poster .pic { background: var(--surface); border: 2px solid var(--ink); display: flex; justify-content: center; align-items: flex-end; padding-top: 10px; height: 168px; overflow: hidden; }
.poster .pic svg { image-rendering: pixelated; }
.poster .name { font: 400 30px/.95 var(--display); margin: 12px 0 4px; }
.poster .what { font-size: 14px; color: var(--ink-2); }
.poster .rep { font: 500 13px/1.2 var(--mono); margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line-3); display: flex; justify-content: space-between; }
.poster .rank { position: absolute; top: 10px; left: 10px; font: 500 12px/1 var(--mono); }
.poster.torn { clip-path: polygon(0 2%, 6% 0, 13% 1.5%, 21% 0, 30% 1.2%, 39% 0, 47% 1.6%, 56% 0, 64% 1.3%, 73% 0, 81% 1.5%, 90% 0, 100% 1.8%, 99% 12%, 100% 25%, 98.6% 38%, 100% 52%, 98.8% 66%, 100% 80%, 99% 92%, 100% 100%, 92% 98.4%, 83% 100%, 74% 98.6%, 65% 100%, 56% 98.5%, 47% 100%, 38% 98.6%, 29% 100%, 20% 98.4%, 11% 100%, 0 98.6%, 1.2% 86%, 0 72%, 1.4% 58%, 0 44%, 1.2% 30%, 0 16%); box-shadow: none; }
.poster.gold { border-color: #9A7A1C; box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px #C9A227; }
.poster.star::after { content: ''; position: absolute; top: -10px; right: -10px; width: 34px; height: 34px; background: #C9A227; clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }

/* tables */
.table-wrap { border: 2px solid var(--ink); background: var(--paper); overflow-x: auto; }
table.board { width: 100%; border-collapse: collapse; font-size: 15px; }
.board th { font: 500 11px/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); text-align: left; padding: 12px 14px; border-bottom: 2px solid var(--ink); background: var(--surface); white-space: nowrap; }
.board td { padding: 10px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.board tr:last-child td { border-bottom: 0; }
.board .num { font-family: var(--mono); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.board th.num { text-align: right; }
.board .who { display: flex; align-items: center; gap: 12px; }
.board .who svg { flex: none; image-rendering: pixelated; background: var(--surface); border: 1px solid var(--line-3); }
.board .who b { display: block; font-weight: 700; }
.board .who small { display: block; font: 400 12px/1.3 var(--mono); color: var(--muted); }
.board .rank { font: 400 28px/1 var(--display); width: 40px; }

/* notice board ($NOON) */
.notice { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 0; border: 2px solid var(--ink); background: var(--paper); }
.notice > div { padding: 26px 24px; }
.notice > div + div { border-left: 1px solid var(--line-3); }
.uses { list-style: none; margin: 0; padding: 0; }
.uses li { display: flex; justify-content: space-between; gap: 14px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line-2); font-weight: 500; }
.uses li:last-child { border-bottom: 0; }
.ca-box { border: 2px solid var(--ink); padding: 14px 16px; background: var(--ground); }
.ca-row { display: flex; gap: 10px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.ca-addr { font: 500 14px/1.3 var(--mono); user-select: all; word-break: break-all; }
.ca-soon { font: 400 34px/1 var(--display); color: var(--warn); }

/* steps */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); counter-reset: s; }
.step { padding: 20px 16px 22px; border-right: 1px solid var(--line-3); }
.step:last-child { border-right: 0; }
.step .label { display: block; margin-bottom: 10px; }
.step h3 { font-size: 18px; }
.step p { margin: 0; font-size: 15px; color: var(--ink-2); }

/* closing band */
.band { background: var(--ink); color: var(--ground); padding: 64px 0; }
.band .wrap { display: flex; align-items: center; gap: 36px; flex-wrap: wrap; }
.band h2 { flex: 1 1 420px; }
.band h2 em { color: #E8735C; }
.band svg { image-rendering: pixelated; }

/* ---------- footer, tab bar ---------- */
.foot { border-top: 3px double var(--line-3); padding: 44px 0 28px; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 28px; }
.foot-brand p { color: var(--ink-2); max-width: 30em; font-size: 15px; margin: 14px 0 0; }
.foot h4 { font: 500 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 4px 0 12px; }
.foot a, .foot-grid span { display: block; text-decoration: none; font-size: 15px; margin-bottom: 8px; }
.foot a:hover { text-decoration: underline; }
.foot-base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 30px; padding-top: 14px; border-top: 1px solid var(--line-2); align-items: baseline; }
.fineprint { font-size: 11px; line-height: 1.4; color: var(--muted); margin: 0; }
.motion-line { font: 400 13px/1 var(--mono); margin: 0; color: var(--ink-2); }
.tabbar { display: none; }

/* ---------- toasts, modal ---------- */
.toasts { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); display: grid; gap: 8px; z-index: 80; width: min(92vw, 420px); }
.toast { background: var(--ink); color: var(--ground); padding: 11px 14px; font-size: 14px; border-radius: var(--r); animation: rise .25s var(--ease); }
.modal-root { position: fixed; inset: 0; background: rgba(42, 31, 23, .45); display: grid; place-items: center; z-index: 70; padding: 16px; }
.modal { background: var(--paper); border: 2px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); width: min(100%, 460px); padding: 22px; animation: rise .25s var(--ease); }
.modal h3 { font: 400 36px/.9 var(--display); margin-bottom: 10px; }
.modal p { margin: 0 0 12px; }
.addr-line { word-break: break-all; font-size: 14px; background: var(--surface); padding: 8px 10px; }
.wallet-list { display: grid; gap: 8px; margin: 6px 0 12px; }
.wallet-opt { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border: 2px solid var(--ink); background: var(--ground); cursor: pointer; font-weight: 600; text-align: left; }
.wallet-opt:hover { background: var(--surface); }
.empty-line { padding: 12px; background: var(--surface); }
@keyframes rise { from { transform: translateY(6px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- the stage ---------- */
.stage { position: relative; background: #F7EEDB; overflow: hidden; }
.stage-svg { width: 100%; height: auto; image-rendering: pixelated; }
.st-f { transition: none; }
.st-f.anim { transition: transform .46s steps(6, end); }
.st-sun { transition: transform .6s steps(4, end); }
.st-pose.st-aim, .st-muzzle, .st-barrel, .st-dust, .st-plate { display: none; }
.st-f.aiming .st-idle { display: none; }
.st-f.aiming .st-aim { display: inline; }
.st-f.firing .st-muzzle { display: inline; }
.st-f.covering .st-barrel { display: inline; }
.st-f.dusty .st-dust { display: inline; animation: dust .4s steps(2, end) infinite; }
.st-f.plated .st-plate { display: inline; }
.st-body { transform-box: fill-box; transform-origin: 50% 100%; }
.st-f.covering .st-body { transform: translateY(6px); }
.st-f.f0.down .st-body { transform: translateY(2px) rotate(-90deg); transition: transform .3s steps(3, end); }
.st-f.f1.down .st-body { transform: translateY(2px) rotate(90deg); transition: transform .3s steps(3, end); }
.st-f.down .st-shadow { display: none; }
.st-f.hit .st-body { animation: hit .42s steps(1, end); }
@keyframes hit { 0% { opacity: .2; } 25% { opacity: 1; } 50% { opacity: .2; } 75% { opacity: 1; } }
@keyframes dust { 50% { transform: translateX(1px); } }
.st-float { font: 500 7px var(--mono); paint-order: stroke; stroke: #F7EEDB; stroke-width: 2px; fill: var(--ink); animation: float 1.05s steps(8, end) forwards; }
.st-float.you { fill: var(--accent); }
.st-float.them { fill: var(--them); }
.st-float.good { fill: var(--good); }
.st-float.muted { fill: var(--muted); }
@keyframes float { from { transform: translateY(0); opacity: 1; } 70% { opacity: 1; } to { transform: translateY(-9px); opacity: 0; } }
.st-trace { stroke: #F4C542; stroke-width: 1; }
.st-rope { fill: none; stroke: #8A5A3A; stroke-width: 1; }

/* ---------- duel page ---------- */
.page-head { padding: 34px 0 28px; }
.page-head h1 { font-size: clamp(46px, 6vw, 88px); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.panel { border: 2px solid var(--ink); background: var(--paper); padding: 22px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.panel-head h2 { font-size: 40px; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 14px 0; }
.pick { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 8px 12px; border: 2px solid var(--line-3); background: var(--ground); cursor: pointer; text-align: center; }
.pick:hover { border-color: var(--ink); }
.pick[aria-pressed='true'] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.pick svg { image-rendering: pixelated; }
.pick b { font-size: 15px; }
.pick small { font: 400 12px/1.3 var(--mono); color: var(--muted); }
.vs-line { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 6px 0 16px; }
select, input[type=text] { height: 44px; border: 2px solid var(--ink); background: var(--ground); padding: 0 12px; font: 500 16px var(--text); border-radius: var(--r); color: var(--ink); }
.rules-list { margin: 10px 0 0; padding-left: 18px; color: var(--ink-2); font-size: 15px; }
.rules-list li { margin-bottom: 6px; }
details.fold summary { cursor: pointer; font-weight: 600; padding: 8px 0; }

.duel { border: 2px solid var(--ink); background: var(--paper); }
.duel-top { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; padding: 12px 14px; border-bottom: 2px solid var(--ink); }
.nameplate .nm { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.nameplate .nm b { font: 400 26px/1 var(--display); }
.nameplate .nm small { font: 400 12px/1.2 var(--mono); color: var(--muted); }
.nameplate.them { text-align: right; }
.nameplate.them .nm { flex-direction: row-reverse; }
.bar { height: 12px; border: 2px solid var(--ink); background: var(--surface); margin: 6px 0 4px; position: relative; }
.bar i { position: absolute; inset: 0 auto 0 0; background: var(--accent); transition: width .4s steps(6, end); }
.nameplate.them .bar i { background: var(--them); left: auto; right: 0; }
.np-meta { display: flex; justify-content: space-between; gap: 8px; font: 400 12px/1.3 var(--mono); color: var(--ink-2); align-items: center; }
.nameplate.them .np-meta { flex-direction: row-reverse; }
.cyl { display: flex; gap: 2px; }
.cyl i { width: 5px; height: 10px; background: var(--ink); }
.cyl i.out { background: transparent; box-shadow: inset 0 0 0 1px var(--line-3); }
.duel-mid { text-align: center; }
.duel-mid .rd { font: 400 30px/1 var(--display); }
.duel-mid .rg { font: 500 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.duel-head { padding: 26px 0 16px; }
.duel-head h1 { font-size: clamp(36px, 4.4vw, 60px); }
.duel-body { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(320px, 1fr); }
.duel-street { border-right: 2px solid var(--ink); }
.duel-street #result:not([hidden]) { border-top: 2px solid var(--ink); }
.duel-side { display: flex; flex-direction: column; min-width: 0; }
.matchup { padding: 14px 16px; border-top: 2px solid var(--ink); }
.matchup table { width: 100%; border-collapse: collapse; font-size: 14px; }
.matchup th { font: 500 11px/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); text-align: left; padding: 0 8px 8px 0; }
.matchup td { padding: 6px 8px 6px 0; border-top: 1px solid var(--line-2); }
.matchup .num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.matchup .now { color: var(--ink); font-weight: 500; background: var(--surface); padding-left: 8px; }
.matchup th.now { color: var(--accent); }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px; }
.act { position: relative; text-align: left; border: 2px solid var(--ink); background: var(--ground); padding: 12px 12px 12px; cursor: pointer; min-height: 104px; display: flex; flex-direction: column; gap: 4px; transition: transform .1s; }
.act:hover:not([disabled]) { background: var(--surface); }
.act:active:not([disabled]) { transform: translateY(1px); }
.act .k { position: absolute; top: 8px; right: 10px; font: 500 11px/1 var(--mono); color: var(--muted); border: 1px solid var(--line-3); padding: 3px 5px; }
.act .t { display: flex; gap: 8px; align-items: center; font: 400 28px/.9 var(--display); }
.act .t .ico { color: var(--accent); }
.act .d { font-size: 13px; line-height: 1.35; color: var(--ink-2); }
.act[disabled] { opacity: .5; cursor: not-allowed; }
.act.picked { border-color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.duel-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 0 14px 14px; flex-wrap: wrap; font-size: 14px; color: var(--ink-2); }
.log { border-top: 2px solid var(--ink); flex: 1; }
.log-head { display: flex; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--line-3); }
.log ol { list-style: none; margin: 0; padding: 0; max-height: 280px; overflow: auto; }
.log li { display: grid; grid-template-columns: 70px 1fr; gap: 4px 10px; padding: 9px 14px; border-bottom: 1px solid var(--line); font-size: 14px; align-items: baseline; }
.log li .tx { grid-column: 1 / -1; }
.log li .h { font: 500 12px/1.2 var(--mono); color: var(--muted); }
.log li .ac { font: 500 12px/1.3 var(--mono); }
.log li .ac .y { color: var(--accent); }
.log li .ac .o { color: var(--them); }
.log .none { padding: 14px; color: var(--muted); font-size: 14px; }
.result { padding: 22px 16px; display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: center; background: var(--ground); }
.result h2 { font-size: clamp(40px, 5vw, 64px); }
.result p { margin: 6px 0 12px; color: var(--ink-2); }
.result .seed { font: 500 13px/1.4 var(--mono); }
.demo-flag { font: 500 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; background: var(--ink); color: var(--ground); padding: 6px 10px; display: inline-block; }

/* ---------- workshop ---------- */
.ws { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, 1fr); gap: 28px; align-items: start; }
.ws-form { border: 2px solid var(--ink); background: var(--paper); }
.field { padding: 18px 20px; border-bottom: 1px solid var(--line-3); }
.field:last-child { border-bottom: 0; }
.field > .label { display: flex; justify-content: space-between; margin-bottom: 10px; }
.field .hint { font-size: 13px; color: var(--muted); margin: 8px 0 0; }
.field .problem { font-size: 13px; color: var(--accent); margin: 8px 0 0; font-weight: 600; }
.field input[type=text] { width: 100%; }
.opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.opts.wide { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.opt { position: relative; text-align: left; border: 2px solid var(--line-3); background: var(--ground); padding: 10px 12px; cursor: pointer; display: flex; flex-direction: column; gap: 3px; }
.opt:hover { border-color: var(--ink); }
.opt[aria-pressed='true'] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.opt b { font-size: 15px; }
.opt small { font: 400 12px/1.35 var(--mono); color: var(--muted); }
.opt .lv { position: absolute; top: 8px; right: 8px; font: 500 10px/1 var(--mono); color: var(--warn); border: 1px solid var(--warn); padding: 2px 4px; }
.opt.class-opt { flex-direction: row; align-items: center; gap: 10px; }
.opt.class-opt svg { image-rendering: pixelated; flex: none; }
.opt.class-opt b, .opt.class-opt small { display: block; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch { width: 54px; border: 2px solid var(--line-3); background: var(--ground); padding: 4px; cursor: pointer; position: relative; }
.swatch[aria-pressed='true'] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.swatch i { display: block; height: 22px; }
.swatch small { display: block; font: 400 10px/1.2 var(--mono); margin-top: 4px; text-align: center; }
.swatch .lv { position: absolute; top: -8px; right: -6px; font: 500 9px/1 var(--mono); background: var(--ground); color: var(--warn); border: 1px solid var(--warn); padding: 2px 3px; }
.ws-side { position: sticky; top: 84px; display: grid; gap: 14px; }
.stats { display: grid; gap: 8px; margin-top: 12px; text-align: left; }
.stat { display: grid; grid-template-columns: 96px 1fr 52px; gap: 8px; align-items: center; font-size: 13px; }
.stat .label { font-size: 10px; }
.stat .meter { height: 8px; border: 1px solid var(--ink); background: var(--surface); position: relative; }
.stat .meter i { position: absolute; inset: 0 auto 0 0; background: var(--ink); }
.stat .v { font: 500 13px/1 var(--mono); text-align: right; }
.save-row { display: flex; gap: 10px; flex-wrap: wrap; }
.note { font-size: 13px; color: var(--muted); margin: 0; }
.posse-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.posse-item { display: flex; gap: 12px; align-items: center; border: 2px solid var(--ink); background: var(--paper); padding: 10px 12px; }
.posse-item svg { image-rendering: pixelated; flex: none; background: var(--surface); }
.posse-item .grow { flex: 1; min-width: 0; }
.posse-item b { display: block; font: 400 24px/1 var(--display); }
.posse-item small { display: block; font: 400 12px/1.35 var(--mono); color: var(--muted); }
.posse-item .acts { display: flex; flex-direction: column; gap: 6px; }
.empty { border: 2px dashed var(--line-3); padding: 22px; text-align: center; color: var(--ink-2); }
.empty b { display: block; font: 400 30px/1 var(--display); color: var(--ink); margin-bottom: 6px; }

/* ---------- guide ---------- */
.guide-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 40px; align-items: start; }
.toc { position: sticky; top: 90px; display: grid; gap: 2px; border-left: 2px solid var(--ink); padding-left: 14px; }
.toc a { text-decoration: none; font-size: 15px; color: var(--ink-2); padding: 4px 0; }
.toc a:hover { color: var(--ink); text-decoration: underline; }
.prose h2 { font-size: clamp(34px, 4vw, 52px); margin: 0 0 14px; }
.prose section { padding: 34px 0; border-top: 1px solid var(--line-3); }
.prose section:first-child { border-top: 0; padding-top: 0; }
.prose p, .prose li { color: var(--ink-2); }
.prose ol.order { padding-left: 22px; }
.prose ol.order li { margin-bottom: 8px; }
.faq details { border-bottom: 1px solid var(--line-3); }
.faq summary { cursor: pointer; padding: 14px 0; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: '+'; font: 500 18px/1 var(--mono); }
.faq details[open] summary::after { content: '−'; }
.faq summary::-webkit-details-marker { display: none; }
.faq details p { margin: 0 0 16px; }
.xp-table { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 12px 0; }
.xp-table div { border: 2px solid var(--ink); background: var(--paper); padding: 12px; }
.xp-table b { display: block; font: 400 34px/1 var(--display); }
.track { list-style: none; margin: 12px 0; padding: 0; border: 2px solid var(--ink); background: var(--paper); }
.track li { display: grid; grid-template-columns: 70px 90px 1fr; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line-2); font-size: 15px; }
.track li:last-child { border-bottom: 0; }
.track .lvl { font: 400 24px/1 var(--display); }
.track .xp { font: 500 13px/1.6 var(--mono); color: var(--muted); }

/* ---------- 404 ---------- */
.lost { padding: 80px 0 100px; display: grid; grid-template-columns: auto 1fr; gap: 40px; align-items: center; }
.lost svg { image-rendering: pixelated; }

/* ---------- phones and tablets ---------- */
@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr; }
  .moves { grid-template-columns: 1fr 1fr; }
  .move:nth-child(2) { border-right: 0; }
  .move:nth-child(-n + 2) { border-bottom: 1px solid var(--line-3); }
  .steps { grid-template-columns: 1fr 1fr; }
  .step { border-bottom: 1px solid var(--line-3); }
  .ws { grid-template-columns: 1fr; }
  .duel-body { grid-template-columns: 1fr; }
  .matchup { display: none; }
  .duel-street { border-right: 0; border-bottom: 2px solid var(--ink); }
  .actions { grid-template-columns: repeat(4, 1fr); }
  .ws-side { position: static; }
  .top-right .ca-chip { display: none; }
}
@media (max-width: 860px) {
  .nav, .hide-sm { display: none; }
  .top-row { height: 58px; justify-content: space-between; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; background: var(--ground); border-top: 3px double var(--line-3); padding-bottom: env(safe-area-inset-bottom); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 0 7px; text-decoration: none; font: 500 11px/1 var(--mono); color: var(--ink-2); min-height: 52px; }
  .tabbar a.on { color: var(--accent); box-shadow: inset 0 3px 0 var(--accent); }
  body { padding-bottom: 64px; }
  .toasts { bottom: 76px; }
  .split, .notice { grid-template-columns: 1fr; }
  .notice > div + div { border-left: 0; border-top: 1px solid var(--line-3); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
  .guide-grid { grid-template-columns: 1fr; }
  .toc { position: static; grid-template-columns: 1fr 1fr; border-left: 0; padding-left: 0; }
  .actions { grid-template-columns: 1fr 1fr; }
  .result { grid-template-columns: 1fr; }
  .lost { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .section { padding: 52px 0; }
  .hero { padding-bottom: 44px; }
  .hero h1 { font-size: clamp(50px, 15vw, 72px); }
  .cta-row .btn { flex: 1 1 100%; }
  .moves { grid-template-columns: 1fr; }
  .move { border-right: 0; border-bottom: 1px solid var(--line-3); }
  .steps { grid-template-columns: 1fr; }
  .step { border-right: 0; }
  .duel-top { grid-template-columns: 1fr 1fr; }
  .duel-mid { grid-column: 1 / -1; order: -1; display: flex; justify-content: center; gap: 12px; align-items: baseline; }
  .nameplate .nm b { font-size: 21px; }
  .act { min-height: 92px; padding: 10px; }
  .act .t { font-size: 24px; }
  .stat { grid-template-columns: 84px 1fr 44px; }
  .masthead span:nth-child(n + 2) { display: none; }
  .btn.wallet .wb-label { display: none; }
  .track li { grid-template-columns: 54px 1fr; }
  .track li .xp { display: none; }
}
