/* ONBOARD 1 the first battle's step card (ui/onboard.js) and the CHƠI NHANH quick card (ui/guide.js).
   The step card lives at the bottom-left edge, above the camera buttons — never in the middle of the field; a phone gets it at the top-left under the gun chip. */
#onbCard{position:fixed;left:max(14px,env(safe-area-inset-left));top:auto;bottom:calc(max(16px,env(safe-area-inset-bottom)) + 76px);z-index:15;display:flex;align-items:center;gap:12px;
  min-width:320px;max-width:min(470px,36vw);padding:9px 12px 9px 10px;box-sizing:border-box;pointer-events:none;
  font-family:var(--k-ui,'Saira Condensed',system-ui,sans-serif);color:var(--k-text,#eee7d2);background:linear-gradient(180deg,rgba(16,20,12,.9),rgba(8,10,6,.92));
  border:1px solid rgba(255,174,52,.42);border-left:3px solid var(--k-acc,#ffae34);box-shadow:0 6px 22px rgba(0,0,0,.45);
  clip-path:polygon(0 0,100% 0,100% calc(100% - 10px),calc(100% - 10px) 100%,0 100%);}
#onbCard.hidden,#onbCard.away{display:none;}
#onbCard.ob-pop{animation:obPop .42s cubic-bezier(.2,.8,.2,1);}
@keyframes obPop{0%{opacity:0;translate:0 10px;}100%{opacity:1;translate:0 0;}}
#onbCard .ob-n{flex:none;display:flex;align-items:baseline;justify-content:center;width:46px;height:46px;padding-top:7px;box-sizing:border-box;border-radius:50%;
  background:rgba(255,174,52,.14);border:1px solid rgba(255,174,52,.5);color:var(--k-acc-hi,#ffd27a);}
#onbCard .ob-n b{font-size:24px;line-height:1;font-weight:700;} #onbCard .ob-n i{font-style:normal;font-size:12px;color:var(--k-mute,rgba(238,231,210,.62));margin-left:1px;}
#onbCard .ob-m{flex:1;min-width:0;}
#onbCard .ob-say{font-size:18px;font-weight:600;letter-spacing:.02em;line-height:1.2;text-shadow:0 1px 2px rgba(0,0,0,.6);}
#onbCard .ob-row{display:flex;align-items:center;gap:10px;margin-top:6px;}
#onbCard .ob-keys{flex:1;display:flex;flex-wrap:wrap;gap:6px;min-height:1px;}
#onbCard .ob-k{display:inline-flex;align-items:center;gap:5px;}
html body #onbCard kbd{display:inline-flex;align-items:center;justify-content:center;min-width:30px;height:28px;padding:0 8px;box-sizing:border-box;font-family:var(--k-mono,'Share Tech Mono',monospace);
  font-size:15px;font-weight:700;color:#fff6dc;background:linear-gradient(180deg,rgba(255,255,255,.16),rgba(255,255,255,.05));border:1px solid rgba(255,236,190,.45);
  border-bottom-width:3px;border-radius:5px;letter-spacing:.04em;white-space:nowrap;}
#onbCard .ob-k em{font-style:normal;font-size:14px;color:var(--k-mute,rgba(238,231,210,.62));}
#onbCard .ob-dots{flex:none;display:flex;gap:4px;}
#onbCard .ob-dots i{width:7px;height:7px;border-radius:50%;background:rgba(238,231,210,.2);} #onbCard .ob-dots i.on{background:var(--k-ok,#9fdc58);} #onbCard .ob-dots i.cur{background:var(--k-acc,#ffae34);}
#onbCard .ob-skip{flex:none;display:flex;align-items:center;gap:5px;pointer-events:auto;cursor:pointer;font-size:12px;letter-spacing:.08em;text-transform:uppercase;
  color:var(--k-mute,rgba(238,231,210,.62));padding:3px 0 3px 8px;border-left:1px solid rgba(238,231,210,.18);}
