/* 99 Club Studio · v1.37 batch: Codebreaker, Function Machines, Arithmagons, Number Towers */

/* Codebreaker: make the operation→digit key a first-class part of the puzzle. */
.tt99-v136-code-choice{gap:6px!important;padding:4px 8px!important;font-size:clamp(6px,.68vw,9px)!important}
.tt99-v136-code-choice>span{font-size:1.15em;font-weight:950;color:#234a4f}
.tt99-v136-code-choice>b{min-width:19px;height:19px;font-size:1.05em}
.tt99-v136-final-code{padding:8px 12px!important;gap:10px!important}
.tt99-v136-codebox{width:30px!important;height:30px!important;font-size:clamp(9px,1vw,14px)!important}
.tt99-v136-lock>i{font-size:clamp(5px,.58vw,8px);font-weight:950}
.tt99-game-activities.count-3 .tt99-v136-code-choice{padding:2px 4px!important;font-size:5px!important}
.tt99-game-activities.count-3 .tt99-v136-codebox{width:19px!important;height:19px!important}

/* Function Machines: one connected casing rather than a row of unrelated cards. */
.tt99-v136-machine,.tt99-v136-reverse{display:none!important}
.tt99-v137-machine{display:flex;align-items:stretch;justify-content:center;margin:7px auto 8px;max-width:94%;min-height:64px}
.tt99-v137-machine-port{position:relative;display:flex;flex-direction:column;justify-content:center;align-items:center;min-width:76px;padding:6px 9px;border:1.5px solid #648f8a;background:#f2f9f7;color:#31575c;z-index:2}
.tt99-v137-machine-port.input{border-radius:18px 5px 5px 18px}.tt99-v137-machine-port.output{border-radius:5px 18px 18px 5px}
.tt99-v137-machine-port small,.tt99-v137-machine-stage small{font-size:clamp(3.8px,.42vw,5.4px);font-weight:900;text-transform:uppercase;letter-spacing:.06em;color:#6b8387}
.tt99-v137-machine-port b{margin-top:2px;font-size:clamp(7px,.78vw,10px);text-transform:uppercase}
.tt99-v137-machine-body{position:relative;display:flex;align-items:stretch;border-top:2px solid #4e8d86;border-bottom:2px solid #4e8d86;background:linear-gradient(180deg,#f9fdfc,#e9f6f3);box-shadow:inset 0 -5px 0 rgba(55,124,116,.06)}
.tt99-v137-machine-body:before{content:"";position:absolute;left:10px;right:10px;top:50%;height:3px;margin-top:-1.5px;background:#a8cfca;z-index:0}
.tt99-v137-machine-stage{position:relative;z-index:1;display:flex;flex-direction:column;justify-content:center;align-items:center;min-width:82px;padding:6px 13px;border-left:1px solid #a6c9c5;border-right:1px solid #a6c9c5;background:rgba(255,255,255,.72)}
.tt99-v137-machine-stage b{display:grid;place-items:center;min-width:48px;height:32px;margin-top:3px;border:1.5px solid #4e8d86;border-radius:16px;background:#fff;color:#116e66;font-size:clamp(11px,1.25vw,18px);line-height:1}
.tt99-v137-machine-flow{position:absolute;right:-9px;top:50%;z-index:4;width:18px;height:18px;margin-top:-9px;border-radius:50%;background:#4e8d86;color:#fff;font:900 12px/18px system-ui;text-align:center}
.tt99-v137-machine-note{margin:-2px auto 6px;text-align:center;color:#71858a;font-size:clamp(4px,.47vw,6.4px)}
.tt99-game-activities.count-2 .tt99-v137-machine{min-height:48px}.tt99-game-activities.count-2 .tt99-v137-machine-stage{min-width:62px;padding:4px 8px}.tt99-game-activities.count-2 .tt99-v137-machine-port{min-width:58px;padding:4px 6px}
.tt99-game-activities.count-3 .tt99-v137-machine{min-height:32px;margin:2px auto 3px}.tt99-game-activities.count-3 .tt99-v137-machine-stage{min-width:42px;padding:2px 4px}.tt99-game-activities.count-3 .tt99-v137-machine-stage b{min-width:30px;height:20px;font-size:8px}.tt99-game-activities.count-3 .tt99-v137-machine-port{min-width:38px;padding:2px 3px;border-radius:6px}.tt99-game-activities.count-3 .tt99-v137-machine-note{display:none}.tt99-game-activities.count-3 .tt99-v137-machine-flow{width:12px;height:12px;right:-6px;margin-top:-6px;font-size:8px;line-height:12px}

/* Number Towers / Skyscrapers */
.tt99-numbertowers-grid{--tower-n:4;display:grid;grid-template-columns:28px repeat(var(--tower-n),1fr) 28px;grid-template-rows:28px repeat(var(--tower-n),1fr) 28px;width:min(100%,390px);aspect-ratio:1;margin:7px auto;align-items:stretch;justify-items:stretch}
.tt99-numbertowers-grid .tower-cell{display:grid;place-items:center;border-right:.9px solid #80979b;border-bottom:.9px solid #80979b;background:#fff;color:#294b51;font-size:clamp(10px,1.15vw,17px);font-weight:900}
.tt99-numbertowers-grid .tower-cell.first-col{border-left:1.5px solid #506c71}.tt99-numbertowers-grid .tower-cell.first-row{border-top:1.5px solid #506c71}.tt99-numbertowers-grid .tower-cell.last-col{border-right:1.5px solid #506c71}.tt99-numbertowers-grid .tower-cell.last-row{border-bottom:1.5px solid #506c71}
.tt99-numbertowers-grid .tower-clue{display:grid;place-items:center;color:#176f67;font-size:clamp(8px,.9vw,13px);font-weight:950}
.tt99-numbertowers-grid .tower-corner{display:block}
.tt99-numbertowers-key{margin:2px auto 0;text-align:center;color:#687d82;font-size:clamp(4.5px,.52vw,7px)}
.tt99-game-activities.count-2 .tt99-numbertowers-grid{width:min(100%,270px)}.tt99-game-activities.count-3 .tt99-numbertowers-grid{width:min(100%,185px);margin-top:2px;grid-template-columns:18px repeat(var(--tower-n),1fr) 18px;grid-template-rows:18px repeat(var(--tower-n),1fr) 18px}
.tt99-game-activities.count-3 .tt99-numbertowers-grid .tower-clue{font-size:6px}

/* Injected library card follows the existing category visual language. */
.tt99-v137-tower-card-note{font-size:.58rem;color:#74888d;line-height:1.25;margin:4px 0 0}

/* Small polish to the two still-under-review algebra puzzles. */
.tt99-v136-symbol-clue,.tt99-v136-repair-row{box-shadow:0 1px 0 rgba(40,85,82,.025)}
.tt99-v136-mystery{border-width:1.5px!important}

@media print{.tt99-numbertowers-grid .tower-cell{background:#fff!important}.tt99-v137-machine-body,.tt99-v137-machine-stage,.tt99-v137-machine-port{background:#fff!important}}
