/* ═══════════════════════════════════════════════════════════════
   STEAM FOUNDRY — youxi--1--128 index stylesheet
   Cast-iron workshop: riveted plates, brass nameplates, turning
   gears, pressure gauges, steam pipes and blueprint paper.
   ═══════════════════════════════════════════════════════════════ */

:root {
  --iron: #14110E;
  --iron-2: #1B1713;
  --plate: #241E18;
  --plate-2: #2C251D;
  --plate-3: #362D23;
  --line: rgba(201, 150, 63, .18);
  --line-2: rgba(201, 150, 63, .38);
  --ink: #F1E7D3;
  --ink-soft: #AE9F84;
  --ink-dim: #6F6453;
  --brass: #C9963F;
  --brass-lt: #E9C579;
  --brass-dk: #8A6626;
  --copper: #B87333;
  --copper-dk: #7E4C1E;
  --steel: #97A0AC;
  --steel-dk: #5C6470;
  --fire: #FF7A2F;
  --fire-dk: #C1440E;
  --steam: #D6E3E8;
  --gauge-green: #8AC46A;
  --warn: #D9482F;
  --blueprint: #10314A;
  --blueprint-2: #0B2438;
  --serif: Georgia, 'Times New Roman', 'Songti SC', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', sans-serif;
  --mono: 'Courier New', 'Consolas', monospace;
  --sec-gap: 36px;
  --rad: 8px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; overflow-x: hidden; }

[v-cloak] { display: none !important; }

/* ── base element resets — no link underlines anywhere ─────── */
a { color: inherit; text-decoration: none; }
a:hover, a:focus, a:active { text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; border: none; background: none; cursor: pointer; color: inherit; }

body {
  background: var(--iron);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  padding-bottom: 40px;
  overflow-x: hidden;
}

/* cast-iron plate texture + riveted edge rails + foundry glow */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(45deg, rgba(255, 122, 47, .022) 0 2px, transparent 2px 5px),
    repeating-linear-gradient(-45deg, rgba(0, 0, 0, .12) 0 1px, transparent 1px 4px),
    radial-gradient(660px 300px at 88% -6%, rgba(255, 122, 47, .07), transparent 70%),
    radial-gradient(520px 260px at 4% 22%, rgba(201, 150, 63, .06), transparent 72%),
    radial-gradient(700px 400px at 50% 118%, rgba(184, 115, 51, .07), transparent 72%);
}

/* riveted side rails */
body::after {
  content: '';
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: 10px;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle 3px at 5px 18px, rgba(201, 150, 63, .5) 96%, transparent) repeat-y,
    linear-gradient(90deg, rgba(201, 150, 63, .14), transparent);
  background-size: 10px 56px, 10px 100%;
  opacity: .55;
}

.wrap { width: min(1180px, 92%); margin: 0 auto; }

/* ── shared: riveted panel helper ─────────────────────────── */
.rivets::before,
.rivets::after {
  content: '';
  position: absolute;
  inset: 7px;
  pointer-events: none;
  background-image:
    radial-gradient(circle 2.5px at 0 50%, rgba(201, 150, 63, .55) 96%, transparent),
    radial-gradient(circle 2.5px at 100% 50%, rgba(201, 150, 63, .55) 96%, transparent);
}

/* ── shared: brass plaque header ───────────────────────────── */
.plaque {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 15px;
  padding: 8px 12px;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(201, 150, 63, .16), rgba(201, 150, 63, .04)),
    linear-gradient(180deg, var(--plate-2), var(--plate));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 3px 10px rgba(0, 0, 0, .35);
}

.plaque-bar {
  width: 6px;
  height: 22px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--brass-lt), var(--brass-dk));
  box-shadow: 0 0 8px rgba(201, 150, 63, .45);
}

.plaque-mod {
  font-family: var(--mono);
  font-size: .56rem;
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--iron);
  background: var(--brass);
  padding: 2px 6px;
  border-radius: 3px;
}

.plaque-title {
  font-family: var(--serif);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--brass-lt);
  text-shadow: 0 1px 0 rgba(0, 0, 0, .6);
  white-space: nowrap;
}

.plaque-line {
  flex: 1;
  height: 3px;
  min-width: 20px;
  border-radius: 2px;
  background:
    repeating-linear-gradient(90deg, rgba(201, 150, 63, .45) 0 6px, transparent 6px 12px);
}

.plaque-side {
  font-family: var(--mono);
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--brass);
  border: 1px solid rgba(201, 150, 63, .45);
  border-radius: 4px;
  padding: 3px 7px;
  white-space: nowrap;
  background: rgba(201, 150, 63, .08);
}

/* ── shared: chips & stars ─────────────────────────────────── */
.chip {
  display: inline-block;
  font-family: var(--mono);
  font-size: .56rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 3px;
  border: 1px solid var(--line-2);
  color: var(--ink-soft);
  background: rgba(0, 0, 0, .25);
}

