/* The classic skin's look of this game (served as games/bloky.css where HERNA_SKIN is not kamagio).
   Blokobitva: the world is one canvas under everything; over it the sides with their health at the top,
   the little map, and at the bottom the walking pad (left), the strip of what I have (above it, one tap takes a
   weapon) and the actions (right). The game brings its own colours (a sky, blocks): the buttons are dark, chunky
   blocks in both skins — every text on them is white on #141a2b or dark on a light block, whatever the skin. */
.bloky{position:absolute;inset:0;overflow:hidden;background:#123;user-select:none;-webkit-user-select:none;touch-action:none;font-family:var(--ui);--glass:rgba(16,21,36,.86);--edge:rgba(255,255,255,.55);--ink:#141a2b}
.bloky-cv{position:absolute;inset:0;width:100%;height:100%;display:block;touch-action:none;cursor:crosshair}
.bloky button{font:inherit;color:inherit;cursor:pointer;touch-action:manipulation}
.bloky button:disabled{opacity:.62;filter:saturate(.35);cursor:default}
.bloky kbd{font:800 .62rem/1 var(--ui);padding:.16em .36em;border-radius:5px;background:#fff;color:var(--ink);box-shadow:0 1.5px 0 rgba(0,0,0,.45)}

/* ── the top: sides, the clock, whose turn, wind ────────────────────── */
.bloky-top{position:absolute;left:0;right:0;top:0;display:grid;gap:4px;padding:5px 6px 0;pointer-events:none}
.bloky-sides{display:flex;gap:5px;justify-content:center;flex-wrap:wrap;padding-right:0}
.bloky-side{display:flex;align-items:center;gap:5px;min-width:0;max-width:49%;padding:3px 8px 3px 6px;border-radius:10px;background:var(--glass);color:#fff;font-size:.78rem;line-height:1.2;border:2px solid rgba(255,255,255,.14);box-shadow:0 2px 0 rgba(0,0,0,.35)}
.bloky-side.turn{border-color:var(--c);box-shadow:0 2px 0 rgba(0,0,0,.35),0 0 0 2px color-mix(in srgb,var(--c) 45%,transparent)}
.bloky-side>i{font-style:normal;opacity:.6}
.bloky-who{min-width:0;max-width:6.5em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#fff}
.bloky-who.off{opacity:.5}
.bloky-hp{flex:0 0 46px;height:9px;border-radius:3px;background:rgba(255,255,255,.2);overflow:hidden;box-shadow:inset 0 0 0 1px rgba(0,0,0,.4)}
.bloky-hp i{display:block;height:100%;background:var(--c);box-shadow:inset 0 3px 0 rgba(255,255,255,.3);transition:width .4s}
.bloky-side b{font-weight:800;color:#fff;min-width:1.6em;text-align:right}
.bloky-mid{display:flex;justify-content:center;align-items:center;gap:6px;flex-wrap:wrap}
.bloky-status{padding:.3em .8em;font-size:.86rem;background:var(--glass);color:#fff;border-radius:10px;box-shadow:0 2px 0 rgba(0,0,0,.35)}
.bloky-status.go{background:var(--gold);color:#17170f}
.bloky-status.late{animation:bloky-late .5s infinite alternate}
@keyframes bloky-late{to{background:#ff5a4d;color:#fff}}
.bloky-coins[hidden],.bloky-replay[hidden],.bloky-status[hidden],.bloky-clock[hidden],.bloky-up[hidden]{display:none}
.bloky-coins,.bloky-wind{padding:.3em .7em;border-radius:10px;background:var(--glass);color:#fff;font-size:.8rem;font-weight:700;white-space:nowrap;box-shadow:0 2px 0 rgba(0,0,0,.35)}
.bloky-up{padding:.3em .6em;border-radius:10px;background:#c8382c;color:#fff;font-size:.76rem;font-weight:800;white-space:nowrap;box-shadow:0 2px 0 rgba(0,0,0,.35)}
.bloky-clock{--k:1;width:34px;height:34px;flex:0 0 34px;border-radius:50%;display:grid;place-items:center;background:conic-gradient(#fff calc(var(--k)*360deg),rgba(255,255,255,.22) 0);box-shadow:0 2px 0 rgba(0,0,0,.35)}
.bloky-clock b{width:26px;height:26px;border-radius:50%;display:grid;place-items:center;background:var(--ink);color:#fff;font:800 .74rem/1 var(--ui);font-variant-numeric:tabular-nums}
.bloky-clock.late{background:conic-gradient(#ff5a4d calc(var(--k)*360deg),rgba(255,255,255,.22) 0);animation:bloky-tick .5s infinite alternate}
@keyframes bloky-tick{to{transform:scale(1.14)}}
.bloky-replay{position:absolute;right:6px;top:134px;width:44px;height:40px;border-radius:12px;border:2px solid var(--edge);background:var(--glass);color:#fff!important;font-size:1.1rem!important}
.bloky-mini{position:absolute;right:6px;top:74px;width:108px;height:54px;border-radius:6px;background:rgba(12,16,28,.6);border:2px solid rgba(255,255,255,.4);image-rendering:pixelated;touch-action:none;cursor:pointer}

/* ── the bottom: pad, actions ───────────────────────────────────────── */
.bloky-ctl{position:absolute;left:0;right:0;bottom:0;display:flex;align-items:flex-end;justify-content:space-between;gap:6px;padding:6px;padding-bottom:max(6px,env(safe-area-inset-bottom));pointer-events:none}
.bloky-pad,.bloky-acts{display:flex;gap:5px;pointer-events:auto}
.bloky-ctl button{min-width:54px;height:54px;padding:0 6px;border-radius:14px;border:2px solid var(--edge);background:var(--glass);color:#fff;font-size:1.35rem;line-height:1;display:grid;place-items:center;box-shadow:0 3px 0 rgba(0,0,0,.45)}
.bloky-ctl button.on,.bloky-ctl button:active:not(:disabled){background:#fff;color:var(--ink);transform:translateY(2px);box-shadow:0 1px 0 rgba(0,0,0,.45)}
.bloky-ctl:not(.mine) .bloky-pad,.bloky-ctl:not(.mine) .bloky-end,.bloky-ctl:not(.mine) [data-b=build]{opacity:.35}
.bloky-jump{border-color:#7dd3ff!important}
.bloky-wp{position:relative;min-width:66px!important;grid-template-rows:1fr auto;padding:3px 4px 4px!important;border-color:#ffe14a!important}
.bloky-wp i{font-style:normal;font-size:1.55rem}
.bloky-wp em{font:800 .56rem/1.1 var(--ui);font-style:normal;max-width:60px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:inherit}
.bloky-wp small,.bloky-bl small{position:absolute;right:3px;top:2px;font-size:.62rem;font-weight:800}
.bloky-end{border-color:#8cc653!important;color:#b8f08a!important}
.bloky-end:active:not(:disabled){color:var(--ink)!important}
.bloky-bl{position:relative;min-width:50px!important}
.bloky-bl i{font-style:normal}

/* ── the strip: everything I have, one tap to take it ───────────────── */
.bloky-strip{position:absolute;left:0;right:0;bottom:calc(66px + env(safe-area-inset-bottom));display:flex;gap:5px;padding:4px 6px 5px;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;touch-action:pan-x;-webkit-overflow-scrolling:touch;z-index:1}
.bloky-strip::-webkit-scrollbar{display:none}
.bloky-strip[hidden],.bloky-keys[hidden]{display:none}
.bloky-strip button{position:relative;flex:0 0 58px;height:60px;padding:3px 2px 3px;border-radius:12px;border:2px solid rgba(255,255,255,.38);background:var(--glass);color:#fff;display:grid;grid-template-rows:1fr auto;justify-items:center;align-items:center;box-shadow:0 3px 0 rgba(0,0,0,.45)}
.bloky-strip i{font-style:normal;font-size:1.55rem;line-height:1}
.bloky-strip em{font:800 .56rem/1.05 var(--ui);font-style:normal;max-width:54px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#dfe6f5}
.bloky-strip small{position:absolute;right:3px;top:1px;font:800 .6rem/1.2 var(--ui);color:#ffe14a}
.bloky-strip kbd{position:absolute;left:2px;top:2px;font-size:.54rem}
.bloky-strip button.on{background:#fff;border-color:#ffe14a;color:var(--ink);transform:translateY(-3px);box-shadow:0 6px 0 rgba(0,0,0,.45),0 0 0 3px rgba(255,225,74,.55)}
.bloky-strip button.on em{color:var(--ink)}
.bloky-strip button.on small{color:#8a5a00}
.bloky-strip button.sug::after{content:"💡";position:absolute;left:50%;transform:translateX(-50%);top:-10px;font-size:.86rem;filter:drop-shadow(0 1px 0 rgba(0,0,0,.5))}
.bloky-strip button.sug:not(.on){border-color:#ffe14a;animation:bloky-sug 1s infinite alternate}
@keyframes bloky-sug{to{box-shadow:0 3px 0 rgba(0,0,0,.45),0 0 0 3px rgba(255,225,74,.45)}}
.bloky-strip button.wod::before{content:"★";position:absolute;right:-2px;bottom:12px;font-size:.8rem;color:#ffe14a;text-shadow:0 1px 0 #000}
.bloky-strip button.more{border-style:dashed}

.bloky-fz{position:absolute;right:6px;bottom:calc(134px + env(safe-area-inset-bottom));min-width:62px;height:42px;padding:0 9px;display:flex;align-items:center;gap:5px;border-radius:12px;border:2px solid #ffb347;background:var(--glass);color:#fff;font-size:1rem;box-shadow:0 3px 0 rgba(0,0,0,.45);z-index:1}
.bloky-fz[hidden]{display:none}
.bloky-fz i{font-style:normal}
.bloky-fz b{font:800 .9rem/1 var(--ui);color:#fff;white-space:nowrap}
.bloky-fz:active{transform:translateY(2px);box-shadow:0 1px 0 rgba(0,0,0,.45)}

/* ── what belongs to the chosen thing ───────────────────────────────── */
.bloky-extra{position:absolute;left:50%;transform:translateX(-50%);bottom:calc(68px + env(safe-area-inset-bottom));display:grid;gap:4px;justify-items:center;width:max-content;max-width:calc(100% - 12px);z-index:1}
.bloky.has-strip .bloky-extra{bottom:calc(136px + env(safe-area-inset-bottom))}
.bloky-extra[hidden],.bloky-ars[hidden],.bloky-tut[hidden]{display:none}
.bloky-row{display:flex;align-items:center;gap:4px;padding:4px;border-radius:14px;background:var(--glass);color:#fff;flex-wrap:wrap;justify-content:center;max-width:100%;box-shadow:0 3px 0 rgba(0,0,0,.35)}
.bloky-row button{position:relative;min-width:42px;height:42px;padding:0 8px;border-radius:10px;border:2px solid rgba(255,255,255,.45);background:transparent;color:#fff;font-size:1.05rem;font-weight:700}
.bloky-row button.on{background:#fff;color:var(--ink)}
.bloky-row button.go{background:#8cc653;border-color:#8cc653;color:#17170f;padding:0 14px}
.bloky-row button.go.big{min-width:150px;height:54px;font-size:1.25rem;font-weight:800;border-radius:16px;box-shadow:0 4px 0 #4f7d27;animation:bloky-go .8s infinite alternate}
@keyframes bloky-go{to{transform:scale(1.05)}}
.bloky-row button small{position:absolute;right:2px;bottom:0;font-size:.6rem}
.bloky-row .sep{width:1px;align-self:stretch;background:rgba(255,255,255,.3);margin:0 2px}
.bloky-hint{padding:0 8px;font-size:.8rem;max-width:13em;line-height:1.2;color:#fff}

/* ── the arsenal and the shop ───────────────────────────────────────── */
.bloky-ars{position:absolute;left:6px;right:6px;bottom:calc(66px + env(safe-area-inset-bottom));max-width:430px;max-height:calc(100% - 150px);margin:0 auto;overflow:auto;padding:8px;border-radius:16px;background:#141a2b;color:#fff;z-index:3;border:2px solid rgba(255,255,255,.25);box-shadow:0 8px 24px rgba(0,0,0,.5)}
.bloky-arsh{display:flex;align-items:center;gap:8px;margin:0 0 6px;font-size:.9rem}
.bloky-arsh b{flex:1}
.bloky-arsh button{min-width:40px;height:36px;padding:0 8px;border-radius:10px;border:2px solid rgba(255,255,255,.45);background:transparent;color:#fff;font-size:.8rem;font-weight:700}
.bloky-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(76px,1fr));gap:5px}
.bloky-grid button{position:relative;display:grid;justify-items:center;gap:1px;padding:6px 2px 4px;border-radius:12px;border:2px solid rgba(255,255,255,.28);background:rgba(255,255,255,.07);color:#fff;min-height:78px}
.bloky-grid button.on{border-color:#ffe14a;background:rgba(255,225,74,.18)}
.bloky-grid button.none{opacity:.72}
.bloky-grid button.none i{filter:grayscale(.7)}
.bloky-grid button.wod::before{content:"★";position:absolute;right:4px;top:2px;color:#ffe14a;font-size:.8rem}
.bloky-grid i{font-style:normal;font-size:1.95rem;line-height:1.1}
.bloky-grid b{font-size:.64rem;font-weight:700;line-height:1.1;text-align:center;color:#fff}
.bloky-grid small{font-size:.68rem;font-weight:800;color:#ffe14a}
.bloky-grid small.buy{color:#8cf08c}
.bloky-grid small.dear{color:#ffb0a8}
.bloky-cats{display:flex;gap:4px;margin:0 0 4px}
.bloky-cats button{position:relative;flex:1;height:44px;border-radius:12px;border:2px solid rgba(255,255,255,.28);background:rgba(255,255,255,.07);font-size:1.25rem}
.bloky-cats button.on{background:#fff;border-color:#fff}
.bloky-cats small{position:absolute;right:2px;bottom:0;font-size:.6rem;font-weight:800;color:#ffe14a}
.bloky-cats button.on small{color:#17170f}
.bloky-catn{margin:6px 2px 6px;font-size:.78rem;font-weight:800;letter-spacing:.05em;text-transform:uppercase;color:#c3cde6}
.bloky-card{position:sticky;top:-8px;z-index:1;display:flex;gap:10px;align-items:flex-start;margin:2px 0 6px;padding:8px;border-radius:12px;background:#232b40;box-shadow:0 6px 10px -6px rgba(0,0,0,.6)}
.bloky-card>i{font-style:normal;font-size:2.2rem;line-height:1}
.bloky-card b{font-size:.95rem;color:#fff}
.bloky-card p{margin:2px 0 4px;font-size:.8rem;line-height:1.3;color:#e6ebf7}
.bloky-wod{font-style:normal;font-size:.7rem;font-weight:800;color:#ffe14a;white-space:nowrap}
.bloky-sts{display:grid;grid-template-columns:1fr 1fr;gap:2px 10px}
.bloky-st{display:flex;align-items:center;gap:5px;font-size:.66rem}
.bloky-st em{font-style:normal;min-width:3.2em;color:#c3cde6}
.bloky-st i{flex:1;height:6px;border-radius:3px;background:rgba(255,255,255,.15);overflow:hidden}
.bloky-st b{display:block;height:100%;background:linear-gradient(90deg,#7dff9a,#ffe14a,#ff5a4d)}
.bloky-mode{width:100%;min-height:38px;margin-top:4px;border-radius:10px;border:1px solid rgba(255,255,255,.35);background:transparent;color:#fff;font-size:.76rem}
.bloky-ring{position:absolute;inset:-5px;border-radius:18px;pointer-events:none}

/* ── the lessons ────────────────────────────────────────────────────── */
.bloky-tut{position:absolute;left:50%;top:132px;transform:translateX(-50%);width:max-content;max-width:calc(100% - 24px);padding:8px 10px 8px 12px;border-radius:14px;background:#ffe14a;color:#17170f;font-size:.92rem;font-weight:700;line-height:1.3;box-shadow:0 4px 0 rgba(0,0,0,.3);z-index:2}
.bloky-tut b{opacity:.6;margin-right:.3em}
.bloky-tut button{margin:.15em 0 .15em .4em;padding:.3em .8em;min-height:30px;border-radius:999px;border:0;background:#17170f;color:#fff;font-size:.8rem;font-weight:700}
.bloky-tut button.quiet{background:transparent;color:#17170f;text-decoration:underline}
.bloky[data-tut="1"] .bloky-pad button,.bloky[data-tut="c0"] .bloky-pad [data-k=r],.bloky[data-tut="2"] .bloky-strip button:not(.on),.bloky[data-tut="c2"] .bloky-strip button:not(.on){animation:bloky-pulse .7s infinite alternate}
@keyframes bloky-pulse{to{border-color:#ffe14a;box-shadow:0 0 0 4px rgba(255,225,74,.6)}}

/* ── the keys, for whoever sits at a keyboard ───────────────────────── */
.bloky-keys{position:absolute;left:8px;bottom:calc(140px + env(safe-area-inset-bottom));display:grid;gap:3px;padding:8px 26px 8px 9px;border-radius:12px;background:var(--glass);color:#fff;font-size:.72rem;line-height:1.25;max-width:230px;box-shadow:0 3px 0 rgba(0,0,0,.35)}
.bloky-keys span{display:block;color:#fff}
.bloky-keys button{position:absolute;right:3px;top:3px;width:22px;height:22px;border-radius:7px;border:0;background:rgba(255,255,255,.16);color:#fff;font-size:.7rem;line-height:1}
@media (pointer:coarse){.bloky-keys{display:none}}

/* a low screen (a phone lying down): everything smaller, the map beside the sides, the strip between the pad and the actions */
@media (max-height:460px){
  .bloky-top{grid-template-columns:auto 1fr;align-items:start;padding-right:120px}
  .bloky-sides{justify-content:flex-start}
  .bloky-mid{justify-content:flex-start}
  .bloky-mini{top:5px}
  .bloky-replay{top:64px}
  .bloky-ctl button{min-width:48px;height:48px}
  .bloky-wp{min-width:58px!important}
  .bloky-tut{top:62px;font-size:.84rem}
  .bloky-ars{max-height:calc(100% - 70px);max-width:560px}
  .bloky-strip{left:170px;right:182px;bottom:calc(2px + env(safe-area-inset-bottom));justify-content:safe center}
  .bloky-strip button{flex-basis:52px;height:52px}
  .bloky-strip i{font-size:1.3rem}
  .bloky-extra,.bloky.has-strip .bloky-extra{bottom:calc(62px + env(safe-area-inset-bottom))}
  .bloky-keys{bottom:64px;font-size:.66rem}
  .bloky-fz{bottom:calc(60px + env(safe-area-inset-bottom));height:38px}
  .bloky-card p{display:none}
  .bloky-grid button{min-height:64px}
  .bloky-grid i{font-size:1.5rem}
}
@media (max-width:350px){
  .bloky-ctl{gap:3px;padding:4px}
  .bloky-pad,.bloky-acts{gap:3px}
  .bloky-ctl button{min-width:46px;height:50px}
  .bloky-wp{min-width:54px!important}
  .bloky-bl{min-width:44px!important}
  .bloky-who{max-width:4.6em}
  .bloky-hp{flex-basis:30px}
  .bloky-strip{bottom:calc(60px + env(safe-area-inset-bottom))}
  .bloky-strip button{flex-basis:54px;height:56px}
  .bloky.has-strip .bloky-extra{bottom:calc(124px + env(safe-area-inset-bottom))}
  .bloky-fz{bottom:calc(122px + env(safe-area-inset-bottom))}
  .bloky-row button{min-width:38px;height:40px;padding:0 6px}
  .bloky-hint{max-width:9.5em;font-size:.74rem}
  .bloky-grid{grid-template-columns:repeat(auto-fill,minmax(68px,1fr))}
}
/* ── the drawn pictures of weapons and tools (bloky-art.js) wherever they stand ── */
.bk-ic{display:inline-block;vertical-align:middle;pointer-events:none;user-select:none;-webkit-user-drag:none;max-width:none}
.bloky-strip i,.bloky-grid i,.bloky-card>i,.bloky-wp i,.bloky-cats button{display:grid;place-items:center}
.bloky-grid button.none .bk-ic{filter:grayscale(.8) opacity(.75)}
.bloky-row button .bk-ic{width:26px;height:26px;margin-right:5px}
.bloky-strip button.more .bk-ic{opacity:.9}
.blk-card>i .bk-ic,.blk-kr>i .bk-ic{display:block}
.blk-card.locked>i .bk-ic{filter:grayscale(.8)}
.blk-cats button{display:grid;place-items:center}
.blk-mine .bk-ic,.blk-kits .vdesc .bk-ic,.blk-next .bk-ic{width:22px;height:22px}
.blk-unlock i .bk-ic{width:44px;height:44px}
/* ── the result: the awards of the match (the sheet's own colours: whatever the skin gives its text) ── */
.bloky-aw{list-style:none;margin:.2rem 0 .6rem;padding:0;display:flex;flex-wrap:wrap;gap:.35rem;justify-content:center}
.bloky-aw li{display:flex;align-items:center;gap:.4rem;padding:.3rem .55rem;border:1.5px solid var(--c,currentColor);border-radius:10px;text-align:left;min-width:0}
.bloky-aw i{font-style:normal;font-size:1.15rem}
.bloky-aw span{display:grid;min-width:0}
.bloky-aw b{font-size:.84rem;line-height:1.15;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:9em}
.bloky-aw small{font-size:.68rem;line-height:1.2;opacity:.85}
/* ── in the lobby: the invitation to the training, the note on the surprise (their own colours: dark on yellow in both skins) ── */
.blk-new{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem;margin:0 0 .7rem;padding:.55rem .7rem;border:2px solid #c99a00;border-radius:12px;background:#ffe14a;color:#17170f}
.blk-new b{flex:1;min-width:9em;font-size:.92rem;color:#17170f}
.blk-new .btn{background:#17170f;color:#fff;border-color:#17170f}
.blk-kits .blk-deal{margin-top:.35rem}
@media (prefers-reduced-motion:reduce){.bloky-status.late,.bloky-clock.late,.bloky [data-tut] button,.bloky-strip button.sug,.bloky-row button.go.big{animation:none}}

/* ── "Zamířit": brings the view back to the figure whose turn it is (shown when it is out of sight or too small) ── */
.bloky-find{position:absolute;left:6px;bottom:calc(134px + env(safe-area-inset-bottom));min-height:42px;padding:0 12px 0 9px;display:flex;align-items:center;gap:6px;border-radius:12px;border:2px solid #ffe14a;background:#141a2b;color:#fff;font-size:1rem;box-shadow:0 3px 0 rgba(0,0,0,.45);z-index:1;animation:bloky-sug 1s infinite alternate}
.bloky-find[hidden]{display:none}
.bloky-find i{font-style:normal}
.bloky-find b{font:800 .86rem/1 var(--ui);color:#fff;white-space:nowrap}
.bloky-cv{cursor:grab}
.bloky-cv:active{cursor:grabbing}
@media (max-height:460px){.bloky-find{bottom:calc(60px + env(safe-area-inset-bottom));min-height:38px}}
@media (max-width:350px){.bloky-find{bottom:calc(122px + env(safe-area-inset-bottom))}}
@media (prefers-reduced-motion:reduce){.bloky-find{animation:none}}

/* the ninja rope's keys (only while hanging on it), the materials of the building bar in one scrolling row */
.bloky-ctl button[hidden]{display:none!important}
.bloky-rope{border-color:#c58e4c!important}
.bloky-mats{flex-wrap:nowrap;overflow-x:auto;justify-content:flex-start;scrollbar-width:none;max-width:calc(100vw - 16px)}
.bloky-mats::-webkit-scrollbar{display:none}
.bloky-mats button{min-width:38px;flex:0 0 auto;padding:0 4px}
.bloky-ctl.roped button{min-width:42px!important;padding:0 2px}
.bloky-ctl.roped .bloky-wp{min-width:56px!important}
.bloky-ctl.roped .bloky-pad,.bloky-ctl.roped .bloky-acts{gap:3px}
