/* Shift, the Streamcell booth game. The look follows the 19 Oct print (booth/print/site-theme):
   paper, ink, sage, Manrope 500 and 700, uppercase eyebrows, white screens with hairlines, the
   braided ring. Light only. The stage is a 1180 × 820 tablet canvas scaled to fit. */

@font-face {
  font-family: "Manrope";
  src: url("assets/manrope-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-display: block;
}

:root {
  --paper: #f5f4ee; --paper2: #f1f2ea; --white: #fff; --ink: #17271f; --ink2: #3d4d38; --muted: #5d6a5a;
  --sage: #cbdcb7; --sage2: #e3eadb; --sage3: #eef2e8; --moss: #4c614f; --moss-deep: #2f3c27;
  --rule: rgba(23, 39, 31, .14); --rule2: rgba(23, 39, 31, .24);
  --green: #11946a; --green2: #0c7a57; --green-bg: #d5efe2; --red: #c8443a; --red-bg: #f6dcd8;
  --amber: #d99a2b; --amber-bg: #f7e7c4; --violet: #6b4fd1; --violet-bg: #ebe6fb;
  --font: "Manrope", ui-sans-serif, system-ui, sans-serif;
  --ease: cubic-bezier(.2, 0, 0, 1);
  --spring: cubic-bezier(.34, 1.4, .64, 1);
  --shadow: 0 1px 2px rgba(23, 39, 31, .05), 0 18px 40px -26px rgba(23, 39, 31, .45);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: #e7e9e0; font-family: var(--font); font-weight: 500; color: var(--ink); -webkit-font-smoothing: antialiased; overflow: hidden; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
input { font: inherit; }

/* ── Fit: a tablet frame on a mouse, edge to edge on touch ── */
.fit { position: fixed; inset: 0; overflow: hidden; }
.device { position: absolute; left: 50%; top: 50%; transform-origin: center; }
.framed .device { padding: 18px; border-radius: 46px; background: #1b1f19; box-shadow: 0 40px 80px -30px rgba(22, 29, 19, .55), inset 0 0 0 2px #2b3127; }
.stage { position: relative; width: 1180px; height: 820px; overflow: hidden; background: linear-gradient(180deg, var(--paper) 0%, var(--paper2) 62%, #e4ebd6 100%); }
.framed .stage { border-radius: 28px; }
.screen { position: absolute; inset: 0; display: none; }
.screen.on { display: block; animation: screenIn .5s var(--ease); }
@keyframes screenIn { from { opacity: 0; } }

/* ── Type ── */
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: var(--ink2); margin: 0; }
.display { font-size: 92px; font-weight: 700; letter-spacing: -.05em; line-height: .95; margin: 0; }
.h2 { font-size: 56px; font-weight: 700; letter-spacing: -.045em; line-height: 1; margin: 0; }
.display em, .h2 em, .h3 em { font-style: normal; color: var(--moss); }
.lede { font-size: 20px; line-height: 1.45; color: var(--ink2); margin: 0; max-width: 34ch; }
.small { font-size: 13px; color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }

/* ── Buttons ── */
.btn { height: 64px; padding: 0 30px; border-radius: 999px; background: var(--ink); color: var(--paper); font-size: 19px; font-weight: 700; display: inline-flex; align-items: center; gap: 12px; transition: transform .15s var(--ease), background .2s, opacity .3s; }
.btn .ic { width: 22px; height: 22px; }
.btn:active { transform: scale(.97); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--rule2); }
.btn.green { background: var(--green2); }
.btn:disabled { opacity: .25; cursor: default; }
.link { font-size: 14px; font-weight: 700; color: var(--ink2); display: inline-flex; gap: 8px; align-items: center; }
.link .ic { width: 18px; height: 18px; }

/* ── The braided ring ── */
.ring-art { position: absolute; pointer-events: none; user-select: none; }

/* ── Attract ── */
#s-attract .lockup { position: absolute; left: 56px; top: 46px; height: 34px; }
#s-attract .ring-art { width: 900px; right: -300px; top: -60px; opacity: .9; animation: drift 60s linear infinite; }
@keyframes drift { to { transform: rotate(360deg); } }
.attract-copy { position: absolute; left: 56px; top: 210px; display: grid; gap: 26px; }
.attract-copy .btn { justify-self: start; margin-top: 10px; height: 76px; padding: 0 40px; font-size: 22px; }
.attract-copy .btn .ic { width: 26px; height: 26px; }
.today { position: absolute; left: 56px; bottom: 50px; display: flex; gap: 32px; align-items: flex-end; }
.today .eyebrow { margin-bottom: 8px; }
.today-row { display: flex; gap: 10px; align-items: baseline; font-size: 15px; }
.today-row b { font-weight: 700; font-size: 22px; }
.today-row span { color: var(--muted); }
.staff { position: absolute; right: 40px; bottom: 36px; }

/* ── Roles ── */
.roles-head { position: absolute; left: 56px; top: 56px; display: grid; gap: 14px; }
.role-grid { position: absolute; left: 56px; right: 56px; top: 206px; bottom: 92px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.role-card { position: relative; text-align: left; background: var(--white); border-radius: 18px; box-shadow: inset 0 0 0 1px var(--rule), var(--shadow); padding: 14px 14px 18px; display: flex; flex-direction: column; gap: 12px; transition: transform .25s var(--spring), box-shadow .2s; opacity: 0; animation: rise .55s var(--ease) forwards; }
.role-card:nth-child(2) { animation-delay: .06s; } .role-card:nth-child(3) { animation-delay: .12s; } .role-card:nth-child(4) { animation-delay: .18s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.role-card:active { transform: scale(.97); }
.role-card .pic { height: 190px; border-radius: 12px; background: var(--sage3); display: grid; place-items: center; flex: none; }
.role-svg { width: 168px; height: 134px; }
.role-card h3 { margin: 4px 4px 0; font-size: 26px; font-weight: 700; letter-spacing: -.035em; }
.role-card p { margin: -6px 4px 0; font-size: 15.5px; color: var(--ink2); }
.issue-list { list-style: none; margin: 4px 0 0; padding: 10px 4px 0; border-top: 1px solid var(--rule); display: grid; gap: 9px; }
.issue-list li { display: flex; gap: 10px; align-items: center; font-size: 14px; font-weight: 700; color: var(--ink2); }
.issue-list .ic { width: 26px; height: 26px; padding: 4px; border-radius: 8px; background: var(--sage3); color: var(--ink); flex: none; }
.role-card .go { margin-top: auto; align-self: stretch; height: 48px; border-radius: 12px; background: var(--ink); color: var(--paper); display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 15px; font-weight: 700; }
.role-card .go .ic { width: 18px; height: 18px; }
.roles-foot { position: absolute; left: 56px; bottom: 44px; }

/* ── Game: top bar ── */
.topbar { position: absolute; left: 0; right: 0; top: 0; height: 64px; display: flex; align-items: center; gap: 14px; padding: 0 16px; border-bottom: 1px solid var(--rule); background: rgba(245, 244, 238, .92); z-index: 6; }
.topbar .lockup { height: 22px; }
.chip { height: 36px; padding: 0 14px 0 10px; border-radius: 999px; background: var(--white); box-shadow: inset 0 0 0 1px var(--rule); display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; white-space: nowrap; }
.chip .ic { width: 18px; height: 18px; }
.round-tag { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.score { position: absolute; left: 590px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; }
.score b { font-size: 34px; font-weight: 700; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.mult { font-size: 14px; font-weight: 700; color: #fff; background: var(--green2); padding: 3px 9px; border-radius: 999px; opacity: 0; transform: scale(.6); transition: .25s var(--spring); }
.mult.on { opacity: 1; transform: none; }
.topbar .right { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.timer { position: relative; width: 46px; height: 46px; display: grid; place-items: center; font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.timer svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.timer circle { fill: none; stroke-width: 3.5; }
.timer .bg { stroke: var(--rule); }
.timer .fg { stroke: var(--ink); stroke-linecap: round; transition: stroke .3s; }
.timer.low .fg { stroke: var(--red); } .timer.low { color: var(--red); }
.assist { height: 40px; padding: 0 14px 0 6px; border-radius: 999px; background: var(--white); box-shadow: inset 0 0 0 1px var(--rule); display: inline-flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 700; transition: box-shadow .4s; }
.sw { width: 42px; height: 26px; border-radius: 999px; background: #d9dcd4; position: relative; flex: none; transition: background .3s; }
.sw i { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .35s var(--spring); }
.assist.on { box-shadow: inset 0 0 0 1.5px var(--green), 0 0 0 5px var(--green-bg); }
.assist.on .sw { background: var(--green); }
.assist.on .sw i { transform: translateX(16px); }

/* ── Overlays ── */
.overlay { position: absolute; inset: 0; z-index: 20; display: none; place-items: center; background: rgba(245, 244, 238, .9); backdrop-filter: blur(4px); }
.overlay.on { display: grid; animation: screenIn .3s var(--ease); }
.howto { display: grid; justify-items: center; gap: 26px; }
.howto-steps { display: grid; grid-template-columns: repeat(3, 230px); gap: 16px; }
.howto-step { background: #fff; border-radius: 16px; box-shadow: inset 0 0 0 1px var(--rule), var(--shadow); padding: 20px; display: grid; gap: 12px; }
.howto-step .n { width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--paper); font-weight: 700; display: grid; place-items: center; }
.howto-step .vis { height: 92px; border-radius: 10px; background: var(--sage3); display: flex; align-items: center; justify-content: center; gap: 8px; }
.howto-step .vis .ic { width: 30px; height: 30px; }
.howto-step b { font-size: 19px; letter-spacing: -.02em; }
.agent-on .howto-step .n { background: var(--green2); }
.count { font-size: 150px; font-weight: 700; letter-spacing: -.06em; line-height: 1; }
.count.word { font-size: 110px; }
.mini-pin { width: 40px; height: 40px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 3px var(--amber); display: grid; place-items: center; }
.mini-btn { height: 40px; padding: 0 12px; border-radius: 10px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--rule2); display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.mini-tok { width: 36px; height: 36px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 1.2px var(--rule2); display: grid; place-items: center; }
.mini-tok .ic { width: 18px !important; height: 18px !important; }

/* ── Switch ── */
#s-switch .ring-art { width: 760px; right: -330px; bottom: -400px; opacity: .5; animation: drift 80s linear infinite reverse; }
#s-switch .ring-art.two { right: auto; left: -360px; top: -420px; bottom: auto; opacity: .32; }
.switch-wrap { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; text-align: center; gap: 22px; padding: 0 120px; }
.switch-wrap .lede { max-width: 48ch; text-align: center; }
.bigswitch { width: 220px; height: 114px; border-radius: 999px; background: #d9dcd4; position: relative; box-shadow: inset 0 2px 6px rgba(23, 39, 31, .15); transition: background .4s, box-shadow .6s; margin: 8px 0 0; }
.bigswitch .knob { position: absolute; top: 12px; left: 12px; width: 90px; height: 90px; border-radius: 50%; background: #fff; box-shadow: 0 8px 20px rgba(23, 39, 31, .25); transition: transform .5s var(--spring); display: grid; place-items: center; color: var(--muted); }
.bigswitch .knob .ic { width: 34px; height: 34px; }
.bigswitch.on { background: var(--green); box-shadow: 0 0 0 12px var(--green-bg), 0 0 80px 20px rgba(17, 148, 106, .35); }
.bigswitch.on .knob { transform: translateX(106px); color: var(--green2); }
.switch-label { font-size: 15px; font-weight: 700; color: var(--ink2); letter-spacing: .02em; }
.recap { font-size: 15px; color: var(--muted); }

/* ── Results ── */
#s-results .ring-art { width: 760px; right: -280px; top: -280px; opacity: .45; }
.res-left { position: absolute; left: 56px; top: 56px; width: 640px; display: grid; gap: 18px; }
.res-score { display: flex; align-items: baseline; gap: 16px; }
.res-score b { font-size: 132px; font-weight: 700; letter-spacing: -.06em; line-height: .9; font-variant-numeric: tabular-nums; }
.res-score span { font-size: 18px; color: var(--ink2); }
.vs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.vs-col { background: #fff; border-radius: 16px; box-shadow: inset 0 0 0 1px var(--rule), var(--shadow); padding: 18px 20px; }
.vs-col.on { box-shadow: inset 0 0 0 2px var(--green), 0 0 0 6px var(--green-bg); }
.vs-col h4 { margin: 0 0 12px; display: flex; gap: 10px; align-items: center; font-size: 14px; }
.vs-col h4 .sw { transform: scale(.8); transform-origin: left center; margin-right: -6px; }
.vs-col.on h4 .sw { background: var(--green); } .vs-col.on h4 .sw i { transform: translateX(16px); }
.vs-big { font-size: 54px; font-weight: 700; letter-spacing: -.05em; line-height: 1; }
.vs-cap { font-size: 13.5px; color: var(--muted); margin: 4px 0 12px; }
.vs-row { display: flex; justify-content: space-between; font-size: 14px; padding: 8px 0; border-top: 1px solid var(--rule); }
.vs-row b { font-variant-numeric: tabular-nums; }
.name-row { display: flex; gap: 10px; align-items: center; }
.name-row input { height: 58px; width: 260px; border-radius: 14px; border: 0; box-shadow: inset 0 0 0 1.5px var(--rule2); background: #fff; padding: 0 18px; font-size: 20px; font-weight: 700; outline: none; color: var(--ink); }
.name-row input:focus { box-shadow: inset 0 0 0 2px var(--ink); }
.name-row .btn { height: 58px; }
.res-actions { display: flex; gap: 12px; margin-top: 4px; }
.board { position: absolute; right: 56px; top: 150px; width: 380px; background: #fff; border-radius: 16px; box-shadow: inset 0 0 0 1px var(--rule), var(--shadow); padding: 20px; }
.board-tabs { display: flex; gap: 4px; margin: 10px 0 8px; flex-wrap: wrap; }
.board-tabs button { height: 30px; padding: 0 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.board-tabs button.on { background: var(--ink); color: var(--paper); }
.brow { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: center; padding: 11px 0; border-top: 1px solid var(--rule); font-size: 16px; }
.brow:first-of-type { border-top: 0; }
.brow .rk { font-weight: 700; color: var(--muted); }
.brow .who small { display: block; font-size: 11.5px; color: var(--muted); }
.brow .pts { font-weight: 700; font-variant-numeric: tabular-nums; }
.brow.you { background: var(--green-bg); margin: 0 -10px; padding: 11px 10px; border-radius: 10px; border-top-color: transparent; }
.brow.you + .brow { border-top-color: transparent; }
.empty { font-size: 14px; color: var(--muted); padding: 10px 0; }

/* ── Behind the scenes ── */
.bts-head { position: absolute; left: 48px; top: 40px; right: 48px; display: flex; justify-content: space-between; align-items: flex-end; }
.bts-head .h2 { font-size: 46px; }
.totals { display: flex; gap: 10px; }
.total { background: #fff; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--rule); padding: 10px 16px; min-width: 120px; }
.total b { display: block; font-size: 30px; font-weight: 700; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.total span { font-size: 12px; color: var(--muted); font-weight: 700; }
.bts-tabs { position: absolute; left: 48px; right: 48px; top: 158px; display: flex; gap: 8px; }
.bts-tab { height: 50px; padding: 0 16px 0 10px; border-radius: 14px; background: rgba(255, 255, 255, .6); box-shadow: inset 0 0 0 1px var(--rule); display: inline-flex; align-items: center; gap: 9px; font-size: 14.5px; font-weight: 700; }
.bts-tab .ic { width: 20px; height: 20px; }
.bts-tab small { font-size: 12px; color: var(--muted); font-weight: 700; }
.bts-tab.on { background: var(--ink); color: var(--paper); box-shadow: none; }
.bts-tab.on small { color: var(--sage); }
.bts-body { position: absolute; left: 48px; right: 48px; top: 226px; bottom: 96px; display: grid; grid-template-columns: 1fr 1.08fr; gap: 18px; }
.bts-card { background: #fff; border-radius: 16px; box-shadow: inset 0 0 0 1px var(--rule), var(--shadow); padding: 18px 20px; overflow: hidden; display: flex; flex-direction: column; animation: cardIn .4s var(--ease); }
.bts-card .card-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.bts-card h3 { margin: 0; font-size: 21px; font-weight: 700; letter-spacing: -.03em; }
.canvas-dots { flex: 1; border-radius: 12px; background-color: #f7f8f4; background-image: radial-gradient(rgba(23, 39, 31, .16) 1px, transparent 1.2px); background-size: 14px 14px; padding: 18px 16px; display: flex; flex-direction: column; align-items: center; overflow: hidden; }
.wf-node { width: 100%; max-width: 400px; background: #fff; border-radius: 11px; box-shadow: inset 0 0 0 1px var(--rule2), 0 4px 10px -8px rgba(23, 39, 31, .3); padding: 8px 12px; display: grid; grid-template-columns: 74px 1fr auto; gap: 10px; align-items: center; opacity: 0; animation: rise .4s var(--ease) forwards; }
.wf-node .lead { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.wf-node .blk { font-size: 14.5px; font-weight: 700; }
.wf-node .tok { justify-self: end; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 6px; background: var(--sage3); color: var(--ink2); white-space: nowrap; max-width: 170px; overflow: hidden; text-overflow: ellipsis; }
.wf-node.when .lead { color: var(--violet); } .wf-node.if .lead { color: var(--red); } .wf-node.then .lead { color: var(--green2); }
.wf-link { width: 2px; height: 12px; background: repeating-linear-gradient(var(--green) 0 4px, transparent 4px 7px); position: relative; flex: none; }
.wf-link::after { content: ""; position: absolute; left: -4px; bottom: -4px; border: 5px solid transparent; border-top-color: var(--green); border-bottom: 0; }
.ran { font-size: 13px; font-weight: 700; color: var(--violet); display: inline-flex; gap: 6px; align-items: center; }
.ran .ic { width: 15px; height: 15px; }
.ways { display: grid; gap: 4px; overflow: hidden; }
.way { display: grid; grid-template-columns: 1fr auto 52px; gap: 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--rule); opacity: 0; animation: rise .4s var(--ease) forwards; }
.way:first-child { border-top: 0; }
.way .nm { font-size: 14px; font-weight: 700; line-height: 1.25; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.way .ct { font-size: 13px; font-weight: 700; color: var(--ink2); font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.way .top { font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--moss); background: var(--sage2); padding: 2px 7px; border-radius: 999px; }
.dots { display: flex; gap: 2.5px; justify-content: flex-end; max-width: 190px; flex-wrap: wrap; }
.dots i { width: 7px; height: 7px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--rule2); }
.dots i.f { background: var(--moss); box-shadow: none; }
.stat-line { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--rule); font-size: 14.5px; line-height: 1.4; color: var(--ink2); }
.stat-line b { color: var(--ink); font-size: 20px; letter-spacing: -.02em; }
.source { font-size: 12px; color: var(--muted); margin-top: 6px; }
.bts-foot { position: absolute; left: 48px; right: 48px; bottom: 26px; display: flex; justify-content: space-between; align-items: center; }
.bts-foot p { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.bts-foot p em { font-style: normal; color: var(--moss); }

/* ── Gallery (design review only) ── */
.gallery { display: grid; grid-template-columns: repeat(4, 340px); gap: 18px; padding: 24px; background: var(--paper); }
.gallery figure { margin: 0; background: #fff; border-radius: 14px; padding: 10px; box-shadow: inset 0 0 0 1px var(--rule); }
.gallery figcaption { font-size: 12.5px; color: var(--ink2); padding: 8px 4px 2px; }

/* ── Preview helper bar (only on a mouse) ── */
.devbar { position: fixed; left: 12px; top: 10px; z-index: 50; display: none; gap: 6px; }
.dev .devbar { display: flex; }
.devbar button { height: 28px; padding: 0 10px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px var(--rule2); font-size: 12px; font-weight: 700; }
.vs-of { font-size: 20px; letter-spacing: -.01em; color: var(--muted); margin-left: 8px; }

/* ── Game: the rack ── */
.field { position: absolute; inset: 0; touch-action: none; user-select: none; -webkit-user-select: none; }
.rack-frame { position: absolute; border-radius: 26px; background: rgba(255, 255, 255, .42); box-shadow: inset 0 0 0 1px var(--rule), 0 30px 60px -40px rgba(23, 39, 31, .35); }
.rack-frame::before, .rack-frame::after { content: ""; position: absolute; top: 14px; bottom: 14px; width: 6px; border-radius: 3px; background: rgba(23, 39, 31, .07); }
.rack-frame::before { left: 8px; } .rack-frame::after { right: 8px; }
.cage { position: absolute; width: 190px; height: 150px; border-radius: 16px; cursor: pointer; --p: 1; transition: transform .25s var(--spring); }
.cage .art { position: absolute; left: -6px; top: -24px; width: 202px; height: 180px; pointer-events: none; }
.cage-svg { width: 100%; height: 100%; overflow: visible; }
.cage::before { content: ""; position: absolute; inset: -6px; border-radius: 22px; box-shadow: 0 0 0 2px var(--amber), 0 0 24px 2px rgba(217, 154, 43, .35); opacity: 0; transition: opacity .2s; pointer-events: none; }
.cage.alert::before, .cage.decoy::before { opacity: 1; }
.cage.late::before { box-shadow: 0 0 0 2px var(--red), 0 0 24px 2px rgba(200, 68, 58, .35); }
.cage.open::before { box-shadow: 0 0 0 2px var(--ink); opacity: 1; }
.agent-on .cage.open::before { box-shadow: 0 0 0 2px var(--green), 0 0 24px 2px rgba(17, 148, 106, .3); }
.bubble .ring { position: absolute; inset: -5px; border-radius: inherit; padding: 4px; background: conic-gradient(var(--rc, var(--amber)) calc(var(--p, 1) * 360deg), rgba(23, 39, 31, .1) 0); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.cage.late .bubble .ring { --rc: var(--red); }
.cage.open .bubble .ring { --rc: var(--ink); }
.bubble .bi { display: grid; place-items: center; }
.cage.alert, .cage.decoy { animation: nudge 1.4s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { transform: none; } 8% { transform: rotate(-.8deg); } 16% { transform: rotate(.8deg); } 24% { transform: none; } }
.cage.open { animation: none; }
.cage.brew .art { animation: brew .38s var(--ease); }
@keyframes brew { 30% { transform: translateY(-3px) scale(1.02); } }
.cage.shake { animation: shake .4s; }
.cage.missed::after { content: ""; position: absolute; inset: 0; border-radius: 16px; background: var(--red); opacity: 0; animation: missFlash .6s; pointer-events: none; }
@keyframes missFlash { 25% { opacity: .22; } }
.cage.done .art { animation: hop .5s var(--spring); }
@keyframes hop { 40% { transform: translateY(-8px); } }
.bubble { position: absolute; left: 50%; top: -38px; width: 54px; height: 54px; margin-left: -27px; border-radius: 50%; background: #fff; box-shadow: 0 10px 22px -8px rgba(23, 39, 31, .45), inset 0 0 0 1.5px var(--rule2); display: grid; place-items: center; color: var(--ink); transform: scale(0) translateY(10px); transition: transform .35s var(--spring); z-index: 3; pointer-events: none; }
.bubble.on { transform: none; }
.bubble .ic { width: 27px; height: 27px; }
.cage.open .bubble { transform: scale(.75); opacity: .5; }

/* mice live a little */
.m { transform-box: fill-box; transform-origin: 50% 100%; }
.m-idle { animation: breathe 3.2s ease-in-out infinite; animation-delay: var(--d); }
@keyframes breathe { 0%, 100% { transform: none; } 50% { transform: scaleY(1.04); } 80% { transform: translateY(-2px); } 86% { transform: none; } }
.m-walk { animation: walk 7s ease-in-out infinite; animation-delay: var(--d); }
@keyframes walk { 0%, 100% { transform: translateX(0); } 40% { transform: translateX(26px); } 55% { transform: translateX(26px) translateY(-2px); } 60% { transform: translateX(26px); } }
.m-sick { animation: shiver .18s linear infinite; }
@keyframes shiver { 50% { transform: translateX(.8px); } }
.m-groom { animation: groom .5s ease-in-out infinite; }
@keyframes groom { 50% { transform: rotate(-3deg); } }
.m-eat { animation: nibble .35s ease-in-out infinite; }
@keyframes nibble { 50% { transform: translateY(-1.5px); } }
.zz-svg { font: 700 15px var(--font); fill: var(--blue, #4d79b8); animation: zzz 1.6s ease-in-out infinite; }
.zz-svg.small { font-size: 11px; animation-delay: .4s; }
@keyframes zzz { 0% { opacity: 0; transform: translateY(4px); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(-8px); } }
.drip { animation: drip 1s ease-in infinite; }
@keyframes drip { from { transform: translateY(0); opacity: 1; } to { transform: translateY(40px); opacity: 0; } }
.flood rect { animation: rise .6s var(--ease); }

/* the room panel, manager only */
.panel { position: absolute; transform: translate(-50%, -50%); display: none; height: 46px; padding: 0 16px; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 1px var(--rule2), var(--shadow); align-items: center; gap: 14px; font-size: 15px; --p: 1; }
.has-panel .panel { display: flex; }
.panel .pl { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.panel b { font-variant-numeric: tabular-nums; }
.panel .bubble { top: -44px; }
.panel.alert { box-shadow: inset 0 0 0 2px var(--red), 0 0 0 6px var(--red-bg); animation: nudge 1.4s ease-in-out infinite; }
.panel.alert #panelTemp { color: var(--red); }
.panel.alert .bubble { transform: none; }
.panel.open { animation: none; box-shadow: inset 0 0 0 2px var(--ink); }

/* stations */
.station { position: absolute; transform: translate(-50%, -50%); width: 136px; height: 148px; border-radius: 22px; background: #fff; box-shadow: inset 0 0 0 1px var(--rule), var(--shadow); display: grid; place-items: center; align-content: center; gap: 10px; transition: box-shadow .2s; }
.station .disc { width: 66px; height: 66px; border-radius: 50%; background: var(--sage3); display: grid; place-items: center; transition: transform .3s var(--spring), background .3s; }
.station .disc .ic { width: 30px; height: 30px; }
.station .sl { font-size: 13.5px; font-weight: 700; color: var(--ink2); }
.station.hot { box-shadow: inset 0 0 0 2.5px var(--ink), 0 0 0 8px rgba(23, 39, 31, .08); }
.station.hot .disc { animation: want 1s ease-in-out infinite; }
@keyframes want { 50% { transform: scale(1.08); } }
.station.stamped .disc { animation: stampPop .45s var(--spring); background: var(--green-bg); color: var(--green2); }
@keyframes stampPop { 40% { transform: scale(1.25); } }
.stamp-chip { position: absolute; top: -12px; right: -14px; height: 26px; padding: 0 10px; border-radius: 999px; background: var(--green2); color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; gap: 5px; opacity: 0; transform: translateY(6px) scale(.8); transition: .3s var(--spring); pointer-events: none; }
.stamp-chip .ic { width: 14px; height: 14px; }
.station.stamped .stamp-chip { opacity: 1; transform: none; }

/* the case card */
.case { position: absolute; left: 0; top: 0; width: 140px; height: 76px; margin: -38px 0 0 -70px; border-radius: 13px; background: #fff; box-shadow: inset 0 0 0 1.6px var(--ink), 0 14px 28px -12px rgba(23, 39, 31, .55); padding: 9px 10px; display: grid; gap: 7px; z-index: 8; opacity: 0; scale: .4; transition: opacity .2s, scale .3s var(--spring); cursor: grab; touch-action: none; }
.case.in { opacity: 1; scale: 1; }
.case-h { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.case-h .ic { width: 16px; height: 16px; color: var(--red); }
.case-route { display: flex; gap: 5px; }
.cr { position: relative; flex: 1; height: 30px; border-radius: 8px; background: var(--sage3); display: grid; place-items: center; transition: .25s var(--ease); }
.cr .ic { width: 17px; height: 17px; }
.cr i { position: absolute; top: -6px; left: -5px; width: 15px; height: 15px; border-radius: 50%; background: var(--ink); color: #fff; font: 700 9.5px/15px var(--font); text-align: center; font-style: normal; }
.cr.next { background: #fff; box-shadow: inset 0 0 0 2px var(--ink); }
.cr.done { background: var(--green-bg); color: var(--green2); }
.cr.done i { background: var(--green2); }
.case.lift { scale: 1.08; box-shadow: inset 0 0 0 1.6px var(--ink), 0 26px 40px -14px rgba(23, 39, 31, .55); cursor: grabbing; z-index: 9; }
.case.auto { box-shadow: inset 0 0 0 1.6px var(--green), 0 0 0 5px var(--green-bg), 0 0 28px 4px rgba(17, 148, 106, .35); }
.case.gone { opacity: 0; scale: .3; }
.streams { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 6; overflow: visible; }
.stream { fill: none; stroke: var(--green); stroke-width: 3.5; stroke-dasharray: 8 6; stroke-linecap: round; animation: march .5s linear infinite; transition: opacity .5s; }
@keyframes march { to { stroke-dashoffset: -14; } }
.ripple { position: absolute; width: 24px; height: 24px; margin: -12px; border-radius: 50%; box-shadow: 0 0 0 3px var(--green); animation: rip .55s var(--ease) forwards; pointer-events: none; z-index: 9; }
.ripple.bad { box-shadow: 0 0 0 3px var(--red); }
@keyframes rip { to { transform: scale(4); opacity: 0; } }
.pop { position: absolute; transform: translate(-50%, -50%); font-size: 20px; font-weight: 700; color: var(--green2); pointer-events: none; z-index: 10; white-space: nowrap; animation: popUp 1s var(--ease) forwards; }
.pop.bad { color: var(--red); }
@keyframes popUp { 0% { opacity: 0; margin-top: 8px; } 20% { opacity: 1; } 100% { opacity: 0; margin-top: -40px; } }
@keyframes shake { 25% { transform: translateX(-7px); } 50% { transform: translateX(6px); } 75% { transform: translateX(-3px); } }
.hint { position: absolute; left: 50%; bottom: 40px; transform: translateX(-50%); display: flex; gap: 10px; align-items: center; font-size: 16px; font-weight: 700; color: var(--ink2); white-space: nowrap; }
.hint .ic { width: 20px; height: 20px; }
.orb { display: inline-block; width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff 0 12%, var(--green) 45%, var(--green2)); box-shadow: 0 0 14px 3px rgba(17, 148, 106, .5); flex: none; }
.orb.big { width: 46px; height: 46px; }
.mult.bump { animation: bump .3s var(--ease); }
@keyframes bump { 50% { transform: scale(1.3); } }
.verdict { font-size: 15px; font-weight: 700; display: flex; gap: 8px; align-items: center; }
.verdict .ic { width: 20px; height: 20px; }
.verdict.good { color: var(--green2); }

/* attract preview, roles, how-to, behind the scenes */
.attract-demo { position: absolute; right: 60px; top: 170px; display: grid; grid-template-columns: repeat(3, 150px); gap: 26px 14px; padding: 34px 24px 22px; border-radius: 26px; background: rgba(255, 255, 255, .5); box-shadow: inset 0 0 0 1px var(--rule), 0 40px 80px -40px rgba(23, 39, 31, .45); backdrop-filter: blur(6px); animation: rise .8s var(--ease) .2s backwards; }
.mini-cage { position: relative; width: 150px; height: 118px; }
.mini-cage .cage-svg { position: absolute; left: -5px; top: -19px; width: 160px; height: 142px; }
.mini-cage .bubble { width: 40px; height: 40px; margin-left: -20px; top: -30px; }
.mini-cage .bubble .ic { width: 21px; height: 21px; }
.role-grid.three { grid-template-columns: repeat(3, 1fr); left: 90px; right: 90px; }
.issue-list li span small { display: block; font-size: 12px; font-weight: 500; color: var(--muted); }
.h2.sm { font-size: 46px; }
.howto-steps { grid-template-columns: repeat(2, 300px) !important; }
.howto-step span:not(.n):not(.mini-bubble):not(.mini-case):not(.orb) { font-size: 14px; color: var(--muted); line-height: 1.4; }
.mini-bubble { width: 50px; height: 50px; border-radius: 50% 50% 50% 10px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--rule2); display: grid; place-items: center; }
.mini-bubble .ic { width: 26px !important; height: 26px !important; }
.mini-case { height: 46px; padding: 0 10px; border-radius: 10px; background: #fff; box-shadow: inset 0 0 0 1.6px var(--ink); display: flex; gap: 8px; align-items: center; }
.mini-case .ic { width: 20px !important; height: 20px !important; }
.route-strip { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 10px; flex-wrap: wrap; }
.route-strip span { display: inline-flex; gap: 5px; align-items: center; height: 28px; padding: 0 10px 0 7px; border-radius: 8px; background: var(--sage3); color: var(--ink); }
.route-strip .ic { width: 15px; height: 15px; }
.route-strip .ic.sep { color: var(--rule2); }
.cage.static { position: relative; }
.role-grid.three { top: 196px; bottom: 92px; }
.role-grid.three .pic { height: 150px; }
.roles-foot { bottom: 40px !important; }
.panel .bubble { top: -4px; left: auto; right: -66px; margin-left: 0; }

.rack-svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.rack-label { font: 700 10px var(--font); letter-spacing: .16em; fill: #6d776d; }
.cage { filter: drop-shadow(0 6px 8px rgba(23, 39, 31, .14)); }
.gallery { grid-template-columns: repeat(3, 380px) !important; }
.gallery .cage.static { width: 190px; height: 150px; zoom: 1.9; margin: 26px 0 0 4px; }
.gallery .cage.static .art { position: absolute; }

/* ── Production layer: particles, feedback, transitions ── */
.fx { position: absolute; left: 0; top: 0; width: 1180px; height: 820px; pointer-events: none; z-index: 60; }
.stage::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1; background: radial-gradient(120% 90% at 50% 0%, transparent 55%, rgba(23, 39, 31, .07) 100%); }
#s-game { background: radial-gradient(70% 55% at 50% 38%, rgba(255, 255, 255, .55), transparent 70%); }
#s-game.hurt::before { content: ""; position: absolute; inset: 0; z-index: 30; pointer-events: none; box-shadow: inset 0 0 120px 20px rgba(200, 68, 58, .38); animation: hurt .55s var(--ease) forwards; }
@keyframes hurt { from { opacity: 1; } to { opacity: 0; } }
#s-game.final .field::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(80% 70% at 50% 50%, transparent 55%, rgba(217, 154, 43, .14)); animation: pulseWarm 1s ease-in-out infinite; }
@keyframes pulseWarm { 50% { opacity: .4; } }
#s-game.quake .field { animation: quake .45s; }
@keyframes quake { 20% { transform: translate(-6px, 3px); } 40% { transform: translate(5px, -4px); } 60% { transform: translate(-3px, 2px); } 80% { transform: translate(2px, -1px); } }
.cage.squash .art { animation: squash .32s var(--spring); }
@keyframes squash { 30% { transform: scale(1.05, .94) translateY(4px); } 70% { transform: scale(.98, 1.03); } }
.cage.alert .bubble.on, .cage.decoy .bubble.on { animation: bob 1.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-4px); } }

.guide { fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-dasharray: 2 9; stroke-linecap: round; opacity: .45; animation: march 1s linear infinite; }
.comet { fill: #fff; stroke: var(--green); stroke-width: 3; filter: drop-shadow(0 0 6px rgba(17, 148, 106, .9)); }
.case { transition: opacity .2s, scale .3s var(--spring), box-shadow .2s; }

.tray { position: absolute; right: -10px; bottom: -10px; min-width: 34px; height: 34px; padding: 0 9px; border-radius: 999px; background: var(--ink); color: var(--paper); font-size: 15px; font-weight: 700; display: grid; place-items: center; box-shadow: 0 6px 14px -6px rgba(23, 39, 31, .5); font-variant-numeric: tabular-nums; }
.agent-on .tray { background: var(--green2); }
.tray.bump { animation: trayBump .45s var(--spring); }
@keyframes trayBump { 40% { transform: scale(1.35); } }
.station { background: linear-gradient(180deg, #fff, #f7f8f4); }
.station .disc { box-shadow: inset 0 -3px 0 rgba(23, 39, 31, .06); }

.streak { display: flex; gap: 4px; margin-left: 4px; }
.streak i { width: 8px; height: 8px; border-radius: 50%; background: rgba(23, 39, 31, .12); transition: background .2s, transform .25s var(--spring); }
.streak i.on { background: var(--ink); transform: scale(1.15); }
.streak.hot i.on { background: var(--green); box-shadow: 0 0 8px rgba(17, 148, 106, .6); }
.banner { position: absolute; left: 50%; top: 92px; transform: translateX(-50%) scale(.6); z-index: 40; height: 44px; padding: 0 20px; border-radius: 999px; background: var(--green2); color: #fff; font-size: 20px; font-weight: 700; letter-spacing: -.01em; display: grid; place-items: center; opacity: 0; pointer-events: none; box-shadow: 0 14px 30px -12px rgba(12, 122, 87, .7); }
.banner.on { animation: bannerIn 1.4s var(--ease) forwards; }
@keyframes bannerIn { 0% { opacity: 0; transform: translateX(-50%) scale(.6); } 15% { opacity: 1; transform: translateX(-50%) scale(1.08); } 25% { transform: translateX(-50%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translateX(-50%) translateY(-14px); } }

.mute { width: 40px; height: 40px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 1px var(--rule); display: grid; place-items: center; }
.mute .ic { width: 20px; height: 20px; }
.attract-mute { position: absolute; right: 40px; top: 40px; z-index: 2; }

.count.spring { animation: countIn .55s var(--spring); }
@keyframes countIn { 0% { transform: scale(2.2); opacity: 0; } 60% { transform: scale(.94); opacity: 1; } 100% { transform: none; } }
.count.go { color: var(--green2); }
.count.slam { animation: slam .5s cubic-bezier(.2, 1.6, .4, 1); transform-origin: center; }
@keyframes slam { 0% { transform: scale(3) rotate(-8deg); opacity: 0; } 60% { transform: scale(.92) rotate(2deg); opacity: 1; } 100% { transform: rotate(-3deg); } }
.rise-in { animation: rise .5s var(--ease) .35s backwards; }

.power-lines { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.power-lines i { position: absolute; left: -40%; top: calc(6% + var(--i) * 6.6%); width: 40%; height: 2px; border-radius: 2px; background: linear-gradient(90deg, transparent, var(--green), transparent); opacity: 0; }
.powered .power-lines i { animation: streak 1.1s var(--ease) calc(var(--i) * 45ms) forwards; }
@keyframes streak { 0% { left: -40%; opacity: 0; } 20% { opacity: .9; } 100% { left: 110%; opacity: 0; } }
#s-switch.powered { background: radial-gradient(60% 50% at 50% 55%, rgba(17, 148, 106, .14), transparent 70%), linear-gradient(180deg, var(--paper), #e6efe0); transition: background 1s; }

.dots i.f { animation: dotIn .35s var(--spring) backwards; animation-delay: calc(var(--j) * 22ms + 250ms); }
@keyframes dotIn { from { transform: scale(0); } }

.mini-cage { transition: transform .3s var(--spring); }
.mini-cage.alert::before { content: ""; position: absolute; inset: -5px; border-radius: 16px; box-shadow: 0 0 0 2px var(--amber), 0 0 20px rgba(217, 154, 43, .35); pointer-events: none; }
.mini-cage.tapped { transform: scale(.95); }
.mini-cage.tapped::after { content: ""; position: absolute; left: 50%; top: 50%; width: 24px; height: 24px; margin: -12px; border-radius: 50%; box-shadow: 0 0 0 3px var(--green); animation: rip .6s var(--ease) forwards; }
.compare { position: absolute; right: 56px; top: 470px; width: 380px; background: #fff; border-radius: 16px; box-shadow: inset 0 0 0 1px var(--rule), var(--shadow); padding: 20px; display: grid; gap: 12px; animation: rise .6s var(--ease) .3s backwards; }
.bar-row { display: grid; grid-template-columns: 96px 1fr 30px; gap: 10px; align-items: center; font-size: 13.5px; font-weight: 700; color: var(--ink2); }
.bar-row b { font-size: 18px; color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }
.bar { height: 14px; border-radius: 999px; background: var(--sage3); overflow: hidden; }
.bar i { display: block; height: 100%; width: calc(var(--w) * 100%); border-radius: inherit; background: var(--ink2); animation: grow 1.1s var(--ease) .5s backwards; }
.bar-row.on .bar i { background: linear-gradient(90deg, var(--green2), var(--green)); box-shadow: 0 0 12px rgba(17, 148, 106, .4); }
@keyframes grow { from { width: 0; } }
.compare-note { margin: 2px 0 0; font-size: 14px; color: var(--muted); line-height: 1.4; }
.board { top: 120px !important; }
.res-right { position: absolute; right: 56px; top: 120px; width: 380px; display: flex; flex-direction: column; gap: 16px; }
.res-right .board, .res-right .compare { position: static !important; width: auto; }

/* ── The room grows: slots, room layout, smaller stations along the bottom ── */
.slot { position: absolute; left: 0; top: 0; width: 190px; height: 150px; transform-origin: 0 0; transition: transform .9s var(--ease), opacity .6s var(--ease); }
.slot.arrive { opacity: 0; }
.slot .cage { position: relative; left: 0; top: 0; }
.cage .bubble { width: calc(54px * var(--bs, 1)); height: calc(54px * var(--bs, 1)); margin-left: calc(-27px * var(--bs, 1)); top: calc(-38px * var(--bs, 1)); }
.cage .bubble .ic { width: calc(27px * var(--bs, 1)); height: calc(27px * var(--bs, 1)); }
.cage .bubble .ring { inset: calc(-5px * var(--bs, 1)); padding: calc(4px * var(--bs, 1)); }
.room .cage::before { inset: -10px; border-radius: 26px; }
#rackArt, .rack-layer { position: absolute; inset: 0; pointer-events: none; }
.rack-layer.in { animation: rackIn .9s var(--ease); }
.rack-layer.out { animation: rackOut .6s var(--ease) forwards; }
@keyframes rackIn { from { opacity: 0; } }
@keyframes rackOut { to { opacity: 0; } }
.field.pullback { animation: pullback 1s var(--ease); }
@keyframes pullback { 0% { transform: scale(1.12); } 100% { transform: none; } }
.station { transition: left .9s var(--ease), top .9s var(--ease), width .6s var(--ease), height .6s var(--ease), box-shadow .2s; }
.room .station { width: 168px; height: 74px; grid-auto-flow: column; justify-content: start; padding: 0 14px; gap: 10px; border-radius: 18px; }
.room .station .disc { width: 46px; height: 46px; }
.room .station .disc .ic { width: 22px; height: 22px; }
.room .station .tray { right: -8px; bottom: auto; top: -10px; min-width: 30px; height: 30px; font-size: 13px; }
.room .case { width: 118px; height: 64px; margin: -32px 0 0 -59px; padding: 7px 8px; gap: 5px; border-radius: 11px; }
.room .case-h { font-size: 11px; } .room .case-h .ic { width: 13px; height: 13px; }
.room .cr { height: 24px; } .room .cr .ic { width: 14px; height: 14px; }
.room .panel { transition: left .9s var(--ease), top .9s var(--ease); }
.room .panel .bubble { top: -50px; right: auto; left: 50%; margin-left: -27px; }
.room .hint { bottom: 6px; font-size: 13px; opacity: .7; }
.cages-chip b { font-variant-numeric: tabular-nums; }
.cages-chip.bump { animation: trayBump .5s var(--spring); }
.agent-on .cages-chip { box-shadow: inset 0 0 0 1.5px var(--green); color: var(--green2); }
.rack-grow { display: flex; gap: 6px; align-items: flex-end; }
.rack-grow i { width: 22px; border-radius: 4px; background: var(--ink2); }
.rack-grow i:nth-child(1) { height: 22px; } .rack-grow i:nth-child(2) { height: 34px; opacity: .8; } .rack-grow i:nth-child(3) { height: 46px; opacity: .6; } .rack-grow i:nth-child(4) { height: 58px; opacity: .45; }
.case.lift { scale: 1.12; }
.res-foot { position: absolute; left: 56px; bottom: 28px; margin: 0; font-size: 12.5px; color: var(--muted); }

/* ── V2: guided first case, difficulty, prize, named stops, simpler end screen ── */
.coach { position: absolute; z-index: 45; transform: translate(-50%, -100%); max-width: 360px; padding: 14px 18px 14px; border-radius: 16px; background: var(--ink); color: var(--paper); font-size: 19px; font-weight: 700; letter-spacing: -.01em; line-height: 1.3; text-align: center; box-shadow: 0 18px 40px -16px rgba(23, 39, 31, .6); opacity: 0; pointer-events: none; transition: left .35s var(--ease), top .35s var(--ease); }
.coach.on { opacity: 1; pointer-events: auto; animation: coachIn .4s var(--spring); }
@keyframes coachIn { from { opacity: 0; transform: translate(-50%, -88%) scale(.9); } }
.coach::after { content: ""; position: absolute; left: 50%; bottom: -8px; margin-left: -8px; border: 8px solid transparent; border-top-color: var(--ink); border-bottom: 0; }
.coach small { display: block; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--sage); margin-bottom: 6px; }
.coach b { color: #9fe0c3; }
.coach .btn { display: flex; margin: 14px auto 2px; height: 54px; font-size: 17px; background: var(--paper); color: var(--ink); }
.coach .btn.green { background: var(--green); color: #fff; }
.coach .skip { position: absolute; right: -10px; top: -12px; height: 26px; padding: 0 10px; border-radius: 999px; background: #fff; color: var(--ink2); font-size: 11.5px; font-weight: 700; box-shadow: 0 4px 10px -4px rgba(0, 0, 0, .3); }
.coach.center { transform: translate(-50%, -50%); max-width: 420px; padding: 22px 26px 18px; font-size: 22px; }
.coach.center::after { display: none; }
.coach.center.on { animation: coachPop .45s var(--spring); }
@keyframes coachPop { from { opacity: 0; transform: translate(-50%, -50%) scale(.85); } }
.ghost { position: absolute; left: 0; top: 0; z-index: 44; width: 58px; height: 58px; margin: -6px 0 0 -14px; color: var(--ink); opacity: 0; pointer-events: none; filter: drop-shadow(0 6px 10px rgba(23, 39, 31, .35)); transform: translate(var(--x0), var(--y0)); }
.ghost > .ic { width: 58px; height: 58px; fill: #fff; }
.ghost.on { opacity: .92; }
.ghost.tap { animation: ghostTap 1.3s ease-in-out infinite; }
@keyframes ghostTap { 0%, 100% { transform: translate(var(--x0), var(--y0)) scale(1); } 45% { transform: translate(var(--x0), var(--y0)) scale(.82); } 55% { transform: translate(var(--x0), var(--y0)) scale(.82); } }
@keyframes ghostDrag { 0% { transform: translate(var(--x0), var(--y0)); opacity: 0; } 12% { opacity: .92; } 75% { transform: translate(var(--x1), var(--y1)); opacity: .92; } 100% { transform: translate(var(--x1), var(--y1)); opacity: 0; } }
.station.hot { box-shadow: inset 0 0 0 3px var(--ink), 0 0 0 10px rgba(23, 39, 31, .1); }
.station.hot .disc { animation: want 1s ease-in-out infinite; }

.level-pick { position: absolute; right: 90px; top: 96px; display: flex; align-items: center; gap: 4px; padding: 5px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px var(--rule), var(--shadow); }
.level-pick span { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 0 10px 0 12px; }
.level-pick button { height: 42px; padding: 0 18px; border-radius: 999px; font-size: 15px; font-weight: 700; color: var(--ink2); }
.level-pick button.on { background: var(--ink); color: var(--paper); }
.lvl-tag { margin-left: 6px; padding: 2px 8px; border-radius: 999px; background: var(--sage3); font-size: 11.5px; color: var(--ink2); }

.prize-card { position: absolute; right: 60px; top: 520px; width: 498px; display: flex; gap: 14px; align-items: center; padding: 16px 20px; border-radius: 18px; background: var(--ink); color: var(--paper); box-shadow: 0 24px 50px -24px rgba(23, 39, 31, .6); animation: rise .8s var(--ease) .35s backwards; }
.prize-card .ic { width: 38px; height: 38px; color: #f0c45c; flex: none; }
.prize-card b { display: block; font-size: 19px; letter-spacing: -.01em; }
.prize-card span { font-size: 14px; color: var(--sage); }
.today { display: none; }
.today-board { position: absolute; left: 56px; bottom: 44px; width: 430px; padding: 14px 18px 10px; border-radius: 16px; background: rgba(255, 255, 255, .7); box-shadow: inset 0 0 0 1px var(--rule); }
.today-board .eyebrow { margin-bottom: 6px; }
.tb-row { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: center; padding: 6px 0; border-top: 1px solid var(--rule); font-size: 15px; }
.tb-row:first-of-type { border-top: 0; }
.tb-row .rk { font-weight: 700; color: var(--muted); }
.tb-row small { margin-left: 8px; font-size: 12px; color: var(--muted); }
.tb-row b { font-variant-numeric: tabular-nums; }
.tb-row.lead b, .tb-row.lead .rk { color: var(--green2); }
.tb-empty { margin: 4px 0 6px; font-size: 14px; color: var(--muted); }
.attract-copy { top: 170px; }
.board-prize { display: flex; gap: 8px; align-items: center; margin: 6px 0 0; font-size: 13.5px; font-weight: 700; color: var(--ink2); }
.board-prize .ic { width: 17px; height: 17px; color: #c9a24a; }

/* named stops on the card */
.case { width: auto; min-width: 170px; height: auto; margin: 0; translate: -50% -50%; padding: 10px 11px; }
.case-route { gap: 6px; }
.cr { flex: none; height: 34px; padding: 0 10px 0 8px; display: inline-flex; align-items: center; gap: 6px; }
.cr b { font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.room .case { width: auto; min-width: 0; margin: 0; padding: 7px 8px; }
.room .cr b { display: none; }
.room .cr { padding: 0 8px; height: 24px; }

/* the end screen: Build, Execute, Report */
.bts-body { grid-template-columns: repeat(3, 1fr) !important; }
.step-card { background: #fff; border-radius: 16px; box-shadow: inset 0 0 0 1px var(--rule), var(--shadow); padding: 20px; display: flex; flex-direction: column; gap: 12px; animation: rise .45s var(--ease) backwards; }
.step-card:nth-child(2) { animation-delay: .08s; } .step-card:nth-child(3) { animation-delay: .16s; }
.step-k { margin: 0; display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: var(--moss); }
.step-k span { width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--paper); display: grid; place-items: center; letter-spacing: 0; font-size: 13px; }
.step-card h3 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -.03em; }
.mini-form { border-radius: 12px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--rule2); padding: 14px; display: grid; gap: 10px; }
.mini-form p { margin: 0 0 2px; font-size: 15px; font-weight: 700; }
.mf-row { display: grid; gap: 5px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.mf-row i { height: 30px; border-radius: 8px; background: #fff; box-shadow: inset 0 0 0 1px var(--rule2); }
.mini-flow { display: grid; gap: 8px; }
.mf { border-radius: 11px; padding: 10px 12px; font-size: 14.5px; font-weight: 700; line-height: 1.35; background: var(--paper); box-shadow: inset 0 0 0 1px var(--rule2); }
.mf b { display: block; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 2px; }
.mf.when b { color: var(--violet); } .mf.if b { color: var(--red); } .mf.then b { color: var(--green2); }
.route-mini { margin: auto 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--ink2); }
.route-mini .ic { width: 16px; height: 16px; } .route-mini .ic.sep { color: var(--rule2); }
.big-stat b { display: block; font-size: 72px; font-weight: 700; letter-spacing: -.05em; line-height: 1; color: var(--green2); }
.big-stat span { font-size: 15px; color: var(--muted); font-weight: 700; }
.fact { margin: 0; font-size: 16px; line-height: 1.45; color: var(--ink2); }
.fact b { color: var(--ink); }
.more { margin-top: auto; height: 46px; padding: 0 16px; border-radius: 12px; box-shadow: inset 0 0 0 1.5px var(--rule2); justify-content: center; }
.sheet { position: absolute; inset: 0; z-index: 30; display: none; place-items: center; background: rgba(245, 244, 238, .7); backdrop-filter: blur(4px); }
.sheet.on { display: grid; animation: screenIn .3s var(--ease); }
.sheet-card { width: 720px; max-height: 620px; overflow: auto; background: #fff; border-radius: 18px; box-shadow: inset 0 0 0 1px var(--rule), 0 40px 80px -30px rgba(23, 39, 31, .5); padding: 22px 24px; animation: rise .4s var(--ease); }
.sheet-card .card-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-card h3 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -.03em; }
.sheet-x { width: 40px; height: 40px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--rule2); display: grid; place-items: center; }
.sheet-x .ic { width: 18px; height: 18px; }

/* The card: the outer layer moves (transform set from code), the inner layer grows and fades. */
.case { width: auto; min-width: 0; height: auto; padding: 0; margin: 0; background: none; box-shadow: none; opacity: 1; scale: none; translate: -50% -50%; transition: none; border-radius: 0; display: block; }
.case.in, .case.lift, .case.gone, .case.auto { scale: none; opacity: 1; box-shadow: none; }
.case-in { display: grid; gap: 7px; min-width: 170px; padding: 10px 11px; border-radius: 13px; background: #fff; box-shadow: inset 0 0 0 1.6px var(--ink), 0 14px 28px -12px rgba(23, 39, 31, .55); opacity: 0; scale: .4; transition: opacity .2s, scale .3s var(--spring), box-shadow .2s; }
.case.in .case-in { opacity: 1; scale: 1; }
.case.lift .case-in { scale: 1.1; box-shadow: inset 0 0 0 1.6px var(--ink), 0 26px 40px -14px rgba(23, 39, 31, .55); }
.case.auto .case-in { box-shadow: inset 0 0 0 1.6px var(--green), 0 0 0 5px var(--green-bg), 0 0 28px 4px rgba(17, 148, 106, .35); }
.case.gone .case-in { opacity: 0; scale: .3; }
.room .case-in { min-width: 0; padding: 7px 8px; gap: 5px; border-radius: 11px; }

/* ── Stops you can tell apart at a glance: each its own colour and picture, the same colour on the
   card's route (Mahmoud, 22 Oct) ── */
.station { --st: var(--ink2); --st-bg: var(--sage3); width: 144px; height: 230px; padding: 12px 10px 10px; border-radius: 24px; display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 6px;
  background: linear-gradient(180deg, #fff 0%, var(--st-bg) 78%); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--st) 32%, transparent), var(--shadow); }
.station .disc { width: 128px; height: 104px; border-radius: 0; background: none; box-shadow: none; flex: 1; display: grid; place-items: center; }
.station .st-art { width: 128px; height: 102px; overflow: visible; }
.station .sl { width: 100%; padding: 10px 6px; border-radius: 13px; background: var(--st); color: #fff; font-size: 15px; font-weight: 800; letter-spacing: -.01em; text-align: center; line-height: 1.1; }
.station .tray { right: -10px; top: -10px; bottom: auto; }
.station .stamp-chip { right: auto; left: 50%; top: -14px; margin-left: -40px; }
.station.stamped .disc { background: none; color: inherit; }
.station.stamped { box-shadow: inset 0 0 0 3px var(--st), 0 0 0 10px color-mix(in srgb, var(--st) 16%, transparent); }
.station.hot { box-shadow: inset 0 0 0 3px var(--st), 0 0 0 10px color-mix(in srgb, var(--st) 20%, transparent); }
.station.hot .disc { animation: want 1s ease-in-out infinite; }
.room .station { width: 172px; height: 76px; padding: 0 12px 0 6px; flex-direction: row; justify-content: flex-start; gap: 4px; border-radius: 18px; background: linear-gradient(90deg, #fff 0%, var(--st-bg) 100%); }
.room .station .disc { flex: none; width: 70px; height: 60px; }
.room .station .st-art { width: 70px; height: 56px; }
.room .station .sl { width: auto; padding: 0; background: none; color: var(--st); font-size: 14.5px; text-align: left; }
.room .station .stamp-chip { top: -14px; }
/* the card's route, in the stops' colours */
.cr { background: var(--st-bg, var(--sage3)); color: var(--st, var(--ink)); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--st, var(--ink)) 25%, transparent); }
.cr b { color: var(--st, var(--ink)); }
.cr i { background: var(--st, var(--ink)); }
.cr.next { background: #fff; box-shadow: inset 0 0 0 2.2px var(--st, var(--ink)); }
.cr.done { background: var(--green-bg); color: var(--green2); box-shadow: none; }
.cr.done b { color: var(--green2); }
.cr.done i { background: var(--green2); }

/* ── The guided cases: the ghost hand carries a see-through copy of the card, and one dotted line
   shows only the next leg ── */
.tut-line { position: absolute; left: 0; top: 0; width: 1180px; height: 820px; pointer-events: none; z-index: 7; overflow: visible; }
.tut-line line { stroke: var(--ink); stroke-width: 4; stroke-linecap: round; stroke-dasharray: .1 13; opacity: .45; animation: lineMarch .9s linear infinite; }
.tut-line path { fill: var(--ink); opacity: .55; }
@keyframes lineMarch { to { stroke-dashoffset: -13.1; } }
.ghost .gcard { display: none; position: absolute; left: 14px; top: calc(6px - var(--lift, 0px)); transform: translate(-50%, -50%); width: max-content; opacity: .8; }
.ghost .gcard .case-in { opacity: 1; scale: .94; }
.ghost > .ic { position: relative; }
.ghost.drag .gcard, .ghost.carry .gcard { display: block; }
.station.peek { box-shadow: inset 0 0 0 3px var(--st), 0 0 0 12px color-mix(in srgb, var(--st) 22%, transparent); }
.station.peek .disc { animation: stampPop .45s var(--spring); }
/* the route chips carry the stop's own picture, small */
.cr .st-art { width: 30px; height: 24px; flex: none; margin: -2px -1px; }
.room .cr .st-art { width: 22px; height: 18px; }

/* ── A tablet held upright: ask for landscape instead of shrinking the game to a strip ── */
@media (orientation: portrait) {
  body.touch::after { content: "Turn the iPad sideways to play"; position: fixed; inset: 0; z-index: 999; display: grid; place-items: center; padding: 24px; background: var(--paper); color: var(--ink); font: 800 28px/1.2 var(--font); letter-spacing: -.02em; text-align: center; }
}
/* edge to edge on a tablet: any spare band matches the stage's own top and bottom */
body.touch { background: linear-gradient(180deg, var(--paper) 0%, var(--paper2) 62%, #e4ebd6 100%); }
.route-mini span { display: inline-flex; align-items: center; gap: 4px; }

/* ── Execute: the workflow as Streamcell's builder draws it, left to right as on the pull-up and the
   site (neutral greys, violet When, red If, emerald Then, dashed emerald arrows) ── */
.bts-body { top: 218px; bottom: 92px; grid-template-columns: 1fr 2.6fr 1fr !important; grid-template-rows: minmax(0, 1fr); }
.bts-body .step-card h3 { font-size: 20px; }
.bts-body .step-card { min-height: 0; overflow: hidden; }
.step-card.exec { gap: 9px; padding: 16px 16px 14px; }
.wb { flex: 1; min-height: 0; display: flex; flex-direction: column; border-radius: 13px; box-shadow: inset 0 0 0 1px #e5e5e5; overflow: hidden; background: #fff; }
.wb-bar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid #e5e5e5; font-size: 13px; }
.wb-bar b { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.wb-form, .wb-pub { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 7px; font-size: 11.5px; font-weight: 600; white-space: nowrap; flex: none; }
.wb-form { background: #f5f5f5; color: #737373; }
.wb-pub { margin-left: auto; background: #ecfdf5; color: #047857; box-shadow: inset 0 0 0 1px #a7f3d0; }
.wb-form .ic, .wb-pub .ic { width: 12px; height: 12px; }
.wb-canvas { flex: 1; min-height: 0; position: relative; overflow: hidden; background-color: #fff; background-image: radial-gradient(circle, #d4d4d4 1px, transparent 1.2px); background-size: 14px 14px; }
.wb-row { position: relative; z-index: 1; height: 100%; display: flex; align-items: center; gap: 28px; padding: 12px 14px; transform-origin: 0 50%; }
.wb-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.wb-col.acts { flex-grow: 1.2; }
.wb-wires { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; overflow: visible; }
.wb-wires .wire { fill: none; stroke: #059669; stroke-opacity: .75; stroke-width: 1.8; stroke-dasharray: 5 4; stroke-linecap: round; animation: wireIn .5s .25s var(--ease) backwards; }
.wb-wires .head { fill: #059669; animation: wireIn .5s .25s var(--ease) backwards; }
@keyframes wireIn { from { opacity: 0; } }
.wb-node { position: relative; border-radius: 12px; background: #fff; border: 1px solid #e5e5e5; box-shadow: 0 1px 3px rgba(0, 0, 0, .1), 0 1px 2px -1px rgba(0, 0, 0, .1); animation: rise .4s var(--ease) backwards; }
.wb-head { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-bottom: 1px solid #e5e5e5; }
.wb-head b { display: block; font-size: 12.5px; font-weight: 700; line-height: 1.15; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wb-head > span:last-child { min-width: 0; }
.wb-head small { display: block; font-size: 8.5px; line-height: 1.3; letter-spacing: .05em; text-transform: uppercase; color: #737373; font-weight: 600; }
.wb-ic { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; flex: none; }
.wb-ic .ic { width: 14px; height: 14px; }
.wb-ic.when { color: #7c3aed; background: rgba(124, 58, 237, .1); }
.wb-ic.if { color: #dc2626; background: rgba(220, 38, 38, .1); }
.wb-ic.then { color: #059669; background: rgba(5, 150, 105, .1); }
.wb-body { margin: 0; padding: 6px 10px 7px; font-size: 12.5px; line-height: 1.6; color: #404040; font-weight: 500; }
.wb-body em { font-style: normal; font-weight: 700; }
.wb-body em.when { color: #7c3aed; } .wb-body em.if { color: #dc2626; } .wb-body em.then { color: #059669; }
.wb-chip { display: inline-flex; align-items: center; gap: 4px; padding: 0 6px; border-radius: 6px; background: #f5f5f5; box-shadow: inset 0 0 0 1px #ebebeb; font-size: 11.5px; font-weight: 600; color: #171717; line-height: 1.55; }
.wb-chip i { width: 6px; height: 6px; border-radius: 50%; background: #f97316; flex: none; }
/* a showing problem bubble is part of its cage: tapping it catches the problem too (Mahmoud, 23 Oct) */
.cage .bubble.on, .panel.alert .bubble { pointer-events: auto; cursor: pointer; }
.cage.open .bubble { pointer-events: none; }