.chip-brass { color: var(--brass-lt); border-color: rgba(201, 150, 63, .55); background: rgba(201, 150, 63, .12); }
.chip-copper { color: #E9A768; border-color: rgba(184, 115, 51, .55); background: rgba(184, 115, 51, .14); }
.chip-steel { color: #C6CEDA; border-color: rgba(151, 160, 172, .5); background: rgba(151, 160, 172, .1); }
.chip-fire { color: #FFB27A; border-color: rgba(255, 122, 47, .5); background: rgba(255, 122, 47, .12); }
.chip-iron { color: var(--ink-soft); border-color: var(--line-2); background: rgba(0, 0, 0, .25); }

.stars { font-family: var(--serif); font-size: .72rem; color: var(--brass); letter-spacing: 1px; white-space: nowrap; }
.stars .off { color: var(--ink-dim); }

/* ── 1) MAST — foundry sign bar ────────────────────────────── */
.mast {
  position: sticky;
  top: 0;
  z-index: 40;
  background: linear-gradient(180deg, var(--iron-2), rgba(20, 17, 14, .92));
  border-bottom: 1px solid var(--line-2);
  box-shadow: 0 4px 18px rgba(0, 0, 0, .5);
}

.mast-in { display: flex; align-items: center; gap: 12px; padding: 11px 0; }

.mast-plate {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 5px;
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: #2A1D06;
  background: linear-gradient(180deg, var(--brass-lt), var(--brass) 55%, var(--brass-dk));
  border: 1px solid var(--brass-dk);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 2px 8px rgba(0, 0, 0, .5);
}

.mast-name {
  font-family: var(--serif);
  font-size: 1.06rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--brass-lt);
  text-shadow: 0 1px 0 rgba(0, 0, 0, .7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mast-gauge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  font-family: var(--mono);
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .16em;
  color: var(--gauge-green);
  border: 1px solid rgba(138, 196, 106, .35);
  border-radius: 4px;
  padding: 4px 9px;
  background: rgba(138, 196, 106, .07);
  white-space: nowrap;
}

.mast-search {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 5px;
  border: 1px solid var(--line-2);
  background: linear-gradient(180deg, var(--plate-2), var(--plate));
  color: var(--brass);
  cursor: pointer;
  transition: border-color .15s, color .15s, box-shadow .15s;
}

.mast-search:hover { color: var(--brass-lt); border-color: var(--brass); box-shadow: 0 0 12px rgba(201, 150, 63, .3); }

/* ── 2) INTAKE — riveted search chute ─────────────────────── */
.intake { margin-top: 16px; }

.intake-in {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px 9px 14px;
  border: 1px solid var(--line-2);
  border-radius: 7px;
  background:
    repeating-linear-gradient(90deg, rgba(201, 150, 63, .05) 0 2px, transparent 2px 9px),
    linear-gradient(180deg, var(--plate-2), var(--plate));
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, .55);
}

.intake-ico { display: flex; color: var(--brass); flex-shrink: 0; }

.intake-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: var(--ink);
  font-family: var(--mono);
  font-size: .9rem;
  letter-spacing: .04em;
}

.intake-input::placeholder { color: var(--ink-dim); }

.intake-go {
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #2A1D06;
  border: none;
  border-radius: 5px;
  padding: 9px 16px;
  cursor: pointer;
  background: linear-gradient(180deg, var(--brass-lt), var(--brass) 60%, var(--brass-dk));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 2px 8px rgba(0, 0, 0, .45);
  transition: filter .15s, transform .15s;
}

.intake-go:hover { filter: brightness(1.08); transform: translateY(-1px); }

/* ── 3) COGBAR — tooth-rail category tabs ──────────────────── */
.cogbar { margin-top: 12px; }

.cogbar-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 3px 2px 8px;
  scrollbar-width: thin;
}

.cogbar-row::-webkit-scrollbar { height: 6px; }
.cogbar-row::-webkit-scrollbar-thumb { background: var(--plate-3); border-radius: 3px; }

.cog-tab {
  position: relative;
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 8px 14px 8px 16px;
  border: 1px solid var(--line);
  border-radius: 5px;
  cursor: pointer;
  background: linear-gradient(180deg, var(--plate-2), var(--plate));
  transition: color .15s, border-color .15s, background .15s, transform .15s;
}

.cog-tab::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 50%;
  width: 5px;
  height: 5px;
  margin-top: -2.5px;
  border-radius: 50%;
  background: var(--steel-dk);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .5);
}

.cog-tab:hover { color: var(--brass-lt); border-color: var(--line-2); transform: translateY(-1px); }

.cog-tab.is-on {
  color: #2A1D06;
  border-color: var(--brass);
  background: linear-gradient(180deg, var(--brass-lt), var(--brass) 60%, var(--brass-dk));
  box-shadow: 0 0 14px rgba(201, 150, 63, .35);
}

.cog-tab.is-on::before { background: var(--fire-dk); }

