@font-face{font-family:Pixel;src:url('/fonts/minecraft-ui-regular.otf') format('opentype');font-weight:400;font-display:swap}@font-face{font-family:Pixel;src:url('/fonts/minecraft-ui-bold.otf') format('opentype');font-weight:700;font-display:swap}*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:Arial,sans-serif;background:#17131c;color:#fff}button,input,select{font:inherit}button,a,input{touch-action:manipulation}button{cursor:pointer}button:disabled{cursor:wait;opacity:.65}button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid #ebd95f;outline-offset:3px}a{color:inherit}#game-screen{position:relative;height:100svh;min-height:580px;overflow:hidden}#world{position:absolute;inset:0;width:100%;height:100%;image-rendering:pixelated}.game-header{position:absolute;top:20px;left:24px;right:24px;display:flex;justify-content:space-between;align-items:start;z-index:5;pointer-events:none}.game-header button{pointer-events:auto;font-family:Pixel,monospace;background:#57545a;border:3px solid #242029;box-shadow:inset 3px 3px #aaa6a6,inset -3px -3px #353139,0 3px #0005;border-radius:0;font-size:23px;color:#fff;width:46px;height:44px;text-shadow:2px 2px #222}.game-header button:hover{filter:brightness(1.17)}#depth-readout{font-family:Pixel,monospace;text-align:center;line-height:1.7;font-size:16px;text-shadow:2px 2px #211f27}#screen{position:absolute;inset:0;z-index:2;pointer-events:none;display:flex;flex-direction:column;align-items:center}#screen>*{pointer-events:auto}.title-screen{margin-top:clamp(105px,18svh,200px);width:min(650px,92vw);text-align:center}.logo{font-family:Pixel,monospace;font-size:clamp(38px,6.4vw,76px);line-height:1;letter-spacing:-5px;color:#ddd6d0;margin:0 0 12px;text-shadow:0 3px #8d8580,0 7px #665a55,0 11px #35302d,4px 13px #17191e,-3px -3px #f4f0e7;-webkit-text-stroke:1px #514943;transform:perspective(650px) rotateX(7deg)}.splash{font-family:Pixel,monospace;color:#fff25a;transform:rotate(-7deg);font-size:14px;margin:0 0 46px;text-shadow:2px 2px #34291f}.main-actions{display:grid;gap:12px;width:min(310px,85vw);margin:auto}.stone-button,button.stone-button{color:#fff;font-family:Pixel,monospace;display:inline-block;text-decoration:none;text-align:center;background:#777376;border:3px solid #29252c;box-shadow:inset 3px 3px #b5afb4,inset -3px -3px #4f4b50,0 3px #0005;padding:13px 22px;line-height:1.4;font-size:15px;border-radius:0;text-shadow:2px 2px #333}.stone-button:hover{background:#8f8b92}.stone-button.primary{background:#85818a}.stone-button.small{font-size:12px;padding:8px 15px}.stone-button.green{background:#5b8b42;box-shadow:inset 3px 3px #9dc36a,inset -3px -3px #355425,0 3px #0005}.text-actions{display:flex;justify-content:center;gap:22px;margin-top:20px}.text-actions button{background:none;border:0;padding:5px;color:#fff;text-shadow:2px 2px #333;font-size:14px}.title-meta{position:absolute;bottom:34px;left:25px;right:25px;display:flex;justify-content:space-between;gap:12px;align-items:end;font-size:13px;text-shadow:2px 2px #333}.title-meta span:last-child{max-width:330px;text-align:right;font-size:11px;line-height:1.6}.prompt-panel{margin-top:clamp(100px,17svh,170px);text-align:center;width:min(640px,91vw);text-shadow:2px 2px #1c1522}.prompt-index{font-family:Pixel,monospace;font-size:13px;color:#eee;margin-bottom:18px}.prompt-panel h2{font-family:Pixel,monospace;font-size:clamp(20px,2.4vw,30px);line-height:1.35;margin:0 auto 14px;max-width:640px}.prompt-panel p{font-size:16px;margin:0 0 27px}.answer-form{width:min(440px,100%);margin:auto}.answer-form label{font-size:13px;display:block;text-align:left;margin-bottom:8px}.answer-row{display:flex;gap:8px}.answer-row input,.room-input{background:#1c1726e8;border:3px solid #9e96aa;box-shadow:inset 2px 2px #0008;color:#fff;min-width:0;font-size:19px;padding:12px 14px;border-radius:0;flex:1;width:100%}.answer-row button{padding:10px 20px}.timer{height:5px;width:100%;background:#1f172b80;margin:13px 0 7px}.timer span{display:block;height:100%;background:#a7da65;transition:width .1s linear}.timer-label{font-family:Pixel,monospace;font-size:12px}.inline-error{min-height:24px;font-size:14px!important;margin:10px 0!important;color:#ffcc8b}.confirmation{background:#21182ced;border:2px solid #89739d;padding:14px;margin-top:10px;display:flex;flex-wrap:wrap;gap:8px;justify-content:center}.confirmation p{width:100%;font-size:14px}.countdown{margin:auto;text-align:center;font-family:Pixel,monospace;font-size:80px;text-shadow:4px 4px #21162c}.countdown small{display:block;font:15px Pixel;margin-top:20px}.feedback{position:absolute;bottom:150px;width:min(460px,90vw);text-align:center;padding:27px 24px;background:#21152fee;border:3px solid #66517b;box-shadow:0 6px 0 #110c1b,0 0 40px #130a2644}.feedback .rarity{font-family:Pixel;font-size:21px;line-height:1.4;color:var(--rarity,#eee)}.feedback img{width:52px;height:52px;image-rendering:pixelated;margin:10px}.feedback h2{font-size:21px;margin:0 0 9px}.feedback p{font-size:14px;line-height:1.5;margin:7px 0}.feedback .points{font:25px Pixel;color:#ffdf56;margin:17px}.feedback small{font-size:12px;color:#c5b9d2}.feedback .stone-button{margin-top:14px}#hotbar{position:absolute;z-index:4;bottom:20px;left:50%;transform:translateX(-50%);width:min(470px,94vw)}.slots{display:grid;grid-template-columns:repeat(9,1fr);border:3px solid #111;background:#797677}.slot{aspect-ratio:1;border:3px solid #363338;box-shadow:inset 2px 2px #aaa5aa;position:relative;padding:6px}.slot img{width:100%;height:100%;image-rendering:pixelated;object-fit:contain}.slot span{position:absolute;bottom:1px;right:2px;font:14px Pixel;text-shadow:2px 2px #000}.xp-track{background:#23201f;height:7px;border:1px solid #111;margin-bottom:7px}.xp-track span{display:block;background:#83c51f;height:100%}#toast{position:absolute;right:20px;top:82px;max-width:280px;background:#242124e8;border:3px solid #695d70;padding:14px;z-index:10;display:none;font:13px Pixel;line-height:1.5}.modal,.results,.mode-list,.party-lobby,.party-game{background:#241b2deF;border:3px solid #75647f;box-shadow:0 6px #140e1d;color:#fff}dialog{background:#241b2df7;border:3px solid #79668c;box-shadow:0 12px 60px #0009;color:#fff;padding:28px;width:min(540px,92vw);max-height:85svh;overflow:auto;z-index:20}dialog::backdrop{background:#15101c88}dialog h2,.results h2,.mode-list h2,.party-lobby h2{font-family:Pixel;font-size:22px;margin:0 0 22px;line-height:1.4}dialog p,dialog li{font-size:16px;line-height:1.7}dialog .menu-grid{display:grid;gap:10px}.results{position:absolute;top:75px;bottom:25px;width:min(650px,95vw);overflow:auto;padding:26px;text-align:center;scrollbar-color:#786086 #22192b}.results h2{margin-bottom:12px}.total-depth{font:37px Pixel;color:#ffdf67;margin:13px 0}.results .muted{color:#bfb3ca;font-size:14px}.dig-bars{height:115px;display:flex;gap:11px;align-items:end;justify-content:center;border-bottom:2px solid #73627d;margin:25px 10px 13px}.dig-bar{flex:1;max-width:48px;background:#a770c6;position:relative;border:2px solid #d6b7e6;min-height:5px}.dig-bar span{font:13px Pixel;position:absolute;top:-24px;left:0;right:0}.answer-detail{border-bottom:1px solid #594664;text-align:left;padding:0;margin:0}.answer-detail summary{cursor:pointer;list-style:none;padding:15px 5px;display:flex;gap:12px;align-items:center;font-size:14px;line-height:1.5}.answer-detail summary strong{margin-left:auto;white-space:nowrap;color:#f5da63}.answer-detail img{width:30px;height:30px;image-rendering:pixelated}.answer-detail p{font-size:13px;color:#cbbcd4}.answer-list{max-height:260px;overflow:auto;padding:5px 10px}.answer-list div{display:flex;justify-content:space-between;gap:10px;padding:7px 0;font-size:13px}.answer-search{background:#17101e;color:white;border:1px solid #8e7e99;padding:10px;width:100%;margin:7px 0}.result-actions,.mode-actions{display:flex;gap:9px;justify-content:center;flex-wrap:wrap;margin-top:22px}.stats-grid{display:flex;justify-content:space-around;gap:8px;margin:20px 0}.stats-grid span{font-size:12px;color:#bcb0c8}.stats-grid strong{display:block;font:22px Pixel;color:#fff;margin:8px}.layers{display:flex;gap:5px;flex-wrap:wrap;justify-content:center;font-size:11px;margin:16px 0;color:#c5b6d0}.layers span{background:#34263f;padding:5px 7px}.loading{margin:auto;font-family:Pixel;color:#eee}.mode-list,.party-lobby{position:absolute;top:90px;bottom:35px;width:min(520px,94vw);padding:25px;overflow:auto}.mode-list .dig-option{display:flex;justify-content:space-between;align-items:center;padding:10px 0;border-bottom:1px solid #584462;font-size:14px}.party-lobby label{display:block;font-size:13px;margin:17px 0 8px}.party-lobby .room-input{display:block;font-size:17px}.room-list{display:grid;gap:8px;margin-top:20px}.room-list button{display:flex;justify-content:space-between;text-align:left}.room-code{font:36px Pixel;letter-spacing:9px;color:#f5de68;text-align:center;margin:10px}.party-game{position:absolute;top:95px;bottom:30px;max-width:820px;width:95vw;padding:24px;display:flex;flex-direction:column;text-align:center;overflow:auto}.party-prompt{font:20px Pixel;line-height:1.5;margin:6px 0 12px}.player-ring{position:relative;min-height:265px;flex:1;max-height:410px;margin:10px 0}.party-player{position:absolute;width:105px;transform:translate(-50%,-50%);font-size:13px;line-height:1.6}.party-player .head{width:42px;height:42px;margin:auto;background:#b88965;box-shadow:inset 0 13px #783c22;border:2px solid #3d2b27;image-rendering:pixelated;position:relative}.head::after{content:'▪ ▪';position:absolute;color:#397c41;left:8px;top:10px;font-size:19px}.party-player.active .head{box-shadow:0 0 0 4px #95c74b,inset 0 13px #783c22}.party-player.dead{opacity:.4}.hearts{color:#ee6561;letter-spacing:1px;font-size:17px}.player-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ring-creeper{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:60px;height:86px;background:#6aab45;box-shadow:inset 10px 0 #87c453,inset -10px 0 #497c32;border:3px solid #2d5325;animation:breathe .9s steps(2) infinite}.ring-creeper::after{content:'';position:absolute;top:20px;left:10px;width:12px;height:12px;background:#152715;box-shadow:24px 0 #152715,12px 12px #152715,6px 24px #152715,12px 24px #152715,18px 24px #152715,6px 30px #152715,18px 30px #152715}.party-status{font-size:14px;color:#e2d2ec;min-height:36px}.party-game .answer-form{margin:8px auto;width:100%;max-width:450px}.notice-line{font-size:12px;line-height:1.7;color:#c9b7d6}.about-copy,.info-page{max-width:800px;margin:0 auto;padding:55px 24px;line-height:1.85;font-size:16px;color:#d7cedf}.about-copy h2,.info-page h1{font:25px Pixel;color:#f0e7f7;line-height:1.5}.about-copy h3{color:#f1e3fa;font-size:20px;margin-top:36px}.about-copy details{border-bottom:1px solid #55425f;padding:14px 0}.about-copy summary{cursor:pointer;color:#fff}footer{padding:25px;text-align:center;font-size:12px;color:#b8a7c4;line-height:1.8}footer nav{display:flex;justify-content:center;gap:17px;flex-wrap:wrap;margin-top:10px}#foundry-consent{position:fixed;bottom:12px;left:50%;transform:translateX(-50%);z-index:25;width:min(600px,95vw);background:#241b2df5;border:2px solid #75647f;padding:15px;display:flex;align-items:center;gap:12px;font-size:13px}#foundry-consent p{margin:0}#foundry-consent div{display:flex;gap:6px}#foundry-consent button{padding:7px 10px;background:#77717f;color:#fff;border:1px solid #bbb}@keyframes breathe{50%{filter:brightness(1.3)}}@media(max-width:600px){.game-header{top:14px;left:14px;right:14px}.title-screen{margin-top:22svh}.logo{letter-spacing:-3px}.splash{margin-bottom:35px;font-size:11px}.title-meta{bottom:20px;left:14px;right:14px;display:block;font-size:11px}.title-meta span:last-child{display:block;max-width:none;text-align:left;font-size:10px;margin-top:6px}.prompt-panel{margin-top:130px}.prompt-panel p{font-size:13px;margin-bottom:22px}.prompt-panel h2{font-size:20px}.answer-row input{font-size:17px;padding:11px}.answer-row button{font-size:12px;padding:10px 12px}.feedback{bottom:130px;padding:20px}.feedback .rarity{font-size:17px}.feedback img{height:40px;width:40px;margin:8px}.feedback .points{font-size:22px;margin:12px}.results{top:76px;bottom:12px;padding:22px 17px}.total-depth{font-size:29px}.stone-button{font-size:13px;padding:12px 15px}.party-game{padding:17px;top:79px}.party-prompt{font-size:16px}.party-player{width:85px;font-size:11px}.player-ring{min-height:280px}.slot{padding:4px;border-width:2px}.slot span{font-size:11px}.notice-line{font-size:11px}#foundry-consent{display:block}#foundry-consent div{margin-top:8px}}@media(prefers-reduced-motion:reduce){*{animation:none!important;scroll-behavior:auto!important}}

