/* The launch console (launch.js), and the stamps and the seal that mark the big moments on the
   orders pad. Loaded after play.css. Sizes are in the table's own units (the table is 900 high).

   The console is a piece of the table: a bakelite plate with a brass rim and slotted screws, a red
   button under a hinged safety cover, labels stencilled on. Nothing glows like a screen.

   With "reduce motion" asked for (the block at the end): the cover just opens, the ring just fills,
   and nothing shakes, pulses or slams down. */

/* ---------- stencilled lettering: slab capitals with the bridges of a stencil cut through them */
.stencil{font-family:var(--slab);font-weight:700;text-transform:uppercase;letter-spacing:.14em;
  -webkit-mask-image:repeating-linear-gradient(90deg,#000 0 .5em,transparent .5em .56em);mask-image:repeating-linear-gradient(90deg,#000 0 .5em,transparent .5em .56em)}

/* ---------- the console card */
.pop.launch{width:648px;max-height:none;padding:11px 14px 13px;box-shadow:0 0 0 1.5px var(--ink),0 0 0 4.5px var(--warn),0 0 0 6px var(--ink),0 16px 28px rgba(0,0,0,.6)}
.lc{position:relative;display:grid;grid-template-columns:minmax(0,1fr) 216px;grid-template-rows:auto auto auto 1fr;grid-template-areas:"head head" "brief ctl" "swap ctl" "foot ctl";gap:8px 16px}
.lc-head{grid-area:head;display:flex;align-items:baseline;gap:12px;border-bottom:1.5px solid var(--ink);padding-bottom:6px}
.lc-head .stencil{font-size:17px;line-height:1;color:var(--warn)}
.lc-head i{font:italic 12px/1 var(--text);color:var(--ink2)}
.lc-brief{grid-area:brief;min-width:0}
.lc-target{display:grid;grid-template-columns:auto 1fr;gap:1px 10px;align-items:baseline}
.lc-l{font:700 10px/1 var(--cond);letter-spacing:.16em;color:var(--ink2)}
.lc-target b{font:700 21px/1.1 var(--slab);letter-spacing:.02em}
.lc-target i{grid-column:2;font:12px/1.3 var(--text);color:var(--ink2);display:flex;align-items:center;gap:5px;white-space:nowrap}
.lc-count{display:flex;align-items:center;gap:10px;margin:8px 0 6px;padding:5px 8px;border:1.2px solid var(--line);border-radius:5px;background:rgba(255,255,255,.35);min-height:52px}
.lc-count svg{flex:none;overflow:visible}
.lc-count>span:last-child{display:flex;flex-direction:column;gap:2px}
.lc-count b{font:700 14px/1 var(--slab)}
.lc-count i{font:italic 11.5px/1.2 var(--text);color:var(--ink2)}
.lc-count .stepper{margin:0}
.lc-count .stepper b.num{font:700 21px/30px var(--slab);min-width:40px;text-align:center;border-left:1.2px solid var(--line);border-right:1.2px solid var(--line)}
.lc-facts{margin:0}
.lc-fact{display:grid;grid-template-columns:92px 1fr;gap:0 8px;padding:4px 0 3px;border-top:1.1px solid var(--line)}
.lc-fact dt{font:700 10px/15px var(--cond);letter-spacing:.1em;text-transform:uppercase;color:var(--ink2)}
.lc-fact dd{margin:0;font:12.5px/15.5px var(--text)}
.lc-fact.hot dd,.lc-fact.hot dd b{color:var(--warn)}
.lc-swap{grid-area:swap;border:1.3px solid var(--amber);background:var(--amberbg);border-radius:4px;padding:5px 8px 6px;font-size:12px;display:flex;flex-wrap:wrap;gap:5px;align-items:center}
.lc-swap p{flex:1 1 100%}
.lc-swap .mini i{font-style:italic;text-transform:none;letter-spacing:0;opacity:.8}
.lc-foot{grid-area:foot;align-self:end;border-top:1.5px solid var(--ink);padding-top:8px;display:flex;flex-direction:column;gap:8px}
.lc-foot p{font:12.5px/1.3 var(--text);color:var(--ink2)}
.lc-foot p b{color:var(--ink)}
.lc-btns{display:flex;gap:10px;align-items:center}
.lc .btn.big{font-size:17px;letter-spacing:.1em;padding:14px 30px 12px;min-width:230px}
.lc .btn.big:focus-visible{outline:3px solid var(--you);outline-offset:3px}

/* ---------- the control: plate, button, cover */
.lc-ctl{grid-area:ctl;display:flex;flex-direction:column;gap:8px;--p:0}
.lc-plate{position:relative;border-radius:11px;padding:13px 12px 11px;display:flex;flex-direction:column;align-items:center;gap:7px;
  background:#2a1c14 radial-gradient(ellipse at 30% 12%,rgba(120,88,62,.6),rgba(42,28,20,0) 62%);
  box-shadow:inset 0 1px 0 rgba(255,225,180,.28),inset 0 -3px 6px rgba(0,0,0,.6),0 0 0 1.5px #120b07,0 0 0 5px #b8943f,0 0 0 6.2px #5e4513,0 7px 10px rgba(0,0,0,.5)}
.lc-screw{position:absolute;width:9px;height:9px;border-radius:50%;background:radial-gradient(circle at 35% 30%,#f3dc97,#b8943f 55%,#6d5118);box-shadow:0 1px 1px rgba(0,0,0,.7)}
.lc-screw:after{content:"";position:absolute;left:1px;right:1px;top:4px;height:1.2px;background:#3d2a0a;transform:rotate(-32deg)}
.lc-screw.a{left:6px;top:6px}.lc-screw.b{right:6px;top:6px}.lc-screw.c{left:6px;bottom:6px}.lc-screw.d{right:6px;bottom:6px}
.lc-screw.b:after,.lc-screw.c:after{transform:rotate(48deg)}
.lc-label{font-size:10.5px;line-height:1;color:#e3c676;height:44px;display:flex;align-items:flex-start;padding-top:2px}
.lc-well{position:relative;width:132px;height:132px}
.lc-ring{position:absolute;inset:0;width:132px;height:132px}
.lc-ring circle{fill:none;stroke-width:7}
.lc-ring .trk{stroke:rgba(255,236,200,.13)}
.lc-ring .fill{stroke:#f3d77c;stroke-dasharray:1;stroke-dashoffset:calc(1 - var(--p))}
.lc-btn{appearance:none;position:absolute;left:19px;top:19px;width:94px;height:94px;border-radius:50%;border:0;cursor:pointer;touch-action:none;user-select:none;-webkit-user-select:none;
  background:radial-gradient(circle at 36% 30%,#f39a86 0,#d6443a 26%,#a3262c 62%,#6a1114 100%);color:#ffe7d8;
  box-shadow:0 0 0 3px #150c07,0 0 0 7.5px #c9a650,0 0 0 8.7px #5e4513,inset 0 -7px 10px rgba(0,0,0,.4),inset 0 4px 5px rgba(255,255,255,.34),0 6px 6px 6px rgba(0,0,0,.4)}
.lc-btn .stencil{font-size:13px;letter-spacing:.2em;margin-right:-.2em;text-shadow:0 1px 0 rgba(0,0,0,.4);pointer-events:none}
.lc-btn:focus-visible{outline:3px solid #fff;outline-offset:10px}
.lc-plate[data-state="safe"] .lc-btn{filter:brightness(.62) saturate(.7);cursor:default}
.lc-plate[data-state="holding"] .lc-btn,.lc-plate[data-state="done"] .lc-btn{transform:translateY(2px) scale(.965);
  box-shadow:0 0 0 3px #150c07,0 0 0 7.5px #c9a650,0 0 0 8.7px #5e4513,inset 0 -3px 8px rgba(0,0,0,.45),inset 0 2px 3px rgba(255,255,255,.25),0 0 calc(10px + var(--p) * 30px) calc(2px + var(--p) * 9px) rgba(255,96,58,calc(.35 + var(--p) * .5))}
.lc-plate[data-state="holding"] .lc-btn{animation:lc-pulse .46s ease-in-out infinite}
.lc-plate[data-state="holding"]{animation:lc-shake .13s linear infinite}
.lc-plate[data-state="done"] .lc-btn{filter:brightness(1.25)}
.lc-plate[data-state="done"] .lc-ring .fill{stroke-dashoffset:0}
@keyframes lc-pulse{50%{filter:brightness(1.32)}}
@keyframes lc-shake{0%{transform:translate(0,0)}25%{transform:translate(.9px,-.6px)}50%{transform:translate(-.7px,.7px)}75%{transform:translate(.6px,.8px)}100%{transform:translate(0,0)}}

/* the cover: red bakelite in a brass frame, hinged along its top edge */
.lc-cover{appearance:none;position:absolute;left:1px;top:1px;width:130px;height:130px;z-index:3;cursor:pointer;border-radius:13px;border:3.5px solid #c9a650;padding:0;
  background:linear-gradient(158deg,rgba(214,68,58,.9),rgba(126,24,26,.93) 62%,rgba(96,14,18,.95));color:#ffe7d8;
  box-shadow:0 0 0 1.2px #5e4513,inset 0 0 0 1.2px #5e4513,inset 0 10px 14px rgba(255,255,255,.22),0 5px 7px rgba(0,0,0,.55);
  transform-origin:50% 0;transition:transform .36s cubic-bezier(.3,1.35,.5,1),filter .36s;display:flex;align-items:flex-end;justify-content:center}
.lc-cover .lc-glass{position:absolute;left:12px;right:12px;top:12px;height:38px;border-radius:7px;background:linear-gradient(180deg,rgba(255,255,255,.3),rgba(255,255,255,.04));pointer-events:none}
.lc-cover .stencil{font-size:12px;letter-spacing:.18em;margin:0 -.18em 13px 0;text-shadow:0 1px 0 rgba(0,0,0,.45)}
.lc-cover:hover:not([aria-disabled="true"]){filter:brightness(1.1)}
.lc-cover:focus-visible{outline:3px solid #fff;outline-offset:3px}
.lc-cover[aria-disabled="true"]{cursor:not-allowed;filter:grayscale(.5) brightness(.8)}
.lc-plate:not([data-state="safe"]) .lc-cover{transform:perspective(520px) rotateX(116deg);filter:brightness(.72)}
.lc-hinge{position:absolute;left:22px;right:22px;top:-4px;height:8px;border-radius:4px;z-index:4;pointer-events:none;
  background:linear-gradient(180deg,#f3dc97,#b8943f 55%,#6d5118);box-shadow:0 1px 2px rgba(0,0,0,.6),inset 26px 0 0 -24px #5e4513,inset -26px 0 0 -24px #5e4513}
.lc-lamps{display:flex;align-items:center;gap:7px;min-height:26px;margin-top:2px;align-self:stretch;justify-content:center}
.lc-lamp{flex:none;width:11px;height:11px;border-radius:50%;background:#51764d;box-shadow:0 0 0 1.5px #120b07,0 0 0 3px #b8943f,inset 0 1px 1px rgba(255,255,255,.5)}
.lc-plate[data-state="armed"] .lc-lamp{background:#f0b23c;box-shadow:0 0 0 1.5px #120b07,0 0 0 3px #b8943f,0 0 9px 2px rgba(240,178,60,.7),inset 0 1px 1px rgba(255,255,255,.6)}
.lc-plate[data-state="holding"] .lc-lamp,.lc-plate[data-state="done"] .lc-lamp{background:#ff5a3c;box-shadow:0 0 0 1.5px #120b07,0 0 0 3px #b8943f,0 0 10px 3px rgba(255,90,60,.8),inset 0 1px 1px rgba(255,255,255,.6)}
.lc-state{font:700 10.5px/1.2 var(--cond);letter-spacing:.1em;text-transform:uppercase;color:#eadcbd;text-align:left;max-width:160px}
.lc-how{font:11.5px/1.35 var(--text);color:var(--ink2)}
.lc-how b{color:var(--ink)}
.lc-plate.locked .lc-well{filter:grayscale(.6)}

/* the stamp that comes down when the hold is complete */
.lc-stamp{display:none;font-size:30px;line-height:1.08;text-align:center;color:var(--warn);border:4px solid var(--warn);border-radius:7px;padding:9px 16px 6px;letter-spacing:.16em;transform:rotate(-9deg);background:rgba(246,239,221,.86);pointer-events:none}
.lc.done>.lc-stamp{display:block;position:absolute;left:54px;top:128px;z-index:5;animation:lc-stamp .34s cubic-bezier(.2,1.5,.4,1) both;box-shadow:0 0 0 3px rgba(246,239,221,.86)}
@keyframes lc-stamp{0%{transform:rotate(-9deg) scale(2.7);opacity:0}55%{opacity:1}100%{transform:rotate(-9deg) scale(1);opacity:1}}
.lc.done .lc-brief,.lc.done .lc-swap{opacity:.55}
/* looking again at a launch that is already on the pad */
.lc-slip{position:relative;display:flex;flex-direction:column;align-items:center;gap:10px;padding:16px 10px 14px;border-radius:4px;background:#FBF6E6 var(--grain);box-shadow:0 0 0 1px rgba(60,40,20,.6),0 2px 0 #d9cfb4,0 3px 0 rgba(60,40,20,.5),0 8px 10px rgba(0,0,0,.35)}
.lc-slip svg{overflow:visible}
.lc-slip .lc-stamp.on{display:block;font-size:19px;border-width:3px;padding:7px 10px 4px;background:none}
.lc-slip i{font:italic 12px/1.3 var(--text);color:var(--ink2);text-align:center}

/* ---------- the orders pad: stamps on the lines that are moments, and the seal when handed in */
.pad li .stamp.stencil{letter-spacing:.14em;transform-origin:50% 50%}
.pad li .stamp.st{color:#5c4a12;border-color:#8a7226;background:rgba(226,190,58,.2);transform:rotate(-3deg)}
.pad li.fresh{animation:pad-in 1s ease-out both}
.pad li.fresh .stamp{animation:stamp-down .42s cubic-bezier(.2,1.5,.4,1) both}
@keyframes pad-in{0%{box-shadow:inset 0 0 0 60px rgba(226,190,58,.5)}100%{box-shadow:inset 0 0 0 60px rgba(226,190,58,0)}}
@keyframes stamp-down{0%{transform:rotate(-4deg) scale(2.8);opacity:0}55%{opacity:1}100%{transform:rotate(-4deg) scale(1);opacity:1}}
.pad li.launch{background:var(--warnbg);box-shadow:inset 4px 0 0 var(--warn)}
.pad li.launch:hover,.pad li.launch.hot{background:#ecc9bd}
.pad li.launch.fresh{animation:none}
.pad li.launch .os{display:flex;flex-direction:column;gap:1px;padding:3px 0 2px;line-height:1.2}
.pad li.launch .fly{font:italic 11px/1.2 var(--text);color:var(--warn)}
.pad li .sd{flex:none;color:var(--warn);border-color:var(--warn);background:#fffaf0;font-size:10.5px;padding:5px 7px 4px}
/* the seal: a stamp in the pad's heading, beside the count, so it never lies over an order or its cost */
.pad .seal{flex:none;display:inline-block;transform:rotate(-3deg);margin:-3px 0;text-align:center;color:#2F4A3C;border:2px solid #2F4A3C;border-radius:4px;padding:2px 7px 0;background:rgba(251,246,230,.8);box-shadow:0 0 0 1.5px rgba(251,246,230,.8),0 0 0 2.8px #2F4A3C;cursor:help}
.pad .seal b{display:block;font-size:13px;line-height:1;letter-spacing:.16em;margin-right:-.16em}
.pad .seal.fresh{animation:seal-down .46s cubic-bezier(.2,1.5,.4,1) both}
@keyframes seal-down{0%{transform:rotate(-3deg) scale(2.6);opacity:0}55%{opacity:1}100%{transform:rotate(-3deg) scale(1);opacity:1}}
.pad:has(.seal) .pad-top{background:#2F4A3C}
.pad:has(.seal) ol li{color:var(--ink2)}

/* ---------- the last round, on the top strip and on the Hand in button */
.lastround{flex:none;font:700 10.5px/1 var(--slab);font-style:normal;letter-spacing:.14em;white-space:nowrap;color:var(--warn);border:1.8px solid var(--warn);border-radius:3px;padding:4px 6px 3px;transform:rotate(-3deg)}
.handin .lastround{color:#ffc2b0;border-color:#ffc2b0;transform:none;font-size:10px;padding:3px 6px 2px}
.handin{gap:5px}
.handin i.then{font:600 10.5px/1.2 var(--cond);font-style:normal;letter-spacing:.08em;text-transform:uppercase;color:#f1e6cc;white-space:normal;text-align:center}

@media (prefers-reduced-motion:reduce){
  .lc-cover{transition:none}
  .lc-plate[data-state="holding"],.lc-plate[data-state="holding"] .lc-btn{animation:none}
  .lc-plate[data-state="holding"] .lc-btn,.lc-plate[data-state="done"] .lc-btn{transform:none;box-shadow:0 0 0 3px #150c07,0 0 0 7.5px #c9a650,0 0 0 8.7px #5e4513,inset 0 -3px 8px rgba(0,0,0,.45),inset 0 2px 3px rgba(255,255,255,.25)}
  .lc.done>.lc-stamp,.pad li.fresh,.pad li.fresh .stamp,.pad .seal.fresh{animation:none}
}

/* the keys, as keys */
.lc-how kbd{font:700 10.5px/1 var(--cond);letter-spacing:.06em;border:1.2px solid var(--ink2);border-bottom-width:2.2px;border-radius:3px;padding:2px 4px 1px;color:var(--ink);background:#fff8e6;white-space:nowrap}
/* a fact that carries on from the one above it has no rule of its own */
.lc-fact.cont{border-top:0;padding-top:0}
/* the cover is locked (a directive is missing) and was pressed: it shakes its head, and the way out lights up */
.lc-plate.nope{animation:lc-nope .42s ease-in-out}
@keyframes lc-nope{0%,100%{transform:translateX(0)}18%{transform:translateX(-7px)}38%{transform:translateX(6px)}58%{transform:translateX(-4px)}78%{transform:translateX(3px)}}
.lc-swap.flash{animation:lc-flash .43s ease-in-out 3}
@keyframes lc-flash{50%{background:#ffd46a;box-shadow:0 0 0 3px var(--amber)}}
@media (prefers-reduced-motion:reduce){
  .lc-plate.nope{animation:none}
  .lc-swap.flash{animation:none;background:#ffd46a;box-shadow:0 0 0 3px var(--amber)}
}

/* The console fits above the hint line under the map (it used to hang over it by a few units and
   cover the hint's words): the briefing lines and the big button are set a little tighter. */
.lc-fact{padding:3px 0 2px}
.lc .btn.big{padding-top:11px;padding-bottom:9px}