#onbCard .ob-skip:hover{color:#fff6dc;} #onbCard .ob-skip[hidden]{display:none;}
html body #onbCard .ob-skip kbd{height:18px;min-width:0;font-size:10px;padding:0 4px;border-bottom-width:2px;} #onbCard .ob-skip kbd:empty{display:none;}
#onbCard.ok{border-color:rgba(159,220,88,.7);border-left-color:var(--k-ok,#9fdc58);}
#onbCard.ok .ob-n,#onbCard.end .ob-n{background:rgba(159,220,88,.18);border-color:rgba(159,220,88,.7);color:var(--k-ok,#9fdc58);}
#onbCard.ok .ob-n b{font-size:26px;} #onbCard.ok .ob-say{color:#d9f3b8;}
/* the HUD element a step talks about pulses (an arrow-free pointer: never text over the field) */
.onb-hl{animation:obHl 1.15s ease-in-out infinite !important;}
@keyframes obHl{0%,100%{filter:none;box-shadow:0 0 0 0 rgba(255,174,52,0);}50%{filter:brightness(1.55) saturate(1.3);box-shadow:0 0 0 3px rgba(255,174,52,.85),0 0 22px 6px rgba(255,174,52,.4);}}
#stickL.onb-hl,#mFire.onb-hl,#mSpell.onb-hl,#mCrew.onb-hl{border-radius:50%;}
/* phone: bottom-centre between the fire button and the right-hand buttons, under the aim zone — the thumbs keep their corners */
body.touch #onbCard{left:0;right:0;margin:0 auto;width:max-content;top:auto;bottom:max(8px,env(safe-area-inset-bottom));min-width:0;max-width:min(400px,48vw);padding:6px 9px 6px 7px;gap:8px;}
body.touch #onbCard .ob-n{width:34px;height:34px;padding-top:5px;} body.touch #onbCard .ob-n b{font-size:17px;} body.touch #onbCard .ob-n i{font-size:10px;}
body.touch #onbCard .ob-say{font-size:14px;} body.touch #onbCard .ob-row{margin-top:3px;} body.touch #onbCard .ob-skip{font-size:11px;padding:5px 0 5px 10px;}
html body.touch #onbCard kbd{height:22px;font-size:12px;min-width:24px;}

