/* Cobra — all styles scoped under .jl-cobra. No external requests. */
.jl-cobra{--jl-bg:#101418;--jl-fg:#e8f0e8;--jl-accent:#2E7D32;--jl-food:#E53935;
  position:absolute;inset:0;display:flex;flex-direction:column;background:var(--jl-bg);
  color:var(--jl-fg);font:16px/1.35 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  user-select:none;-webkit-user-select:none;overflow:hidden;touch-action:none}
.jl-cobra *{box-sizing:border-box;margin:0;padding:0}
.jl-cobra-hud{display:flex;justify-content:space-between;align-items:center;
  padding:6px 12px;font-size:15px;font-weight:600;letter-spacing:.02em;flex:0 0 auto}
.jl-cobra-hud b{font-variant-numeric:tabular-nums}
.jl-cobra-hud .jl-cobra-lab{opacity:.72;font-weight:500;font-size:12px;
  text-transform:uppercase;display:block}
.jl-cobra-stage{position:relative;flex:1 1 auto;min-height:0;display:flex;
  align-items:center;justify-content:center}
.jl-cobra-stage canvas{display:block;border-radius:6px;touch-action:none}
.jl-cobra-pad{flex:0 0 auto;padding:8px 10px calc(10px + env(safe-area-inset-bottom));
  display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(2,1fr);
  gap:6px;justify-items:center;align-items:center;max-width:260px;margin:0 auto;width:100%}
.jl-cobra-btn{width:100%;min-width:48px;min-height:48px;max-width:82px;aspect-ratio:1;
  border:1px solid #2f3a44;border-radius:12px;background:#1b232b;color:var(--jl-fg);
  font-size:22px;line-height:1;display:flex;align-items:center;justify-content:center;
  cursor:pointer;transition:transform .06s ease,background .06s ease;touch-action:none;
  -webkit-tap-highlight-color:transparent}
.jl-cobra-btn.jl-on{background:#2E7D32;border-color:#43A047;transform:scale(.94)}
.jl-cobra-btn:focus-visible{outline:2px solid #64B5F6;outline-offset:2px}
.jl-cobra-u{grid-column:2;grid-row:1}
.jl-cobra-l{grid-column:1;grid-row:2}
.jl-cobra-d{grid-column:2;grid-row:2}
.jl-cobra-r{grid-column:3;grid-row:2}
.jl-cobra-hint{grid-column:1/-1;text-align:center;font-size:12px;opacity:.6;padding-top:2px}
.jl-cobra-veil{position:absolute;inset:0;display:flex;flex-direction:column;
  align-items:center;justify-content:center;gap:10px;text-align:center;padding:20px;
  background:rgba(9,12,15,.86);z-index:3}
.jl-cobra-veil[hidden]{display:none}
.jl-cobra-veil h1{font-size:22px;font-weight:700}
.jl-cobra-veil p{font-size:15px;opacity:.86;max-width:280px}
.jl-cobra-veil .jl-cobra-rec{color:#FFD54F;font-weight:700}
.jl-cobra-cta{min-height:48px;min-width:150px;padding:0 20px;border:0;border-radius:12px;
  background:#2E7D32;color:#fff;font-size:16px;font-weight:700;cursor:pointer;
  -webkit-tap-highlight-color:transparent}
.jl-cobra-cta:focus-visible{outline:2px solid #64B5F6;outline-offset:2px}
.jl-cobra-err{font-size:15px;line-height:1.5;max-width:300px}
.jl-cobra-err a{color:#64B5F6}
@media (max-height:600px){.jl-cobra-btn{max-width:60px;font-size:19px}
  .jl-cobra-pad{gap:4px}}
@media (prefers-reduced-motion:reduce){.jl-cobra-btn{transition:none}}

/* --- audio mute toggle (shared shape across the six games) ----------------
   Placed bottom-right: every game already uses the top-right for a score or a
   piece preview, so a top-right control collides with it. */
.jl-audio-btn{position:absolute;bottom:calc(8px + env(safe-area-inset-bottom));right:8px;
  z-index:60;width:44px;height:44px;min-width:44px;min-height:44px;border-radius:50%;
  border:1px solid rgba(255,255,255,.18);background:rgba(0,0,0,.5);color:#fff;
  font-size:20px;line-height:1;display:flex;align-items:center;justify-content:center;
  cursor:pointer;padding:0;opacity:.85;-webkit-tap-highlight-color:transparent}
.jl-audio-btn:active{transform:scale(.94)}
.jl-audio-btn:focus-visible{outline:2px solid #64B5F6;outline-offset:2px}

/* --- help button + guideline panel ---------------------------------------
   Sits directly above the sound button so both controls share one corner.
   44x44 to match SH-22. */
.jl-help-btn{position:absolute;bottom:calc(58px + env(safe-area-inset-bottom));right:8px;
  z-index:60;width:44px;height:44px;min-width:44px;min-height:44px;border-radius:50%;
  border:1px solid rgba(255,255,255,.18);background:rgba(0,0,0,.5);color:#fff;
  font-size:19px;font-weight:700;line-height:1;display:flex;align-items:center;
  justify-content:center;cursor:pointer;padding:0;opacity:.85;
  -webkit-tap-highlight-color:transparent}
.jl-help-btn:active{transform:scale(.94)}
.jl-help-btn:focus-visible{outline:2px solid #64B5F6;outline-offset:2px}
/* The panel covers the whole game so nothing behind it competes for attention. */
/* Fully opaque: at .97 the board showed faintly through, which was distracting. */
.jl-help{position:fixed;inset:0;z-index:90;background:#080a0e;
  display:flex;flex-direction:column;padding:18px 16px calc(18px + env(safe-area-inset-bottom));
  overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y}
.jl-help[hidden]{display:none}
.jl-help h2{font-size:20px;font-weight:700;margin-bottom:12px;text-align:center}
.jl-help ul{list-style:none;display:grid;gap:9px;width:100%;max-width:420px;margin:0 auto}
.jl-help li{display:flex;gap:11px;align-items:flex-start;background:#161c24;
  border:1px solid #232c36;border-radius:10px;padding:10px 12px;font-size:14px;line-height:1.45}
.jl-help .jl-help-ico{flex:0 0 auto;width:26px;text-align:center;font-size:18px;line-height:1.3}
.jl-help .jl-help-txt{flex:1 1 auto;min-width:0}
.jl-help-close{min-height:48px;min-width:160px;margin:16px auto 0;padding:0 22px;border:0;
  border-radius:12px;background:#3a4757;color:#fff;font-size:16px;font-weight:700;
  cursor:pointer;-webkit-tap-highlight-color:transparent}
.jl-help-close:focus-visible{outline:2px solid #64B5F6;outline-offset:2px}