.cog-tab.f-brass.is-on { background: linear-gradient(180deg, var(--brass-lt), var(--brass-dk)); }
.cog-tab.f-copper.is-on { background: linear-gradient(180deg, #E9A768, var(--copper-dk)); border-color: var(--copper); }
.cog-tab.f-steel.is-on { background: linear-gradient(180deg, #D5DCE6, var(--steel-dk)); border-color: var(--steel); }
.cog-tab.f-fire.is-on { background: linear-gradient(180deg, #FFB27A, var(--fire-dk)); border-color: var(--fire); }

/* ── loading rig ───────────────────────────────────────────── */
.loading-full {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46vh;
}

.loading-rig {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.loading-gears { position: relative; width: 96px; height: 68px; }

.loading-txt {
  font-family: var(--mono);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .22em;
  color: var(--brass);
}

/* ── shared GEAR construction ──────────────────────────────── */
.gear {
  position: relative;
  display: block;
  border-radius: 50%;
  background: radial-gradient(circle, var(--brass-lt) 0 24%, var(--brass) 26% 60%, transparent 62%);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .5));
}

.gear::before {
  content: '';
  position: absolute;
  inset: -9%;
  border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, var(--brass) 0 11deg, transparent 11deg 22deg);
  -webkit-mask-image: radial-gradient(circle closest-side, transparent 58%, black 60%);
  mask-image: radial-gradient(circle closest-side, transparent 58%, black 60%);
}

.gear::after {
  content: '';
  position: absolute;
  inset: 33%;
  border-radius: 50%;
  background: var(--iron-2);
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .55);
}

.gear.spin { animation: gearspin 22s linear infinite; }
.gear.spin-rev { animation: gearspin 22s linear infinite reverse; }

@keyframes gearspin { to { transform: rotate(360deg); } }

/* ── 4) BOILER BANNER — the featured build, full width ─────── */
/* .boiler-sec { margin-top: var(--sec-gap); } */

.boiler-main {
  position: relative;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 0;
  min-height: 236px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(180deg, var(--plate-2), var(--plate));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 8px 24px rgba(0, 0, 0, .45);
  transition: border-color .18s, box-shadow .18s, transform .18s;
}

.boiler-main:hover { border-color: var(--brass); box-shadow: 0 10px 28px rgba(0, 0, 0, .5), 0 0 20px rgba(201, 150, 63, .15); transform: translateY(-2px); }

.boiler-art { position: relative; overflow: hidden; border-right: 1px solid var(--line); }

.boiler-art img { width: 100%; height: 100%; object-fit: cover; display: block; min-height: 236px; }

/* heat shimmer across the furnace mouth */
.boiler-art::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 46%;
  top: 0;
  background: linear-gradient(180deg, rgba(255, 122, 47, .22), transparent);
  animation: heatair 4.6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes heatair {
  0%, 100% { transform: translateY(0); opacity: .75; }
  50% { transform: translateY(8px); opacity: 1; }
}

/* glowing furnace grate at the bottom edge */
.boiler-art::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 12px;
  z-index: 2;
  background:
    repeating-linear-gradient(90deg, rgba(255, 122, 47, .85) 0 3px, rgba(255, 122, 47, .25) 3px 9px);
  box-shadow: 0 -6px 18px rgba(255, 122, 47, .5);
  opacity: .85;
}

.boiler-body {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 18px 20px;
  min-width: 0;
}

.boiler-chiprow { display: flex; gap: 7px; flex-wrap: wrap; }

.boiler-name {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.6vw, 1.75rem);
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--brass-lt);
  text-shadow: 0 2px 0 rgba(0, 0, 0, .6);
  overflow: hidden;
  text-overflow: ellipsis;
}

.boiler-desc {
  font-size: .88rem;
  color: var(--ink-soft);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.boiler-specs {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

.boiler-no {
  font-family: var(--mono);
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--ink-dim);
}

.boiler-play {
  margin-left: auto;
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #2A1D06;
  padding: 8px 14px;
  border-radius: 5px;
  background: linear-gradient(180deg, var(--brass-lt), var(--brass) 60%, var(--brass-dk));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35);
}

/* ── 4b) PRESSURE CONSOLE — standby builds, its own board ──── */
.press-sec { margin-top: var(--sec-gap); }

.press-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.press-row {
  position: relative;
  display: grid;
  grid-template-columns: 62px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line-2);
  border-radius: 9px;
  background: linear-gradient(180deg, var(--plate-2), var(--plate));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
  overflow: hidden;
  transition: border-color .15s, background .15s, transform .15s;
}

.press-row:hover { border-color: var(--brass); background: var(--plate-3); transform: translateY(-2px); }

/* mini pressure dial */
.press-dial {
  position: relative;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 2px solid var(--brass-dk);
  background:
    repeating-conic-gradient(from 200deg, rgba(201, 150, 63, .5) 0 .8deg, transparent .8deg 14deg),
    radial-gradient(circle, var(--plate-3), var(--iron-2));
  box-shadow: inset 0 0 8px rgba(0, 0, 0, .6);
}

