/* ANVIL — cabinet 03, the forge economy.
   mine (reflex) → smelt (control) → anvil (rhythm) → the stand.

   Most of this file is decoration. Three parts are not, and changing them
   changes what the player is reacting to:

     .av-face phase colours       the mine cue — the colour IS the go/no-go
     .av-band / .av-gauge-col     the melt band and the heat, read as position
     .av-note-ring scale          the approach ring; the beat lives in the
                                  transform, set per frame from JS
*/

.av-game { display: flex; flex-direction: column; gap: 14px; position: relative; }

/* ---------------------------------------------------------------- chrome */
.av-bar {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  border: 1px solid var(--line-2); background: var(--bg-2);
  padding: 8px 14px; font-size: 0.72rem;
}
.av-wallet { display: flex; align-items: center; gap: 6px; font-weight: 700; }
.av-glyph { color: var(--st-spark); }
.av-label { color: var(--muted); font-weight: 400; }
.av-grow { flex: 1; }
.av-stat { color: var(--muted); }
.av-stat b { color: var(--ink); font-variant-numeric: tabular-nums; }
.av-dim { color: var(--muted); font-size: 0.68rem; }
.av-warn { color: var(--st-spark); font-size: 0.68rem; margin: 8px 0 0; }
.bad { color: var(--bad); }

.av-tabs { display: flex; gap: 4px; }
.av-tab {
  border: 1px solid var(--line-2); background: var(--bg); color: var(--muted);
  padding: 6px 14px; font: inherit; font-size: 0.7rem; cursor: pointer;
  text-transform: lowercase; letter-spacing: 0.04em;
}
.av-tab:hover { color: var(--ink); }
.av-tab.active { background: var(--acc); border-color: var(--acc); color: var(--acc-ink); font-weight: 700; }

.av-toast {
  position: sticky; bottom: 8px; align-self: center;
  border: 1px solid var(--acc); background: var(--bg-2); color: var(--ink);
  padding: 8px 14px; font-size: 0.72rem; max-width: 90%;
  opacity: 0; transform: translateY(6px); pointer-events: none;
  transition: opacity var(--med), transform var(--med);
}
.av-toast.show { opacity: 1; transform: translateY(0); }

.av-panel { border: 1px solid var(--line-2); background: var(--bg-2); padding: 12px 14px; }
.av-panel + .av-panel { margin-top: 12px; }
.av-panel-h {
  display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px;
  font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--acc);
}
.av-empty { margin: 0 0 10px; font-size: 0.72rem; color: var(--muted); line-height: 1.6; }
.av-rules { margin: 0; font-size: 0.66rem; color: var(--muted); line-height: 1.7; }
.av-rules b { color: var(--acc); }
.av-rules b.bad { color: var(--bad); }
kbd {
  border: 1px solid var(--line-2); padding: 0 4px; font-size: 0.6rem;
  color: var(--ink-2); font-family: var(--mono);
}

/* --------------------------------------------------------------- staging */
.av-stage { display: flex; flex-direction: column; gap: 12px; }
.av-stage-head {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  font-size: 0.7rem; border-bottom: 1px solid var(--line); padding-bottom: 7px;
}
.av-stage-name {
  text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.64rem;
  color: var(--acc); font-weight: 700;
}
.av-rock-name { font-weight: 700; color: var(--ink); }
.av-stage-note { color: var(--muted); font-size: 0.66rem; }

/* ------------------------------------------------------------------ MINE
   No cues and no targets — just a rock, a shake, chips, and cracks that
   spread one per swing. */
.av-face {
  position: relative; display: grid; place-items: center;
  border: 1px solid var(--line-2); background: var(--bg-3);
  padding: 14px; min-height: 268px; cursor: pointer;
  user-select: none; -webkit-user-select: none; touch-action: manipulation;
}
.av-face:focus-visible { outline: 1px solid var(--acc); outline-offset: -3px; }
.av-face:active { background: color-mix(in srgb, var(--acc) 7%, var(--bg-3)); }
.av-rock { display: block; max-width: 100%; height: auto; }