/* Keep the room controls inside the game while native input focus scrolls. */
.party-game{overscroll-behavior:contain;min-height:0;scroll-padding:18px}.party-game h2,.party-game .room-code,.party-game .party-prompt,.party-game .party-status,.party-game .mode-actions,.party-game .answer-form{flex-shrink:0}.party-game .player-ring{flex:1 0 220px;min-height:220px}.party-game .mode-actions{padding-bottom:8px}.party-game h2{margin:0 0 8px}.party-game .room-code{font-size:27px;margin:5px}.party-game .party-prompt{font-size:18px;margin:6px}.party-game .party-status{margin:4px 0}.party-game .inline-error{margin:2px 0!important;min-height:20px}@media(max-height:760px){.party-game{top:72px;bottom:10px;padding:14px}.party-game .player-ring{min-height:160px;flex-basis:160px}.party-game .room-code{font-size:22px}.party-game h2{font-size:18px}.party-game .mode-actions{margin-top:8px}.party-game .head{width:30px;height:30px}.party-game .party-prompt{font-size:15px}}

.consent-banner{position:fixed;z-index:100;bottom:1rem;left:1rem;right:1rem;max-width:40rem;margin:auto;padding:1rem;background:#222c;border:2px solid #aaa;color:white;font:16px/1.5 system-ui;backdrop-filter:blur(8px)}.consent-banner div{display:flex;gap:.75rem}.consent-banner a{color:#b8e8ff}

.helmet-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(125px,1fr));gap:8px}.helmet-grid button{display:flex;flex-direction:column;align-items:center;gap:5px}.helmet-grid img{width:32px;image-rendering:pixelated}.helmet-grid small{font-size:11px}.selected{outline:2px solid #c9ef8a}.friend-list>div{padding:12px 0;border-bottom:1px solid #777;display:flex;flex-wrap:wrap;gap:10px;align-items:center}.friend-list span{flex:1}
.party-game{background:linear-gradient(180deg,color-mix(in srgb,var(--arena-bg,#344b28) 75%,transparent),#17251dde)}.party-extras{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center;justify-content:center;font-size:.8rem}.party-extras select{font:inherit;max-width:12rem}.party-xp{display:block;width:72px;height:6px;margin:.3rem auto;accent-color:#8acb57}.party-player.spectator{opacity:.65}

/* iPhone Safari: safe areas and visual viewport are independent of the layout viewport. */
:root{--safe-top:env(safe-area-inset-top,0px);--safe-bottom:env(safe-area-inset-bottom,0px)}
.game-header{top:calc(var(--safe-top) + 14px);left:max(14px,env(safe-area-inset-left,0px));right:max(14px,env(safe-area-inset-right,0px))}
.title-meta{bottom:calc(var(--safe-bottom) + 20px)}
body.playing{overflow:hidden}body.playing .about-copy,body.playing footer{display:none}
body.playing #game-screen{position:fixed;top:var(--game-vtop,0px);left:0;right:0;height:var(--game-vh,100svh);min-height:0}
body.playing .prompt-panel{margin-top:calc(var(--safe-top) + 100px)}
body.playing .results,body.playing .party-game,body.playing .mode-list,body.playing .party-lobby{top:calc(var(--safe-top) + 70px);bottom:calc(var(--safe-bottom) + 12px)}
body.playing #hotbar{bottom:calc(var(--safe-bottom) + 16px)}
@media(max-width:600px){body.keyboard-open .prompt-panel{margin-top:calc(var(--safe-top) + 70px)}body.keyboard-open .prompt-index{font-size:10px;margin-bottom:8px}body.keyboard-open .prompt-panel h2{font-size:16px;margin-bottom:10px}body.keyboard-open .prompt-panel>p{display:none}body.keyboard-open #hotbar{display:none}body.keyboard-open .answer-row input{padding:9px;font-size:17px}body.keyboard-open .game-header button{height:38px;font-size:20px}body.keyboard-open #depth-readout{font-size:11px}}

.info-nav{display:flex;align-items:center;justify-content:space-between;gap:16px;max-width:800px;margin:0 auto;padding:20px 24px}.info-nav nav{display:flex;gap:16px;font-size:14px}.info-nav+.info-page{padding-top:20px}@media(max-width:400px){.info-nav{padding:14px 16px;gap:10px}.info-nav nav{gap:12px;font-size:13px}}

.results>.result-actions{margin:18px 0}.result-actions>.stone-button{min-height:44px}

/* Observed original: prompt card above the world, controls immediately above the inventory. */
#game-screen{font-family:Pixel,monospace}
.stone-button,.game-header button{font-weight:400}
body.playing .asking-prompt{position:absolute;top:calc(var(--safe-top) + 46px);margin:0;width:min(400px,calc(100vw - 8px));padding:8px;text-align:left;background:#180e22f5;border:3px solid #31134b;box-shadow:0 0 0 1px #100a18;text-shadow:2px 2px #333}
.asking-prompt .prompt-topline{display:flex;justify-content:space-between;align-items:start;gap:8px}
.asking-prompt .prompt-index{font-size:16px;color:#bcb8be;margin:0 0 5px}
.asking-prompt .prompt-depth{display:none;font-size:14px;color:#bcb8be;white-space:nowrap}
.asking-prompt h2{font-size:24px;font-weight:400;line-height:1.2;margin:0 0 8px}
.asking-prompt p{font-family:Pixel,monospace;color:#bcb8be;font-size:16px;line-height:1.2;margin:0}
body.asking #depth-readout{text-align:left;width:min(400px,calc(100vw - 120px));font-size:16px;line-height:1.1;font-weight:400}
body.asking #depth-readout small{font-size:inherit}
body.playing #hotbar{width:min(366px,94vw);bottom:calc(var(--safe-bottom) + 6px)}
body.asking #hotbar .xp-track{visibility:hidden}
.dig-controls{position:absolute;bottom:calc(var(--safe-bottom) + 52px);width:min(400px,calc(100vw - 8px));text-align:center;display:flex;flex-direction:column}
.dig-controls>label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.dig-controls .answer-row{gap:4px}
.dig-controls .answer-row input{font-family:Pixel,monospace;font-size:20px;border:2px solid #ddd;background:#000;padding:7px 8px;box-shadow:none;height:40px}
.dig-controls .answer-row button{font-size:20px;padding:4px 20px;min-width:100px;height:40px}
.dig-controls .timer-label{font-size:20px;line-height:20px;margin-top:5px;color:#87ff00;text-shadow:2px 2px #111}
.dig-controls .timer{width:min(366px,94vw);height:6px;margin:0 auto;background:#1b2919;border:1px solid #111}
.dig-controls .timer span{background:#83c51f}
.dig-controls .inline-error{position:absolute;bottom:calc(100% + 5px);left:0;right:0;margin:0!important;min-height:0;padding:0;color:#ffdc9f;text-shadow:1px 1px #000}
.dig-controls .inline-error:not(:empty){padding:8px;background:#180e22f5;border:2px solid #704a35}
.dig-controls #confirm-answer:not(:empty){position:absolute;bottom:calc(100% + 40px);left:0;right:0}
@media(max-width:600px){body.asking #depth-readout{visibility:hidden}.asking-prompt .prompt-depth{display:block}.asking-prompt h2{font-size:24px}.asking-prompt .prompt-index{font-size:15px}}
@media(max-width:600px){body.keyboard-open .asking-prompt{top:calc(var(--safe-top) + 44px);margin:0;padding:6px}body.keyboard-open .asking-prompt h2{font-size:18px;margin-bottom:0}body.keyboard-open .asking-prompt .prompt-index{font-size:12px;margin-bottom:4px}body.keyboard-open .asking-prompt .prompt-depth{font-size:12px}body.keyboard-open .dig-controls{bottom:6px}body.keyboard-open .dig-controls .answer-row input{font-size:18px;padding:7px 8px}body.keyboard-open .dig-controls .answer-row button{font-size:18px;min-width:88px;padding:4px 14px}body.keyboard-open .dig-controls .timer-label{font-size:16px;line-height:18px;margin-top:4px}}

/* Reuse the original title-screen hierarchy without a third-party logo or invented player counts. */
.title-screen{margin-top:clamp(96px,13svh,150px);width:min(650px,calc(100vw - 8px))}
.logo{font-size:clamp(48px,15vw,84px);letter-spacing:-2px}
.splash{font-size:clamp(16px,3.4vw,22px);margin-bottom:clamp(65px,12svh,110px)}
.main-actions{width:min(400px,calc(100vw - 8px));gap:8px}
.main-actions .stone-button{font-size:20px;padding:7px 12px;min-height:40px;line-height:1.2}
.text-actions{width:min(400px,calc(100vw - 8px));margin:8px auto 0;gap:4px}
.text-actions .stone-button{flex:1;background:#777376;border:3px solid #29252c;padding:6px 7px;font-family:Pixel,monospace;font-size:17px;line-height:1.2;min-height:40px}
.text-actions .profile-button{flex:0 0 40px;padding:2px}
.profile-button img{display:block;width:28px;height:28px;image-rendering:pixelated;object-fit:contain}
.title-meta{flex-direction:column;align-items:center;text-align:center;font-family:Pixel,monospace;font-size:14px;gap:10px;text-shadow:-1px -1px #111,1px -1px #111,-1px 1px #111,1px 1px #111,2px 2px #111}
.title-meta span:last-child{max-width:550px;text-align:center;font-size:13px;line-height:1.4}

.stone-button.primary{background:#777376}.stone-button:hover{background:#747077}.stone-button.green{background:#3e682d}
body.asking #depth-readout>span,body.asking #depth-readout>small{background:#1b1727b3;padding:0 2px}

/* Existing pack HUD sprites; item icons and labels remain accessible DOM content. */
#hotbar{--hotbar-width:min(366px,94vw)}
.slots{background:var(--hotbar) center/100% 100% no-repeat;border:0;padding:2px;image-rendering:pixelated}
.slot{background:transparent;border:0;box-shadow:none}
.slot:first-child::after{content:'';position:absolute;inset:-4%;background:var(--slot-selected) center/100% 100% no-repeat;pointer-events:none}
.xp-track{background:var(--xp-empty) center/100% 100% no-repeat;border:0;image-rendering:pixelated}
.xp-track span{background:var(--xp-fill) left center/var(--hotbar-width,100%) 100% no-repeat}

.chart-description{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.depth-distribution{margin:46px auto 18px;width:min(100%,520px)}
.depth-bars{height:108px;display:flex;align-items:end;gap:2px;border-bottom:2px solid #a9a6ac;padding:0 2px}
.depth-bin{position:relative;flex:1;background:#6e6b70;min-width:0}
.depth-bin.own-depth{background:#ffff55}
.depth-marker{position:absolute;bottom:calc(100% + 4px);left:50%;transform:translateX(-50%);width:20px;height:20px;background:url('/assets/minecraft/entity/player/wide/alex.png') -20px -20px/160px 160px no-repeat;image-rendering:pixelated}
.depth-axis{display:flex;justify-content:space-between;font:14px Pixel,monospace;color:#ccc;padding-top:5px}
.dig-heading{display:flex;justify-content:space-between;gap:10px;text-align:left;border-bottom:1px solid #666;padding-bottom:8px;font:17px Pixel,monospace}
.dig-heading small{font-size:14px}
.textured-dig{height:174px;gap:9px;border:0;margin:18px auto 24px;width:min(100%,340px);align-items:start}
.dig-shaft{position:relative;flex:1;max-width:36px;min-width:0;height:138px;border:2px solid #100d12;background:url('/assets/minecraft/blocks/stone.png') 0 0/16px 16px;image-rendering:pixelated}
.dig-surface{display:block;position:absolute;top:0;left:0;right:0;height:32px;background:url('/assets/minecraft/blocks/grass_block_side.png') center/100% 100% no-repeat}
.dig-shaft>img{position:absolute;top:clamp(0px,calc(var(--dig-position) - 16px),calc(100% - 28px));left:50%;transform:translateX(-50%);width:32px;height:32px;object-fit:contain;image-rendering:pixelated}
.dig-shaft>b{position:absolute;top:calc(100% + 5px);left:0;right:0;font:17px Pixel,monospace;color:var(--rarity,#fff)}
.layer-table{font:15px Pixel,monospace;color:#aaa;text-align:left;margin:8px 0 24px}
.layer-table>div{display:grid;grid-template-columns:22px 85px 1fr;gap:8px;align-items:center;padding:5px 0}
.layer-table>div.reached{color:#e0dce2}
.layer-table img{width:18px;height:18px;image-rendering:pixelated}
.results{padding-bottom:115px}
.results>.result-actions{position:fixed;left:50%;bottom:calc(var(--safe-bottom) + 20px);transform:translateX(-50%);z-index:8;max-width:calc(100vw - 24px);width:max-content;background:#1b1424f5;border:1px solid #675773;padding:6px;margin:0}
body.party-scene #game-screen{background:linear-gradient(#0004,#0005),url('/assets/scenes/party-forest-v1.webp') center/cover no-repeat}
body.party-scene #world{visibility:hidden}
body.playing.party-scene .party-lobby{top:0;bottom:0;width:100%;max-width:none;border:0;box-shadow:none;background:#0004;padding:86px max(12px,calc((100vw - 900px)/2)) 100px;text-align:left}
.party-lobby>h2{position:absolute;top:24px;left:70px;right:70px;text-align:center;font:28px Pixel,monospace;text-shadow:2px 2px #111}
.party-entry{max-width:600px;margin:0 auto 14px}
.party-lobby .room-input{background:#000;border:2px solid #ddd;font:24px Pixel,monospace;padding:10px 12px;margin:0;min-width:0}
.party-match-row{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin:10px 0}
.party-match-row small{grid-column:1/-1;font-size:12px;text-shadow:1px 1px #111}
.party-match-row .stone-button,.party-join-row .stone-button{font-size:20px;padding:9px}
.party-join-row{display:grid;grid-template-columns:1fr 1fr auto;gap:6px;align-items:stretch}
.party-entry>p{font:14px Pixel,monospace;margin:8px 0;text-shadow:1px 1px #111}
.party-entry>p label{margin:0;font:inherit}
.party-lobby>h3{font:22px Pixel,monospace;border-bottom:2px solid #0008;padding-bottom:12px;margin:16px 0 10px;text-shadow:2px 2px #111}
.party-lobby .room-list{margin-top:0;gap:8px}
.party-lobby .room-list button{background:#0005;border:0;box-shadow:none;font:20px Pixel,monospace;padding:12px;text-shadow:2px 2px #111}
.party-bottom-nav{position:fixed;bottom:calc(var(--safe-bottom) + 16px);left:50%;transform:translateX(-50%);width:min(900px,calc(100vw - 24px));display:grid;grid-template-columns:repeat(3,1fr);gap:8px;background:#0004;padding:6px}
.party-bottom-nav .stone-button{font-size:20px;padding:8px 10px}
.party-rules{margin:16px 0}
.party-scene .party-game{background:#0006;border:0;box-shadow:none}
@media(max-width:600px){.party-lobby>h2{font-size:23px}.party-lobby .room-input{font-size:19px}.party-match-row .stone-button,.party-join-row .stone-button{font-size:17px}.party-bottom-nav{gap:4px;padding:4px}.party-bottom-nav .stone-button{font-size:17px;padding:8px 5px}.party-join-row{grid-template-columns:minmax(0,1.2fr) minmax(0,1fr) auto}.party-join-row .room-input{padding:8px 5px}.party-lobby .room-list button{font-size:17px}}

body.playing .results{top:0;bottom:0;width:100%;max-width:none;background:#000a;border:0;box-shadow:none;padding:24px max(14px,calc((100vw - 600px)/2)) 120px;font-family:Pixel,monospace}
.results>h2{font-size:20px;font-weight:400;padding:0 48px 20px;margin:0 0 24px;border-bottom:1px solid #aaa4}
.results .total-depth{display:flex;align-items:baseline;justify-content:center;flex-wrap:wrap;gap:8px;margin:12px 0;color:#ffff55}
.results .total-depth strong{font:72px Pixel,monospace;font-weight:400;line-height:1.1}
.results .total-depth span{font:25px Pixel,monospace;color:#fff}
.results>.muted{color:#55ffff;font-size:17px}
.results .dig-heading{margin-top:30px}
@media(max-width:600px){.results>h2{font-size:18px;margin-bottom:18px}.results .total-depth strong{font-size:60px}.results .total-depth span{font-size:21px}}

.dig-controls .answer-row input,.dig-controls .answer-row button{height:44px}.text-actions .stone-button{min-height:44px}.text-actions .profile-button{flex-basis:44px}

.party-name-row{display:grid;grid-template-columns:56px minmax(0,1fr);gap:8px}.party-avatar{display:block;width:56px;height:56px;background:url('/assets/minecraft/entity/player/wide/alex.png') -56px -56px/448px 448px no-repeat;image-rendering:pixelated;outline:2px solid #aaa;outline-offset:-2px}@media(max-width:600px){.party-name-row{grid-template-columns:44px minmax(0,1fr)}.party-avatar{width:44px;height:44px;background-size:352px 352px;background-position:-44px -44px}}

/* Keep glyphs and decoded images inside their own independent layout boxes. */
.logo{font-size:clamp(36px,11vw,76px)}
.profile-face{display:block;width:28px;height:28px;background:var(--miner-head,url('/assets/minecraft/heads/alex.png')) center/100% 100% no-repeat;image-rendering:pixelated}
.slots{grid-template-columns:repeat(9,minmax(0,1fr));aspect-ratio:182/22}
.slot{min-width:0;min-height:0;aspect-ratio:auto;padding:0;overflow:visible}
.slot>img{position:absolute;inset:12%;width:76%;height:76%;max-width:76%;max-height:76%;object-fit:contain}
body.playing .feedback{width:min(400px,calc(100vw - 20px));bottom:calc(var(--safe-bottom) + 140px);padding:14px 16px 18px}
.feedback .feedback-prompt{font:17px Pixel,monospace;color:#c4bec8;line-height:1.3;margin:0 0 18px}
.feedback h2{font-family:Pixel,monospace;font-weight:400}
.feedback #next-prompt{position:absolute;left:0;bottom:-62px;width:100%;min-height:44px;margin:0}

body.party-scene #game-screen{background-image:linear-gradient(#0004,#0005),var(--party-scene-image,url('/assets/scenes/party-forest-v1.webp'))}

body.playing .feedback{display:flex;flex-direction:column;align-items:center;gap:6px;padding:10px 12px;max-height:min(340px,calc(var(--game-vh,100svh) - 300px));overflow:auto}
.feedback>*{margin:0!important}
.feedback>img{width:40px;height:40px}
.feedback .feedback-prompt{font-size:16px;line-height:1.2}
.feedback .rarity{font-size:24px;line-height:1.1}
.feedback h2{font-size:24px;line-height:1.1}
.feedback p{font-size:14px;line-height:1.3}
.feedback .points{font:20px Pixel,monospace;line-height:1.2}
.feedback small{font-size:12px;line-height:1.2}
.feedback-next{position:absolute;bottom:calc(var(--safe-bottom) + 78px);width:min(400px,calc(100vw - 20px));min-height:44px}
.feedback>br{display:none}.feedback-next{font-size:20px;line-height:1.2;padding:7px 12px}

/* Header controls use geometry so unsupported pixel-font glyphs never hide an action. */
.game-header button svg{width:28px;height:28px;display:block;margin:auto;pointer-events:none}
.sound-muted-mark{display:none}
#sound-button[data-muted="true"] .sound-muted-mark{display:block}

.ranked-progress{width:100%;min-width:0;flex-shrink:0;text-align:center}.ranked-progress h3{margin:6px 0;font-size:16px}.ranked-progress small{font-size:12px}.ranked-progress .stats-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin:6px 0 10px}.ranked-progress .stats-grid strong{margin:3px 0}

/* Reserve the original label so completion feedback cannot move neighbouring controls. */
.stable-label{display:inline-grid;grid-template-areas:"label";align-items:center;justify-content:center}
.stable-label::after{content:attr(data-reserve-label);grid-area:label;visibility:hidden;pointer-events:none}
.stable-label>.stable-label-text{grid-area:label}

/* Site-owned title art: controls stay real DOM elements over a text-free scene. */
.account-label{display:none}
body.branded-title #game-screen{background:#061d27 var(--title-background) center center/cover no-repeat}
body.branded-title #world{opacity:0}
.branded-title .title-screen{margin-top:clamp(60px,8svh,100px);width:min(760px,calc(100vw - 28px));text-align:center}
.brand-mark{display:block;width:clamp(112px,15svh,150px);height:auto;aspect-ratio:1;margin:0 auto 7px;object-fit:contain}
.brand-wordmark{margin:0 auto;width:min(690px,100%);line-height:0}
.brand-wordmark img{display:block;width:100%;height:auto;max-height:110px;object-fit:contain}
.brand-tagline{font:clamp(16px,1.8vw,21px)/1.4 Pixel,monospace;color:#ffe8a0;margin:10px 0 clamp(22px,3.4svh,38px);text-shadow:2px 2px #07161b}
.branded-title .main-actions{width:min(570px,100%);gap:12px}
.branded-title .stone-button{background-color:transparent;background-image:var(--title-stone);background-repeat:no-repeat;background-size:100% 100%;border:0;box-shadow:none;padding:12px 18px;min-height:62px;font-size:22px;line-height:1.2;text-shadow:2px 3px 1px #0d161c;color:#fff}
.branded-title .main-actions .primary{background-image:var(--title-primary);min-height:82px;font-size:clamp(22px,2.4vw,30px);font-weight:700}
.branded-title .stone-button:hover{filter:brightness(1.15)}
.branded-title .stone-button:active{transform:translateY(2px)}
.branded-title .text-actions{width:min(555px,100%);margin:12px auto 0;gap:10px;display:flex;justify-content:center;align-items:stretch}
.branded-title .text-actions .stone-button{font-size:18px;min-height:53px;flex:1;min-width:0;padding:10px 14px}
.branded-title .text-actions .profile-button{width:56px;flex:0 0 56px;display:flex;align-items:center;justify-content:center}
.branded-title .profile-face{width:30px;height:30px;flex:0 0 30px}
.branded-title .title-meta{bottom:calc(var(--safe-bottom) + 20px);gap:6px;color:#e0e7e9;font-size:11px}
.branded-title .title-meta>span:first-child{font-size:11px;color:#c2d4db}
.branded-title .title-meta span:last-child{font:11px/1.5 Arial,sans-serif;max-width:620px}
.branded-title .title-meta a{font-size:13px;text-underline-offset:3px}
.brand-theme dialog{background:#10232af5;border-color:#62757b}
.mode-choice{display:flex;flex-direction:column;align-items:flex-start;gap:7px;text-align:left}
.mode-choice small{font:13px/1.4 Arial,sans-serif;color:#e0e4e6;text-shadow:none}
body.playing .asking-prompt{top:calc(var(--safe-top) + 76px)}
@media(max-width:600px){
 .branded-title .title-screen{margin-top:calc(var(--safe-top) + 76px);width:calc(100vw - 28px)}
 .branded-title .brand-mark{width:76px;margin-bottom:12px}
 .branded-title .brand-wordmark{width:100%}
 .branded-title .brand-wordmark img{max-height:60px}
 .branded-title .brand-tagline{font-size:14px;line-height:1.5;margin:13px 0 24px}
 .branded-title .main-actions .primary{min-height:65px;font-size:23px}
 .branded-title .main-actions .stone-button{min-height:56px;font-size:21px}
 .branded-title .text-actions{gap:8px;margin-top:12px}
 .branded-title .text-actions .stone-button{font-size:13px;padding:9px 6px;min-height:47px}
 .branded-title .text-actions .profile-button{width:48px;flex-basis:48px}
 .branded-title .title-meta{left:18px;right:18px;bottom:calc(var(--safe-bottom) + 18px)}
 .branded-title .title-meta>span:first-child{display:none}
 .branded-title .title-meta span:last-child{font-size:10px;line-height:1.5}
 body.keyboard-open .asking-prompt{top:calc(var(--safe-top) + 64px)}
}
@media(max-height:650px) and (min-width:601px){
 .branded-title .title-screen{margin-top:48px}
 .branded-title .brand-mark{width:60px;margin-bottom:2px}
 .branded-title .brand-wordmark{width:470px}
 .branded-title .brand-tagline{font-size:16px;margin:6px 0 15px}
 .branded-title .main-actions .primary{min-height:62px;font-size:24px}
 .branded-title .main-actions .stone-button{min-height:52px}
 .branded-title .text-actions .stone-button{min-height:43px;font-size:14px}
}

/* Gameplay controls: native Minecraft sprites, shared viewport dimensions. OPS-1761. */
:root{--dig-unit:2px;--dig-column:min(calc(200 * var(--dig-unit)),35vw);--dig-controls-bottom:calc(var(--safe-bottom) + 86px)}
body.playing:not(.party-scene) .game-header{top:calc(var(--safe-top) + 4px);left:max(4px,env(safe-area-inset-left,0px));right:max(4px,env(safe-area-inset-right,0px))}
body.playing:not(.party-scene) .game-header button{width:max(44px,calc(20 * var(--dig-unit)));height:max(44px,calc(20 * var(--dig-unit)));padding:0;border:calc(3 * var(--dig-unit)) solid transparent;border-image:url('/assets/minecraft/gui/sprites/widget/button.png') 3 fill / calc(3 * var(--dig-unit)) / 0 repeat;background:none;box-shadow:none;image-rendering:pixelated;filter:none}
body.playing:not(.party-scene) .game-header button:hover{border-image-source:url('/assets/minecraft/gui/sprites/widget/button_highlighted.png')}
body.playing:not(.party-scene) .game-header button svg{width:calc(12 * var(--dig-unit));height:calc(12 * var(--dig-unit))}
body.playing:not(.party-scene) #depth-readout{position:absolute;top:0;left:50%;transform:translateX(-50%);width:var(--dig-column);text-align:left;font:calc(8 * var(--dig-unit))/1.1 Pixel,monospace;white-space:nowrap}
body.playing:not(.party-scene) #depth-readout small{font-size:inherit}
body.playing .asking-prompt,body.playing .feedback{width:min(calc(var(--dig-column) + 12 * var(--dig-unit)),calc(100vw - 8px));border:calc(9 * var(--dig-unit)) solid transparent;border-image:url('/assets/minecraft/gui/sprites/tooltip/frame.png') 9 fill / calc(9 * var(--dig-unit)) / 0 stretch;background:#100617ef;background-clip:padding-box;box-shadow:none;image-rendering:pixelated;padding:calc(3 * var(--dig-unit));text-shadow:calc(1 * var(--dig-unit)) calc(1 * var(--dig-unit)) #211426}
body.playing .asking-prompt{top:calc(var(--safe-top) + 30px);margin:0}
.asking-prompt .prompt-index,.asking-prompt p{font-size:calc(8 * var(--dig-unit));line-height:1.2}
.asking-prompt h2{font-size:calc(11 * var(--dig-unit));line-height:1.25}
body.playing .feedback{bottom:calc(var(--dig-controls-bottom) + max(44px,calc(20 * var(--dig-unit))) + 3 * var(--dig-unit));gap:calc(3 * var(--dig-unit));max-height:calc(var(--game-vh,100svh) - var(--safe-top) - 230px);overflow:auto}
.feedback .feedback-prompt{font:calc(8 * var(--dig-unit))/1.2 Pixel,monospace;color:#d1c6d8}
.feedback>img{width:calc(24 * var(--dig-unit));height:calc(24 * var(--dig-unit));flex-shrink:0}
.feedback .rarity,.feedback h2{font:calc(12 * var(--dig-unit))/1.15 Pixel,monospace}
.feedback-missed .rarity{font-weight:700;text-shadow:calc(1 * var(--dig-unit)) calc(1 * var(--dig-unit)) #4c0000}
.feedback p{font:calc(8 * var(--dig-unit))/1.25 Pixel,monospace;color:#c6becb}
.feedback .points{font:calc(10 * var(--dig-unit))/1.2 Pixel,monospace;color:#ffff55}
body.playing:not(.party-scene) .dig-controls,body.playing .feedback-next{bottom:var(--dig-controls-bottom);width:var(--dig-column)}
body.playing:not(.party-scene) .dig-controls .answer-row{gap:calc(2 * var(--dig-unit))}
body.playing:not(.party-scene) .dig-controls .answer-row input{height:calc(20 * var(--dig-unit));min-height:44px;padding:calc(5 * var(--dig-unit)) calc(3 * var(--dig-unit));font:calc(8 * var(--dig-unit))/1 Pixel,monospace;border:var(--dig-unit) solid transparent;border-image:url('/assets/minecraft/gui/sprites/widget/text_field.png') 1 fill / var(--dig-unit) / 0 stretch;background:none;box-shadow:none;image-rendering:pixelated}
body.playing:not(.party-scene) .dig-controls .answer-row input:focus{outline:0;border-image-source:url('/assets/minecraft/gui/sprites/widget/text_field_highlighted.png')}
body.playing .feedback-next,body.playing:not(.party-scene) .dig-controls .answer-row button{min-height:44px;height:calc(20 * var(--dig-unit));padding:0 calc(2 * var(--dig-unit));font:calc(8 * var(--dig-unit))/1 Pixel,monospace;border:calc(3 * var(--dig-unit)) solid transparent;border-image:url('/assets/minecraft/gui/sprites/widget/button.png') 3 fill / calc(3 * var(--dig-unit)) / 0 repeat;background:none;box-shadow:none;image-rendering:pixelated}
body.playing:not(.party-scene) .dig-controls .answer-row button{min-width:calc(50 * var(--dig-unit))}
body.playing .feedback-next:hover,body.playing:not(.party-scene) .dig-controls .answer-row button:hover{border-image-source:url('/assets/minecraft/gui/sprites/widget/button_highlighted.png')}
body.playing .feedback-next:active,body.playing:not(.party-scene) .dig-controls .answer-row button:active{filter:brightness(.85)}
body.playing:not(.party-scene) .dig-controls .timer{width:100%;height:calc(3 * var(--dig-unit))}
body.playing:not(.party-scene) .dig-controls .timer-label{font-size:calc(10 * var(--dig-unit));line-height:1;margin-top:calc(2 * var(--dig-unit))}
@media(min-width:850px) and (min-height:850px){:root{--dig-unit:3px;--dig-controls-bottom:calc(var(--safe-bottom) + 129px)}body.playing .asking-prompt{top:calc(var(--safe-top) + 45px)}}
@media(max-width:600px){
 :root{--dig-column:calc(100vw - 8px)}
 body.playing .asking-prompt{top:calc(var(--safe-top) + 60px)}
 body.playing .asking-prompt h2{font-size:24px}
 body.playing .feedback{max-height:calc(var(--game-vh,100svh) - var(--safe-top) - 210px)}
 body.keyboard-open .asking-prompt{top:calc(var(--safe-top) + 56px)}
 body.keyboard-open .asking-prompt h2{font-size:18px}
 body.keyboard-open .asking-prompt .prompt-index,body.keyboard-open .asking-prompt .prompt-depth{font-size:12px}
 body.keyboard-open .dig-controls{bottom:6px}
 body.keyboard-open .game-header button{width:38px;height:38px}
}

body.playing:not(.party-scene) #hotbar{--hotbar-width:min(calc(182 * var(--dig-unit)),94vw);width:var(--hotbar-width)}
body.playing:not(.party-scene) .xp-track{height:calc(3 * var(--dig-unit));margin-bottom:calc(3 * var(--dig-unit))}
body.playing:not(.party-scene) .slot span{font-size:calc(8 * var(--dig-unit));bottom:var(--dig-unit);right:var(--dig-unit)}

body.playing:not(.party-scene) .dig-controls{bottom:calc(var(--dig-controls-bottom) - 15 * var(--dig-unit))}
@media(max-width:600px){body.keyboard-open .dig-controls{bottom:6px}}

@media(max-width:600px){body.playing:not(.party-scene) #depth-readout{width:auto;max-width:calc(100vw - 120px);text-align:center;font-size:14px}}

/* Safari landscape leaves less vertical room than a desktop viewport of the same width. */
@media(min-width:601px) and (max-height:500px){
 :root{--dig-unit:1.5px;--dig-column:min(400px,calc(100vw - 140px));--dig-controls-bottom:78px}
 body.playing .feedback{max-height:calc(var(--game-vh,100svh) - 170px);gap:2px}
 body.playing .feedback>img{width:24px;height:24px}
 body.playing .feedback small{font-size:11px}
 body.playing:not(.party-scene) .dig-controls .answer-row input{font-size:16px}
 body.playing .asking-prompt{top:calc(var(--safe-top) + 30px)}
 body.playing.keyboard-open .asking-prompt{top:4px;max-height:calc(var(--game-vh,100svh) - 90px);overflow:auto}
 body.playing.keyboard-open .asking-prompt .prompt-topline,body.playing.keyboard-open .asking-prompt p{display:none}
 body.playing.keyboard-open:not(.party-scene) .dig-controls{bottom:6px}
}

/* OPS-1761: the original's flat game screens, using our existing pack and controls. */
:root{--ui-unit:2px}
@media(min-width:850px) and (min-height:850px){:root{--ui-unit:3px}}
body:not(.branded-title) .stone-button{border:calc(3 * var(--ui-unit)) solid transparent;border-image:url('/assets/minecraft/gui/sprites/widget/button.png') 3 fill / calc(3 * var(--ui-unit)) / 0 repeat;background:none;box-shadow:none;image-rendering:pixelated;padding:calc(2 * var(--ui-unit)) calc(4 * var(--ui-unit));min-height:44px;font-family:Pixel,monospace;line-height:1.2}
body:not(.branded-title) .stone-button:hover{border-image-source:url('/assets/minecraft/gui/sprites/widget/button_highlighted.png');background:none}
body:not(.branded-title) .stone-button:disabled{border-image-source:url('/assets/minecraft/gui/sprites/widget/button_disabled.png')}
body:not(.branded-title) .game-header{top:calc(var(--safe-top) + 4px);left:max(4px,env(safe-area-inset-left,0px));right:max(4px,env(safe-area-inset-right,0px))}
body:not(.branded-title) .game-header button{width:max(44px,calc(20 * var(--ui-unit)));height:max(44px,calc(20 * var(--ui-unit)));padding:0;border:calc(3 * var(--ui-unit)) solid transparent;border-image:url('/assets/minecraft/gui/sprites/widget/button.png') 3 fill / calc(3 * var(--ui-unit)) / 0 repeat;background:none;box-shadow:none;image-rendering:pixelated}
body:not(.branded-title) .game-header button svg{width:calc(12 * var(--ui-unit));height:calc(12 * var(--ui-unit))}
body:not(.branded-title) .title-screen{margin-top:clamp(90px,13svh,150px);width:min(760px,calc(100vw - 8px))}
body:not(.branded-title) .logo{font-weight:700;font-size:clamp(44px,14vw,calc(28 * var(--ui-unit)));letter-spacing:-1px;line-height:1.1;color:#ddd;background:repeating-linear-gradient(#eee 0px,#eee 3px,#bbb 3px,#bbb 6px);background-clip:text;-webkit-text-fill-color:transparent;-webkit-text-stroke:0;transform:none;filter:drop-shadow(0 3px #aaa) drop-shadow(0 4px #666) drop-shadow(0 4px #222);text-shadow:none;margin-bottom:18px}
body:not(.branded-title) .splash{font-size:calc(10 * var(--ui-unit));line-height:1.2;margin:0 0 clamp(70px,12svh,110px);color:#ffff55;transform:rotate(-7deg)}
body:not(.branded-title) .main-actions,body:not(.branded-title) .text-actions{width:min(calc(200 * var(--ui-unit)),calc(100vw - 8px))}
body:not(.branded-title) .main-actions{gap:calc(4 * var(--ui-unit))}
body:not(.branded-title) .main-actions .stone-button{font-size:calc(10 * var(--ui-unit));height:calc(20 * var(--ui-unit))}
body:not(.branded-title) .text-actions{gap:calc(2 * var(--ui-unit));margin-top:calc(4 * var(--ui-unit))}
body:not(.branded-title) .text-actions .stone-button{font-size:calc(8 * var(--ui-unit));min-width:0;padding:0 calc(2 * var(--ui-unit));height:calc(20 * var(--ui-unit))}
body:not(.branded-title) .text-actions .profile-button{flex-basis:max(44px,calc(20 * var(--ui-unit)))}
body:not(.branded-title) .title-meta{bottom:calc(var(--safe-bottom) + 10px);gap:10px;font-size:calc(8 * var(--ui-unit));line-height:1.25}
body:not(.branded-title) .title-meta span:last-child{font-size:calc(8 * var(--ui-unit));line-height:1.25;max-width:min(780px,calc(100vw - 12px))}
/* Navigation pages cover the world with the same dark veil as the results. */
dialog.game-page{position:fixed;inset:var(--game-vtop,0px) 0 auto;width:100%;max-width:none;height:var(--game-vh,100svh);max-height:none;margin:0;padding:0;border:0;background:#000a;box-shadow:none;font:calc(8 * var(--ui-unit))/1.25 Pixel,monospace;overflow:hidden}
dialog.game-page::backdrop{background:transparent}
dialog.game-page>h2{height:calc(32 * var(--ui-unit));font:inherit;font-weight:400;margin:0;padding:calc(12 * var(--ui-unit)) 50px calc(8 * var(--ui-unit));text-align:center;border-bottom:1px solid #aaa4}
dialog.game-page>.modal-body{position:absolute;inset:calc(32 * var(--ui-unit)) 0 calc(32 * var(--ui-unit));overflow:auto;padding:calc(8 * var(--ui-unit)) max(12px,calc((100vw - 300 * var(--ui-unit))/2));text-align:center;scrollbar-color:#777 #222}
dialog.game-page .modal-body p,dialog.game-page .modal-body li{font:inherit;line-height:1.25}
dialog.game-page .modal-footer{position:absolute;bottom:0;width:100%;height:calc(32 * var(--ui-unit));margin:0;padding:calc(5 * var(--ui-unit));border-top:1px solid #aaa4;text-align:center}
dialog.game-page .modal-footer button{width:min(calc(100 * var(--ui-unit)),90vw);height:calc(20 * var(--ui-unit));font-size:calc(8 * var(--ui-unit))}
dialog.game-page .menu-grid{max-width:calc(200 * var(--ui-unit));margin:0 auto;gap:calc(4 * var(--ui-unit))}
dialog.game-page:has(.mode-choice) .menu-grid{max-width:none}
dialog.game-page .mode-choice{display:grid;grid-template-columns:calc(32 * var(--ui-unit)) 1fr;gap:2px calc(4 * var(--ui-unit));text-align:left;align-items:center;padding:calc(3 * var(--ui-unit));border:2px solid transparent;border-image:none;background:transparent;box-shadow:none;min-height:calc(36 * var(--ui-unit));font-size:calc(8 * var(--ui-unit))}
dialog.game-page .mode-choice:hover{border-color:#eee;background:#0005}
.mode-choice .mode-icon{grid-row:1/3;width:calc(32 * var(--ui-unit));height:calc(32 * var(--ui-unit));object-fit:contain;image-rendering:pixelated}
dialog.game-page .mode-choice small{font:inherit;line-height:1.2;color:#aaa}
body.playing .results>.result-actions{background:#0005;border:0;border-top:1px solid #aaa4;bottom:0;width:100%;max-width:none;padding:calc(5 * var(--ui-unit));gap:calc(4 * var(--ui-unit))}
.results .result-actions .stone-button{font-size:calc(8 * var(--ui-unit));min-height:44px}
.results .depth-distribution{width:100%}
.results .dig-heading{font-weight:400}
/* Retain Safari's 16px input floor and the 44px interaction target while matching the game. */
body.playing:not(.party-scene) .dig-controls .answer-row input{font-size:max(16px,calc(8 * var(--dig-unit)))}
@media(max-width:600px){
 body:not(.branded-title) .title-meta{font-size:14px;gap:8px}
 body:not(.branded-title) .title-meta span:last-child{font-size:14px}
 body:not(.branded-title) .logo{font-size:clamp(38px,13.7vw,56px)}
 body:not(.branded-title) .splash{font-size:20px}
 dialog.game-page .mode-choice small{font-size:14px}
}
@media(max-height:500px) and (min-width:601px){
 body:not(.branded-title) .title-screen{margin-top:50px}
 body:not(.branded-title) .logo{font-size:42px;margin-bottom:8px}
 body:not(.branded-title) .splash{font-size:16px;margin-bottom:20px}
 body:not(.branded-title) .title-meta{font-size:10px;gap:3px;bottom:4px}
 body:not(.branded-title) .title-meta span:last-child{font-size:10px}
 dialog.game-page{font-size:14px}
 dialog.game-page>h2{height:44px;padding:14px 50px}
 dialog.game-page>.modal-body{top:44px;bottom:58px}
 dialog.game-page .modal-footer{height:58px;padding:6px}
}

/* Navigation pages keep the current world behind them while replacing its UI. */
body:has(dialog.game-page[open]) :is(#screen,#hotbar,.game-header){visibility:hidden}
dialog.tile-menu{width:min(86vw,calc(166 * var(--ui-unit)));max-height:calc(100svh - 12px);padding:calc(4 * var(--ui-unit));background:#111;color:white;overflow:auto}
dialog.tile-menu::backdrop{background:#000b}
dialog.tile-menu>h2{text-align:center;font:calc(9 * var(--ui-unit))/1.2 Pixel,monospace;margin:0 0 calc(4 * var(--ui-unit))}
.menu-tiles{display:grid;grid-template-columns:repeat(3,1fr);gap:calc(2 * var(--ui-unit))}
body dialog.tile-menu .menu-tiles .stone-button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-width:0;aspect-ratio:1.12;height:auto;padding:2px;font:calc(7 * var(--ui-unit))/1.1 Pixel,monospace;overflow-wrap:normal}
.menu-tiles img{width:calc(16 * var(--ui-unit));height:calc(16 * var(--ui-unit));object-fit:contain;image-rendering:pixelated}
dialog.tile-menu .modal-footer{margin:calc(4 * var(--ui-unit)) 0 0}
dialog.tile-menu .modal-footer button{width:100%}
.score-guide{display:grid;grid-template-columns:auto auto;justify-content:center;column-gap:clamp(12px,4vw,72px);margin:1em auto;text-align:left}
.score-guide dd{margin:0;text-align:right}
.score-guide dt:nth-of-type(1){color:#fa0}
.score-guide dt:nth-of-type(2){color:#f5f}
.score-guide dt:nth-of-type(3){color:#5ff}
.score-guide dt:nth-of-type(4){color:#ff5}
.score-guide dt:nth-of-type(6){color:#aaa}

/* Original answer-statistics controls: colored counts, searchable two-column answers. */
.answer-most{text-align:center;margin:14px 0}.answer-most span{color:#fff}
.answer-filters{display:flex;flex-wrap:wrap;justify-content:center;gap:6px;margin:12px 0}
.answer-filters button{background:#181818;color:var(--answer-color);border:1px solid #777;padding:7px 9px;font:13px Pixel,monospace;min-height:44px}
.answer-filters button[aria-pressed="true"]{border-color:var(--answer-color);box-shadow:inset 0 0 0 1px var(--answer-color)}
.answer-filters button span{color:#aaa;margin-left:4px}
ul.answer-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 18px;margin:8px 0 20px;padding:0;max-height:none;list-style:none}
.answer-list li{display:flex;align-items:center;gap:6px;padding:6px 3px;min-width:0;font:13px/1.4 Pixel,monospace;color:var(--answer-color,#fff)}
.answer-list li img{width:20px;height:20px;object-fit:contain;flex-shrink:0}
.answer-list li span{overflow-wrap:anywhere}.answer-list li strong{margin-left:auto;color:#aaa;font-weight:400;white-space:nowrap}
.answer-list li.yours{outline:1px solid #aaa;background:#ffffff0c}
.dig-option:has(.unlock-dig){flex-wrap:wrap;gap:8px}.dig-option:has(.unlock-dig)>span{width:100%}
@media(max-width:360px){ul.answer-list{grid-template-columns:1fr}}

.answer-list .answer-count-detail{width:100%}.answer-detail .answer-list summary{list-style:none;display:flex;align-items:center;gap:6px;padding:5px 2px;font:13px/1.4 Pixel,monospace;color:var(--answer-color);min-height:44px}
.answer-list summary::-webkit-details-marker{display:none}.answer-detail .answer-list summary strong{color:#aaa;font-weight:400}
.answer-detail .answer-list .answer-count-detail p{margin:4px 2px 8px;font:12px/1.4 Pixel,monospace;color:#bbb}

.dig-option>span small{display:block;margin-top:4px}

/* The observed public preset head grid shares the existing profile and renderer. */
.head-grid{display:grid;grid-template-columns:repeat(auto-fit,44px);gap:6px;justify-content:center;max-width:600px;margin:12px auto}
.head-choice{position:relative;width:44px;height:44px;padding:4px;border:2px solid transparent;background:none;display:grid;place-items:center;cursor:pointer}
.head-choice input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}.head-choice:has(input:checked){border-color:#fff}.head-choice:has(input:focus-visible){outline:2px solid #ebd95f;outline-offset:2px}.head-choice:hover{background:#fff2}.head-choice img{width:32px;height:32px;image-rendering:pixelated}
.head-name{text-align:center;font-family:Pixel,monospace}
.party-name-row .party-avatar{background:var(--miner-head,url('/assets/minecraft/heads/alex.png')) center/100% 100% no-repeat;border:2px solid #999;padding:0;image-rendering:pixelated}
.party-player .head,.party-player.active .head{background:var(--player-head,url('/assets/minecraft/heads/alex.png')) center/100% 100% no-repeat;box-shadow:none;border:2px solid #333}
.party-player.active .head{outline:3px solid #95c74b}.party-player .head::after{content:none}
.depth-marker{background:var(--miner-head,url('/assets/minecraft/heads/alex.png')) center/100% 100% no-repeat}

.mc-skin{margin:16px 0;padding:12px 0;border-top:2px solid #6f6f6f;border-bottom:2px solid #282828}.mc-skin img{image-rendering:pixelated}.mc-skin .room-input{max-width:100%;box-sizing:border-box}