.press-needle {
  position: absolute;
  left: 50%;
  bottom: 50%;
  width: 2px;
  height: 34%;
  margin-left: -1px;
  border-radius: 1px;
  background: linear-gradient(0deg, var(--warn), #FFB27A);
  transform-origin: 50% 100%;
  box-shadow: 0 0 6px rgba(255, 122, 47, .6);
  animation: pressswing 5.5s ease-in-out infinite;
}

.press-row:nth-child(2) .press-needle { animation-delay: 1.1s; }
.press-row:nth-child(3) .press-needle { animation-delay: 2.2s; }
.press-row:nth-child(4) .press-needle { animation-delay: 3.3s; }

@keyframes pressswing {
  0%, 100% { transform: rotate(-38deg); }
  50% { transform: rotate(38deg); }
}

.press-mid { min-width: 0; }

.press-nm {
  display: block;
  font-family: var(--serif);
  font-weight: 700;
  font-size: .9rem;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.press-lab {
  display: block;
  font-family: var(--mono);
  font-size: .56rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-top: 2px;
}

.press-bar {
  position: relative;
  width: 9px;
  height: 46px;
  border-radius: 4px;
  background: rgba(0, 0, 0, .45);
  box-shadow: inset 0 0 0 1px var(--line);
  overflow: hidden;
}

.press-bar i {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: block;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--fire), var(--brass));
  box-shadow: 0 0 8px rgba(255, 122, 47, .5);
}

/* ── 5) GEAR RACK — meshing gear wall ─────────────────────── */
.rack-sec { margin-top: var(--sec-gap); }

.gear-rack {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px 10px;
  padding: 20px 16px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background:
    repeating-linear-gradient(90deg, rgba(201, 150, 63, .04) 0 1px, transparent 1px 26px),
    linear-gradient(180deg, var(--plate), var(--iron-2));
  box-shadow: inset 0 0 40px rgba(0, 0, 0, .5);
}

.gear-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.gear-orb {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 86px;
  height: 86px;
}

.gear-item:nth-child(3n) .gear-orb { width: 74px; height: 74px; }
.gear-item:nth-child(4n) .gear-orb { width: 94px; height: 94px; }

.gear-orb .gear { position: absolute; inset: 0; width: 100%; height: 100%; }

.gear-face {
  position: relative;
  z-index: 2;
  width: 56%;
  height: 56%;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(0, 0, 0, .5);
  box-shadow: 0 0 0 2px rgba(233, 197, 121, .35);
}

.gear-face img { width: 100%; height: 100%; object-fit: cover; display: block; }

.gear-nm {
  max-width: 100%;
  font-family: var(--mono);
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gear-item:hover .gear-nm { color: var(--brass-lt); }

/* ── 6) CONVEYOR LINE — belt of daily crates ──────────────── */
.conveyor-sec { margin-top: var(--sec-gap); }

.belt-wrap { position: relative; padding: 22px 0 30px; }

.belt-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 6px 2px 12px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}

.belt-track::-webkit-scrollbar { height: 6px; }
.belt-track::-webkit-scrollbar-thumb { background: var(--plate-3); border-radius: 3px; }

/* moving belt surface behind the crates */
.belt-surface {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 22px;
  height: 26px;
  border-radius: 6px;
  background:
    repeating-linear-gradient(115deg, rgba(201, 150, 63, .22) 0 8px, rgba(0, 0, 0, .35) 8px 16px),
    linear-gradient(180deg, var(--plate-3), var(--iron-2));
  border: 1px solid var(--line-2);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .6);
  animation: beltmove 2.4s linear infinite;
  pointer-events: none;
}

@keyframes beltmove { to { background-position: 62px 0, 0 0; } }

/* rollers on the belt edge */
.belt-rollers {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 16px;
  height: 12px;
  pointer-events: none;
  background: repeating-linear-gradient(90deg, var(--steel-dk) 0 10px, transparent 10px 26px);
  -webkit-mask-image: radial-gradient(circle 6px at 5px 6px, black 96%, transparent);
  mask-image: radial-gradient(circle 6px at 5px 6px, black 96%, transparent);
  mask-size: 26px 12px;
  -webkit-mask-size: 26px 12px;
  mask-repeat: repeat-x;
  opacity: .8;
}

.crate {
  position: relative;
  flex-shrink: 0;
  width: 132px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 10px 8px 12px;
  border: 1px solid var(--line-2);
  border-radius: 7px;
  background: linear-gradient(180deg, var(--plate-2), var(--plate));
  box-shadow: 0 6px 16px rgba(0, 0, 0, .45);
  transition: transform .16s, border-color .16s;
}

.crate:hover { transform: translateY(-5px); border-color: var(--brass); }

