/* Shared responsive art for web, VK Play, VK Games and Yandex Games. */
:root{color-scheme:dark;--gold:#ffe1a1;--ink:#fff4da;font-family:system-ui,-apple-system,"Segoe UI",sans-serif}
*{box-sizing:border-box}body{margin:0;background:#131b1d;color:var(--ink);overscroll-behavior-y:none}body:before{content:"";position:fixed;inset:0;background:radial-gradient(ellipse at 50% 30%,#7a5336,#203338 45%,#0a1418 85%);z-index:-1}
button{font:inherit;color:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent;touch-action:manipulation}button:focus-visible{outline:3px solid #c8ffff;outline-offset:3px}button:disabled{opacity:.5;cursor:default}img{display:block;max-width:100%;user-select:none;-webkit-user-drag:none}.hidden{display:none!important}
.shell{position:relative;isolation:isolate;width:min(100%,56.25dvh,560px);height:100dvh;min-height:640px;margin:0 auto;overflow:hidden;background:#352719 image-set(url("assets/art/workshop.webp") 1x,url("assets/art/workshop@2x.webp") 2x) center/cover no-repeat;box-shadow:0 0 70px #0009}
.shell:after{content:"";position:absolute;inset:0;box-shadow:inset 0 0 22px #130d0d80;pointer-events:none;z-index:10}.screen{position:absolute;inset:0}
.top{position:absolute;z-index:12;top:max(12px,env(safe-area-inset-top));left:12px;right:12px;display:flex;justify-content:space-between;align-items:center;gap:4px;height:42px;pointer-events:none}
.studio{font-size:8px;letter-spacing:1.6px;color:#ffedc3;text-shadow:0 2px 4px #000;opacity:.85}
.wallet{display:flex;align-items:center;justify-content:center;position:relative;gap:6px;min-width:90px;height:34px;border:2px solid #bb8b3d;border-radius:9px;background:linear-gradient(90deg,#0c272aef,#173b3ce8);box-shadow:0 2px 6px #0008,inset 0 1px #fff7a780;font-weight:750;font-size:15px;padding:0 10px 0 3px;text-shadow:0 1px 3px #000}
.wallet small{font-size:8px;display:block;line-height:1;color:#c8e9dd;letter-spacing:.5px}.wallet img{width:39px;height:39px;object-fit:contain;margin-left:-8px}
.wallet-energy small{margin-top:2px;font-size:11px;line-height:1.15;font-weight:800;color:#fff0c2;text-shadow:0 1px 2px #000,0 0 10px #0008;letter-spacing:.02em}.wallet-energy #energyLabel{font-size:17px;font-weight:900;color:#ffffff;text-shadow:0 1px 3px #000,0 0 14px #71d8ff99}.wallet-energy.full small{color:#d9ffd4}.wallet-energy.full #energyLabel{text-shadow:0 1px 3px #000,0 0 14px #92ffae}.wallet-energy.charging small{color:#ffeab0}.wallet-energy.charging #energyLabel{text-shadow:0 1px 3px #000,0 0 14px #ffd17a99}
.coin-icon{font-style:normal;display:grid;place-items:center;width:34px;height:34px;margin-left:-8px;border:3px ridge #ffd26c;border-radius:50%;background:linear-gradient(135deg,#ffe082,#ac5f06);box-shadow:0 1px 3px #0008;color:#fff0a5;font-size:22px}
.home-title{position:absolute;z-index:3;top:8.2%;left:19%;width:62%;text-align:center;padding:10px 5px 12px;background:linear-gradient(135deg,#0c3e3eef,#0b2628f5);border:3px ridge #dbac5a;border-radius:45% 8% 40% 8%/10% 30% 10% 30%;box-shadow:0 4px 10px #0008,inset 0 0 0 2px #6b411e;transform:rotate(-2deg)}
.home-title>span{display:block;color:#b7dfcf;text-transform:uppercase;font-size:8px;letter-spacing:2px;margin-bottom:3px}h1{font:bold clamp(21px,3.5dvh,37px)/.98 Georgia,"Times New Roman",serif;letter-spacing:.3px;text-transform:uppercase;margin:0;color:#ffe7a7;text-shadow:0 2px #67411c,0 3px 4px #000}
.round-control{position:absolute;z-index:4;top:10.4%;width:54px;height:54px;border:0;background:none;padding:0;border-radius:50%;filter:drop-shadow(0 3px 3px #0007)}.profile-control{left:10px}.settings-control{right:10px}.round-control img{width:100%;height:100%;object-fit:contain}.round-control:hover{filter:brightness(1.15) drop-shadow(0 3px 3px #0007)}.round-control:active{translate:0 2px}
.reactor{position:absolute;z-index:1;top:21%;left:6%;right:6%;height:42.7%;display:flex;justify-content:center;align-items:center;pointer-events:none}.reactor>img{height:100%;width:auto;max-width:100%;object-fit:contain;filter:drop-shadow(0 8px 7px #26170680)}
.reactor-light{position:absolute;width:22%;aspect-ratio:1;border-radius:50%;background:radial-gradient(circle,#56deff60,transparent 67%);mix-blend-mode:screen;animation:reactorBreath 4s ease-in-out infinite;pointer-events:none}.light-blue{top:22%;left:39%}.light-green{top:42%;left:24%;background:radial-gradient(circle,#61ffa34d,transparent 70%);animation-delay:-1.3s}.light-amber{top:45%;right:23%;background:radial-gradient(circle,#ffcf6b5c,transparent 70%);animation-delay:-2.6s}
@keyframes reactorBreath{0%,100%{opacity:.35;transform:scale(.9)}50%{opacity:.95;transform:scale(1.12)}}
.workshop-cat{position:absolute;z-index:2;left:0;bottom:37%;width:25%;pointer-events:none;transform-origin:50% 95%;animation:catBreath 5s ease-in-out infinite;filter:drop-shadow(0 4px 4px #0008)}@keyframes catBreath{50%{transform:scaleY(1.015) rotate(-.6deg)}}
.event-slot{position:absolute;z-index:4;top:36%;width:54px;min-height:54px}.event-left{left:6px}.event-right{right:6px}
.play-area{position:absolute;z-index:4;left:10%;right:10%;top:62.2%;text-align:center}.level-plaque{display:table;margin:0 auto -3px;background:linear-gradient(#fce9b6,#b47b31);border:2px ridge #a7752f;border-radius:8px;padding:4px 25px;color:#3b230f;font:bold 14px Georgia,serif;box-shadow:0 2px 4px #0009}
.hero-play{width:100%;height:clamp(66px,9.5dvh,104px);border:0;background:transparent url("assets/art/button-play@2x.webp") center/100% 100% no-repeat;filter:drop-shadow(0 5px 4px #0007);padding:0 22px 3px;font:bold clamp(22px,3.5dvh,36px) Georgia,serif;color:#fff0b3;text-shadow:0 3px 1px #16452a,0 1px 4px #000;letter-spacing:1px}.hero-play:hover{filter:brightness(1.13) drop-shadow(0 5px 4px #0007)}.hero-play:active{transform:translateY(2px)}
.home-note{display:table;margin:0 auto;padding:3px 12px;border-radius:12px;background:#182d24d9;color:#f8e6be;font-size:10px;line-height:1.3}
.treasury{position:absolute;z-index:4;left:2.5%;right:2.5%;bottom:2.4%;height:21.8%;border-top:2px solid #ba873c88;border-bottom:2px solid #80532488;border-radius:14px;background:linear-gradient(180deg,#1a120d00 0%,#1c120d22 28%,#120b073d 100%);box-shadow:none;backdrop-filter:none}
.treasury-heading{display:flex;align-items:center;justify-content:center;gap:12px;height:28px;transform:translateY(-3px)}.treasury h2{margin:0;padding:4px 14px;background:#233d32e8;border:1px solid #e5b260;border-radius:7px;color:#ffe3a1;font:bold 16px Georgia,serif;text-shadow:0 1px 3px #000}.treasury-heading>span{font-size:11px;color:#ffe8b8;text-shadow:0 1px 3px #000}
.treasure-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:3px;height:calc(100% - 24px);align-items:end}.loot{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;position:relative;min-width:0;min-height:44px;padding:0 2px 6px;background:none;border:0;border-radius:12px;line-height:1.12}.loot img{width:100%;height:calc(100% - 46px);min-height:58px;object-fit:contain;filter:drop-shadow(0 5px 7px #000a);transition:transform .15s}.loot:hover img{transform:translateY(-4px) scale(1.03)}.loot strong{font-size:12px;font-weight:800;white-space:nowrap;color:#fff2c7;text-shadow:0 1px 3px #000,0 0 10px #0007;letter-spacing:.02em}.loot span{font-size:11px;font-weight:700;color:#ffe2aa;text-shadow:0 1px 2px #000}.loot small{font-size:10px;font-weight:700;color:#d8e6cf;text-shadow:0 1px 2px #000}.loot.piggy small{color:#f6d892}.loot:active img{transform:translateY(-1px) scale(1.01)}
.progress{display:block;width:76%;height:6px;border-radius:999px;background:#071c1bcc;overflow:hidden;margin-top:4px;box-shadow:inset 0 1px 2px #000a,0 0 0 1px #8b6e3d66}.progress>span{display:block;height:100%;width:0;background:linear-gradient(90deg,#28c0a0,#ffe1a1)}.prototype-note{position:absolute;bottom:0;left:0;right:0;text-align:center;font-size:8px;color:#ffe9bbbd;text-shadow:0 1px 3px #000;margin:3px}
.game-screen{background:linear-gradient(#0b1e2570,transparent 35%,#160e0b33)}
.gamehead{position:absolute;z-index:5;top:7.2%;left:12px;right:12px;height:44px;display:grid;grid-template-columns:44px 1fr 73px;align-items:center;gap:7px}.back-control{width:44px;height:44px;border-radius:50%;border:3px ridge #e0b566;background:radial-gradient(circle at 40% 25%,#388b77,#124536);color:#fff0b5;font-size:27px;line-height:1;box-shadow:0 2px 5px #0008}
.stage{text-align:center;font:bold 14px Georgia,serif;color:#ffe8ae;text-shadow:0 2px 2px #000;background:#173731e8;border:2px ridge #bc873f;border-radius:7px;padding:8px 2px}.counter{display:grid;place-items:center;min-height:40px;padding:3px;font-size:12px;font-weight:750;text-align:center;border:2px ridge #e0b566;border-radius:7px;background:#092d34e8;color:#fff1c9;box-shadow:0 2px 5px #0007}
.game-caption{position:absolute;z-index:4;top:13.2%;left:20%;right:20%;padding:5px 4px;background:#172c24ef;border:2px ridge #bd8d43;border-radius:7px;text-align:center;pointer-events:none}.game-caption strong{display:block;font:bold 12px Georgia,serif;color:#ffe3a0}.game-caption>span{display:block;margin-top:2px;font-size:9px;color:#ece9d0}.category-track{width:85%;height:5px;background:#091c20;border:1px solid #806940;border-radius:4px;margin:3px auto 0;overflow:hidden}.category-track>div{height:100%;background:linear-gradient(90deg,#10a669,#9fee76);width:0;transition:width .25s}
.chamber{position:absolute;top:13%;bottom:10%;left:0;right:0;display:flex;justify-content:center;pointer-events:none}.chamber-frame{position:relative;flex:none;height:100%;aspect-ratio:941/1672;max-width:100%;background:transparent image-set(url("assets/art/chamber.webp") 1x,url("assets/art/chamber@2x.webp") 2x) center/100% 100% no-repeat}
/* Measured inside the glass: x=137..804, y=226..1371 of the 941x1672 frame. */
.bubblefield{position:absolute;left:14.6%;right:14.6%;top:13.6%;bottom:18%;border:0;border-radius:14px;background:transparent;overflow:hidden;pointer-events:auto;contain:layout style}
.creation-portal{position:absolute;z-index:2;left:33%;width:34%;top:6.1%;height:4%;border-radius:50%;background:radial-gradient(ellipse,#8df9ff88,#1dd8ff24 55%,transparent 72%);box-shadow:0 0 15px #00b6ff55;animation:portalIdle 3.8s ease-in-out infinite;pointer-events:none}.creation-portal span{position:absolute;inset:-20% -8%;border-radius:50%;background:radial-gradient(ellipse,#d1ffffa8,transparent 65%);opacity:.2}.creation-portal.portal-active span{animation:portalPulse .65s ease-out}
@keyframes portalIdle{50%{opacity:.6}}@keyframes portalPulse{0%{opacity:1;transform:scale(.5)}100%{opacity:0;transform:scale(1.7)}}
.bubble{position:absolute;left:0;top:0;display:flex;align-items:center;justify-content:center;margin:0;padding:0;border:0;border-radius:50%;background:none;box-shadow:none;color:#fff9e3;font:bold 12px/1.12 Georgia,"Times New Roman",serif;text-shadow:0 2px 2px #000,0 0 4px #000;cursor:grab;touch-action:none;user-select:none;-webkit-user-select:none;overflow:visible;will-change:transform}
.capsule-art{position:absolute;inset:0;background:transparent image-set(url("assets/art/capsule-blue.webp") 1x,url("assets/art/capsule-blue@2x.webp") 2x) center/100% 100% no-repeat;pointer-events:none}.bubble[data-count="2"] .capsule-art{background-image:image-set(url("assets/art/capsule-green.webp") 1x,url("assets/art/capsule-green@2x.webp") 2x)}.bubble[data-count="3"] .capsule-art{background-image:image-set(url("assets/art/capsule-amber.webp") 1x,url("assets/art/capsule-amber@2x.webp") 2x)}.bubble.finished .capsule-art{background-image:image-set(url("assets/art/capsule-purple.webp") 1x,url("assets/art/capsule-purple@2x.webp") 2x)}
.capsule-single,.capsule-words{position:relative;z-index:2;display:block;text-align:center;overflow-wrap:anywhere;hyphens:auto;max-width:67%;pointer-events:none}.capsule-words{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;width:67%}.capsule-word{display:block;max-width:100%;overflow-wrap:anywhere;hyphens:auto}.capsule-plus{font:700 9px/1 system-ui;color:#ffe6a5}
.modifier-badge{position:absolute;z-index:3;right:12%;top:5%;min-width:21px;padding:2px 3px;border:1px solid #eec574;border-radius:8px;background:#233b37ed;font:700 12px/1.2 system-ui;color:#fff3bc;text-shadow:0 1px 2px #000;pointer-events:none}.bubble[data-modifier="fog"] .capsule-art{filter:saturate(.35) brightness(.8)}.bubble.picked{outline:2px solid #c8fffd;outline-offset:1px}.bubble.dragging{z-index:20;cursor:grabbing;filter:drop-shadow(0 0 7px #a2ffff)}
/* Animate child art only; never override the physics transform on the button. */
.bubble.falling .capsule-art{animation:capsuleAppear .5s ease-out both}.bubble.merging .capsule-art{animation:capsuleMerge .42s ease-out}.bubble.invalid .capsule-art{animation:capsuleError .55s ease-out}
@keyframes capsuleAppear{from{opacity:0;scale:.68;filter:brightness(1.8)}to{opacity:1;scale:1;filter:brightness(1)}}@keyframes capsuleMerge{0%{scale:.85;filter:brightness(2)}55%{scale:1.06;filter:brightness(1.35)}100%{scale:1;filter:brightness(1)}}@keyframes capsuleError{25%,65%{filter:sepia(1) saturate(4) hue-rotate(320deg) brightness(1.4)}45%,100%{filter:none}}
.game-footer{position:absolute;z-index:6;left:5%;right:5%;bottom:max(8px,env(safe-area-inset-bottom));pointer-events:none}.game-tools{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;align-items:end}.workshop-tool{position:relative;pointer-events:auto;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;min-width:0;min-height:79px;padding:0 0 3px;background:none;border:0;border-radius:9px;color:#fff2c5;text-shadow:0 1px 2px #000}.workshop-tool>img{height:clamp(47px,7dvh,72px);width:auto;max-width:72%;object-fit:contain;filter:drop-shadow(0 3px 3px #0008);margin-bottom:-4px;transition:transform .15s}.workshop-tool:hover>img{transform:translateY(-2px)}.tool-label{width:100%;display:flex;flex-direction:column;justify-content:center;min-height:34px;padding:2px;background:linear-gradient(#45301bee,#15221cf7);border:2px ridge #c49242;border-radius:7px;box-shadow:0 3px 4px #0008;position:relative}.tool-label strong{font-size:10px;font-weight:700}.tool-label small{font-size:10px;color:#ffdf99}
.field-actions{display:flex;align-items:center;justify-content:space-between;gap:4px;margin-top:4px;color:#e5e0c9;font-size:8px;text-shadow:0 1px 2px #000}.field-actions button{pointer-events:auto;background:#142d2ae8;border:1px solid #8c794b;border-radius:5px;padding:5px;min-height:30px;font-size:9px}.notice{margin:0 auto 6px;padding:7px 9px;border:1px solid #ccb367;background:#102a2ef2;border-radius:7px;font-size:11px;text-align:center;color:#fff0c7;box-shadow:0 2px 9px #0008}
.modalshade{position:fixed;z-index:30;inset:0;display:grid;place-items:center;background:#041218bb;padding:16px;backdrop-filter:blur(4px)}.modal{width:min(380px,100%);max-height:calc(100dvh - 32px);overflow:auto;background:linear-gradient(145deg,#173d3d,#0b2027);border:3px ridge #d5a254;box-shadow:0 12px 50px #0009,inset 0 0 0 2px #73532d;border-radius:16px;padding:24px 20px;color:#f5edd6}.modal h2{font:700 24px/1.15 Georgia,serif;color:#ffe5a3;margin:0 0 14px}.modal p{font-size:14px;line-height:1.55;color:#d5dfd5;margin:0 0 18px}.buttons{display:flex;flex-direction:column;gap:9px}.buttons button{min-height:44px;border:1px solid #b99558;border-radius:8px;padding:10px 12px;font-size:14px;font-weight:650;background:linear-gradient(#315e53,#153d36);color:#fff2c3}.buttons button.primary{background:linear-gradient(#e4bf70,#ac7531);color:#2e1d0d}.buttons button:hover{filter:brightness(1.15)}
@media(min-height:950px){.treasury{bottom:4%;height:19%}.loot strong,.loot span{font-size:12px}.loot small{font-size:11px}.loot img{height:calc(100% - 46px)}.home-note{font-size:12px}.round-control{width:64px;height:64px}.top{height:48px}.wallet{height:40px;font-size:18px;min-width:108px}.gamehead{height:52px;grid-template-columns:50px 1fr 85px}.stage{font-size:16px}.counter{font-size:14px}.game-caption strong{font-size:15px}.game-caption>span{font-size:11px}.tool-label strong,.tool-label small{font-size:12px}.tool-label{min-height:41px}.field-actions{font-size:10px}.field-actions button{font-size:11px}}
@media(max-width:370px){.studio{display:none}.home-title{left:19%;width:62%}h1{font-size:23px}.home-title>span{font-size:7px;letter-spacing:1px}.round-control{width:48px;height:48px}.treasury h2{font-size:14px}.treasury-heading{gap:6px}.game-caption{left:17%;right:17%}.stage{font-size:12px}.tool-label strong{font-size:9px}.field-actions>span{max-width:60%}}
@media(max-height:680px){.shell{width:min(100%,400px)}.home-title{top:9%}.home-title>span{display:none}.reactor{top:21%;height:41%}.play-area{top:62%}.treasury{height:19%;bottom:2.5%}.home-note{font-size:9px}.game-caption{top:14%}.chamber{top:14%;bottom:12%}.gamehead{top:8.2%}.field-actions>span{display:none}.field-actions{justify-content:center}}
.loot strong,.loot span{font-size:11px}.loot small{font-size:10px}.game-caption>span{font-size:10px}.tool-label strong,.tool-label small{font-size:11px}.field-actions{font-size:10px}.field-actions button{min-height:44px;font-size:10px}
.top{pointer-events:none}.language-control{pointer-events:auto;min-width:54px;min-height:44px;padding:4px;background:#102e2ae8;border:1px solid #c89c54;border-radius:8px;color:#ffe7ad;font-size:10px;font-weight:750}.capsule-words{line-height:1.03}.capsule-plus{font-size:8px;line-height:7px}html[lang="en"] h1{font-size:clamp(21px,3.3dvh,35px)}html[lang="en"] .hero-play{font-size:clamp(20px,3.1dvh,32px)}html[lang="en"] .game-caption>span{font-size:9px}html[lang="en"] .loot strong{font-size:10px}
.treasury-heading{gap:6px}.treasury h2{font-size:13px;padding-inline:6px}#shopBtn{min-width:64px;min-height:44px;padding:4px;background:linear-gradient(#365f4f,#17372f);border:1px solid #c49b54;border-radius:7px;font-size:10px;box-shadow:0 2px 4px #0008;z-index:2}.platform-paused{pointer-events:none}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* Player card and input: future avatar shop uses the stable avatar IDs in game data. */
.profile-dialog{text-align:center;width:min(390px,100%);padding:18px 17px}
.profile-dialog h2{font-size:23px;margin-bottom:10px}
.profile-portrait{margin:0 auto 8px;width:94px;height:94px;display:grid;place-items:center;border-radius:50%;font-size:51px;background:radial-gradient(circle at 35% 28%,#8ad8d3,#1e6873 60%,#183338);border:5px ridge #e2b967;box-shadow:0 4px 14px #000a,inset 0 0 12px #6ce7ed88}
.profile-nickname{color:#ffe6ac;font:700 22px/1.2 Georgia,serif;overflow-wrap:anywhere}
.profile-badge{font-size:11px!important;margin:6px 0 12px!important;opacity:.85}
.profile-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin:10px 0 13px}
.profile-stat{border:1px solid #a17c47;background:#092c32a8;border-radius:10px;padding:8px 4px;display:grid;gap:2px}
.profile-stat strong{color:#fff0b3;font-size:21px}
.profile-stat span{font-size:11px;color:#ccdadd}
.profile-subtitle{font:700 15px Georgia,serif;color:#fbe1a0;margin:14px 0 8px}
.profile-avatars{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-bottom:10px}
.profile-avatar-option{border:2px solid #b28e54;border-radius:12px;background:linear-gradient(145deg,#336b6b,#112e36);min-width:0;min-height:58px;font-size:29px;cursor:pointer}
.profile-avatar-option.selected{border-color:#ffdc76;box-shadow:0 0 0 2px #f6ca5c77,inset 0 0 14px #66dbd977}
.profile-avatar-option:disabled{opacity:.4;cursor:not-allowed}
.profile-action{display:block;width:100%;min-height:43px;margin:8px 0 0;border:1px solid #e0ba6c;border-radius:9px;background:linear-gradient(#dcb76e,#ad7737);color:#271d14;font-size:14px;font-weight:700}
.profile-name-input{box-sizing:border-box;width:100%;min-height:46px;margin:6px 0;padding:9px 12px;border:2px solid #caa45e;border-radius:8px;background:#f8f0da;color:#183238;font-size:16px;text-align:center}
.profile-shop-note{font-size:11px!important;margin:0 0 12px!important}
.restart-control{border-color:#cead70!important;color:#ffe3a0!important;white-space:nowrap}
.combo-toast{pointer-events:none;position:absolute;z-index:20;top:25%;left:50%;transform:translateX(-50%);white-space:nowrap;font:900 clamp(20px,4vw,32px)/1.1 Georgia,serif;color:#fff3c4;text-shadow:0 3px 0 #91501e,0 0 16px #f5a938,0 3px 14px #000;animation:combo-celebrate 1.3s ease-out forwards}
@keyframes combo-celebrate{0%{opacity:0;transform:translate(-50%,24px) scale(.72)}18%{opacity:1;transform:translate(-50%,-8px) scale(1.2)}56%{opacity:1;transform:translate(-50%,-20px) scale(1)}100%{opacity:0;transform:translate(-50%,-49px) scale(1.03)}}
@media(max-width:370px){.field-actions span{display:none}.field-actions button{font-size:10px}}
@media(prefers-reduced-motion:reduce){.combo-toast{animation:none;opacity:1}}

.bug-report-trigger,.bug-report-home{border:1px solid #ceae69;border-radius:10px;padding:8px 12px;background:linear-gradient(#1d4646,#123438);color:#ffe1a3;font-weight:700;cursor:pointer}
.bug-report-home{display:block;margin:5px auto 14px}
.bug-report-dialog{box-sizing:border-box;width:min(94vw,520px);max-height:calc(100dvh - 30px);overflow:auto;text-align:left}
.bug-report-dialog h2{text-align:center}
.bug-report-form{display:grid;gap:10px}
.bug-report-form textarea{box-sizing:border-box;width:100%;resize:vertical;border:1px solid #c9a766;border-radius:8px;padding:12px;background:#f7f1e3;color:#142c31;font:16px/1.4 sans-serif}
.bug-report-form label{display:grid;gap:6px;font-size:13px}
.bug-report-form input[type=file]{box-sizing:border-box;width:100%;font-size:13px}
.bug-report-form .bug-report-consent{display:flex;align-items:flex-start;gap:8px}
.bug-report-status{min-height:20px;font-size:12px}
.bug-report-form button{min-height:42px;border-radius:8px;border:1px solid #c9a766;background:#183d42;color:#fff3cf;cursor:pointer}
.bug-report-form button:disabled{opacity:.5}
@media(max-width:500px){.field-actions{flex-wrap:wrap}.bug-report-dialog{padding:16px}}

.bug-report-trigger,.bug-report-home{min-height:44px;min-width:44px}

/* Compact main-menu action rail: avatar/report on the left, settings/shop on the right. */
.home-screen .shop-control,.home-screen .bug-report-home{position:absolute;z-index:5;top:calc(10.4% + 62px);width:54px;height:54px;min-width:44px;min-height:44px;display:grid;place-items:center;margin:0;padding:0;border:2px ridge #dbac5a;border-radius:50%;background:radial-gradient(circle at 35% 25%,#376b67,#123338 75%);color:#ffe1a1;box-shadow:0 3px 7px #0009,inset 0 0 0 2px #6b411e;font-size:27px;line-height:1}
.home-screen .shop-control{right:10px}.home-screen .bug-report-home{left:10px}
.home-screen .shop-control:hover,.home-screen .bug-report-home:hover{filter:brightness(1.15) drop-shadow(0 3px 3px #0007)}
@media(min-height:950px){.home-screen .shop-control,.home-screen .bug-report-home{top:calc(10.4% + 73px);width:64px;height:64px}}
@media(max-width:370px){.home-screen .shop-control,.home-screen .bug-report-home{top:calc(10.4% + 55px);width:48px;height:48px;font-size:24px}}

/* The shop artwork is circular: remove the legacy square button skin. */
.home-screen #shopBtn{min-width:0;min-height:0;width:54px;height:54px;padding:0;border:0;border-radius:50%;background:transparent;box-shadow:none;filter:drop-shadow(0 3px 3px #0008)}
.home-screen #shopBtn img{width:100%;height:100%;display:block;object-fit:contain}
@media(min-height:950px){.home-screen #shopBtn{width:64px;height:64px}}
@media(max-width:370px){.home-screen #shopBtn{width:48px;height:48px}}

/* In-game hosted checkout preview. Bank may disallow framing; always offer a link. */
.payment-shade{padding:10px;z-index:100}
.payment-panel{width:min(560px,100%);height:min(790px,calc(100dvh - 20px));display:flex;flex-direction:column;overflow:hidden;background:#102a2d;border:2px ridge #cba35f;border-radius:18px;box-shadow:0 15px 55px #000c}
.payment-panel-head{flex:none;display:flex;justify-content:space-between;align-items:center;padding:10px 14px;background:linear-gradient(110deg,#174c4d,#0c292d);color:#ffe6ae;font:700 17px Georgia,serif}
.payment-panel-close{width:40px;height:40px;border:1px solid #c69c58;border-radius:50%;background:#1b3b3d;color:#fff;font:26px Arial,sans-serif;cursor:pointer}
.payment-bank-frame{display:block;width:100%;min-height:0;flex:1;border:0;background:#fff}
.payment-panel-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;flex:none;padding:10px 12px;background:#102e31;color:#d1e3d9;font:12px/1.4 Arial,sans-serif}
.payment-panel-foot a{flex:none;padding:8px 10px;border:1px solid #caa76b;border-radius:8px;background:#204f49;color:#ffe9b7;text-decoration:none;font-weight:700}
@media(max-width:480px){.payment-shade{padding:3px}.payment-panel{height:calc(100dvh - 6px);width:100%;border-radius:12px}.payment-panel-head{font-size:15px}.payment-panel-foot{font-size:11px;gap:6px}.payment-panel-foot a{font-size:11px;padding:8px}}

/* VK Play: use the desktop viewport, without changing the artwork's height. */
@media (min-width:701px) and (pointer:fine){
 /* Desktop VK uses a wider glass playfield, while phone rules below stay untouched. */
 .shell{width:100%;max-width:none;min-height:640px;background-position:center;background-size:cover;box-shadow:none}
 .chamber{left:0;right:0}
 .chamber-frame{width:min(74%,820px);height:100%;aspect-ratio:auto;max-width:96%}
 .game-caption{left:50%;right:auto;width:min(55%,510px);transform:translateX(-50%)}
 .gamehead{left:50%;right:auto;width:min(80%,720px);transform:translateX(-50%)}
 .game-footer{left:50%;right:auto;width:min(87%,820px);transform:translateX(-50%)}
}
/* Accessibility-first phone layout; desktop and phone share game logic. */
@media (pointer:coarse) and (max-width:700px) and (orientation:portrait){
 .shell{width:100%;min-height:0;height:100dvh}
 .chamber{top:12.5%;bottom:13%;left:1%;right:1%}
 .chamber-frame{width:96%;height:100%;aspect-ratio:auto;max-width:none}
 .gamehead{top:6.6%;left:8px;right:8px;gap:5px;grid-template-columns:46px minmax(0,1fr) 77px}
 .game-caption{top:12%;left:13%;right:13%;padding:4px}
 .game-caption strong{font-size:clamp(13px,3.4vw,17px)}
 .game-caption>span{font-size:clamp(11px,2.8vw,13px)}
 .game-footer{left:3%;right:3%;bottom:max(7px,env(safe-area-inset-bottom))}
 .game-tools{gap:5px}
 .workshop-tool{min-height:65px}
 .workshop-tool>img{height:clamp(39px,5.8dvh,60px)}
 .tool-label{min-height:42px;padding:3px 1px}
 .tool-label strong{font-size:clamp(11px,2.9vw,14px)}
 .tool-label small{font-size:clamp(11px,2.8vw,13px)}
 .field-actions{gap:5px;flex-wrap:wrap;justify-content:space-between}
 .field-actions>span{display:none}
 .field-actions button{min-height:44px;font-size:clamp(11px,2.8vw,13px);padding:6px}
 .bubble.picked{outline:4px solid #b8ffff;outline-offset:1px}
}
@media (pointer:coarse) and (max-width:950px) and (orientation:landscape){
 .shell{width:min(100%,105dvh);min-height:0}
 .chamber{left:2%;right:2%}
 .chamber-frame{width:min(88%,100%);max-width:none;height:100%;aspect-ratio:auto}
 .game-tools{gap:4px}.workshop-tool>img{height:34px}.workshop-tool{min-height:54px}
 .tool-label{min-height:30px}.field-actions>span{display:none}
}
.vk-profile-dialog{display:flex;flex-direction:column;align-items:center;gap:10px;text-align:center}
.vk-profile-avatar{width:96px;height:96px;object-fit:cover;border-radius:50%;border:3px solid #d5a254}
.vk-profile-name{font-size:23px;color:#fff2c3;overflow-wrap:anywhere}
.vk-profile-uid{font-size:13px;color:#c4ded6;margin:0 0 10px}
.vk-profile-dialog .buttons{width:100%}
.round-control img.vk-profile-button-avatar{border-radius:50%;border:2px solid #d5a254;object-fit:cover}
/* Pikabu: build version in the settings dialog, right-aligned under Close. */
.pikabu-settings-version{margin-top:10px;text-align:right;color:#d9c89d;font:500 11px/1.3 system-ui,Arial,sans-serif;letter-spacing:.02em;overflow-wrap:anywhere;user-select:text}

/* PIKABU test.10 — airy laboratory screen, no massive side columns. */
body:has(.shell) .chamber-frame{
 background:none;
}
.chamber-frame::before{
 content:"";position:absolute;left:14.6%;right:14.6%;top:13.6%;bottom:18%;
 background:linear-gradient(90deg,rgba(13,78,103,.46),rgba(7,36,65,.77) 10%,rgba(7,36,65,.78) 90%,rgba(13,78,103,.46)),
 radial-gradient(ellipse at 50% 12%,#53d9ff28,transparent 60%);
 border-top:2px solid #72dffe88;border-bottom:3px solid #83e9ffb8;
 box-shadow:inset 0 0 28px #39c9ff44,0 8px 18px #0004;
 border-radius:14px 14px 24px 24px;pointer-events:none;
}
.chamber-frame::after{
 content:"";position:absolute;left:16%;right:16%;bottom:16.5%;height:2%;
 border-radius:50%;background:radial-gradient(ellipse,#a7f5ffc9,#2bb9e580 48%,transparent 74%);
 filter:blur(3px);pointer-events:none;
}
/* Buttons beneath the game controls — larger hit targets, consistent workshop palette. */
.game-footer .field-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin-top:7px;align-items:stretch}
.game-footer .field-actions>span{display:none}
.game-footer .field-actions button{
 min-width:0;min-height:42px;padding:7px 4px;
 border:2px solid #bd9859;border-radius:11px;
 background:linear-gradient(160deg,#24575b,#102f39 75%);
 box-shadow:0 3px 6px #0008,inset 0 1px 1px #fff2b533;
 color:#fff0bb;font-weight:800;font-size:clamp(10px,1.15vw,14px);
 text-shadow:0 1px 3px #000a;white-space:normal;line-height:1.16;
}
.game-footer .field-actions button:hover{filter:brightness(1.15)}
.game-footer .field-actions button:active{transform:translateY(1px)}
.game-footer .field-actions .restart-control{border-color:#dcb06a}
/* Store: upper-right gilded X and compact purchase restore beside Close. */
.pikabu-shop-dialog{position:relative;width:min(440px,100%);padding-top:25px}
.pikabu-shop-dialog h2{padding-right:41px;margin-bottom:11px}
.pikabu-shop-x{position:absolute;right:12px;top:12px;width:38px;height:38px;border:2px solid #edc77b;
 border-radius:50%;background:radial-gradient(circle at 32% 25%,#376e6b,#123439 78%);
 box-shadow:0 2px 6px #0009,inset 0 1px #fff6a544;color:#fff0c1;
 font:800 27px/1 Georgia,serif;display:grid;place-items:center;cursor:pointer}
.pikabu-shop-x:hover{filter:brightness(1.15)}
.pikabu-shop-dialog .buttons{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.pikabu-shop-dialog .buttons>button{grid-column:1/-1;min-width:0}
.pikabu-shop-dialog .buttons>.pikabu-check-purchases{grid-column:1;grid-row:5;min-height:43px;font-size:12px;padding:8px 6px}
.pikabu-shop-dialog .buttons>.pikabu-shop-bottom-close{grid-column:2;grid-row:5;min-height:43px;font-size:13px}
.pikabu-shop-dialog .buttons>.pikabu-shop-ad{grid-column:1/-1;grid-row:4}
@media(max-width:500px){
 .treasury{height:21%;bottom:1.5%}
 .loot img{min-height:46px}
 .loot strong{font-size:clamp(10px,2.8vw,12px)}
 .loot span{font-size:clamp(9px,2.6vw,11px)}
 .loot small{font-size:clamp(9px,2.4vw,10px)}
 .wallet-energy small{font-size:clamp(9px,2.7vw,11px)}
 .game-footer .field-actions button{font-size:clamp(10px,2.9vw,13px);min-height:45px}
 .pikabu-shop-dialog .buttons>.pikabu-check-purchases{font-size:11px}
}

/* Pikabu test.11: constrain treasury art to its own bottom strip.
   Previous percentage image height in a flex column used intrinsic image height
   and allowed chest sprites to overflow across the play button. */
.home-screen .treasury {
  height: clamp(116px, 20%, 178px);
  bottom: 2.2%;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.home-screen .treasure-grid {
  height: calc(100% - 28px);
  min-height: 0;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: clamp(3px,.8vw,12px);
  align-items: stretch;
}
.home-screen .loot {
  display: grid;
  grid-template-rows: minmax(0,1fr) auto auto auto;
  align-items: end;
  justify-items: center;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  gap: 0;
  padding: 0 2px 2px;
}
.home-screen .loot img {
  display: block;
  width: min(100%, 136px);
  height: 100%;
  max-height: 116px;
  min-height: 0;
  min-width: 0;
  object-fit: contain;
  object-position: center bottom;
}
.home-screen .loot strong { font-size: clamp(11px,1.05vw,14px); line-height:1.15; }
.home-screen .loot span { font-size: clamp(10px,.9vw,12px); line-height:1.15; }
.home-screen .loot small { font-size: clamp(9px,.84vw,11px); line-height:1.15; }
.home-screen .loot .progress { width: min(80%,110px); height: 4px; margin: 1px 0; }
@media(max-width:700px) {
 .home-screen .treasury{height:clamp(112px,20%,155px);bottom:1.5%}
 .home-screen .loot img{max-height:86px}
 .home-screen .loot strong{font-size:clamp(10px,2.7vw,12px)}
 .home-screen .loot span{font-size:clamp(9px,2.5vw,11px)}
 .home-screen .loot small{font-size:clamp(8px,2.3vw,10px)}
}

/* Pikabu test.12: readable desktop game and transparent gold-rimmed glass. */
.chamber-frame::before{
  background:linear-gradient(90deg,rgba(73,196,228,.10),rgba(15,91,130,.075) 12%,rgba(14,101,146,.10) 50%,rgba(73,196,228,.10)),
             radial-gradient(ellipse at 50% 6%,rgba(180,242,255,.19),transparent 46%);
  border:3px solid rgba(232,189,106,.9);
  border-top-color:#ffe8ab;
  border-bottom-color:#d9a351;
  border-radius:17px 17px 24px 24px;
  box-shadow:inset 0 0 0 1px rgba(255,245,207,.40),inset 0 0 22px rgba(116,221,255,.23),0 0 11px rgba(249,203,101,.32),0 5px 15px #0004;
  backdrop-filter:brightness(1.04);
}
.chamber-frame::after{
  background:radial-gradient(ellipse,rgba(220,251,255,.55),rgba(71,185,229,.37) 52%,transparent 80%);
  filter:blur(3px);
}
@media (min-width:701px) and (pointer:fine){
  .chamber-frame{width:min(88%,1020px);max-width:96%;}
  .gamehead{width:min(90%,1000px);height:56px;grid-template-columns:56px minmax(0,1fr) 104px;gap:10px}
  .back-control{width:54px;height:54px;font-size:30px}
  .stage{font-size:clamp(17px,1.5vw,23px);padding:10px 8px}
  .counter{font-size:clamp(14px,1.15vw,18px);min-height:48px}
  .game-caption{width:min(65%,750px);padding:9px 14px}
  .game-caption strong{font-size:clamp(17px,1.35vw,22px)}
  .game-caption>span{font-size:clamp(13px,1.08vw,17px)}
  .game-footer{width:min(86%,1050px);bottom:clamp(15px,2.3dvh,30px)}
  .game-tools{gap:12px}
  .workshop-tool{min-height:102px}
  .workshop-tool>img{height:clamp(60px,9dvh,88px);max-width:66%}
  .tool-label{min-height:45px;border-radius:10px}
  .tool-label strong{font-size:clamp(15px,1.25vw,19px)}
  .tool-label small{font-size:clamp(12px,1vw,16px)}
  .game-footer .field-actions{gap:12px;margin-top:10px}
  .game-footer .field-actions button{font-size:clamp(14px,1.08vw,18px);min-height:49px}
  .home-screen .loot strong{font-size:clamp(13px,1.12vw,16px)}
  .home-screen .loot span{font-size:clamp(12px,1.01vw,15px)}
  .home-screen .loot small{font-size:clamp(11px,.95vw,14px)}
  .treasury h2{font-size:clamp(16px,1.3vw,20px)}
  .treasury-heading>span{font-size:clamp(12px,1.05vw,16px)}
  .wallet-energy small{font-size:clamp(11px,1vw,15px)}
}

/* Pikabu test.13: the global counters already exist; keep only chest artwork and rewards. */
.home-screen .treasure-grid{height:100%;}

/* Pikabu test.14 — minimal controls, two purchased/rewarded actions plus replay.
   No additional active tools or duplicate camera heading. */
.game-screen .game-caption{padding:6px 10px;min-height:35px}
.game-screen #machineTitle{display:none!important}
.game-screen .game-caption>span{font-size:clamp(12px,1vw,16px);font-weight:750}
.game-footer{left:50%;right:auto;width:min(90%,960px);transform:translateX(-50%);bottom:clamp(8px,1.5dvh,18px)}
.game-footer .game-tools{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:clamp(7px,1.2vw,15px)}
.game-footer .workshop-tool{min-width:0;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;padding:0;border:0;background:none}
.game-footer .workshop-tool>img{height:clamp(40px,6.5dvh,72px);width:auto;max-width:50%;margin:0 0 -4px;object-fit:contain;filter:drop-shadow(0 3px 5px #0009)}
.game-footer .tool-label{min-height:43px;width:100%;border:2px solid #c69d57;border-radius:11px;background:linear-gradient(150deg,rgba(27,76,75,.97),rgba(12,37,45,.98));box-shadow:0 3px 8px #0007,inset 0 1px 1px #fff5a632;padding:5px 3px;gap:2px;text-align:center}
.game-footer .tool-label strong{font-size:clamp(12px,1.15vw,17px);line-height:1.13;color:#fff1c6}
.game-footer .tool-label small{font-size:clamp(10px,.95vw,14px);line-height:1.14;color:#f0d2a1}
.game-footer .restart-tool-icon{display:grid;place-items:center;height:clamp(40px,6.5dvh,72px);width:clamp(40px,6.5dvh,72px);margin-bottom:-4px;border:3px ridge #e0b46b;border-radius:50%;background:radial-gradient(circle at 30% 25%,#429d99,#15424a 70%);font:bold clamp(30px,4.4dvh,49px)/1 Georgia,serif;color:#ffe5a0;text-shadow:0 2px 3px #0009;box-shadow:0 4px 9px #0009}
.game-footer .field-actions{display:flex;justify-content:center;align-items:center;margin-top:5px;gap:0}
.game-footer .field-actions #clearBtn{width:min(32%,220px);min-height:34px;padding:5px 8px;font-size:clamp(11px,.9vw,14px);border:1px solid #ab8855;border-radius:8px;background:#15383edb;color:#e8dfc6;box-shadow:none}
@media (min-width:701px) and (pointer:fine){
  .game-footer{width:min(76%,900px);bottom:clamp(9px,1.6dvh,19px)}
  .game-footer .workshop-tool{min-height:0}
  .game-footer .tool-label{min-height:43px}
  .game-footer .field-actions{margin-top:5px}
  .game-footer .field-actions #clearBtn{min-height:35px}
}
@media (max-width:700px){
  .game-footer{width:96%;bottom:max(5px,env(safe-area-inset-bottom))}
  .game-footer .game-tools{gap:5px}
  .game-footer .workshop-tool>img{height:clamp(32px,5.5dvh,47px);max-width:58%}
  .game-footer .restart-tool-icon{height:clamp(32px,5.5dvh,47px);width:clamp(32px,5.5dvh,47px);font-size:30px}
  .game-footer .tool-label{min-height:43px;padding:4px 2px}
  .game-footer .tool-label strong{font-size:clamp(10px,2.7vw,13px)}
  .game-footer .tool-label small{font-size:clamp(9px,2.25vw,11px)}
  .game-footer .field-actions #clearBtn{width:45%;min-height:34px}
}

/* Pikabu test.15: retain the original gilded machine, transparent centre. */
body:has(.shell) .chamber-frame{
 background: transparent image-set(url("assets/art/chamber.webp") 1x,url("assets/art/chamber@2x.webp") 2x) center/100% 100% no-repeat;
}
.chamber-frame::before{
 left:14.6%;right:14.6%;top:13.6%;bottom:18%;
 border:1.5px solid rgba(255,224,145,.38);
 background:linear-gradient(100deg,rgba(190,239,255,.12),rgba(48,151,185,.025) 20%,rgba(25,110,142,.012) 78%,rgba(159,229,255,.14)),
 radial-gradient(ellipse at 50% 8%,rgba(147,231,255,.13),transparent 60%);
 box-shadow:inset 8px 0 18px rgba(98,217,255,.14),inset -8px 0 18px rgba(98,217,255,.13),inset 0 0 0 1px rgba(255,240,176,.25);
 border-radius:18px 18px 24px 24px; backdrop-filter:none;
}
.chamber-frame::after{bottom:17.8%;height:1%;opacity:.48;filter:blur(4px)}
/* Unbroken single-word labels, responsive font fit calculated in art-ui.js. */
.bubble .capsule-single,.bubble .capsule-word{white-space:nowrap;overflow-wrap:normal;word-break:normal;hyphens:none;max-width:none}
.bubble .capsule-words{max-width:75%;width:75%}
.bubble .capsule-single{max-width:77%}
@media (min-width:701px) and (pointer:fine){
 .game-screen .chamber{top:12.5%;bottom:11.5%}
 .game-screen .chamber-frame{width:min(89%,1030px);max-width:96%}
}
