/* Style trzech pierwszych kontrapcji. Wszystkie ruchy ustawia JS skokowo, więc tu nie ma transition. */
.mech { display: block; }

/* ---------- Szafa z windą ---------- */
.mech-cabinet .cab-wrap { display: grid; grid-template-columns: 300px 96px minmax(0, 1fr); gap: 28px; align-items: start; }
.mech-cabinet .cabinet { padding: 16px 14px 18px; border: 3px solid var(--wood-dark); border-radius: 6px; box-shadow: var(--shadow-hard), inset 0 0 0 2px rgb(255 255 255 / .08); }
.mech-cabinet .cab-plate { text-align: center; font-size: 12px; letter-spacing: .24em; padding: 4px 8px; margin: 0 40px 12px; border-radius: 3px; box-shadow: 0 2px 0 rgb(0 0 0 / .3); }
.mech-cabinet .drawer { display: block; width: 100%; margin: 6px 0 0; padding: 0; border: 0; background: var(--wood-dark); text-align: left; position: relative; cursor: pointer; border-radius: 2px; }
.mech-cabinet .drawer:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
.mech-cabinet .drawer-face { display: flex; align-items: center; justify-content: space-between; gap: 10px; height: 100%; padding: 0 14px 0 16px; color: #f6ecd8;
  background: linear-gradient(180deg, #b9823f, #8f5c2a 70%, #7a4c21); border: 2px solid #4a2e14; box-shadow: inset 0 2px 0 rgb(255 255 255 / .15), 0 2px 0 rgb(0 0 0 / .25); border-radius: 2px; }
.mech-cabinet .drawer.is-open .drawer-face { box-shadow: inset 0 2px 0 rgb(255 255 255 / .15), -12px 10px 0 rgb(0 0 0 / .25); }
.mech-cabinet .label { display: grid; gap: 2px; font-family: var(--font-type); line-height: 1.15; min-width: 0; }
.mech-cabinet .label b { font-weight: 400; font-size: 13px; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mech-cabinet .label small { font-size: 11px; opacity: .8; letter-spacing: .06em; }
.mech-cabinet .pull { flex: none; width: 46px; height: 13px; border-radius: 7px; box-shadow: 0 2px 0 rgb(0 0 0 / .35); }
.mech-cabinet .shaft { position: relative; height: 100%; min-height: 540px; }
.mech-cabinet .chain { position: absolute; left: 50%; top: 0; bottom: 120px; width: 8px; margin-left: -4px; border-radius: 4px;
  background: repeating-linear-gradient(180deg, #6b6b6b 0 10px, #2f2f2f 10px 14px, #8a8a8a 14px 18px, #2f2f2f 18px 22px); box-shadow: 2px 0 0 rgb(0 0 0 / .25); }
.mech-cabinet .lift { position: absolute; left: 50%; width: 62px; height: 42px; margin-left: -31px; transform: translateY(-50%); display: grid; place-items: center; border-radius: 4px;
  box-shadow: 3px 4px 0 rgb(0 0 0 / .3); font-size: 18px; color: #4a2e14; }
.mech-cabinet .crank { position: absolute; left: 50%; bottom: 20px; width: 92px; height: 92px; margin-left: -46px; border-radius: 50%; }
.mech-cabinet .crank svg { width: 100%; height: 100%; overflow: visible; }
.mech-cabinet .gear { transform-origin: 60px 60px; }
.mech-cabinet .crank-caption { position: absolute; left: 0; right: 0; bottom: -4px; text-align: center; font-size: 11px; letter-spacing: .3em; color: var(--soft); }
.mech-cabinet .cab-doc { padding: 30px 36px 34px; min-height: 520px; }
.mech-cabinet .doc-head { border-bottom: 1px solid var(--rule); padding-bottom: 10px; margin-bottom: 14px; }
.mech-cabinet .doc-company { font: 700 26px/1.1 var(--font-display); }
.mech-cabinet .doc-role { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--soft); margin-top: 6px; }
.mech-cabinet .doc-context { font-size: 14px; color: var(--soft); max-width: 62ch; }
.mech-cabinet .doc-inner h4 { font-size: 15px; margin: 18px 0 6px; }
.mech-cabinet .doc-items { list-style: none; padding: 0; margin: 0; font-size: 13.5px; line-height: 1.5; }
.mech-cabinet .doc-items li { padding: 6px 0 6px 34px; position: relative; border-bottom: 1px dotted var(--rule); }
.mech-cabinet .doc-items .n { position: absolute; left: 0; color: var(--red); }

/* ---------- Tablica z klapkami ---------- */
.mech-splitflap { max-width: 980px; }
.mech-splitflap .flap-plate { display: inline-block; font-size: 12px; letter-spacing: .24em; padding: 5px 16px; border-radius: 3px 3px 0 0; box-shadow: 0 -2px 0 rgb(0 0 0 / .2) inset; }
.mech-splitflap .board { display: grid; grid-template-columns: repeat(var(--cols, 40), 1fr); gap: 3px; padding: 14px; background: #1a1a1a; border: 8px solid var(--brass-dark); border-radius: 0 8px 8px 8px; box-shadow: var(--shadow-hard); }
.mech-splitflap .cell { position: relative; aspect-ratio: .7; display: flex; align-items: center; justify-content: center; border-radius: 2px; color: #f3e9d0;
  font: 700 clamp(12px, 2vw, 24px)/1 var(--font-mono); background: linear-gradient(180deg, #2c2c2c 0 48%, #0d0d0d 48% 52%, #242424 52%); box-shadow: inset 0 1px 0 rgb(255 255 255 / .06); }
.mech-splitflap .cell.mid { transform: scaleY(.35); background: #0c0c0c; color: transparent; }
.mech-splitflap .flap-bar { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.mech-splitflap .flap-btn { width: 40px; height: 32px; border-radius: 4px; font-size: 13px; cursor: pointer; box-shadow: 0 2px 0 rgb(0 0 0 / .3); }
.mech-splitflap .flap-btn:active { transform: translateY(1px); box-shadow: 0 1px 0 rgb(0 0 0 / .3); }
.mech-splitflap .flap-counter { min-width: 70px; text-align: center; font-size: 13px; letter-spacing: .1em; }
.mech-splitflap .lever { position: relative; width: 34px; height: 110px; margin-left: 20px; --pull: 0px; }
.mech-splitflap .lever-arm { position: absolute; left: 14px; top: 0; width: 6px; height: calc(60px + var(--pull)); background: linear-gradient(90deg, #4a4a4a, #9a9a9a, #4a4a4a); border-radius: 3px; }
.mech-splitflap .lever-knob { position: absolute; left: 0; top: calc(52px + var(--pull)); width: 34px; height: 34px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #d04a3a, var(--red) 60%, #6b2318); box-shadow: 2px 3px 0 rgb(0 0 0 / .3); }

/* ---------- Sejf ---------- */
.mech-vault .vault { max-width: 760px; }
.mech-vault .vault-body { position: relative; width: 420px; height: 420px; margin: 0 auto; perspective: 1400px; }
.mech-vault .vault-interior { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 50% 40%, #3a3a3a, #141414 75%); border: 16px solid var(--brass-dark); box-shadow: var(--shadow-hard), inset 0 0 60px rgb(0 0 0 / .8); overflow: hidden; }
.mech-vault .shelf { position: absolute; left: 12%; right: 12%; height: 10px; background: linear-gradient(180deg, #8a6a2c, #4a3512); box-shadow: 0 6px 10px rgb(0 0 0 / .6); }
.mech-vault .shelf:nth-child(1) { top: 32%; } .mech-vault .shelf:nth-child(2) { top: 54%; } .mech-vault .shelf:nth-child(3) { top: 76%; }
.mech-vault .shelf::before { content: ""; position: absolute; left: 6%; right: 6%; bottom: 10px; height: 34px; background: repeating-linear-gradient(90deg, #efe3c3 0 26px, #c9b58a 26px 28px, #e6d9b8 28px 54px, #b9a26f 54px 56px); border-radius: 2px; }
.mech-vault .vault-door { position: absolute; inset: 16px; border-radius: 50%; transform-origin: 2% 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 42% 36%, #e6cf92, #c9a85c 45%, #8a6a2c 80%, #5a4214); box-shadow: inset 0 0 0 10px rgb(90 66 20 / .6), inset 0 0 0 14px rgb(226 201 138 / .5), 10px 10px 0 rgb(0 0 0 / .18); }
.mech-vault .wheel { width: 54%; height: 54%; border-radius: 50%; }
.mech-vault .wheel svg { width: 100%; height: 100%; transform-origin: 50% 50%; }
.mech-vault .bolts { position: absolute; right: -14px; top: 50%; transform: translateY(-50%); display: grid; gap: 28px; --bolt: 1; }
.mech-vault .bolts span { display: block; width: 36px; height: 14px; border-radius: 7px; background: linear-gradient(180deg, #e8e8e8, #8d8d8d 60%, #555); transform: translateX(calc(-22px + 22px * var(--bolt))); box-shadow: 0 2px 0 rgb(0 0 0 / .4); }
.mech-vault .vault-label { position: absolute; bottom: 12%; font-size: 11px; letter-spacing: .3em; color: #4a2e14; }
.mech-vault .vault-tray { margin: -40px auto 0; max-width: 700px; padding: 34px 36px 30px; opacity: 0; max-height: 0; overflow: hidden; }
.mech-vault .vault-tray.is-out { overflow: visible; }
.mech-vault .tray-inner h4 { margin: 0 0 12px; font-size: 16px; }
.mech-vault .tray-items { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.mech-vault .tray-items li { display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start; padding: 10px 12px; background: var(--paper-light); border: 1px solid var(--rule); box-shadow: 3px 4px 0 rgb(42 33 26 / .12); font-size: 13.5px; line-height: 1.5; }
.mech-vault .band { display: inline-grid; place-items: center; width: 34px; height: 26px; border-radius: 3px; font: 700 12px var(--font-mono); }

@media (max-width: 900px) {
  .mech-cabinet .cab-wrap { grid-template-columns: 1fr 70px; }
  .mech-cabinet .cab-doc { grid-column: 1 / -1; min-height: 0; }
  .mech-vault .vault-body { width: min(420px, 90vw); height: min(420px, 90vw); }
}

/* Bilet pod tablicą: pełna, czytelna treść punktu. */
.mech-splitflap .flap-ticket { --print: 1; margin: 18px 0 0 24px; max-width: 70ch; padding: 16px 22px 18px; border: 1px solid var(--rule);
  box-shadow: 4px 5px 0 rgb(42 33 26 / .14); clip-path: inset(0 0 calc((1 - var(--print)) * 100%) 0);
  background-image: radial-gradient(circle at 8px 50%, transparent 5px, var(--paper) 5.5px), radial-gradient(circle at calc(100% - 8px) 50%, transparent 5px, var(--paper) 5.5px); }
.mech-splitflap .ticket-head { font-size: 11px; letter-spacing: .3em; color: var(--red); margin-bottom: 8px; }
.mech-splitflap .flap-text { margin: 0; font-size: 15px; line-height: 1.55; }

/* ---------- Drzwi obrotowe ---------- */
.mech-revolving .rev-wrap { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 32px; align-items: start; }
.mech-revolving .lobby { position: relative; height: 360px; perspective: 900px; perspective-origin: 50% 40%; }
.mech-revolving .door { position: absolute; left: 50%; top: 40px; width: 0; height: 260px; transform-style: preserve-3d; cursor: grab; }
.mech-revolving .axis { position: absolute; left: -5px; top: -10px; width: 10px; height: 280px; background: linear-gradient(90deg, #5a4214, #c9a85c, #5a4214); border-radius: 5px; }
.mech-revolving .wing { position: absolute; left: 0; top: 0; width: 140px; height: 260px; transform-origin: 0 50%; }
.mech-revolving .pane { position: absolute; inset: 0 0 0 0; border: 5px solid #5a4214; background: linear-gradient(160deg, rgb(215 228 236 / .55), rgb(255 255 255 / .25) 50%, rgb(183 198 212 / .55)); display: grid; place-items: center; backface-visibility: visible; }
.mech-revolving .plate { padding: 6px 10px; font-size: 11px; letter-spacing: .14em; text-align: center; max-width: 110px; box-shadow: 0 2px 0 rgb(0 0 0 / .3); }
.mech-revolving .door-top, .mech-revolving .door-floor { position: absolute; left: 50%; width: 300px; height: 70px; margin-left: -150px; border-radius: 50%; }
.mech-revolving .door-top { top: 6px; background: radial-gradient(ellipse at 50% 40%, #c9a85c, #7a5c22); border: 4px solid #5a4214; box-shadow: var(--shadow-hard); }
.mech-revolving .door-floor { top: 270px; background: radial-gradient(ellipse, #4a3a2a, #2a211a); border: 4px solid #5a4214; }
.mech-revolving .lobby-sign { position: absolute; left: 50%; transform: translateX(-50%); bottom: -4px; font-size: 11px; letter-spacing: .3em; color: var(--soft); }
.mech-revolving .lobby-card { padding: 26px 30px; min-height: 300px; }
.mech-revolving .card-inner h4 { margin: 0 0 4px; font-size: 18px; }
.mech-revolving .card-inner .sub { margin: 0 0 12px; color: var(--soft); font-size: 13px; }
.mech-revolving .card-items { list-style: none; padding: 0; margin: 0; font-size: 13.5px; line-height: 1.5; }
.mech-revolving .card-items li { padding: 6px 0 6px 30px; position: relative; border-bottom: 1px dotted var(--rule); }
.mech-revolving .card-items .n { position: absolute; left: 0; color: var(--red); }

/* ---------- Jednoręki bandyta ---------- */
.mech-slot .slot-wrap { display: grid; grid-template-columns: 560px 60px; gap: 10px; align-items: start; }
.mech-slot .slot-cabinet { position: relative; padding: 18px 22px 22px; border-radius: 14px 14px 8px 8px; background: linear-gradient(180deg, #b23a2c, #7a241a); border: 6px solid var(--brass-dark); box-shadow: var(--shadow-hard), inset 0 0 0 3px rgb(226 201 138 / .5); --sym: 72px; }
.mech-slot .slot-marquee { text-align: center; font-size: 13px; letter-spacing: .3em; padding: 6px; border-radius: 6px; margin-bottom: 14px; box-shadow: 0 2px 0 rgb(0 0 0 / .3); }
.mech-slot .reels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.mech-slot .reel-window { height: var(--sym); overflow: hidden; background: #f7f1e3; border: 4px solid var(--brass-dark); border-radius: 6px; box-shadow: inset 0 10px 14px rgb(0 0 0 / .25), inset 0 -10px 14px rgb(0 0 0 / .25); }
.mech-slot .reel-strip { will-change: transform; }
.mech-slot .sym { height: var(--sym); display: grid; place-items: center; font: 700 clamp(14px, 1.6vw, 22px)/1 var(--font-mono); color: var(--ink); border-bottom: 1px solid rgb(0 0 0 / .08); padding: 0 6px; text-align: center; }
.mech-slot .slot-counter { text-align: center; color: #f6e7c8; font-size: 12px; letter-spacing: .2em; margin: 12px 0 10px; }
.mech-slot .slot-tray { --print: 0; padding: 14px 18px 16px; border: 1px solid var(--rule); box-shadow: inset 0 2px 0 #fff; clip-path: inset(0 0 calc((1 - var(--print)) * 100%) 0); min-height: 60px; }
.mech-slot .tray-head { font-size: 11px; letter-spacing: .3em; color: var(--red); margin-bottom: 6px; }
.mech-slot .tray-text { margin: 0; font-size: 14.5px; line-height: 1.55; }
.mech-slot .arm { position: relative; width: 60px; height: 240px; --pull: 0px; }
.mech-slot .arm-rod { position: absolute; left: 22px; top: 30px; width: 10px; height: calc(110px + var(--pull)); background: linear-gradient(90deg, #4a4a4a, #c0c0c0, #4a4a4a); border-radius: 5px; }
.mech-slot .arm-ball { position: absolute; left: 6px; top: calc(4px + var(--pull)); width: 42px; height: 42px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #e26a58, var(--red) 55%, #5e1d14); box-shadow: 3px 4px 0 rgb(0 0 0 / .3); }

/* ---------- Auto ---------- */
.mech-car .road-scene { position: relative; min-height: 420px; padding-top: 30px; }
.mech-car .car { position: absolute; left: 24px; top: 90px; width: 560px; height: 240px; filter: drop-shadow(6px 8px 0 rgb(42 33 26 / .22)); }
.mech-car .car-body { width: 100%; height: 100%; overflow: visible; }
.mech-car .wheel { transform-box: fill-box; }
.mech-car .steer { position: absolute; left: 240px; top: 64px; width: 52px; height: 52px; border-radius: 50%; }
.mech-car .steer svg { width: 100%; height: 100%; transform-origin: 50% 50%; }
.mech-car .starter { position: absolute; left: 520px; top: 140px; width: 64px; height: 64px; }
.mech-car .starter svg { width: 100%; height: 100%; overflow: visible; }
.mech-car .starter-g { transform-origin: 40px 40px; }
.mech-car .puffs { position: absolute; left: 10px; top: 120px; width: 10px; height: 10px; }
.mech-car .puff { position: absolute; left: -30px; top: -30px; min-width: 160px; max-width: 220px; padding: 14px 18px; border-radius: 48% 52% 50% 50% / 60% 55% 45% 40%; background: #f8f3e6; border: 3px solid var(--ink); font-size: 12px; letter-spacing: .08em; text-align: center; color: var(--ink); box-shadow: 4px 5px 0 rgb(42 33 26 / .18); transform-origin: 100% 100%; }
.mech-car .puff::after { content: ""; position: absolute; right: -14px; bottom: -10px; width: 22px; height: 22px; border-radius: 50%; background: #f8f3e6; border: 3px solid var(--ink); }
.mech-car .road { position: absolute; left: 0; right: 0; top: 318px; height: 12px; background: repeating-linear-gradient(90deg, var(--ink) 0 46px, transparent 46px 70px); border-top: 4px solid var(--ink); }
.mech-car .sign { position: absolute; right: 24px; top: 40px; width: min(380px, 40%); padding: 18px 22px 20px; opacity: .3; }
.mech-car .sign.is-empty .sign-text { display: none; }
.mech-car .sign-head { font-size: 11px; letter-spacing: .3em; color: var(--red); margin-bottom: 8px; }
.mech-car .sign-text { margin: 0; font-size: 14px; line-height: 1.55; }
.mech-car .sign-post { position: absolute; left: 50%; bottom: -70px; width: 12px; height: 70px; margin-left: -6px; background: linear-gradient(90deg, #5d3b1e, #a9733f, #5d3b1e); z-index: -1; }

@media (max-width: 900px) {
  .mech-revolving .rev-wrap, .mech-slot .slot-wrap { grid-template-columns: 1fr; }
  .mech-slot .arm { height: 120px; margin: 0 auto; }
  .mech-car .road-scene { min-height: 520px; }
  .mech-car .sign { position: static; width: auto; margin: 340px 0 0; }
}

/* ---------- Litery na sznurkach ---------- */
.mech-letters .letters-stage { position: relative; min-height: 300px; overflow: hidden; padding-top: 10px; }
.mech-letters .letter-line { display: flex; gap: 10px; align-items: flex-start; }
.mech-letters .line-1 { margin-left: 60px; margin-top: -10px; }
.mech-letters .hang { position: relative; display: inline-flex; flex-direction: column; align-items: center; }
.mech-letters .string { width: 2px; height: calc(40px + (var(--k) % 3) * 14px); background: var(--ink); opacity: .7; }
.mech-letters .letter { font: 900 clamp(44px, 7vw, 96px)/1 var(--font-display); color: var(--ink); background: var(--paper); border: 3px solid var(--ink); padding: 4px 10px 0; cursor: pointer; box-shadow: 6px 7px 0 rgb(42 33 26 / .25); transform: rotate(calc((var(--k) % 3 - 1) * 2deg)); }
.mech-letters .letter:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
.mech-letters .letters-sub { margin: 26px 0 0 64px; font-size: 13px; letter-spacing: .24em; text-transform: uppercase; color: var(--soft); }

/* ---------- Popiersie ---------- */
.mech-bust .bust-wrap { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 30px; align-items: center; }
.mech-bust .bust { width: 300px; height: 380px; cursor: pointer; filter: drop-shadow(8px 10px 0 rgb(42 33 26 / .22)); border-radius: 12px; }
.mech-bust .bust-svg { width: 100%; height: 100%; overflow: visible; }
.mech-bust .lid, .mech-bust .scroll { transform-box: view-box; }
.mech-bust .bust-card { padding: 28px 32px; max-width: 62ch; }
.mech-bust .bust-card h4 { margin: 0 0 10px; font-size: 18px; }
.mech-bust .bust-card p { margin: 0; font-size: 15px; line-height: 1.6; }

/* ---------- Licznik bębnowy ---------- */
.mech-counter .counter-wrap { display: grid; grid-template-columns: repeat(4, minmax(150px, auto)) 60px; gap: 22px 28px; align-items: start; justify-content: start; --digit: 56px; position: relative; }
.mech-counter .counter { display: grid; gap: 10px; justify-items: center; }
.mech-counter .drums { display: flex; align-items: center; gap: 4px; padding: 8px 10px; background: #2a211a; border: 4px solid var(--brass-dark); border-radius: 8px; box-shadow: var(--shadow-hard); }
.mech-counter .drum-window { display: block; width: 38px; height: var(--digit); overflow: hidden; background: #f7f1e3; border-radius: 4px; box-shadow: inset 0 8px 10px rgb(0 0 0 / .25), inset 0 -8px 10px rgb(0 0 0 / .25); }
.mech-counter .drum { display: block; }
.mech-counter .drum i { display: grid; place-items: center; height: var(--digit); font: 700 30px/1 var(--font-mono); font-style: normal; color: var(--ink); }
.mech-counter .plate-ch { font: 700 26px/1 var(--font-mono); color: #f3e9d0; padding: 0 2px; }
.mech-counter .gap { width: 10px; }
.mech-counter .counter-unit { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); text-align: center; min-height: 1.2em; }
.mech-counter .counter-label { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--soft); text-align: center; max-width: 190px; }
.mech-counter .counter-co { font-size: 10.5px; letter-spacing: .1em; color: var(--red); text-align: center; min-height: 1.2em; }
.mech-counter .counter-set { grid-column: 1 / -1; font-size: 11px; letter-spacing: .3em; color: var(--soft); }
.mech-counter .counter-lever { position: relative; width: 40px; height: 120px; --pull: 0px; }
.mech-counter .cl-rod { position: absolute; left: 16px; top: 0; width: 8px; height: calc(70px + var(--pull)); background: linear-gradient(90deg, #4a4a4a, #c0c0c0, #4a4a4a); border-radius: 4px; }
.mech-counter .cl-knob { position: absolute; left: 2px; top: calc(60px + var(--pull)); width: 36px; height: 36px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #e26a58, var(--red) 55%, #5e1d14); box-shadow: 3px 4px 0 rgb(0 0 0 / .3); }

/* ---------- Centralka telefoniczna ---------- */
.mech-switchboard .sb-wrap { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 30px; align-items: start; }
.mech-switchboard .switchboard { position: relative; padding: 16px 16px 90px; border: 3px solid var(--wood-dark); border-radius: 8px; box-shadow: var(--shadow-hard); min-height: 380px; }
.mech-switchboard .sb-plate { text-align: center; font-size: 12px; letter-spacing: .24em; padding: 4px 8px; margin: 0 40px 16px; border-radius: 3px; box-shadow: 0 2px 0 rgb(0 0 0 / .3); }
.mech-switchboard .jacks { display: grid; gap: 14px; position: relative; z-index: 2; }
.mech-switchboard .jack { display: grid; grid-template-columns: 18px 34px 1fr; gap: 12px; align-items: center; padding: 10px 12px; border: 2px solid #4a2e14; border-radius: 4px; background: linear-gradient(180deg, #b9823f, #8f5c2a); color: #f6ecd8; text-align: left; cursor: pointer; }
.mech-switchboard .jack:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
.mech-switchboard .lamp { width: 16px; height: 16px; border-radius: 50%; background: #3a2a1a; border: 2px solid #c9a85c; box-shadow: inset 0 0 4px #000; }
.mech-switchboard .jack.is-live .lamp { background: radial-gradient(circle at 40% 35%, #fff4b0, #f0b400 60%, #a66d00); box-shadow: 0 0 14px #ffd54a; }
.mech-switchboard .hole { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; }
.mech-switchboard .hole::after { content: ""; width: 12px; height: 12px; border-radius: 50%; background: #1a1208; box-shadow: inset 0 2px 3px #000; }
.mech-switchboard .jack-label { display: grid; gap: 2px; line-height: 1.15; min-width: 0; }
.mech-switchboard .jack-label b { font-weight: 400; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mech-switchboard .jack-label small { font-size: 10.5px; opacity: .85; letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mech-switchboard .cords { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; overflow: visible; }
.mech-switchboard .cord { fill: none; stroke: #2a211a; stroke-width: 6; stroke-linecap: round; }
.mech-switchboard .plug { position: absolute; left: -9px; top: -9px; width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #e2c98a, #7a5c22); border: 2px solid #2a211a; z-index: 4; pointer-events: none; }
.mech-switchboard .socket { position: absolute; left: 36px; bottom: 26px; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; }
.mech-switchboard .socket::after { content: ""; width: 14px; height: 14px; border-radius: 50%; background: #1a1208; }
.mech-switchboard .sb-card { padding: 26px 30px; min-height: 300px; }
.mech-switchboard .card-inner h4 { margin: 0 0 4px; font-size: 18px; }
.mech-switchboard .card-inner .sub { margin: 0 0 12px; color: var(--soft); font-size: 13px; }
.mech-switchboard .card-items { list-style: none; padding: 0; margin: 0; font-size: 13.5px; line-height: 1.5; }
.mech-switchboard .card-items li { padding: 6px 0 6px 30px; position: relative; border-bottom: 1px dotted var(--rule); }
.mech-switchboard .card-items .n { position: absolute; left: 0; color: var(--red); }

@media (max-width: 900px) {
  .mech-bust .bust-wrap, .mech-switchboard .sb-wrap { grid-template-columns: 1fr; }
  .mech-counter .counter-wrap { grid-template-columns: repeat(2, auto); }
}

/* ---------- Rozwiń wszystko: lista pod mechanizmem ---------- */
.mech > .all-content { margin-top: 18px; padding: 22px 28px; font-size: 13.5px; line-height: 1.5; }
.mech > .all-content h4 { margin: 14px 0 6px; font-size: 15px; } .mech > .all-content h4:first-child { margin-top: 0; }
.mech > .all-content .all-items { margin: 0; padding-left: 22px; } .mech > .all-content .all-items li { padding: 3px 0; }
.mech > .all-content .sub, .mech > .all-content .chips { color: var(--soft); margin: 0 0 8px; }

/* ---------- Taśma dalekopisu ---------- */
.mech-ticker .ticker-wrap { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 28px; align-items: start; }
.mech-ticker .ticker-machine { position: relative; padding: 16px 16px 20px; background: linear-gradient(180deg, #4a4a4a, #262626); border: 4px solid var(--brass-dark); border-radius: 10px; box-shadow: var(--shadow-hard); color: #f3e9d0; }
.mech-ticker .ticker-plate { text-align: center; font-size: 12px; letter-spacing: .24em; padding: 4px; border-radius: 4px; margin-bottom: 14px; }
.mech-ticker .ticker-dome { position: relative; height: 90px; background: radial-gradient(ellipse at 50% 100%, #777, #333 70%); border-radius: 60px 60px 6px 6px; border: 3px solid #111; }
.mech-ticker .ticker-reel { position: absolute; top: 18px; left: 60px; width: 54px; height: 54px; border-radius: 50%; border: 6px solid #c9a85c; background: repeating-conic-gradient(#2a211a 0 20deg, #efe3c8 20deg 40deg); }
.mech-ticker .ticker-reel.r2 { left: auto; right: 60px; }
.mech-ticker .ticker-slot { height: 10px; margin: 12px 30px 0; background: #111; border-radius: 5px; box-shadow: inset 0 2px 4px #000; }
.mech-ticker .tkey { position: relative; display: block; margin: 16px auto 0; width: 120px; height: 56px; border: 0; background: transparent; cursor: pointer; }
.mech-ticker .tkey-arm { position: absolute; left: 0; right: 30px; top: 22px; height: 8px; background: linear-gradient(180deg, #e2c98a, #8a6a2c); border-radius: 4px; transform-origin: 0 50%; transform: rotate(-8deg); }
.mech-ticker .tkey.down .tkey-arm { transform: rotate(4deg); }
.mech-ticker .tkey-knob { position: absolute; right: 10px; top: 6px; width: 34px; height: 34px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #555, #111); border: 3px solid #c9a85c; }
.mech-ticker .tkey.down .tkey-knob { top: 14px; }
.mech-ticker .ticker-counter { text-align: center; font-size: 11px; letter-spacing: .3em; margin-top: 8px; opacity: .8; }
.mech-ticker .tape { padding: 18px 26px 24px; min-height: 120px; max-height: 420px; overflow: auto; border-left: 10px solid var(--paper-dark); border-right: 10px solid var(--paper-dark); box-shadow: 6px 8px 0 rgb(42 33 26 / .16); font-size: 14.5px; line-height: 1.55;
  background-image: repeating-linear-gradient(180deg, transparent 0 28px, rgb(42 33 26 / .07) 28px 29px); }
.mech-ticker .tape-seg { display: grid; grid-template-columns: 34px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--rule); }
.mech-ticker .tape-n { color: var(--red); } .mech-ticker .tape-text { white-space: pre-wrap; }

/* ---------- Tablica z haczykami ---------- */
.mech-pegboard .pegboard { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 20px; padding: 18px; border: 4px solid var(--wood-dark); border-radius: 8px; box-shadow: var(--shadow-hard);
  background-color: #d9c7a3; background-image: radial-gradient(circle at 10px 10px, rgb(42 33 26 / .22) 2px, transparent 2.5px); background-size: 22px 22px; }
.mech-pegboard .peg-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; align-items: start; margin-bottom: 10px; }
.mech-pegboard .peg-group { font-size: 10.5px; letter-spacing: .14em; padding: 5px 8px; border-radius: 3px; text-align: center; box-shadow: 0 2px 0 rgb(0 0 0 / .3); align-self: start; margin-top: 10px; }
.mech-pegboard .peg-tags { display: flex; flex-wrap: wrap; gap: 6px 8px; }
.mech-pegboard .tag { position: relative; display: inline-flex; flex-direction: column; align-items: center; padding: 0; border: 0; background: transparent; cursor: default; }
.mech-pegboard .tag.has-map { cursor: pointer; }
.mech-pegboard .hook { width: 8px; height: 10px; border: 2px solid #4a4a4a; border-top: 0; border-radius: 0 0 6px 6px; }
.mech-pegboard .tag-paper { display: inline-block; padding: 4px 9px 3px; font-size: 11.5px; background: var(--paper-light); border: 1px solid var(--rule); box-shadow: 2px 3px 0 rgb(42 33 26 / .15); white-space: nowrap; color: var(--ink); }
.mech-pegboard .tag:not(.has-map) .tag-paper { opacity: .75; }
.mech-pegboard .tag.is-on .tag-paper { background: var(--red); color: #fff; border-color: var(--red); }
.mech-pegboard .tag:focus-visible .tag-paper { outline: 3px solid var(--red); outline-offset: 2px; }
.mech-pegboard .peg-right { display: grid; gap: 8px; align-content: start; }
.mech-pegboard .company-plate { font-size: 11px; padding: 6px 10px; background: var(--paper-light); border: 1px solid var(--rule); box-shadow: 2px 3px 0 rgb(42 33 26 / .15); opacity: .55; }
.mech-pegboard .company-plate.is-on { opacity: 1; border-color: var(--red); box-shadow: 0 0 0 2px rgb(164 56 42 / .25), 2px 3px 0 rgb(42 33 26 / .15); }
.mech-pegboard .threads { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.mech-pegboard .thread { fill: none; stroke: var(--red); stroke-width: 2.5; stroke-linecap: round; }
.mech-pegboard .peg-card { margin-top: 16px; padding: 18px 24px; font-size: 13.5px; }
.mech-pegboard .peg-card .hint { color: var(--soft); font-style: italic; }
.mech-pegboard .ctx { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.mech-pegboard .ctx .co { display: inline-block; min-width: 150px; color: var(--red); }

/* ---------- Dyplomy na bloczkach i trąbka ---------- */
.mech-diplomas .dip-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 30px; align-items: start; }
.mech-diplomas .rig { position: relative; display: grid; grid-template-columns: repeat(3, 1fr) 40px; gap: 18px; padding-top: 20px; min-height: 340px; }
.mech-diplomas .beam { position: absolute; left: -10px; right: -10px; top: 0; height: 14px; background: linear-gradient(180deg, #a9733f, #5d3b1e); border-radius: 3px; box-shadow: 0 3px 0 rgb(0 0 0 / .25); }
.mech-diplomas .hanger { position: relative; --drop: 0; }
.mech-diplomas .pulley { position: absolute; left: 50%; top: -6px; width: 22px; height: 22px; margin-left: -11px; border-radius: 50%; background: radial-gradient(circle, #5a4214 30%, #c9a85c 32%); border: 2px solid #5a4214; z-index: 2; }
.mech-diplomas .rope { position: absolute; left: 50%; top: 10px; width: 3px; height: calc(20px + var(--drop) * 80px); margin-left: -1px; background: #6b5a3a; }
.mech-diplomas .frame { position: relative; margin-top: calc(26px + var(--drop) * 80px - 80px); transform: rotate(calc((var(--k) - 1) * 1.2deg)); padding: 10px; background: linear-gradient(135deg, #c9a85c, #8a6a2c); border: 3px solid #5a4214; box-shadow: var(--shadow-hard); opacity: calc(.15 + var(--drop) * .85); }
.mech-diplomas .frame-inner { background: var(--paper-light); padding: 14px 14px 16px; font-size: 12.5px; line-height: 1.45; border: 1px solid var(--rule); min-height: 120px; }
.mech-diplomas .rope-handle { position: relative; width: 40px; height: 160px; }
.mech-diplomas .rope-line { position: absolute; left: 18px; top: -10px; width: 4px; height: 110px; background: #6b5a3a; }
.mech-diplomas .rope-knob { position: absolute; left: 4px; top: 96px; width: 32px; height: 40px; border-radius: 10px 10px 16px 16px; background: linear-gradient(180deg, #a9733f, #5d3b1e); border: 2px solid #2a211a; }
.mech-diplomas .herald { position: relative; padding-top: 10px; }
.mech-diplomas .trumpet { display: block; width: 220px; height: 120px; border: 0; background: transparent; cursor: pointer; transform-origin: 10% 55%; }
.mech-diplomas .trumpet svg { width: 100%; height: 100%; overflow: visible; }
.mech-diplomas .ribbon { --unroll: 0; margin: -10px 0 0 30px; padding: 16px 20px; font-size: 13px; line-height: 1.5; border: 1px solid var(--rule); box-shadow: 4px 5px 0 rgb(42 33 26 / .16); clip-path: inset(0 calc((1 - var(--unroll)) * 100%) 0 0); position: relative; }
.mech-diplomas .ribbon::before, .mech-diplomas .ribbon::after { content: ""; position: absolute; top: 0; bottom: 0; width: 14px; background: var(--paper-dark); }
.mech-diplomas .ribbon::before { left: 0; } .mech-diplomas .ribbon::after { right: 0; }
.mech-diplomas .ribbon p { margin: 0 0 8px 12px; } .mech-diplomas .ribbon p:last-child { margin-bottom: 0; }

/* ---------- Latarnia czarnoksięska ---------- */
.mech-lantern .lantern-wrap { position: relative; display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 0; align-items: center; min-height: 320px; }
.mech-lantern .lantern { position: relative; width: 220px; height: 200px; filter: drop-shadow(6px 8px 0 rgb(42 33 26 / .22)); }
.mech-lantern .lantern svg { width: 100%; height: 100%; }
.mech-lantern .lcrank { position: absolute; left: 150px; top: 116px; width: 60px; height: 60px; }
.mech-lantern .lcrank svg { width: 100%; height: 100%; overflow: visible; }
.mech-lantern .lcrank-g { transform-origin: 30px 30px; }
.mech-lantern .beam { position: absolute; left: 200px; right: 40px; top: 50%; height: 240px; transform: translateY(-50%); background: linear-gradient(90deg, rgb(255 236 170 / .55), rgb(255 236 170 / .08)); clip-path: polygon(0 44%, 100% 0, 100% 100%, 0 56%); pointer-events: none; }
.mech-lantern .wall { position: relative; margin-left: 30px; padding: 14px; background: #efe6d2; border: 6px solid #5d3b1e; box-shadow: var(--shadow-hard); overflow: hidden; min-height: 240px; display: grid; }
.mech-lantern .slide { padding: 22px 26px; box-shadow: inset 0 0 0 1px var(--rule); }
.mech-lantern .slide-title { font-size: 18px; margin-bottom: 8px; }
.mech-lantern .slide-text { margin: 0; font-size: 14.5px; line-height: 1.55; }
.mech-lantern .slide-counter { margin-top: 12px; font-size: 11px; letter-spacing: .3em; color: var(--soft); }

/* ---------- Nożowy wyłącznik i wielka dźwignia ---------- */
.mech-knife .knife { width: 160px; height: 110px; border: 0; background: transparent; cursor: pointer; filter: drop-shadow(4px 5px 0 rgb(42 33 26 / .2)); }
.mech-knife .knife svg { width: 100%; height: 100%; overflow: visible; }
.mech-knife .knife:focus-visible { outline: 3px solid var(--red); outline-offset: 4px; border-radius: 8px; }
.mech-biglever .biglever { position: relative; width: 150px; height: 150px; border: 0; background: transparent; cursor: pointer; --pull: 0; }
.mech-biglever .bl-plate { position: absolute; left: 0; right: 0; top: 0; font-size: 10px; letter-spacing: .16em; padding: 5px 4px; border-radius: 3px; text-align: center; box-shadow: 0 2px 0 rgb(0 0 0 / .3); }
.mech-biglever .bl-arm { position: absolute; left: 50%; top: 40px; width: 10px; height: 70px; margin-left: -5px; background: linear-gradient(90deg, #4a4a4a, #c0c0c0, #4a4a4a); border-radius: 5px; transform-origin: 50% 100%; transform: rotate(calc(-50deg + var(--pull) * 100deg)); }
.mech-biglever .bl-knob { position: absolute; left: 50%; top: 24px; width: 40px; height: 40px; margin-left: -20px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #e26a58, var(--red) 55%, #5e1d14); box-shadow: 3px 4px 0 rgb(0 0 0 / .3); transform-origin: 50% 86px; transform: rotate(calc(-50deg + var(--pull) * 100deg)); }
.mech-biglever .biglever:focus-visible { outline: 3px solid var(--red); outline-offset: 4px; border-radius: 8px; }

@media (max-width: 900px) {
  .mech-ticker .ticker-wrap, .mech-diplomas .dip-wrap, .mech-lantern .lantern-wrap { grid-template-columns: 1fr; }
  .mech-pegboard .pegboard { grid-template-columns: 1fr; } .mech-pegboard .peg-row { grid-template-columns: 1fr; }
  .mech-lantern .beam { display: none; } .mech-lantern .wall { margin: 16px 0 0; }
}

.mech-cabinet > .all-content .all-pos { padding: 14px 0 18px; border-bottom: 1px solid var(--rule); }
.mech-cabinet > .all-content .all-pos:last-child { border-bottom: 0; }

/* ---------- katalog umiejętności (mech-catalogue): rolodeks + katalog z zakładkami; geometria okna w zmiennych --cat-* ---------- */
.mech-catalogue { --cat-ar: 1536 / 1024; --cat-win-x: 9.90%; --cat-win-y: 15.15%; --cat-win-w: 77.40%; --cat-win-h: 67.10%; --cat-tabs-x: 91.60%;
  --rolo-card-x: 32.0%; --rolo-card-y: 10.0%; --rolo-card-w: 36.0%; --rolo-card-h: 17.0%; --rolo-crank-cx: 0.86; --rolo-crank-cy: 0.47; }
.mech-catalogue .cat-wrap { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 22px; align-items: start; }
.mech-catalogue .rolodex { position: relative; aspect-ratio: 1; }
.mech-catalogue .rolo-drum { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 50% 47%, #efe3c8 0 56%, #c9a85c 56% 61%, transparent 61%); }
.mech-catalogue .rolo-card { position: absolute; left: var(--rolo-card-x); top: var(--rolo-card-y); width: var(--rolo-card-w); height: var(--rolo-card-h); display: grid; place-items: center; background: var(--paper-light) var(--grain); border: 1px solid var(--ink-faint); }
.mech-catalogue .rolo-card .vig { width: 82%; height: 82%; }
.mech-catalogue .rolo-crank { position: absolute; left: calc(var(--rolo-crank-cx) * 100% - 30px); top: calc(var(--rolo-crank-cy) * 100% - 30px); width: 60px; height: 60px; border: 0; padding: 0; background: transparent; cursor: pointer; }
.mech-catalogue .rolo-crank svg { width: 100%; height: 100%; overflow: visible; } .mech-catalogue .crank-g { transform-origin: 30px 30px; }
.mech-catalogue .rolo-crank:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 50%; }
.mech-catalogue .catalogue { position: relative; aspect-ratio: var(--cat-ar); perspective: 1600px; }
.mech-catalogue .page { position: absolute; left: var(--cat-win-x); top: var(--cat-win-y); width: var(--cat-win-w); height: var(--cat-win-h); background: var(--paper-light) var(--grain); perspective: 1400px; }
.mech-catalogue .card, .mech-catalogue .leaf { position: absolute; inset: 0; padding: 3.5% 4.5%; box-sizing: border-box; overflow: hidden; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 6px; }
.mech-catalogue .leaf { display: none; transform-origin: left center; backface-visibility: hidden; background: var(--paper-light) var(--grain); box-shadow: -8px 0 14px rgb(0 0 0 / .22); z-index: 3; }
.mech-catalogue .card-head { display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--ink-faint); padding-bottom: 6px; }
.mech-catalogue .card-head h4 { margin: 0; font-size: 16px; letter-spacing: .1em; flex: 1; }
.mech-catalogue .card-no { font-size: 11px; letter-spacing: .2em; color: var(--ink-soft); }
.mech-catalogue .vig { display: inline-block; width: 44px; height: 44px; flex: none; background: center / contain no-repeat; }
.mech-catalogue .items { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 5%; row-gap: 1px; align-content: start; }
.mech-catalogue .items.cols-1 { grid-template-columns: minmax(0, 1fr); }
.mech-catalogue .item-btn { width: 100%; display: flex; align-items: center; gap: 6px; background: none; border: 0; padding: 3px 0; text-align: left; font: 12px/1.25 var(--font-type); color: var(--ink); cursor: default; }
.mech-catalogue .item.has-map .item-btn { cursor: pointer; }
.mech-catalogue .item.has-map .item-btn:hover .name { background: rgb(42 33 26 / .07); }
.mech-catalogue .name { flex: 0 1 auto; min-width: 0; }
.mech-catalogue .dots { flex: 1 1 10px; min-width: 10px; border-bottom: 1px dotted var(--ink-soft); height: .7em; opacity: .6; }
.mech-catalogue .stamps { flex: none; display: flex; gap: 3px; }
.mech-catalogue .stamp { display: inline-grid; place-items: center; min-width: 30px; height: 15px; padding: 0 5px; font: 700 7px/1 var(--font-type); letter-spacing: .06em; color: var(--red); border: 1.5px solid var(--red); border-radius: 3px; transform: rotate(var(--rot, -4deg)); opacity: .88; }
.mech-catalogue .stamp.v1 { --rot: 3deg; border-radius: 50% / 60%; } .mech-catalogue .stamp.v2 { --rot: -2deg; }
.mech-catalogue .item.dim { opacity: .3; } .mech-catalogue .item.lit .name { background: rgb(179 38 30 / .14); }
.mech-catalogue .item.is-stamped .stamp { animation: stamp-hit .45s ease-out; }
@keyframes stamp-hit { 0% { transform: scale(1.9) rotate(var(--rot, -4deg)); opacity: .2; } 60% { transform: scale(.95) rotate(var(--rot, -4deg)); opacity: 1; } 100% { transform: scale(1) rotate(var(--rot, -4deg)); opacity: .88; } }
.mech-catalogue .legend { font-size: 9.5px; letter-spacing: .04em; color: var(--ink-soft); border-top: 1px solid var(--ink-faint); padding-top: 5px; }
.mech-catalogue .legend b { color: var(--red); }
.mech-catalogue .tabs { position: absolute; left: var(--cat-tabs-x); top: var(--cat-win-y); height: var(--cat-win-h); display: flex; flex-direction: column; justify-content: space-between; z-index: 2; }
.mech-catalogue .tab { position: relative; width: 92px; height: 12%; padding: 0 0 0 12px; text-align: left; background: var(--paper-light) var(--grain); border: 1px solid var(--ink-faint); border-left: 0; border-radius: 0 8px 8px 0; box-shadow: 2px 2px 0 rgb(42 33 26 / .18); font: 10px var(--font-type); letter-spacing: .08em; text-transform: uppercase; color: var(--ink); cursor: pointer; transition: transform .25s ease; }
.mech-catalogue .tab span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mech-catalogue .tab.is-active { transform: translateX(10px); font-weight: 700; color: var(--red); }
.mech-catalogue .tab:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.mech-catalogue .ctx-note { position: absolute; right: 8%; bottom: 9%; width: 48%; max-height: 60%; overflow: auto; padding: 12px 14px; z-index: 4; border: 1px solid var(--ink); box-shadow: 6px 7px 0 rgb(42 33 26 / .22); font-size: 11.5px; line-height: 1.45; }
.mech-catalogue .ctx-note > b { display: block; margin-bottom: 6px; font-size: 12px; padding-right: 18px; }
.mech-catalogue .ctx { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; } .mech-catalogue .ctx .co { color: var(--red); font-weight: 700; }
.mech-catalogue .ctx-close { position: absolute; right: 6px; top: 4px; border: 0; background: none; font: 16px/1 var(--font-type); cursor: pointer; color: var(--ink-soft); }
.mech-catalogue .cover { position: absolute; inset: 0; transform-origin: left center; background: #2f4a3a; border: 2px solid #1d2e24; z-index: 5; }
.mech-catalogue .all-card { padding: 12px 0 16px; border-bottom: 1px solid var(--rule); }
@media (max-width: 900px) { .mech-catalogue .cat-wrap { grid-template-columns: 1fr; } .mech-catalogue .rolodex { display: none; } .mech-catalogue .items { grid-template-columns: 1fr !important; } }

.mech-catalogue .items { min-height: 0; overflow: hidden; }   /* lista nigdy nie wchodzi na legendę; przy za krótkiej karcie ucina się, nie nakłada */
.mech-catalogue .legend { min-height: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* karteczka kontekstu w obrębie okna karty (prawy dolny róg), legenda może się łamać na 2 linie */
.mech-catalogue .ctx-note { right: calc(100% - var(--cat-win-x) - var(--cat-win-w) + 1.5%); bottom: calc(100% - var(--cat-win-y) - var(--cat-win-h) + 2%); width: calc(var(--cat-win-w) * .52); max-height: calc(var(--cat-win-h) * .7); }
.mech-catalogue .legend { white-space: normal; max-height: 2.7em; line-height: 1.3; }

/* gęste karty: mniejszy druk i stemple */
.mech-catalogue .items.dense .item-btn { font-size: 11px; line-height: 1.2; padding: 2px 0; }
.mech-catalogue .items.dense .stamp { min-width: 26px; height: 13px; font-size: 6.4px; padding: 0 4px; }
html.has-stamp0 .mech-catalogue .items.dense .stamp.v0, html.has-stamp1 .mech-catalogue .items.dense .stamp.v1, html.has-stamp2 .mech-catalogue .items.dense .stamp.v2 { min-width: 30px; height: 14px; padding: 0 5px; }

.mech-catalogue .legend { max-height: none; white-space: normal; overflow: visible; text-overflow: clip; font-size: 9px; }   /* legenda w całości (karty mają zapas), lista oddaje jej miejsce */

/* ---------- duży rolodeks (rolodex2): maszyna 3/4 przed lewą krawędzią katalogu; karty bębna pod ryciną (okna przezroczyste) ---------- */
.mech-catalogue .rolo-faces { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.mech-catalogue .rolo-face { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.mech-catalogue .face-in { position: absolute; inset: 0; display: grid; place-items: center; background: var(--paper-light) var(--grain); transform-origin: 50% 0; box-shadow: inset 0 0 0 2px rgb(42 33 26 / .12); }
.mech-catalogue .face-in .vig { width: 74%; height: 74%; }
html.has-rolodex2 .mech-catalogue .cat-wrap { grid-template-columns: 34% minmax(0, 1fr); gap: 0; align-items: center; }
html.has-rolodex2 .mech-catalogue .rolodex { aspect-ratio: var(--rolo-ar, 4 / 5); margin-right: -7%; z-index: 6; }
html.has-rolodex2 .mech-catalogue .rolo-drum { z-index: 1; background: var(--eng-rolodex2) center / 100% 100% no-repeat; border-radius: 0; filter: drop-shadow(9px 11px 0 rgb(42 33 26 / .22)); }
html.has-rolodex2 .mech-catalogue .rolo-card { display: none; }
html.has-rolodex2 .mech-catalogue .rolo-crank { z-index: 2; left: var(--hub-x, 88%); top: var(--hub-y, 50%); width: 26%; height: auto; aspect-ratio: 160 / 148; transform: translate(-50%, -50%) rotate(var(--angle, 0deg)); }

/* ---------- korba 3D rolodeksu: części (ramię + rączka) albo klatki, nad bębnem; przycisk = przezroczyste pole chwytu ---------- */
.mech-catalogue .crank-parts { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.mech-catalogue .crank-arm, .mech-catalogue .crank-boss, .mech-catalogue .crank-grip, .mech-catalogue .crank-frame { position: absolute; left: 0; top: 0; display: none; background: center / 100% 100% no-repeat; filter: drop-shadow(3px 4px 0 rgb(42 33 26 / .25)); }
.mech-catalogue .crank-boss { background-image: url("../assets/images/crank_boss.png"); }
.mech-catalogue[data-crank="puppet"] .rolo-crank, .mech-catalogue[data-crank="frames"] .rolo-crank { z-index: 4; cursor: grab; border-radius: 40%; }
.mech-catalogue[data-crank="puppet"] .rolo-crank:active, .mech-catalogue[data-crank="frames"] .rolo-crank:active { cursor: grabbing; }

/* gęste karty po zwężeniu katalogu (maszyna z korbą): ciaśniejszy druk, węższy odstęp kolumn, mniejsza legenda */
.mech-catalogue .card:has(.items.dense), .mech-catalogue .leaf:has(.items.dense) { padding-top: 2.4%; padding-bottom: 2.4%; gap: 4px; }
.mech-catalogue .items.dense { column-gap: 3%; }
.mech-catalogue .items.dense .item-btn { font-size: 10.5px; line-height: 1.12; padding: 1px 0; }
.mech-catalogue .card:has(.items.dense) .legend { font-size: 8.5px; padding-top: 3px; }
.mech-catalogue .card:has(.items.dense) .card-head { padding-bottom: 3px; }
.mech-catalogue .card:has(.items.dense) .card-head .vig { width: 34px; height: 34px; }
.mech-catalogue .items.tight .item-btn { font-size: 9.8px; line-height: 1.06; padding: 0; }
.mech-catalogue .items.tight .stamp { height: 12px; min-width: 24px; }

/* ---------- stemple = odciski logo firm: maska tuszu (assets/images/stamps/<id>.png) wypełniona tuszem firmy, mnożona z papierem ----------
   (.items .stamp.logo: specyficzność jak .items.dense .stamp ze stempli napisowych, a reguła jest później — rozmiar logo wygrywa) */
.mech-catalogue .stamps { align-items: center; gap: 2px; padding-right: 2px; }   /* obrócony odcisk nie wystaje za linię tekstu */
.mech-catalogue .items .stamp.logo, .mech-catalogue .stamp.logo { --sh: 17px; height: calc(var(--sh) * var(--sc, 1)); width: calc(var(--sh) * var(--sc, 1) * var(--ar, 1)); min-width: 0; padding: 0; border: 0; border-radius: 0; background: var(--ink, var(--red)); -webkit-mask: var(--logo) center / 100% 100% no-repeat; mask: var(--logo) center / 100% 100% no-repeat; mix-blend-mode: multiply; opacity: .9; transform: translateY(var(--dy, 0)) rotate(var(--rot, -3deg)); cursor: pointer; }
.mech-catalogue .stamp.logo + .stamp.logo { margin-left: calc(var(--sh) * -.08); }
.mech-catalogue .stamp.logo { margin-block: calc(var(--sh) * min(0, 1 - var(--sc, 1)) / 2); }   /* większy odcisk (sc > 1) nie rozpycha wiersza */
.mech-catalogue .items.snug .item-btn { font-size: 11.4px; line-height: 1.18; padding: 2px 0; }   /* zbity druk: między zwykłym a gęstym */
.mech-catalogue .items.snug .stamp.logo { --sh: 16px; }
.mech-catalogue .items.dense .stamp.logo { --sh: 15px; }
.mech-catalogue .items.tight .stamp.logo { --sh: 13.5px; }
.mech-catalogue .stamp.logo:hover { opacity: 1; }
.mech-catalogue .card:not(:has(.legend)), .mech-catalogue .leaf:not(:has(.legend)) { grid-template-rows: auto minmax(0, 1fr); }
/* tusze: barwy firm przygaszone do tuszu pieczątkowego */
.mech-catalogue .stamp[data-stamp="citi"] { --ink: #2350b0; }
.mech-catalogue .stamp[data-stamp="blablacar"] { --ink: #0f6a7d; }
.mech-catalogue .stamp[data-stamp="flixbus"] { --ink: #5a9614; }
.mech-catalogue .stamp[data-stamp="roihunter"] { --ink: #2c2c72; }
.mech-catalogue .stamp[data-stamp="cachet"] { --ink: #1f2d4f; }
.mech-catalogue .stamp[data-stamp="superprezenty"] { --ink: #c2185b; }
.mech-catalogue .stamp[data-stamp="everli"] { --ink: #2f7d39; }
.mech-catalogue .stamp[data-stamp="thinkkong"] { --ink: #b07800; }
.mech-catalogue .stamp[data-stamp="faceaddicted"] { --ink: #6a2c91; }
.mech-catalogue .stamp[data-stamp="fasttony"] { --ink: #1e78c8; }
.mech-catalogue .stamp[data-stamp="sotrender"] { --ink: #d4581c; }