/* crate slats */
.crate::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 7px;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 46%, rgba(201, 150, 63, .18) 46% 54%, transparent 54%);
  opacity: .8;
}

.crate-img {
  width: 78px;
  height: 78px;
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, .5);
  box-shadow: 0 0 0 2px rgba(201, 150, 63, .22);
}

.crate-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

.crate-nm {
  max-width: 100%;
  font-family: var(--serif);
  font-weight: 700;
  font-size: .74rem;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.crate-code {
  font-family: var(--mono);
  font-size: .54rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--fire);
}

/* ── 7) BLUEPRINT WALL — drafting sheets ──────────────────── */
.blueprint-sec { margin-top: var(--sec-gap); }

.bp-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.bp-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(150, 200, 235, .3);
  border-radius: 6px;
  background:
    repeating-linear-gradient(0deg, rgba(150, 200, 235, .07) 0 1px, transparent 1px 16px),
    repeating-linear-gradient(90deg, rgba(150, 200, 235, .07) 0 1px, transparent 1px 16px),
    linear-gradient(160deg, var(--blueprint), var(--blueprint-2));
  box-shadow: 0 6px 18px rgba(0, 0, 0, .45);
  transition: transform .16s, box-shadow .16s, border-color .16s;
}

.bp-card:hover { transform: translateY(-3px); border-color: rgba(180, 220, 250, .55); box-shadow: 0 10px 22px rgba(0, 0, 0, .5); }

.bp-no {
  position: absolute;
  top: 8px;
  right: 9px;
  font-family: var(--mono);
  font-size: .54rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: rgba(190, 225, 250, .75);
}

.bp-frame {
  position: relative;
  padding: 8px;
  border: 1px dashed rgba(170, 210, 240, .45);
  border-radius: 4px;
}

.bp-frame img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; border-radius: 3px; filter: saturate(.92); }

/* dimension line under the drawing */
.bp-dim {
  position: relative;
  height: 10px;
  margin-top: 6px;
}

.bp-dim::before,
.bp-dim::after {
  content: '';
  position: absolute;
  top: 0;
  width: 1px;
  height: 8px;
  background: rgba(170, 210, 240, .6);
}

.bp-dim::before { left: 0; }
.bp-dim::after { right: 0; }

.bp-dim i {
  position: absolute;
  left: 0;
  right: 0;
  top: 4px;
  height: 1px;
  background: rgba(170, 210, 240, .6);
}

.bp-meta { display: flex; flex-direction: column; gap: 5px; min-width: 0; }

.bp-nm {
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .02em;
  color: #DCEEFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bp-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

.bp .stars { color: #FFD98A; }
.bp .stars .off { color: rgba(190, 225, 250, .3); }

/* ── 8) WORKBENCH — tool rail + parts tray ────────────────── */
.bench-sec { margin-top: var(--sec-gap); }

.bench-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: linear-gradient(180deg, var(--plate), var(--iron-2));
  box-shadow: inset 0 0 30px rgba(0, 0, 0, .45);
}

.tool-rail { display: flex; flex-direction: column; gap: 8px; }

.tool-tab {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  text-align: left;
  cursor: pointer;
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: linear-gradient(180deg, var(--plate-2), var(--plate));
  transition: color .15s, border-color .15s, transform .15s, background .15s;
}

.tool-tab:hover { color: var(--brass-lt); border-color: var(--line-2); transform: translateX(3px); }

.tool-tab.is-on {
  color: var(--brass-lt);
  border-color: var(--brass);
  background: linear-gradient(90deg, rgba(201, 150, 63, .18), rgba(201, 150, 63, .04));
  box-shadow: inset 3px 0 0 var(--brass);
}

.tool-count {
  font-size: .6rem;
  color: var(--ink-dim);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 1px 5px;
}

.bench-tray {
  position: relative;
  padding: 14px;
  border: 1px dashed var(--line-2);
  border-radius: 8px;
  background:
    repeating-linear-gradient(45deg, rgba(201, 150, 63, .035) 0 3px, transparent 3px 10px),
    rgba(0, 0, 0, .25);
}

.tray-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--line);
}

.tray-name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: .04em;
  color: var(--brass-lt);
}

.tray-note {
  font-family: var(--mono);
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--ink-dim);
}

.tray-open {
  margin-left: auto;
  cursor: pointer;
  font-family: var(--mono);
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #2A1D06;
  border: none;
  border-radius: 4px;
  padding: 7px 11px;
  background: linear-gradient(180deg, var(--brass-lt), var(--brass-dk));
}

.tray-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.tray-part {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 9px 6px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--plate-2);
  transition: border-color .15s, transform .15s;
}

.tray-part:hover { border-color: var(--brass); transform: translateY(-3px); }

.tray-part img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 4px; display: block; }

.tray-part p {
  font-family: var(--mono);
  font-size: .6rem;
  font-weight: 700;
  color: var(--ink-soft);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* ── 9) PARTS BIN — crate grid of everything ─────────────── */
