/* CHAIN REACTION 2: controls group (KEYPAD, SWITCHES, DIAL, CODE LOCK, PIANO) */

/* ---------- shared: the milled faceplate, the big action button ---------- */
.c2x-face { position: absolute; inset: 0; border-radius: 10px; }
.c2x-go { position: absolute; left: calc(50% - 75px); width: 150px; height: 54px; font: 900 22px var(--sans); letter-spacing: 4px; }
.c2x-big { font-size: 28px; }
.c2-keytable td.c2x-k { width: 70px; font-size: 20px; white-space: nowrap; }
table.c2d-table, table.c2l-table, table.c2p-table { width: auto; min-width: 360px; }
.c2d-table td { padding-left: 22px; padding-right: 22px; }
.c2l-table td, .c2p-table td { padding-left: 22px; padding-right: 22px; }

/* ---------- KEYPAD ---------- */
.c2k-well { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 18px 26px 26px; }
.c2k-grid { display: grid; grid-template-columns: 112px 112px; gap: 18px 30px; }
.c2k-cell { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.c2k-led { width: 14px; height: 14px; }
.c2k-key { width: 112px; height: 112px; border-radius: 12px; }
.c2k-icon { width: 64px; height: 64px; fill: currentColor; filter: drop-shadow(0 1px 0 rgba(255,255,255,.75)) drop-shadow(0 -1px 0 rgba(0,0,0,.35)); pointer-events: none; }
.c2k-key.done .c2k-icon { filter: drop-shadow(0 1px 0 rgba(255,255,255,.5)); }
.c2k-table td { font-size: 14px; padding: 6px 3px; line-height: 1.15; }
.c2k-micon { display: block; width: 28px; height: 28px; margin: 0 auto 3px; fill: currentColor; }
.c2k-table td span { display: block; font-size: 12px; font-weight: 700; letter-spacing: .5px; }

/* ---------- SWITCHES ---------- */
.c2sw-well { position: absolute; left: 50%; top: 74px; transform: translateX(-50%); display: flex; align-items: stretch; gap: 8px; padding: 16px 16px 10px 12px; }
.c2sw-legend { display: flex; flex-direction: column; justify-content: space-between; padding: 6px 0 40px; font: 800 12px var(--mono); letter-spacing: 1px; color: #c9ced4; text-align: left; white-space: nowrap; width: 52px; }
.c2sw-row { display: flex; gap: 6px; }
.c2sw-col { display: flex; flex-direction: column; align-items: center; width: 56px; }
.c2sw-num { margin-top: 4px; width: 30px; height: 26px; border-radius: 4px; display: grid; place-items: center; font: 900 18px var(--mono); color: #24272b;
  background: var(--grain), linear-gradient(180deg, #e3e6ea, #a3aab2); box-shadow: inset 0 -1px 0 rgba(0,0,0,.3), 0 1px 2px rgba(0,0,0,.6); }
.c2sw-set { top: 300px; }
.c2sw-table td.c2sw-up { color: #fff; } .c2sw-table td.c2sw-dn { color: #aab2bb; }
body.print .c2sw-table td.c2sw-up, body.print .c2sw-table td.c2sw-dn { color: #111; }

/* ---------- DIAL ---------- */
.c2d-label { position: absolute; left: 18px; top: 18px; display: flex; align-items: center; gap: 5px; font-size: 11px; padding: 2px 8px; }
.c2d-sw { width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 1px 1px rgba(0,0,0,.5); }
.c2d-plate { position: absolute; left: 50px; top: 14px; width: 300px; height: 300px; }
.c2d-plate::before { content: ''; position: absolute; inset: 26px; border-radius: 50%; background: radial-gradient(circle, #2b2f34 0 60%, #23272b 100%);
  box-shadow: inset 0 3px 10px rgba(0,0,0,.8), 0 1px 0 rgba(255,255,255,.12); }
.c2d-ring { position: absolute; left: 62px; top: 62px; width: 176px; height: 176px; border-radius: 50%; box-sizing: border-box; border: 12px solid var(--ring);
  box-shadow: inset 0 2px 4px rgba(0,0,0,.6), 0 0 0 2px #15171a, 0 1px 0 3px rgba(255,255,255,.08); }
.c2d-knob { position: absolute; left: 84px; top: 84px; cursor: default; pointer-events: none; }
.c2d-num { position: absolute; width: 50px; height: 50px; border: none; border-radius: 50%; cursor: pointer; padding: 0;
  font: 900 24px var(--mono); color: #1c1f23;
  background: repeating-radial-gradient(circle at 50% 50%, rgba(255,255,255,.07) 0 1px, transparent 1px 3px), linear-gradient(180deg, #eceef0, #c3c8cd 60%, #a9aeb4);
  box-shadow: 0 3px 0 #0b0b0b, 0 5px 8px rgba(0,0,0,.55), inset 0 1.5px 0 rgba(255,255,255,.4);
  transition: transform 60ms, box-shadow 60ms; }
.c2d-num:active { transform: translateY(3px); box-shadow: 0 0 0 #0b0b0b, 0 1px 3px rgba(0,0,0,.6), inset 0 2px 3px rgba(0,0,0,.3); }
.c2d-num.on { box-shadow: 0 3px 0 #0b0b0b, 0 5px 8px rgba(0,0,0,.55), inset 0 0 0 3px var(--k-amber); }
.c2d-set { top: 328px; }
.c2d-table td { font-size: 18px; }

/* ---------- CODE LOCK ---------- */
.c2l-well { position: absolute; left: 50%; top: 62px; transform: translateX(-50%); padding: 22px 26px; }
.c2l-row { display: flex; gap: 22px; }
.c2l-wheel { width: 80px; height: 140px; font-size: 60px; cursor: default; }
.c2l-wheel::before, .c2l-wheel::after { font-size: 16px; color: #4a5056; }
.c2l-wheel::before { top: 20px; } .c2l-wheel::after { bottom: 20px; }
.c2l-wheel span { transition: transform 60ms; }
.c2l-wheel.up span { transform: translateY(-8px); }
.c2l-wheel.dn span { transform: translateY(8px); }
.c2l-up, .c2l-dn { position: absolute; left: 0; right: 0; height: 50%; border: none; padding: 0; background: transparent; cursor: pointer; z-index: 1; }
.c2l-up { top: 0; } .c2l-dn { bottom: 0; }
.c2l-up:active { background: linear-gradient(180deg, rgba(0,0,0,.16), transparent); }
.c2l-dn:active { background: linear-gradient(0deg, rgba(0,0,0,.16), transparent); }
.c2l-open { top: 296px; }
.c2l-code { font: 900 26px var(--mono); letter-spacing: 2px; white-space: nowrap; }

/* ---------- PIANO ---------- */
.c2p-leds { position: absolute; left: 50%; top: 46px; transform: translateX(-50%); display: flex; gap: 26px; padding: 10px 20px; border-radius: 8px; background: #1b1e22;
  box-shadow: inset 0 2px 6px rgba(0,0,0,.85), 0 1px 0 rgba(255,255,255,.12); }
.c2p-well { position: absolute; left: 50%; top: 104px; transform: translateX(-50%); padding: 12px 12px 16px; }
.c2p-keys { --c2p-w: 48px; position: relative; display: flex; width: calc(7 * var(--c2p-w)); height: 232px; }
.c2p-key { position: relative; width: calc(var(--c2p-w) - 2px); margin: 0 1px; height: 224px; border: none; border-radius: 0 0 7px 7px; padding: 0; cursor: pointer;
  background: linear-gradient(90deg, rgba(0,0,0,.06), transparent 18%, transparent 82%, rgba(0,0,0,.08)), linear-gradient(180deg, #d9d6cc 0, #fbfaf5 10%, #f4f2ea 85%, #e2dfd4 100%);
  box-shadow: 0 6px 0 #8f8b80, 0 8px 8px rgba(0,0,0,.5), inset 0 -2px 0 rgba(255,255,255,.8);
  transition: transform 60ms, box-shadow 60ms; }
.c2p-key:active, .c2p-key.down { transform: translateY(5px); box-shadow: 0 1px 0 #8f8b80, 0 2px 3px rgba(0,0,0,.5), inset 0 3px 5px rgba(0,0,0,.15); }
.c2p-key span { position: absolute; left: 0; right: 0; bottom: 12px; text-align: center; font: 900 26px var(--mono); color: #2a2d31; }
.c2p-black { position: absolute; top: 0; width: 28px; height: 128px; border-radius: 0 0 5px 5px; z-index: 2; pointer-events: none;
  background: linear-gradient(180deg, #0f1012, #2b2e33 80%, #3c4046 92%, #1a1c1f);
  box-shadow: 0 4px 6px rgba(0,0,0,.6), inset 0 -6px 0 rgba(255,255,255,.06), inset 1px 0 0 rgba(255,255,255,.08); }
.c2p-tune { font: 900 26px var(--mono); white-space: pre; letter-spacing: 2px; }
