/* ===== Кирка (страница #pickaxe): шахта, которую прорубает кирка с прочностью ===== */
.pk { display: none; --ease-out: cubic-bezier(0.230, 1, 0.320, 1); }
body.is-pk .pk { display: block; animation: cview-in 0.400s var(--ease-out); }
body.is-pk .promo, body.is-pk .cases, body.is-pk .cview, body.is-pk .inv, body.is-pk .dep,
body.is-pk .prof, body.is-pk .upg, body.is-pk .crash, body.is-pk .mines, body.is-pk .ctr { display: none; }
.pk .visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.pk__wrap { max-width: 520px; margin: 0 auto; border-radius: 24px; overflow: hidden; background: #0b1030; box-shadow: inset 0 0 0 1px rgb(170 180 255 / 0.180), 0 22px 44px -22px #000; }
.pk__barico { width: 34px; height: 34px; transform: none; filter: drop-shadow(0 0 8px rgb(122 240 255 / 0.600)); }
#pk-sound .is-off { display: none; }
#pk-sound[aria-pressed="false"] .is-on { display: none; }
#pk-sound[aria-pressed="false"] .is-off { display: block; }
#pk-sound[aria-pressed="false"] { color: #8a93ad; }

/* окно шахты: 9 клеток в ширину, ~13 в высоту; мир внутри едет вверх за киркой */
.pk__scene { position: relative; --cell: 40px; }
.pk__mine { position: relative; height: calc(var(--cell) * 13); overflow: hidden; background: #160f1c; }
.pk__world { position: absolute; left: 0; right: 0; top: 0; will-change: transform; transition: transform var(--cam, 0.250s) linear; }
.pk__sky { position: relative; height: calc(var(--cell) * 4); background: #0b1238 url("../assets/pickaxe/sky.jpg?v=1") center 16% / 100% auto no-repeat; }
.pk__sky::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 12px; z-index: 2;
  background: radial-gradient(10px 7px at 10px 7px, #eef7ff 98%, transparent) 0 0 / 20px 12px repeat-x; filter: drop-shadow(0 2px 4px rgb(200 230 255 / 0.500)); }
.pk__top { display: flex; align-items: center; gap: 8px; padding: 10px 12px 0; }
.pk__logo { height: 50px; margin-right: auto; filter: drop-shadow(0 4px 8px #0008); }
.pk__top .cbal { height: 40px; }
.pk__rows { display: grid; grid-template-columns: repeat(9, var(--cell)); grid-auto-rows: var(--cell); }
.pkc { position: relative; background: #2a1d33 center / cover no-repeat; box-shadow: inset 0 0 0 0.500px rgb(0 0 0 / 0.300); }
.pkc[data-c="s"] { background-image: url("../assets/pickaxe/b-snow.png?v=1"); }
.pkc[data-c="t"] { background-image: url("../assets/pickaxe/b-stone.png?v=1"); }
.pkc[data-c="i"] { background-image: url("../assets/pickaxe/b-ice.png?v=1"); }
.pkc[data-c="a"] { background-image: url("../assets/pickaxe/b-amber.png?v=1"); }
.pkc[data-c="g"] { background-image: url("../assets/pickaxe/b-gold.png?v=1"); }
.pkc[data-c="m"] { background-image: url("../assets/pickaxe/b-gem.png?v=1"); }
.pkc[data-c="c"] { background-image: url("../assets/pickaxe/b-chest.png?v=1"); }
.pkc[data-c="b"] { background-image: url("../assets/pickaxe/b-bomb.png?v=1"); }
.pkc[data-c="h"] { background-image: url("../assets/pickaxe/b-heart.png?v=1"); }
.pkc[data-c="u"] { background-image: url("../assets/pickaxe/b-up.png?v=1"); }
/* прорубленный тоннель */
.pkc.is-gone { background: linear-gradient(180deg, #1f2a4f, #182040); box-shadow: inset 0 0 10px rgb(0 0 0 / 0.600); }
.pkc.is-pop::after { content: ""; position: absolute; inset: 0; background: rgb(255 255 255 / 0.700); animation: pkc-pop 0.300s var(--ease-out) forwards; pointer-events: none; }
@keyframes pkc-pop { to { opacity: 0; transform: scale(1.400); } }
.pkc.is-boom::after { background: radial-gradient(circle, #fff 0%, #ffd66b 30%, #ff6a3d 60%, transparent 75%); animation-duration: 0.450s; }

/* кирка и её прочность */
.pk__hero { position: absolute; left: 0; top: 0; z-index: 4; width: var(--cell); height: var(--cell); pointer-events: none;
  transition: transform var(--step, 0.180s) var(--ease-out); }
.pk__pick { position: absolute; left: -15%; top: -15%; width: 130%; height: 130%; object-fit: contain; filter: drop-shadow(0 4px 6px #000c); transform-origin: 25% 80%; }
.pk__hero.is-swing .pk__pick { animation: pk-swing var(--step, 0.180s) ease-in; }
@keyframes pk-swing { 0% { rotate: -45deg; } 70% { rotate: 25deg; } 100% { rotate: 0deg; } }
.pk__hp { position: absolute; left: 50%; bottom: 100%; transform: translate(-50%, -2px); display: flex; align-items: center; gap: 3px; padding: 3px 7px; border-radius: 9px;
  font: 900 12px/1 var(--font-title); white-space: nowrap; color: #fff; background: rgb(8 12 30 / 0.850); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.150); }
.pk__hp i { font-style: normal; color: #ff4f6a; }
.pk__hp.is-low { box-shadow: inset 0 0 0 1.500px #ff4f6a; }
.pk__hero.is-dead .pk__pick { filter: grayscale(1) brightness(0.600); rotate: 70deg; transition: rotate 0.400s, filter 0.400s; }
/* всплывающие монеты и события */
.pkfloat { position: absolute; z-index: 6; transform: translate(-50%, -50%); pointer-events: none; display: flex; align-items: center; gap: 3px; padding: 3px 7px; border-radius: 9px;
  font: 900 13px/1 var(--font-title); white-space: nowrap; color: #ffe08a; background: rgb(8 12 30 / 0.850); box-shadow: inset 0 0 0 1.500px #ffc94a; animation: pkfloat 1s var(--ease-out) forwards; }
.pkfloat::before { content: ""; width: 10px; height: 11px; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: linear-gradient(160deg, #fff3c2, #ffb800); }
.pkfloat.is-gem { color: #8fe9ff; box-shadow: inset 0 0 0 1.500px #5cc8ff; }
.pkfloat.is-chest { color: #fff; background: linear-gradient(180deg, #ffb347, #e0731a); box-shadow: 0 0 20px #ffb347; font-size: 16px; }
.pkfloat.is-heart { color: #ff8aa0; box-shadow: inset 0 0 0 1.500px #ff4f6a; }
.pkfloat.is-up { color: #6dffb0; box-shadow: inset 0 0 0 1.500px #3ddc8a; }
.pkfloat.is-heart::before, .pkfloat.is-up::before { display: none; }
@keyframes pkfloat { 0% { opacity: 0; transform: translate(-50%, -30%) scale(0.600); } 20% { opacity: 1; transform: translate(-50%, -70%) scale(1.100); } 100% { opacity: 0; transform: translate(-50%, -190%); } }
.pk__note { position: absolute; left: 50%; top: 42%; z-index: 7; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 4px; padding: 14px 22px; border-radius: 18px; text-align: center;
  pointer-events: none; background: rgb(8 12 28 / 0.900); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: pknote 0.400s var(--ease-out); }
.pk__note:empty { display: none; }
.pk__note b { font: 900 30px/1 var(--font-title); color: #ffd84a; }
.pk__note span { font: 800 13px/1.200 var(--font-title); color: #c9d4ee; }
.pk__note.is-win { box-shadow: inset 0 0 0 2px #ffc94a, 0 0 30px -6px #ffc94a; }
.pk__note.is-zero b { color: #c9d4ee; }
@keyframes pknote { from { transform: translate(-50%, -50%) scale(0.700); opacity: 0; } }

/* панель под шахтой */
.pk__panel { display: grid; gap: 8px; padding: 10px; background: linear-gradient(180deg, #121836, #0b1030); border-top: 1px solid rgb(255 255 255 / 0.080); }
.pk__row1 { display: flex; align-items: center; gap: 8px; }
.pk__win { display: grid; gap: 3px; padding: 8px 14px; border-radius: 14px; background: rgb(8 12 30 / 0.850); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.120); }
.pk__win small { font: 800 12px/1 var(--font-title); color: #aab6d6; }
.pk__win b { font: 900 22px/1 var(--font-title); color: #ffd84a; font-variant-numeric: tabular-nums; }
.pk__win.is-big { box-shadow: inset 0 0 0 2px #ffc94a, 0 0 24px -4px #ffc94a; }
.pk__tools { display: flex; gap: 8px; margin-left: auto; }
.pk__tool { display: grid; place-items: center; width: 46px; height: 46px; border: 0; border-radius: 14px; cursor: pointer; color: #e6ecfa;
  background: rgb(12 15 32 / 0.800); box-shadow: inset 0 0 0 1.500px rgb(92 200 255 / 0.450); }
.pk__tool svg { width: 24px; height: 24px; }
.pk__tool[aria-pressed="true"] { color: #0b1a44; background: linear-gradient(180deg, #8fe0ff, #4aa3ff); box-shadow: 0 0 14px -2px #5cc8ff; }
.pk__bar { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 8px; }
.pk__amt { height: 60px; gap: 6px; background: rgb(8 11 22 / 0.900); }
.pk__amt .cbal__coin { flex: 0 0 auto; width: 22px; height: 24px; font-size: 11px; }
.pk__amt input { text-align: center; font-size: 19px; }
.pk__go { border: 0; border-radius: 17px; cursor: pointer; font: 900 20px/1 var(--font-title); color: #04210f;
  background: linear-gradient(180deg, #5cf09a, #18a95f); box-shadow: inset 0 1px 0 #ffffff80, inset 0 -5px 0 #0002, 0 10px 22px -10px #18a95f; transition: transform 0.150s, filter 0.200s; }
.pk__go:active { transform: scale(0.970); }
.pk__go:disabled { cursor: default; filter: saturate(0.400) brightness(0.700); }
.pk__go.is-stop { color: #fff; background: linear-gradient(180deg, #ff7a8a, #e0344f); }
.pk__msg { margin: 0; font: 700 13px/1.300 var(--font-title); color: #ff8a8a; text-align: center; }
.pk__msg:empty { display: none; }
.pk__msg a { color: #8cc8ff; }
/* что сколько даёт */
.pk__legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 10px 10px 14px; background: #0b1030; border-top: 1px solid #ffffff10; }
.pk__legend span { display: flex; align-items: center; gap: 7px; padding: 5px 7px; border-radius: 10px; font: 800 12px/1.150 var(--font-title); color: #c9d4ee; background: rgb(255 255 255 / 0.040); }
.pk__legend i { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 5px; background: center / cover no-repeat; }
.pk__legend b { margin-left: auto; color: #ffd84a; white-space: nowrap; }
.pk__legend .pk__coin { grid-column: 1 / -1; justify-content: center; color: #8592b3; background: none; }
.pk:fullscreen { overflow-y: auto; padding: 12px; background: #090c1a; }
.pk:-webkit-full-screen { overflow-y: auto; padding: 12px; background: #090c1a; }
.fsheet.is-pk .fcard--crash { display: none; }
@media (prefers-reduced-motion: reduce) {
  body.is-pk .pk, .pkc.is-pop::after, .pkfloat, .pk__hero.is-swing .pk__pick, .pk__note { animation: none; }
  .pk__world, .pk__hero { transition: none; }
}