.bin-sec { margin-top: var(--sec-gap); }

.bin-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 11px;
}

.bin-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line-2);
  border-radius: 7px;
  overflow: hidden;
  background: linear-gradient(180deg, var(--plate-2), var(--plate));
  box-shadow: 0 5px 14px rgba(0, 0, 0, .4);
  transition: transform .16s, border-color .16s, box-shadow .16s;
}

.bin-tile:hover { transform: translateY(-3px); border-color: var(--brass); box-shadow: 0 8px 18px rgba(0, 0, 0, .5); }

.bin-tile img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; }

.bin-plate {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px 9px 10px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(201, 150, 63, .1), transparent);
}

.bin-nm {
  font-family: var(--serif);
  font-weight: 700;
  font-size: .74rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bin-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; }

.bin-no {
  font-family: var(--mono);
  font-size: .52rem;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--ink-dim);
}

.binmore-wrap { display: flex; justify-content: center; margin-top: 18px; }

.binmore {
  cursor: pointer;
  font-family: var(--mono);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--brass-lt);
  padding: 12px 24px;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  background: linear-gradient(180deg, var(--plate-2), var(--plate));
  transition: border-color .15s, color .15s, transform .15s;
}

.binmore:hover { border-color: var(--brass); color: #FFE0A6; transform: translateY(-2px); }

/* ── 10) PISTON BANK — vertical rods ─────────────────────── */
.piston-sec { margin-top: var(--sec-gap); }

.piston-bank {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px 10px;
  padding: 18px 14px 8px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: linear-gradient(180deg, var(--iron-2), var(--plate));
  box-shadow: inset 0 0 34px rgba(0, 0, 0, .5);
}

.piston {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.piston-rod {
  position: relative;
  width: 10px;
  height: 46px;
  border-radius: 5px;
  background: linear-gradient(180deg, var(--steel), var(--steel-dk));
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .4);
  overflow: hidden;
}

.piston-rod::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 16px;
  border-radius: 5px;
  background: linear-gradient(180deg, var(--brass-lt), var(--brass));
  animation: pistonpump 3.4s ease-in-out infinite;
}

.piston:nth-child(2n) .piston-rod::after { animation-delay: .5s; }
.piston:nth-child(3n) .piston-rod::after { animation-delay: 1.1s; }

@keyframes pistonpump {
  0%, 100% { transform: translateY(30px); }
  50% { transform: translateY(0); }
}

.piston-head {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid var(--brass-dk);
  box-shadow: 0 0 0 2px rgba(201, 150, 63, .2), 0 6px 14px rgba(0, 0, 0, .45);
}

.piston-head img { width: 100%; height: 100%; object-fit: cover; display: block; }

.piston-ticks {
  width: 10px;
  height: 40px;
  margin: 0 auto;
  background: repeating-linear-gradient(180deg, rgba(201, 150, 63, .5) 0 1px, transparent 1px 8px);
  border-left: 1px solid var(--line);
}

.piston-nm {
  max-width: 100%;
  font-family: var(--mono);
  font-size: .58rem;
  font-weight: 700;
  color: var(--ink-soft);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.piston:hover .piston-nm { color: var(--brass-lt); }

/* ── 11) GAUGE WALL — pressure gauge cards ───────────────── */
.gauge-sec { margin-top: var(--sec-gap); }

.gauge-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.gauge-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px 12px 14px;
  border: 1px solid var(--line-2);
  border-radius: 9px;
  background: linear-gradient(180deg, var(--plate-2), var(--plate));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04), 0 6px 16px rgba(0, 0, 0, .4);
  transition: transform .16s, border-color .16s;
}

.gauge-card:hover { transform: translateY(-3px); border-color: var(--brass); }

.gauge-dial {
  position: relative;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  border: 3px solid var(--brass-dk);
  background:
    repeating-conic-gradient(from 210deg, rgba(201, 150, 63, .55) 0 .7deg, transparent .7deg 15deg),
    radial-gradient(circle at 50% 40%, var(--plate-3), var(--iron-2));
  box-shadow: inset 0 0 14px rgba(0, 0, 0, .7), 0 3px 10px rgba(0, 0, 0, .5), inset 0 0 0 6px rgba(0, 0, 0, .25);
}

.gauge-needle {
  position: absolute;
  left: 50%;
  bottom: 50%;
  width: 3px;
  height: 40%;
  margin-left: -1.5px;
  border-radius: 2px;
  transform-origin: 50% 100%;
  background: linear-gradient(0deg, var(--warn), #FFC08A);
  box-shadow: 0 0 8px rgba(255, 122, 47, .7);
  z-index: 4;
}

.gauge-card:nth-child(1) .gauge-needle { transform: rotate(-52deg); }
.gauge-card:nth-child(2) .gauge-needle { transform: rotate(-18deg); }
.gauge-card:nth-child(3) .gauge-needle { transform: rotate(14deg); }
.gauge-card:nth-child(4) .gauge-needle { transform: rotate(46deg); }
.gauge-card:nth-child(5) .gauge-needle { transform: rotate(-34deg); }
.gauge-card:nth-child(6) .gauge-needle { transform: rotate(28deg); }
.gauge-card:nth-child(7) .gauge-needle { transform: rotate(-6deg); }
.gauge-card:nth-child(8) .gauge-needle { transform: rotate(56deg); }

.gauge-hub {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--brass-lt), var(--brass-dk));
  box-shadow: 0 0 0 2px rgba(0, 0, 0, .5);
  z-index: 3;
}

