/* Escodebars â€” Don Pablo & The Syndicate (real artwork: /assets/syndicate-poker.png 1024x572) */
/* 4 Nov (Jamie): the poker-room group picture is retired as a page background; Code mode shows Don Pablo's animated stage. */
/* Fibre-optic lines go off while the squad is selected (Daniel keeps them). */
body.escodebars-squad #anyki-connected-fibre-canvas { display: none !important; }
.cloud-workbench.escodebars-syndicate { background: radial-gradient(circle at 50% 10%, #2a1a10, #0b0908 75%); color: #e0d5c1; }

/* Stage */
.syndicate-scene { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 0 0 12px; }
.esco-stage {
  position: relative; width: min(900px, 100%); aspect-ratio: 1024 / 572; overflow: hidden; border-radius: 12px;
  background: #120d0a; border: 1px solid rgba(255,215,0,.15); box-shadow: 0 20px 60px rgba(0,0,0,.95); cursor: pointer;
}
.esco-stage .syndicate-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(.85) contrast(1.05); transition: filter .5s ease; user-select: none; }
.esco-stage.look-mode .syndicate-bg { filter: brightness(1) contrast(1.08); }
.esco-stage .boss-sprite {
  position: absolute; inset: 0; width: 100%; height: 100%; background-image: url('/assets/syndicate-poker.png'); background-size: 100% 100%;
  transition: transform .55s cubic-bezier(.22,1,.36,1), filter .4s ease; will-change: transform, filter; pointer-events: none;
}
/* Code & poker: every boss leans in to his laptop/cards (per-boss lean set in --lean). Don Pablo dims a touch so the screens pop. */
.esco-stage.code-mode .boss-sprite { transform: var(--lean); }
.esco-stage.code-mode .boss-sprite[data-boss="pablo"] { filter: brightness(.92); }
/* Look at you / speaking: snap forward, square to the camera. */
.esco-stage.look-mode .boss-sprite { transform: perspective(900px) rotateY(0deg) rotateX(0deg) scale(1.03); filter: brightness(1.08) drop-shadow(0 12px 24px rgba(0,0,0,.85)); }
.esco-stage.look-mode .boss-sprite[data-boss="pablo"], .esco-stage .boss-sprite.facing { transform: perspective(900px) scale(1.06) translateY(-4px) !important; filter: brightness(1.12) drop-shadow(0 18px 35px rgba(0,0,0,.95)) !important; animation: none !important; }
.esco-stage .boss-sprite.speaking { filter: brightness(1.22) drop-shadow(0 0 18px rgba(255,200,90,.55)) !important; animation: talkBounce .35s ease-in-out infinite alternate !important; }
@keyframes talkBounce { 0% { transform: scale(1.03) translateY(0); } 100% { transform: scale(1.05) translateY(-6px); } }
@keyframes breatheLeft  { 0%,100% { transform: var(--lean) translateY(0); }   50% { transform: var(--lean) translateY(-3px) rotateZ(.4deg); } }
@keyframes breatheRight { 0%,100% { transform: var(--lean) translateY(0); }   50% { transform: var(--lean) translateY(-3px) rotateZ(-.4deg); } }
@keyframes breatheBack  { 0%,100% { transform: var(--lean) translateY(0); }   50% { transform: var(--lean) translateY(-2px); } }
@keyframes breathePablo { 0%,100% { transform: var(--lean) translateY(0); }   50% { transform: var(--lean) translateY(-4px) scale(1.005); } }
.esco-stage.look-mode .boss-sprite { animation: none !important; }
.esco-stage .syndicate-fx { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 6; pointer-events: none; }
/* Lane labels under each boss (name Â· pool Â· worker) */
.syndicate-tags { position: absolute; inset: 0; z-index: 7; pointer-events: none; font-family: 'Courier New', Courier, monospace; font-size: 11px; text-shadow: 0 1px 4px #000, 0 0 8px #000; }
.boss-tag { position: absolute; color: #e0d5c1; white-space: nowrap; background: rgba(0,0,0,.45); padding: 1px 6px; border-radius: 4px; }
.boss-tag[data-for="capone"]  { left: 4%;  bottom: 3%; }
.boss-tag[data-for="luciano"] { left: 26%; top: 9%; }
.boss-tag[data-for="gotti"]   { left: 58%; top: 8%; }
.boss-tag[data-for="lansky"]  { right: 2%; bottom: 3%; }
.boss-tag[data-for="pablo"]   { left: 50%; bottom: 1.5%; transform: translateX(-50%); color: #ffd700; }
.boss-tag.working { color: #ffd700; } .boss-tag.done { color: #7CFC9A; } .boss-tag.failed { color: #ff6b6b; } .boss-tag.warn { color: #f5a623; }

/* Record strip */
.syndicate-strip { width: 100%; max-width: 900px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-family: 'Courier New', Courier, monospace; }
.syndicate-strip p { margin: 0; }
.syndicate-record { color: #ffd700; font-weight: bold; letter-spacing: .02em; }
.syndicate-clock { color: #e0d5c1; }
.cloud-job.world-record { outline: 2px solid #ffd700; box-shadow: 0 0 18px rgba(255,215,0,.35); }
.cloud-job .syndicate-lane { font-family: 'Courier New', Courier, monospace; }
.cloud-job .syndicate-lane.done { color: #7CFC9A; } .cloud-job .syndicate-lane.working { color: #ffd700; } .cloud-job .syndicate-lane.failed { color: #ff6b6b; }

/* Centre stage: the Syndicate replaces Mecha Daniel while "Escodebars (squad)" is the selected bot in Code mode. */
#anyki-clean-center-daniel-wrap.is-syndicate #anyki-single-clean-daniel,
#anyki-clean-center-daniel-wrap.is-syndicate #anyki-daniel-laser-beam { display: none !important; }
#anyki-clean-center-daniel-wrap.is-syndicate { max-width: 94vw !important; }
.syndicate-scene.in-centre { pointer-events: none; margin: 0; }
.syndicate-scene.in-centre .esco-stage { pointer-events: auto; width: min(860px, 68vw); }
.syndicate-scene.in-centre .syndicate-strip { pointer-events: auto; justify-content: center; font-size: 12px; gap: 16px; text-shadow: 0 2px 6px rgba(0,0,0,.9); }
body.escodebars-squad #anyki-daniel-live-bubble { border-color: rgba(255,215,0,.45) !important; }
@media (max-width: 768px) { .syndicate-scene.in-centre .esco-stage { width: 94vw; } .syndicate-tags { font-size: 9px; } }

/* CELEBRATE_TOMMY_GUNS â€” 4s salute when a run finishes: sprites recoil in sync with the gunfire, room flashes, banner drops in. */
@keyframes recoilShake {
  0%   { transform: scale(1.03) translate(0, 0) rotateZ(0deg); }
  25%  { transform: scale(1.04) translate(-3px, 5px) rotateZ(-1.2deg); }
  50%  { transform: scale(1.03) translate(2px, -3px) rotateZ(1deg); }
  75%  { transform: scale(1.05) translate(-2px, 4px) rotateZ(-.8deg); }
  100% { transform: scale(1.03) translate(1px, 0) rotateZ(0deg); }
}
.esco-stage.celebrate-mode .boss-sprite { animation: recoilShake .14s infinite !important; filter: brightness(1.2) contrast(1.15) drop-shadow(0 0 20px rgba(255,160,40,.5)) !important; transition: none !important; }
.esco-stage.celebrate-mode .syndicate-bg { filter: brightness(1.05) contrast(1.1); }
.esco-stage .victory-banner {
  position: absolute; top: 4%; left: 50%; transform: translateX(-50%) scale(.8); z-index: 10; opacity: 0; pointer-events: none;
  background: rgba(15,12,8,.92); border: 2px solid #ffd700; color: #ffd700; padding: 8px 24px; border-radius: 8px;
  font: 800 clamp(11px, 1.6vw, 18px) 'Segoe UI', Tahoma, sans-serif; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap;
  box-shadow: 0 0 30px rgba(255,215,0,.5); transition: all .25s cubic-bezier(.175,.885,.32,1.275);
}
.esco-stage.celebrate-mode .victory-banner { opacity: 1; transform: translateX(-50%) scale(1); }