/* ---- CHƠI NHANH quick card ---- */
#guide #guideBody.guide{display:block !important;width:min(1040px,100%) !important;max-width:none !important;margin:0 auto !important;box-sizing:border-box;}
.qc{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:18px 40px;}
.qc h3{margin:0 0 10px;font-family:var(--k-ui,'Saira Condensed',sans-serif);font-size:13px;letter-spacing:.24em;text-transform:uppercase;color:var(--k-acc,#ffae34);font-weight:700;}
.qc-grid{display:flex;flex-direction:column;gap:6px;}
.qc-row{display:grid;grid-template-columns:118px 1fr;align-items:center;gap:14px;padding:6px 12px;background:rgba(255,255,255,.04);border:1px solid rgba(214,226,196,.12);}
.qc-keys{display:flex;flex-wrap:wrap;align-items:center;gap:6px 18px;}
.qc-c{display:inline-flex;align-items:center;gap:6px;} .qc-c i{font-style:normal;color:var(--k-faint,rgba(238,231,210,.38));margin:0 1px;}
.qc-c em{font-style:normal;font-size:16px;color:var(--k-text,#eee7d2);}
html body #guide .qc kbd{display:inline-flex;align-items:center;justify-content:center;min-width:34px;height:32px;padding:0 9px;box-sizing:border-box;font-family:var(--k-mono,'Share Tech Mono',monospace)!important;
  font-size:16px!important;font-weight:700;color:#fff6dc;background:linear-gradient(180deg,rgba(255,255,255,.16),rgba(255,255,255,.05));border:1px solid rgba(255,236,190,.45);border-bottom-width:3px;letter-spacing:.04em;white-space:nowrap;}
.qc-t{font-size:13px;font-weight:700;letter-spacing:.14em;text-transform:uppercase;color:var(--k-acc-hi,#ffd27a);}
.qc-tricks{display:flex;flex-direction:column;gap:8px;}
.qc-tr{display:flex;gap:12px;align-items:center;padding:10px 12px;background:rgba(255,255,255,.035);border:1px solid rgba(214,226,196,.12);font-size:16px;line-height:1.35;color:var(--k-text,#eee7d2);}
.qc-ic{flex:none;width:34px;height:34px;padding:6px;box-sizing:border-box;color:var(--k-acc-hi,#ffd27a);background:rgba(255,174,52,.12);display:flex;} .qc-ic svg{width:100%;height:100%;}
#guide .xk-foot{gap:10px;flex-wrap:wrap;justify-content:flex-end;}
@media (max-width:760px),(max-height:480px){ .qc{gap:8px 16px;} .qc-row{padding:1px 8px;gap:10px;grid-template-columns:76px 1fr;} .qc-keys{gap:3px 12px;} .qc-c em{font-size:12.5px;}
  html body #guide .qc kbd{height:20px;min-width:22px;font-size:11px!important;padding:0 5px;border-bottom-width:2px;} .qc-t{font-size:10.5px;letter-spacing:.1em;} .qc-tr{font-size:12.5px;padding:4px 8px;gap:8px;} .qc-ic{width:24px;height:24px;padding:3px;} .qc h3{margin-bottom:5px;font-size:11px;} .qc-grid,.qc-tricks{gap:4px;} }

/* ONBOARD 2 the pointer (ui/onboard.js place): a pulsing ring round the control a step is about and a small arrow pointing at it from the middle's side;
   on a phone's first step a ghost stick where the thumb goes (the real stick only appears under the thumb) with a knob that shows the drag */
#onbPoint{position:fixed;z-index:40;pointer-events:none;box-sizing:border-box;}
#onbPoint.hidden,#onbPoint.away{display:none;}
#onbPoint .op-ring{position:absolute;inset:0;border:4px solid #ffd27a;border-radius:12px;box-shadow:0 0 0 2px rgba(0,0,0,.55),0 0 18px 5px rgba(255,174,52,.75),inset 0 0 12px rgba(255,174,52,.45);animation:opRing 1s ease-in-out infinite;}
@keyframes opRing{0%,100%{transform:scale(1);opacity:1;}50%{transform:scale(1.1);opacity:.7;}}
#onbPoint .op-arrow{position:absolute;left:0;top:0;width:0;height:0;border-style:solid;border-width:15px 0 15px 26px;border-color:transparent transparent transparent #ffd27a;
  filter:drop-shadow(0 0 2px #000) drop-shadow(0 0 8px rgba(255,174,52,.8));transform-origin:50% 50%;animation:opArrow 1.1s ease-in-out infinite;}
@keyframes opArrow{0%,100%{opacity:1;}50%{opacity:.6;}}
#onbPoint.op-round .op-ring{border-radius:50%;}
#onbPoint .op-knob{display:none;}
#onbPoint.op-stick .op-ring{border-radius:50%;border-width:4px;background:radial-gradient(circle,rgba(255,174,52,.32),rgba(255,174,52,.1) 70%);box-shadow:0 0 18px 4px rgba(255,174,52,.6),0 0 0 2px rgba(0,0,0,.45);}
#onbPoint.op-stick .op-arrow{display:none;}
#onbPoint.op-stick .op-knob{display:block;position:absolute;left:50%;top:50%;width:34px;height:34px;margin:-17px 0 0 -17px;box-sizing:border-box;border-radius:50%;background:radial-gradient(circle at 40% 35%,#ffe2a0,#ffae34 60%,#c97a12);border:2px solid rgba(20,12,2,.7);box-shadow:0 0 0 2px rgba(255,210,122,.6),0 0 14px rgba(255,174,52,.9);
  animation:opKnob 1.6s ease-in-out infinite;}
@keyframes opKnob{0%,15%{transform:translate(0,0);opacity:1;}60%{transform:translate(0,-34px);opacity:1;}80%{transform:translate(0,-34px);opacity:.25;}100%{transform:translate(0,0);opacity:.6;}}

/* ONBOARD 2 a phone's top centre: the objective line (#winLine), a short banner (#combo, ĐỢT 1/5…) and the objective card (#objChip) were all pinned within
   12–28 px of the top and printed over each other — stacked now, one line each, all above the aim zone (25 % of the height) */
html body.touch #winLine#winLine{top:calc(env(safe-area-inset-top,0px) + 3px);white-space:nowrap;text-overflow:ellipsis;overflow:hidden;max-width:min(56vw,480px);line-height:1.2;}
html body.touch #combo#combo{top:calc(env(safe-area-inset-top,0px) + 21px)!important;}
html body.touch #objChip#objChip{top:calc(env(safe-area-inset-top,0px) + 38px)!important;}
html body.touch #edgeNote#edgeNote#edgeNote{top:calc(env(safe-area-inset-top,0px) + 78px)!important;left:50%!important;}   /* a fort's alarm line: under the objective card, not over it */
/* ONBOARD 2 the phone's LÍNH button (get off / on the ride) was never shown since no-tanks dropped the body.hascrew switch — a phone could not leave the saddle */
body.touch:not(.pad) #mbtns .m-crew{display:flex;}