.gauge-face {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 62%;
  height: 62%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(0, 0, 0, .5);
  opacity: .95;
  box-shadow: 0 0 8px rgba(0, 0, 0, .6);
  z-index: 1;
}

.gauge-face img { width: 100%; height: 100%; object-fit: cover; display: block; }

.gauge-nm {
  max-width: 100%;
  font-family: var(--serif);
  font-weight: 700;
  font-size: .82rem;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gauge-read {
  font-family: var(--mono);
  font-size: .56rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--brass);
  text-align: center;
}

/* ── 12) STAMP WALL — steel seals ────────────────────────── */
.stamp-sec { margin-top: var(--sec-gap); }

.stamp-wall {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  padding: 20px 16px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background:
    repeating-linear-gradient(45deg, rgba(151, 160, 172, .05) 0 4px, transparent 4px 12px),
    linear-gradient(180deg, var(--iron-2), var(--plate));
  box-shadow: inset 0 0 30px rgba(0, 0, 0, .5);
}

.stamp {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  width: 108px;
}

.stamp-seal {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  transform: rotate(-6deg);
  background:
    radial-gradient(circle, rgba(201, 150, 63, .18) 0 58%, transparent 60%),
    repeating-conic-gradient(from 0deg, rgba(151, 160, 172, .5) 0 6deg, transparent 6deg 18deg);
  transition: transform .2s;
}

.stamp:nth-child(2n) .stamp-seal { transform: rotate(7deg); }
.stamp:nth-child(3n) .stamp-seal { transform: rotate(-11deg); }

.stamp:hover .stamp-seal { transform: rotate(0deg) scale(1.05); }

.stamp-seal img {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--brass-dk);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, .45), 0 4px 12px rgba(0, 0, 0, .5);
}

.stamp-nm {
  max-width: 100%;
  font-family: var(--mono);
  font-size: .56rem;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--ink-soft);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── 13) FORGE RESULTS — filtered / searched ─────────────── */
.forge-bar {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 16px;
  padding: 10px 13px;
  border: 1px solid var(--line-2);
  border-radius: 7px;
  background: linear-gradient(180deg, var(--plate-2), var(--plate));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
}

.forge-back {
  cursor: pointer;
  font-family: var(--mono);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brass-lt);
  border: 1px solid var(--line-2);
  border-radius: 4px;
  padding: 6px 11px;
  background: rgba(0, 0, 0, .3);
  transition: border-color .15s, color .15s;
}

.forge-back:hover { border-color: var(--brass); color: #FFE0A6; }

.forge-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.forge-count {
  margin-left: auto;
  font-family: var(--mono);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--iron);
  background: var(--brass);
  border-radius: 4px;
  padding: 3px 9px;
}

.forge-sec { margin-top: 14px; }

.forge-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 11px;
}

.forge-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line-2);
  border-radius: 7px;
  overflow: hidden;
  background: linear-gradient(180deg, var(--plate-2), var(--plate));
  transition: transform .16s, border-color .16s;
}

.forge-card:hover { transform: translateY(-3px); border-color: var(--brass); }

.forge-card img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; }

.forge-body { display: flex; flex-direction: column; gap: 5px; padding: 9px 10px 11px; }

.forge-nm {
  font-family: var(--serif);
  font-weight: 700;
  font-size: .84rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.forge-desc {
  font-size: .74rem;
  color: var(--ink-soft);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.forge-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; }

.no-scrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 54px 20px;
  border: 1px dashed var(--line-2);
  border-radius: 10px;
  background: rgba(0, 0, 0, .25);
  text-align: center;
}

.no-scrap .gear { width: 60px; height: 60px; opacity: .7; }

.no-scrap .txt {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--brass-lt);
}

.no-scrap .sub { font-family: var(--mono); font-size: .66rem; color: var(--ink-dim); letter-spacing: .1em; }

/* ── 14) FOUNDRY FOOTER ──────────────────────────────────── */
.foundry-foot {
  margin-top: 44px;
  border-top: 1px solid var(--line-2);
  background:
    repeating-linear-gradient(90deg, rgba(201, 150, 63, .07) 0 2px, transparent 2px 30px),
    linear-gradient(180deg, var(--iron-2), var(--iron));
}

.foot-in {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 0 22px;
  flex-wrap: wrap;
}