.av-rockwrap { position: relative; display: grid; place-items: center; }
.av-rockwrap > * { grid-area: 1 / 1; }
.av-rockwrap.hit { animation: av-jolt 150ms ease-out; }
@keyframes av-jolt {
  0% { transform: scale(1) translate(0, 0); }
  30% { transform: scale(0.965) translate(-3px, 2px); }
  60% { transform: scale(1.015) translate(2px, -1px); }
  100% { transform: scale(1) translate(0, 0); }
}
.av-rockwrap.broken { animation: av-burst 500ms ease-out forwards; }
@keyframes av-burst {
  0% { transform: scale(1); opacity: 1; filter: brightness(1); }
  25% { transform: scale(1.07); filter: brightness(2.2); }
  100% { transform: scale(0.7); opacity: 0; filter: brightness(1); }
}

/* A crack is opaque and hard-edged. Round caps and joins rounded every corner
   off into something soft, and 0.85 opacity let the rock show through a split
   in itself. It draws outward from where it started rather than fading up at
   six units wide, which was the flash that made every swing feel like a hit
   on the whole rock instead of one more line in it. */
.av-crack path {
  fill: none; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 8;
  stroke-dasharray: 1; stroke-dashoffset: 0;
  animation: av-split 190ms ease-out;
}
.av-crack-core { stroke: #0B0906; }
.av-crack-lip { opacity: 0.5; }
@keyframes av-split { from { stroke-dashoffset: 1; } }

.av-chips { position: absolute; inset: 0; pointer-events: none; }
.av-chipburst { position: absolute; transform: translate(-50%, -50%); }
.av-chipburst i {
  position: absolute; width: 4px; height: 4px;
  animation: av-spark 500ms ease-out forwards;
}

.av-swingbar {
  position: relative; height: 20px; border: 1px solid var(--line-2); background: var(--bg);
  display: flex; align-items: center;
}
.av-swingbar i {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0%;
  background: color-mix(in srgb, var(--acc) 65%, transparent);
  transition: width 120ms ease-out;
}
.av-swingbar span {
  position: relative; margin-left: 8px; font-size: 0.62rem;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

.av-hint { margin: 0; font-size: 0.72rem; color: var(--muted); min-height: 1.2em; }

/* ----------------------------------------------------------------- SMELT */
/* The crucible is a press target as well as a readout — you hold it while
   watching the band, which is the thing your eyes are locked to anyway. */
.av-crucible {
  display: grid; grid-template-columns: 1fr 70px 14px minmax(120px, 180px); gap: 14px;
  align-items: stretch; border: 1px solid var(--line-2); background: var(--bg-3); padding: 14px;
  cursor: pointer; user-select: none; -webkit-user-select: none; touch-action: manipulation;
}
.av-crucible.pumping { border-color: var(--acc); }
.av-flamebox { position: relative; display: grid; place-items: end center; min-height: 230px; }
.av-flame { width: 100%; max-width: 240px; height: auto; }
.av-scorch { position: absolute; inset: 0; pointer-events: none; background: transparent; }
.av-scorch.flare { background: radial-gradient(ellipse at 50% 85%, rgba(255,180,60,0.35), transparent 62%); }

.av-gauge {
  position: relative; border: 1px solid var(--line-2); background: var(--bg);
  overflow: hidden; min-height: 230px;
}
/* The column, the band and the burn zone all move by transform off a single
   measured height. They used to move by `height`/`bottom` in percent, which
   re-laid out the panel on every frame of a 60fps loop — and that showed up at
   the fingertips as input lag on the one stage that can least afford it. */
.av-gauge-col {
  position: absolute; left: 0; right: 0; bottom: 0; height: 100%;
  transform-origin: 50% 100%; transform: scaleY(0); will-change: transform;
  background: linear-gradient(0deg, #4C1D0F, #B45309);
}
/* the melt band. Position is the whole readout — you play this by looking at
   where the column stops relative to this box. */
.av-band {
  position: absolute; left: -1px; right: -1px; bottom: 0; height: 22%;
  border-top: 1px solid var(--ok); border-bottom: 1px solid var(--ok);
  background: color-mix(in srgb, var(--ok) 16%, transparent);
  transition: none; will-change: transform;
}
.av-band.in { background: color-mix(in srgb, var(--ok) 42%, transparent); }
.av-band-lbl {
  position: absolute; left: 3px; top: 50%; transform: translateY(-50%);
  font-size: 0.52rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ok);
}
/* the burn zone sits on top of the band and moves with it — drawing it at a
   fixed height would be lying about where the danger is */
.av-burnzone {
  position: absolute; left: -1px; right: -1px; bottom: 0; height: 100%;
  will-change: transform;
  border-bottom: 1px dashed color-mix(in srgb, var(--bad) 70%, transparent);
  background: repeating-linear-gradient(
    -45deg, transparent 0 5px, color-mix(in srgb, var(--bad) 12%, transparent) 5px 10px);
}
.av-burnzone.on { background: color-mix(in srgb, var(--bad) 34%, transparent); }
.av-burnzone span {
  position: absolute; right: 3px; bottom: 2px; font-size: 0.52rem;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--bad);
}

/* the catch bar — the pour filling and draining, right next to the thing you
   are steering. Green while it climbs, red while the metal burns it off. */
.av-fill {
  position: relative; border: 1px solid var(--line-2); background: var(--bg); overflow: hidden;
}
.av-fill i {
  position: absolute; left: 0; right: 0; bottom: 0; height: 100%;
  transform-origin: 50% 100%; transform: scaleY(0); will-change: transform;
  background: var(--muted);
}
.av-fill i.up { background: var(--ok); }
.av-fill i.down { background: var(--st-spark); }
.av-fill i.burning { background: var(--bad); }

.av-readouts { display: flex; flex-direction: column; gap: 10px; justify-content: center; }
.av-read { display: flex; flex-direction: column; }
.av-read b { font-size: 1.5rem; line-height: 1; font-variant-numeric: tabular-nums; }
.av-read span { font-size: 0.62rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.av-read b.good, .av-read #av-zone.good { color: var(--ok); }
#av-zone.good { color: var(--ok); }
#av-zone.burning { color: var(--bad); }

.av-bellows {
  display: grid; grid-template-columns: 60px 1fr 90px; align-items: center; gap: 12px;
  border: 1px solid var(--line-2); background: var(--bg-2); padding: 12px 14px;
  cursor: pointer; font: inherit; color: var(--ink); text-align: left;
  user-select: none; -webkit-user-select: none; touch-action: none;
}
.av-bellows.pumping { border-color: var(--acc); background: color-mix(in srgb, var(--acc) 10%, var(--bg-2)); }
.av-bellows-body {
  display: block; height: 34px; background: linear-gradient(180deg, #6B4226, #3B2A1E);
  border: 1px solid #2A1B10; transform-origin: center; transition: none;
}
.av-bellows-lbl { font-size: 0.7rem; color: var(--muted); }
.av-air { display: block; height: 8px; border: 1px solid var(--line-2); background: var(--bg); }
.av-air i { display: block; height: 100%; width: 0%; background: var(--acc); }

/* ----------------------------------------------------------------- ANVIL */
.av-field {
  position: relative; min-height: 400px; overflow: hidden;
  border: 1px solid var(--line-2); background: var(--bg-3);
  cursor: crosshair; user-select: none; -webkit-user-select: none; touch-action: manipulation;
}
.av-billet {
  position: absolute; left: 12%; right: 12%; top: 42%; height: 16%;
  background: linear-gradient(180deg, color-mix(in srgb, var(--metal) 70%, #FFF6E0), var(--metal));
  box-shadow: 0 0 60px 20px color-mix(in srgb, var(--acc) 22%, transparent);
  opacity: 0.55;
}
.av-notes, .av-judge { position: absolute; inset: 0; pointer-events: none; }

/* One circle at a time, and it is the size of your fist. Everything about the
   scale here is a legibility decision: a 54px target with a 2px ring reads as
   noise in a browser panel, and noise is not difficulty. */
.av-note { position: absolute; transform: translate(-50%, -50%); width: 0; height: 0; }
.av-note-core {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 112px; height: 112px; border-radius: 50%; display: grid; place-items: center;
  border: 4px solid var(--acc); background: color-mix(in srgb, var(--acc) 22%, var(--bg));
  box-shadow: 0 0 26px 4px color-mix(in srgb, var(--acc) 28%, transparent);
  font-size: 1.7rem; color: var(--ink); font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.av-note-ring {
  position: absolute; left: 50%; top: 50%; margin: -56px 0 0 -56px;
  width: 112px; height: 112px; border-radius: 50%;
  border: 5px solid color-mix(in srgb, var(--ink) 70%, transparent);
  transform: scale(2.9); will-change: transform;
}
/* the beat: the ring has arrived and this is the frame to hit */
.av-note.ripe .av-note-core {
  border-color: #FFF6E0; background: color-mix(in srgb, var(--acc) 46%, var(--bg));
  box-shadow: 0 0 40px 10px color-mix(in srgb, var(--acc) 55%, transparent);
}
.av-note.judged { animation: av-notepop 300ms ease-out forwards; }
.av-note.judged .av-note-ring { display: none; }
.av-note.j-0 .av-note-core { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 22%, var(--bg)); box-shadow: none; }
@keyframes av-notepop {
  from { opacity: 1; }
  to { opacity: 0; transform: translate(-50%, -50%) scale(1.35); }
}

.av-judge-pop {
  position: absolute; transform: translate(-50%, -50%);
  font-size: 0.78rem; font-weight: 800; letter-spacing: 0.05em;
  animation: av-pop 520ms ease-out forwards;
}
.av-judge-pop.j-300 { color: var(--st-spark); }
.av-judge-pop.j-100 { color: var(--st-shipped); }
.av-judge-pop.j-50 { color: var(--ink-2); }
.av-judge-pop.j-0 { color: var(--bad); }
@keyframes av-pop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.7); }
  25% { opacity: 1; transform: translate(-50%, -60%) scale(1.05); }
  100% { opacity: 0; transform: translate(-50%, -100%) scale(1); }
}

.av-sparkburst { position: absolute; transform: translate(-50%, -50%); }
.av-sparkburst i {
  position: absolute; width: 3px; height: 3px; background: var(--st-spark);
  animation: av-spark 480ms ease-out forwards;
}
@keyframes av-spark {
  from { opacity: 1; transform: translate(0, 0); }
  to { opacity: 0; transform: translate(var(--dx), var(--dy)); }
}

.av-countin {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 1.4rem; font-weight: 800; letter-spacing: 0.16em;
  color: var(--acc); background: color-mix(in srgb, var(--bg) 70%, transparent);
}

.av-hud { display: flex; align-items: center; gap: 16px; font-variant-numeric: tabular-nums; }
.av-combo { font-size: 1.4rem; font-weight: 800; line-height: 1; }
.av-combo span { font-size: 0.8rem; color: var(--muted); }
.av-combo.hot { color: var(--acc); }
.av-acc { font-size: 0.9rem; color: var(--ink-2); }
.av-blows { font-size: 0.68rem; color: var(--muted); letter-spacing: 0.06em; }
.av-grade {
  min-width: 34px; text-align: center; border: 1px solid var(--acc); color: var(--acc);
  font-weight: 800; padding: 2px 6px; font-size: 0.8rem;
}
.av-brittle { margin-left: auto; color: var(--bad); font-size: 0.68rem; }

/* ------------------------------------------------------- pour and reveal */
.av-pour { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding: 8px 0; }
.av-billet-big {
  width: min(340px, 90%); height: 46px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--metal) 60%, #FFF6E0), var(--metal));
  border: 2px solid var(--mod); box-shadow: 0 0 50px 14px color-mix(in srgb, var(--acc) 30%, transparent);
}
.av-pour-lines { display: flex; gap: 26px; flex-wrap: wrap; justify-content: center; }
.av-bigstat { display: flex; flex-direction: column; }
.av-bigstat b { font-size: 1.2rem; line-height: 1.1; }
.av-bigstat span { font-size: 0.62rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }

.av-reveal {
  display: grid; grid-template-columns: minmax(150px, 240px) 1fr; gap: 22px; align-items: center;
  border: 1px solid var(--rar); background: var(--bg-2); padding: 18px;
}
.av-reveal-art { display: grid; place-items: center; }
.av-weapon { display: block; filter: drop-shadow(0 4px 10px rgba(0,0,0,0.4)); }
.av-reveal-info h3 { margin: 6px 0 12px; font-size: 1.3rem; line-height: 1.2; }
.av-rarchip {
  display: inline-block; padding: 2px 9px; font-size: 0.6rem; font-weight: 800;
  letter-spacing: 0.12em; text-transform: uppercase; color: #0C0C0A;
}
.av-reveal-stats { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 10px; }
.av-reveal-stats div { display: flex; flex-direction: column; }
.av-reveal-stats b { font-size: 1rem; font-variant-numeric: tabular-nums; }
.av-reveal-stats span { font-size: 0.6rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.av-reveal-val { font-size: 1.6rem; font-weight: 800; color: var(--st-spark); margin: 8px 0 14px; }
.av-reveal-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.av-reveal.prismatic { border-image: linear-gradient(90deg, #F87171, #FBBF24, #4ADE80, #38BDF8, #A78BFA, #F472B6) 1; }

/* ------------------------------------------------------------ the result */
.av-result { border: 1px solid var(--acc); background: var(--bg-2); padding: 13px 15px; margin-bottom: 12px; }
.av-result.cracked { border-color: var(--bad); }
.av-result-h {
  font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--acc); margin-bottom: 8px;
}
.av-result.cracked .av-result-h { color: var(--bad); }
.av-result-body { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.av-result-lines { flex: 1; min-width: 200px; }
.av-result-row {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  font-size: 0.72rem; color: var(--muted); margin-bottom: 8px;
}
.av-result-row b { color: var(--st-spark); font-size: 0.86rem; }

/* ------------------------------------------------------------- the crate */
.av-stacks { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.av-stack {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--line); border-left: 3px solid var(--mod, var(--line-2));
  background: var(--bg); padding: 7px 10px;
}
.av-stack-info { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.av-stack-info b { font-size: 0.76rem; }
.av-ore-ico { flex: 0 0 auto; }
/* Smelt is the thing you came here to do; scrap is the thing you do to the ore
   you were never going to smelt. It sits under the primary and stays quiet
   until you go looking for it. */
.av-stack-btns { display: flex; flex-direction: column; gap: 4px; flex: 0 0 auto; align-items: stretch; }
.av-stack-btns .btn { white-space: nowrap; }
.av-scrap { color: var(--muted); font-size: 0.62rem; }
.av-scrap:hover { color: var(--bg); background: var(--muted); border-color: var(--muted); }

/* the line between the face and the crate — what the last rock gave up */
.av-ticker {
  margin: 0; min-height: 1.4em; display: flex; align-items: baseline; gap: 12px;
  flex-wrap: wrap; font-size: 0.72rem; color: var(--muted);
}
.av-ticker b { color: var(--st-spark); }
.av-tick-name { color: var(--ink); font-weight: 700; }
.av-ticker .av-warn { margin: 0; }
.av-ticker.flash { animation: av-tickin 400ms ease-out; }
@keyframes av-tickin { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.av-facefull { text-align: center; }
.av-facefull .av-empty { margin: 0; }

/* ------------------------------------------------------------- the stand
   No price lives in this view. The weapon arrives from the anvil with one and
   the card only prints it — the street out front is where the game is. */
.av-stand { display: flex; flex-direction: column; gap: 12px; }

/* the street: a strip of road above the counter that buyers walk in along */
.av-street {
  position: relative; height: 96px; overflow: hidden; margin-bottom: 8px;
  /* paving stones only in the bottom third — the road they walk along, not a
     row of boxes behind their heads */
  background-image:
    repeating-linear-gradient(90deg, transparent 0 45px, var(--line) 45px 46px),
    linear-gradient(to bottom, transparent, color-mix(in srgb, var(--bg-3) 80%, transparent));
  background-repeat: repeat-x, no-repeat;
  background-size: 100% 26px, 100% 100%;
  background-position: 0 100%, 0 0;
  border-bottom: 2px solid var(--line-2);
}
.av-streetnote {
  position: absolute; left: 12px; bottom: 8px;
  font-size: 0.66rem; color: var(--muted); font-style: italic;
}
.av-crowd { position: absolute; inset: 0; }
.av-walker {
  position: absolute; bottom: 4px; left: 108%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  transition: left 1400ms cubic-bezier(0.42, 0, 0.4, 1);
}
.av-walker .av-bust { border-color: var(--cls); }
.av-walker-name { font-size: 0.58rem; color: var(--muted); letter-spacing: 0.04em; }
.av-walker.walking .av-bust { animation: av-step 420ms ease-in-out infinite; }
@keyframes av-step { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }

/* someone with an offer in hand and nobody serving them */
.av-walker.ready { cursor: pointer; }
.av-walker.ready .av-bust {
  border-width: 2px; box-shadow: 0 0 0 2px color-mix(in srgb, var(--cls) 30%, transparent);
  animation: av-waiting 1.5s ease-in-out infinite;
}
@keyframes av-waiting { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
.av-walker.ready:hover .av-bust { border-color: var(--acc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--acc) 35%, transparent); }
.av-walker.talking .av-bust { border-color: var(--acc); border-width: 2px; }
/* the patience bar: the only thing on this screen that moves every frame */
.av-patience { display: block; width: 40px; height: 3px; background: var(--bg); border: 1px solid var(--line); }
.av-walker:not(.ready):not(.talking) .av-patience { visibility: hidden; }
.av-patience i { display: block; height: 100%; width: 100%; background: var(--cls); }

.av-bubble {
  position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%);
  white-space: nowrap; max-width: 46vw; overflow: hidden; text-overflow: ellipsis;
  border: 1px solid var(--line-2); background: var(--bg-2); color: var(--ink-2);
  padding: 3px 7px; font-size: 0.64rem; z-index: 1;
}
.av-bubble.plain { font-style: italic; color: var(--muted); }
.av-walker.ready .av-bubble { border-color: var(--cls); color: var(--ink); }

.av-listings { display: flex; flex-direction: column; gap: 8px; }
.av-listing {
  display: flex; gap: 12px; align-items: center;
  border: 1px solid var(--line); background: var(--bg); padding: 8px 10px;
}
.av-listing.looked { border-color: color-mix(in srgb, var(--acc) 55%, var(--line)); }
.av-listing.talked { border-color: var(--acc); box-shadow: inset 3px 0 0 var(--acc); }
.av-listing-info { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.av-listing-price { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }

.av-invgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.av-invcard {
  display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center;
  border: 1px solid var(--line); border-top: 2px solid var(--rar); background: var(--bg); padding: 10px;
}
.av-invcard b { font-size: 0.72rem; line-height: 1.3; }
.av-invcard-foot { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.av-val { color: var(--st-spark); font-size: 0.8rem; }

.av-bust { flex: 0 0 auto; border: 1px solid var(--line-2); background: var(--bg-3); }
.av-bust.prismatic { border-image: linear-gradient(135deg, #F472B6, #67E8F9, #FDE047) 1; }

/* the offer — a card under the street, pointing at whoever is talking. It is
   deliberately NOT a modal: nothing behind it is disabled, the page still
   scrolls, and the three other people out there are still running out of
   patience while you read it. */
.av-talk {
  position: relative; display: flex; flex-direction: column; gap: 8px;
  border: 1px solid var(--line-2); border-top: 2px solid var(--cls);
  background: var(--bg-3); padding: 14px 16px; margin-bottom: 10px;
  animation: av-talkin 180ms cubic-bezier(0.2, 0.9, 0.3, 1);
}
.av-talk.prismatic { border-top-color: transparent;
  border-image: linear-gradient(90deg, #F472B6, #67E8F9, #FDE047) 1; }
/* the pointer back up at them */
.av-talk::before {
  content: ""; position: absolute; top: -7px; left: var(--ax); margin-left: -6px;
  border-left: 6px solid transparent; border-right: 6px solid transparent;
  border-bottom: 6px solid var(--cls);
}
@keyframes av-talkin { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.av-talk-x {
  position: absolute; top: 6px; right: 8px; width: 22px; height: 22px;
  border: 1px solid var(--line-2); background: var(--bg); color: var(--muted);
  font: inherit; font-size: 0.8rem; line-height: 1; cursor: pointer;
}
.av-talk-x:hover { color: var(--ink); border-color: var(--acc); }
.av-talk-who { display: flex; align-items: center; gap: 10px; }
.av-talk-who b { display: block; font-size: 0.82rem; }
.av-talk-who .av-dim { display: block; }
.av-quote {
  margin: 0; font-size: 0.8rem; line-height: 1.5; color: var(--ink);
  border-left: 2px solid var(--cls); padding-left: 10px;
}
.av-talk-deal { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.av-talk-item {
  flex: 1; min-width: 190px; display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--line); background: var(--bg); padding: 6px 8px;
}
.av-talk-item b { display: block; font-size: 0.72rem; line-height: 1.3; }
.av-talk-item .av-dim { display: block; }
.av-talk-foot { font-size: 0.62rem; color: var(--muted); font-style: italic; }
.av-offer-num { display: flex; flex-direction: column; }
.av-offer-num b { font-size: 1.6rem; line-height: 1.1; color: var(--st-spark); font-variant-numeric: tabular-nums; }
.av-offer-num .ok { color: var(--ok); }
.av-offer-btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* -------------------------------------------------------------- the shop */
.av-shop { display: flex; flex-direction: column; gap: 12px; }
.av-pickrow { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.av-pickcard {
  flex: 1; min-width: 190px; display: flex; flex-direction: column; gap: 5px; align-items: flex-start;
  border: 1px solid var(--line-2); background: var(--bg); padding: 10px 12px;
}
.av-pickcard b { font-size: 0.9rem; }
.av-pickcard span { font-size: 0.66rem; color: var(--muted); }
.av-pickcard.next { border-color: var(--acc); }
.av-pickarrow { color: var(--muted); }

.av-oddstable { width: 100%; border-collapse: collapse; font-size: 0.7rem; }
.av-oddstable th {
  text-align: left; font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--muted); font-weight: 400; padding: 4px 8px 6px 0; border-bottom: 1px solid var(--line);
}
.av-oddstable td { padding: 4px 8px 4px 0; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.av-oddstable td.good { color: var(--ok); }
.av-oddsplit td { border-top: 1px solid var(--line); padding-top: 8px; }

.av-caprow { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.av-capcard {
  display: flex; flex-direction: column; gap: 5px; align-items: flex-start;
  border: 1px solid var(--line); background: var(--bg); padding: 10px 12px;
}
.av-capcard b { font-size: 0.74rem; }

/* ------------------------------------------------- modifier effect motion
   Every one of these is applied to an SVG group inside a rock or a weapon.
   They are the only animations in the cabinet that run continuously, so they
   are all cheap transforms and opacity, and all of them stop under
   prefers-reduced-motion. */
.av-glint { animation: av-sweep 3.4s linear infinite; }
@keyframes av-sweep { from { transform: translateX(0); } to { transform: translateX(240px); } }
.av-pulse { animation: av-breathe 2.2s ease-in-out infinite; transform-origin: center; }
@keyframes av-breathe { 0%,100% { opacity: 0.35; transform: scale(0.94); } 50% { opacity: 0.9; transform: scale(1.06); } }
.av-rise { animation: av-float 2.6s ease-in infinite; }
@keyframes av-float { 0% { transform: translateY(6px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(-34px); opacity: 0; } }
.av-spin { animation: av-rotate 9s linear infinite; transform-origin: center; }
@keyframes av-rotate { to { transform: rotate(360deg); } }
.av-hue { animation: av-shift 6s linear infinite; }
@keyframes av-shift { to { filter: hue-rotate(360deg); } }
.av-flicker { animation: av-blink 0.42s steps(2) infinite; }
@keyframes av-blink { 50% { opacity: 0.15; } }
.av-drip { animation: av-ooze 2.4s ease-in infinite; }
@keyframes av-ooze { 0% { opacity: 0; transform: translateY(-6px); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(16px); } }
.av-writhe { animation: av-squirm 3.2s ease-in-out infinite; transform-origin: 60px 60px; }
@keyframes av-squirm { 0%,100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }

/* --------------------------------------------------------------- smaller */
@media (max-width: 720px) {
  .av-crucible { grid-template-columns: 1fr 52px 12px; }
  .av-readouts { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; }
  .av-reveal { grid-template-columns: 1fr; }
  .av-bellows { grid-template-columns: 46px 1fr; }
  .av-air { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  .av-glint, .av-pulse, .av-rise, .av-spin, .av-hue, .av-flicker, .av-drip, .av-writhe,
  .av-judge-pop, .av-sparkburst i, .av-chipburst i, .av-rockwrap.hit, .av-crack path,
  .av-ticker.flash, .av-walker.walking .av-bust, .av-walker.ready .av-bust,
  .av-talk { animation: none; }
  /* the walk still has to happen — it just happens instantly, and the beats
     between arriving, looking and offering are held by the timers, not the
     transition */
  .av-walker { transition: none; }
  .av-judge-pop { opacity: 1; }
  /* the break still has to hide the rock, so it keeps a plain fade */
  .av-rockwrap.broken { animation: none; opacity: 0; transition: opacity 200ms linear; }
}