.foot-plate {
  font-family: var(--serif);
  font-size: .92rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brass-lt);
  text-shadow: 0 1px 0 rgba(0, 0, 0, .7);
}

.foot-links { display: flex; gap: 14px; margin-left: auto; }

.foot-links a {
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color .15s;
}

.foot-links a:hover { color: var(--brass-lt); }

.foot-lamp {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--gauge-green);
}

.foot-fine {
  width: 100%;
  font-family: var(--mono);
  font-size: .56rem;
  letter-spacing: .14em;
  color: var(--ink-dim);
}

/* ── shared lamp (steam pressure light) ──────────────────── */
.lamp {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--gauge-green);
  box-shadow: 0 0 7px rgba(138, 196, 106, .7);
  animation: lampbreathe 2.6s ease-in-out infinite;
}

.lamp.l-fire { background: var(--fire); box-shadow: 0 0 7px rgba(255, 122, 47, .75); }
.lamp.l-brass { background: var(--brass-lt); box-shadow: 0 0 7px rgba(233, 197, 121, .7); }
.lamp.l-steel { background: var(--steel); box-shadow: 0 0 7px rgba(151, 160, 172, .6); }
.lamp.d2 { animation-delay: .85s; }
.lamp.d3 { animation-delay: 1.7s; }

@keyframes lampbreathe {
  0%, 100% { opacity: .45; }
  50% { opacity: 1; }
}

/* ── back to top: lift lever ─────────────────────────────── */
.totop-btn {
  position: fixed;
  right: 18px;
  bottom: 22px;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  cursor: pointer;
  color: var(--brass-lt);
  font-size: .9rem;
  background: linear-gradient(180deg, var(--plate-2), var(--plate));
  box-shadow: 0 4px 14px rgba(0, 0, 0, .5);
  transition: transform .15s, border-color .15s, box-shadow .15s;
}

.totop-btn:hover { transform: translateY(-3px); border-color: var(--brass); box-shadow: 0 0 16px rgba(201, 150, 63, .3); }

/* ── steam puffs drifting over the page ──────────────────── */
.steam-deco {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.puff {
  position: absolute;
  bottom: -60px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(214, 227, 232, .07), transparent 68%);
  filter: blur(6px);
  animation: puffup 26s linear infinite;
}

.puff.p1 { left: 6%; animation-duration: 24s; animation-delay: 0s; }
.puff.p2 { left: 34%; animation-duration: 31s; animation-delay: 6s; width: 160px; height: 160px; }
.puff.p3 { left: 62%; animation-duration: 27s; animation-delay: 12s; }
.puff.p4 { left: 86%; animation-duration: 34s; animation-delay: 3s; width: 140px; height: 140px; }

@keyframes puffup {
  0% { transform: translateY(0) scale(.6); opacity: 0; }
  12% { opacity: .9; }
  80% { opacity: .5; }
  100% { transform: translateY(-108vh) scale(1.7); opacity: 0; }
}

/* ── responsive ──────────────────────────────────────────── */
@media (max-width: 1024px) {
  .boiler-main { grid-template-columns: 240px 1fr; }
  .gear-rack { grid-template-columns: repeat(4, 1fr); }
  .piston-bank { grid-template-columns: repeat(4, 1fr); }
  .bin-grid { grid-template-columns: repeat(4, 1fr); }
  .forge-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 860px) {
  .bench-grid { grid-template-columns: 1fr; }
  .tool-rail { flex-direction: row; overflow-x: auto; padding-bottom: 6px; }
  .tool-tab { flex-shrink: 0; }
  .bp-grid { grid-template-columns: repeat(2, 1fr); }
  .gauge-grid { grid-template-columns: repeat(2, 1fr); }
  .tray-grid { grid-template-columns: repeat(3, 1fr); }
  .boiler-main { grid-template-columns: 1fr; min-height: 0; }
  .boiler-art { border-right: none; border-bottom: 1px solid var(--line); }
  .boiler-art img { min-height: 180px; max-height: 220px; }
  .press-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .plaque-title { font-size: .84rem; }
  .plaque-mod { display: none; }
  .plaque-side { font-size: .52rem; padding: 2px 5px; }
  .mast-gauge { display: none; }
  .gear-rack { grid-template-columns: repeat(3, 1fr); }
  .gear-orb { width: 70px !important; height: 70px !important; }
  .piston-bank { grid-template-columns: repeat(3, 1fr); }
  .bin-grid { grid-template-columns: repeat(2, 1fr); }
  .forge-grid { grid-template-columns: repeat(2, 1fr); }
  .tray-grid { grid-template-columns: repeat(2, 1fr); }
  .boiler-body { padding: 14px 15px; }
  .boiler-play { font-size: .64rem; padding: 7px 11px; }
  .stamp { width: 92px; }
  .stamp-seal { width: 78px; height: 78px; }
  .stamp-seal img { width: 56px; height: 56px; }
  .gauge-dial { width: 88px; height: 88px; }
  .foot-fine { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
