@font-face{font-family:"Minecraft";src:url("/fonts/minecraft.woff2") format("woff2");font-weight:400;font-style:normal;font-display:block}

:root{--slot:56px;--sh:2px 2px 0 #3a3a3a;--safe-b:env(safe-area-inset-bottom,0px);--safe-t:env(safe-area-inset-top,0px)}
*{box-sizing:border-box}
[hidden]{display:none!important}
html,body{margin:0;height:100%;overflow:hidden;color:#fff;font:400 16px/1.25 "Minecraft",monospace;
  background:linear-gradient(#6f9cf5 0%,#9dbdf7 20%,#c9dcfb 36%,#c9dcfb 100%);
  -webkit-font-smoothing:none;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent;
  user-select:none;-webkit-user-select:none;touch-action:none;overscroll-behavior:none}
h1,h2,b,strong,label,button,input{font-weight:400}
button,input{font:inherit;color:inherit;border-radius:0;margin:0}
img{image-rendering:pixelated}
canvas#gl{position:fixed;inset:0;width:100%;height:100%;display:block;outline:none}

/* stone buttons */
.btn{display:inline-block;appearance:none;-webkit-appearance:none;background:#7a7a7a;border:3px solid #000;
  box-shadow:inset 3px 3px 0 #b4b4b4,inset -3px -3px 0 #4e4e4e;padding:9px 16px 10px;color:#fff;line-height:1;
  text-shadow:var(--sh);text-align:center;white-space:nowrap;cursor:pointer;pointer-events:auto}
.btn:hover,.btn:focus-visible{background:#7b86c4;box-shadow:inset 3px 3px 0 #b9c2ff,inset -3px -3px 0 #4a5391;color:#ffffa0;outline:none}
.btn:active{box-shadow:inset 3px 3px 0 #4a5391,inset -3px -3px 0 #b9c2ff}
.btn.gold{background:#a4801c;box-shadow:inset 3px 3px 0 #dab64a,inset -3px -3px 0 #6b5310}
.btn.gold:hover,.btn.gold:focus-visible{background:#b8922a;box-shadow:inset 3px 3px 0 #f0d070,inset -3px -3px 0 #6b5310;color:#ffffa0}
.btn.on{background:#565656;box-shadow:inset 3px 3px 0 #2e2e2e,inset -3px -3px 0 #8e8e8e;color:#ffffa0}
.btn:disabled,.btn:disabled:hover{background:#2e2e2e;box-shadow:inset 3px 3px 0 #3a3a3a,inset -3px -3px 0 #232323;color:#9a9a9a;text-shadow:none;cursor:default}
.btn.on:disabled,.btn.on:disabled:hover{color:#d8d890;box-shadow:inset 3px 3px 0 #1c1c1c,inset -3px -3px 0 #4a4a4a}
.ca{background:rgba(0,0,0,.45);padding:9px 12px 10px;border:3px solid #000;line-height:1;white-space:nowrap;pointer-events:auto;text-shadow:var(--sh)}
.ca[data-full]{cursor:pointer}

/* ---------- playing ---------- */
#hud{position:fixed;inset:0;z-index:2;pointer-events:none;text-shadow:var(--sh)}
.mark{position:absolute;left:16px;top:calc(12px + var(--safe-t));font-size:32px;line-height:1;letter-spacing:2px;color:#f2f2f2;text-shadow:3px 3px 0 #2b2b2b}
.tr{position:absolute;right:14px;top:calc(14px + var(--safe-t));display:flex;gap:8px;align-items:center;justify-content:flex-end;flex-wrap:wrap;max-width:calc(100% - 150px)}
.cross{position:absolute;left:50%;top:50%;width:22px;height:22px;transform:translate(-50%,-50%);mix-blend-mode:difference}
.cross:before,.cross:after{content:"";position:absolute;background:#fff}
.cross:before{left:10px;top:0;width:2px;height:22px}.cross:after{top:10px;left:0;height:2px;width:22px}
.tip{position:absolute;left:calc(50% + 22px);top:calc(50% + 10px);max-width:calc(50% - 30px);background:rgba(16,0,16,.94);border:3px solid #2a0a5e;outline:2px solid #100010;padding:5px 9px 6px;line-height:1.25}
.tip span{display:block;color:#a8a8a8}
.hot{position:absolute;left:50%;bottom:calc(10px + var(--safe-b));transform:translateX(-50%);display:flex;border:3px solid #111;background:rgba(0,0,0,.45);pointer-events:auto}
.slot{width:var(--slot);height:var(--slot);border:3px solid #8b8b8b;border-right-color:#555;border-bottom-color:#555;display:grid;place-items:center;position:relative;cursor:pointer}
.slot.on{outline:4px solid #fff;outline-offset:-1px;z-index:2}
.slot img{width:calc(var(--slot) - 16px);height:calc(var(--slot) - 16px);pointer-events:none}
.chat{position:absolute;left:10px;bottom:calc(var(--slot) + 36px + var(--safe-b));line-height:1.25;display:flex;flex-direction:column;align-items:flex-start}
.chat div{background:rgba(0,0,0,.42);padding:2px 8px;max-width:min(520px,calc(100vw - 20px));overflow-wrap:anywhere;transition:opacity 1s linear}
.chat div.old{opacity:0}
.chat.open div.old{opacity:1;transition:none}
.chat.open{bottom:calc(var(--slot) + 54px + var(--safe-b))}
.chat .y{color:#ffe14a}.chat .g{color:#b9b9b9}
.say{position:absolute;left:10px;right:10px;bottom:calc(var(--slot) + 22px + var(--safe-b));margin:0;pointer-events:auto}
.say input{display:block;width:100%;background:rgba(0,0,0,.55);border:0;outline:0;padding:4px 8px;color:#fff;text-shadow:var(--sh);user-select:text;-webkit-user-select:text}
.count{position:absolute;left:calc(50% + var(--slot)*4.5 + 16px);bottom:calc(26px + var(--safe-b));white-space:nowrap;line-height:1;color:#e8e8e8}
.line{position:fixed;left:50%;bottom:calc(var(--slot) + 32px + var(--safe-b));transform:translateX(-50%);z-index:60;width:max-content;max-width:calc(100vw - 24px);
  text-align:center;text-shadow:var(--sh);pointer-events:none;background:rgba(0,0,0,.42);padding:2px 8px}

body.paneled .line{bottom:auto;top:calc(8px + var(--safe-t))}
body.paneled .chat,body.paneled .count{display:none}   /* paneled: a panel or the title is up */

/* ---------- touch ---------- */
#touch{position:fixed;inset:0;z-index:1;pointer-events:none;text-shadow:var(--sh)}
#touch .look{position:absolute;left:50%;right:0;top:0;bottom:0;pointer-events:auto}
#touch .tt{position:absolute;left:16px;top:calc(52px + var(--safe-t));display:flex;gap:8px}
.joy{position:absolute;left:calc(16px + env(safe-area-inset-left,0px));bottom:calc(16px + var(--safe-b));width:120px;height:120px;background:rgba(0,0,0,.3);border:3px solid rgba(0,0,0,.6);pointer-events:auto}
.joy i{position:absolute;left:50%;top:50%;width:48px;height:48px;margin:-24px 0 0 -24px;background:rgba(139,139,139,.85);border:3px solid #000;box-shadow:inset 3px 3px 0 #c6c6c6,inset -3px -3px 0 #4e4e4e}
.tb{position:absolute;right:calc(16px + env(safe-area-inset-right,0px));bottom:calc(16px + var(--safe-b));display:grid;grid-template-columns:72px 72px;gap:8px;pointer-events:none}
.pad{width:72px;height:56px;padding:0;background:rgba(0,0,0,.3);border:3px solid rgba(0,0,0,.6);color:#fff;text-shadow:var(--sh);pointer-events:auto;line-height:1;appearance:none;-webkit-appearance:none}
.pad:active,.pad.down{background:rgba(255,255,255,.28)}
#t-hit{grid-column:2}
body.touch .chat{bottom:calc(152px + var(--safe-b))}
body.touch .say{bottom:auto;top:calc(120px + var(--safe-t))}
body.touch .count{left:calc(16px + env(safe-area-inset-left,0px));right:auto;bottom:auto;top:calc(96px + var(--safe-t))}

/* ---------- title ---------- */
#title{position:fixed;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:space-between;padding:calc(24px + var(--safe-t)) 16px calc(16px + var(--safe-b));text-shadow:var(--sh)}
.t-top{display:flex;flex-direction:column;align-items:center;margin-top:3vh}
.t-pic{width:96px;height:96px;border:4px solid #000;box-shadow:0 0 0 4px #c6c6c6,0 0 0 8px #000;margin-bottom:28px;image-rendering:auto}
#title h1{margin:0;font-size:96px;line-height:1;letter-spacing:6px;color:#f2f2f2;text-shadow:6px 6px 0 #2b2b2b;padding-left:6px}
.splash{margin:16px 0 0;font-size:24px;line-height:1;color:#ffe14a;text-shadow:3px 3px 0 #3f3a12;text-align:center}
.menu{display:flex;flex-direction:column;gap:8px;width:min(400px,100%);align-items:stretch}
.menu .btn,.pause .btn{padding:11px 16px 12px}
.pair{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.t-note{margin:4px 0 0;min-height:20px;text-align:center;color:#fff}
.strip{display:flex;gap:8px;align-items:center;justify-content:center;flex-wrap:wrap}

/* ---------- panels ---------- */
#dim{position:fixed;inset:0;background:rgba(10,10,14,.62);z-index:40}
.pause{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);z-index:50;display:flex;flex-direction:column;gap:8px;width:min(400px,calc(100vw - 32px));text-shadow:var(--sh)}
.pause h2{margin:0 0 16px;font-size:24px;line-height:1;text-align:center}
.gui{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);z-index:50;width:min(660px,calc(100vw - 16px));max-height:calc(100vh - 16px);max-height:calc(100dvh - 16px);
  overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;background:#c6c6c6;border:4px solid #000;box-shadow:inset 5px 5px 0 #fff,inset -5px -5px 0 #555;
  padding:22px 26px 24px;color:#3f3f3f;text-shadow:none;scrollbar-width:thin;scrollbar-color:#8b8b8b #555}
.gui h2{margin:0 44px 14px 0;font-size:24px;line-height:1;color:#3f3f3f;overflow-wrap:anywhere}
.gui .x{position:absolute;right:16px;top:16px;width:32px;height:32px;padding:0 0 3px;line-height:1}
.gui label{display:block;margin:0 0 4px;line-height:1}
.inp{display:block;width:100%;background:#000;color:#fff;border:3px solid #a0a0a0;padding:7px 10px 8px;margin:0 0 11px;line-height:1.25;text-shadow:var(--sh);outline:0;
  user-select:text;-webkit-user-select:text;appearance:none;-webkit-appearance:none}
.inp:focus{border-color:#fff}
.inp::placeholder{color:#6f6f6f;text-shadow:none;opacity:1}
.cell{width:62px;height:62px;padding:0;border:0;background:#8b8b8b;box-shadow:inset 3px 3px 0 #373737,inset -3px -3px 0 #fff;display:grid;place-items:center;flex:none;appearance:none;-webkit-appearance:none}
button.cell{cursor:pointer;color:#c6c6c6;font-size:32px;line-height:1;text-shadow:2px 2px 0 #555}
button.cell:hover,button.cell:focus-visible{background:#a9a9a9;outline:none}
.cell img{width:50px;height:50px;object-fit:cover;image-rendering:auto}
.out{width:150px;height:150px;background:#8b8b8b;box-shadow:inset 4px 4px 0 #373737,inset -4px -4px 0 #fff;display:grid;place-items:center;flex:none}
.out img{width:112px;height:112px}
.cap{text-align:center;margin-top:8px;line-height:1.25;overflow-wrap:anywhere}
.inset{display:block;background:#8b8b8b;box-shadow:inset 3px 3px 0 #373737,inset -3px -3px 0 #fff;color:#fff;text-shadow:var(--sh);padding:9px 12px 10px;line-height:1;white-space:nowrap}

.craft{display:flex;gap:24px;align-items:center}
.craft .f{flex:1;min-width:0}
.tick{display:flex;align-items:stretch;margin:0 0 11px}
.tick span{background:#000;color:#fff;text-shadow:var(--sh);border:3px solid #a0a0a0;border-right:0;padding:7px 0 8px 10px;line-height:1.25}
.tick .inp{margin:0;border-left:0;padding-left:2px;text-transform:uppercase}
.tick:focus-within span,.tick:focus-within .inp{border-color:#fff}
.pt{display:flex;gap:24px;margin:0 0 11px}
.tax{display:flex;gap:6px;flex-wrap:wrap}
.tax .btn{padding:9px 0 10px;width:52px}
.arrow{width:0;height:0;border-left:40px solid #8b8b8b;border-top:22px solid transparent;border-bottom:22px solid transparent;flex:none}
.res{width:170px;flex:none;display:flex;flex-direction:column;align-items:center}
.deal{margin:0 0 6px;line-height:1.25}
.deal span{display:inline-block}
.craft + .deal{margin-top:6px}
.go{display:flex;gap:16px;align-items:center;margin-top:14px}
.go .btn{padding:11px 34px 12px;flex:none}
.stage{line-height:1.25;color:#3f3f3f}
.stage.bad{color:#8a1f1f}

.steve{display:flex;gap:24px;align-items:flex-start;margin-bottom:14px}
.sl{display:flex;flex-direction:column;gap:10px;align-items:flex-start}
.sr{flex:1;min-width:0;display:flex;flex-direction:column;gap:10px}
.s-line{display:flex;gap:8px 16px;justify-content:space-between;flex-wrap:wrap;line-height:1}
.s-tk{font-size:24px;line-height:1;margin-top:-4px}
.bar{height:20px;background:#373737;box-shadow:inset 3px 3px 0 #1c1c1c,inset -3px -3px 0 #fff;padding:3px}
.bar i{display:block;height:100%;background:#fff;width:0}
.pips{display:flex;gap:6px}
.pips i{width:26px;height:26px;background:#8b8b8b;box-shadow:inset 3px 3px 0 #373737,inset -3px -3px 0 #fff;position:relative}
.pips i.on:after{content:"";position:absolute;inset:5px;background:var(--c,#70b242);box-shadow:inset -2px -2px 0 rgba(0,0,0,.28),inset 2px 2px 0 rgba(255,255,255,.35)}
.s-ca{display:flex;gap:8px;align-items:stretch}
.s-ca .inset{flex:1;min-width:0;overflow:hidden;text-overflow:clip}
.s-act{display:flex;gap:8px;flex-wrap:wrap}
.s-act .btn{padding:11px 16px 12px;flex:1}
.j-cap{margin-top:2px}
.journal{background:#000;border:3px solid #a0a0a0;color:#fff;text-shadow:var(--sh);max-height:max(168px,min(300px,calc(100vh - 520px)));min-height:62px;overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;padding:4px 10px 8px;
  line-height:1.25;scrollbar-width:thin;scrollbar-color:#8b8b8b #2a2a2a;user-select:text;-webkit-user-select:text}
.journal p{margin:6px 0 0}
.journal time{display:block;color:#a8a8a8}
.journal em{font-style:normal;color:#ffe14a}
.journal .none{color:#a8a8a8}

.lbar{display:flex;gap:10px;align-items:flex-start;flex-wrap:wrap;margin-bottom:11px}
.lbar .inp{flex:1 1 180px;width:auto;margin:0}
.sort{display:flex;gap:6px}
.sort .btn{padding:10px 10px 11px}
.rows{background:#8b8b8b;box-shadow:inset 3px 3px 0 #373737,inset -3px -3px 0 #fff;padding:6px;height:min(366px,calc(100vh - 220px));height:min(366px,calc(100dvh - 220px));min-height:120px;overflow-y:auto;
  overscroll-behavior:contain;touch-action:pan-y;scrollbar-width:thin;scrollbar-color:#c6c6c6 #555;color:#fff;text-shadow:var(--sh)}
.lrow{display:grid;grid-template-columns:40px minmax(0,1.5fr) minmax(0,1.1fr) 48px 72px;gap:10px;align-items:center;width:100%;padding:4px 8px 4px 4px;background:transparent;border:0;
  text-align:left;cursor:pointer;line-height:1.25;text-shadow:var(--sh);color:#fff}
.lrow:hover,.lrow:focus-visible{background:rgba(0,0,0,.28);outline:3px solid #fff;outline-offset:-3px}
.lrow img{width:40px;height:40px;display:block;border:2px solid #000}
.lrow span{overflow:hidden;white-space:nowrap}
.lrow .nm i{font-style:normal;color:#ffe14a;display:block}
.lrow .r{text-align:right}
.rows .none{margin:12px 8px;color:#e8e8e8}

.how{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px}
.how li{display:flex;gap:12px;align-items:flex-start;line-height:1.25}
.how b{flex:none;width:32px;height:32px;display:grid;place-items:center;background:#8b8b8b;box-shadow:inset 3px 3px 0 #373737,inset -3px -3px 0 #fff;color:#fff;text-shadow:var(--sh);line-height:1;padding-bottom:2px}
.how span{padding-top:6px}

.gui::-webkit-scrollbar,.journal::-webkit-scrollbar,.rows::-webkit-scrollbar{width:12px}
.gui::-webkit-scrollbar-track,.rows::-webkit-scrollbar-track{background:#555}
.journal::-webkit-scrollbar-track{background:#2a2a2a}
.gui::-webkit-scrollbar-thumb,.journal::-webkit-scrollbar-thumb{background:#8b8b8b;box-shadow:inset 2px 2px 0 #c6c6c6,inset -2px -2px 0 #4e4e4e}
.rows::-webkit-scrollbar-thumb{background:#c6c6c6;box-shadow:inset 2px 2px 0 #fff,inset -2px -2px 0 #7a7a7a}

/* ---------- small screens ---------- */
@media (max-width:1100px){
  .count{left:auto;right:12px;bottom:calc(var(--slot) + 30px + var(--safe-b))}
}
@media (max-width:720px){
  :root{--slot:40px}
  .mark{font-size:24px;left:12px}
  .tr{right:8px;top:calc(8px + var(--safe-t));gap:6px;max-width:calc(100% - 110px)}
  .tr .ca-t{display:none}
  .tr .btn,.tr .ca{padding:7px 8px 8px}
  #touch .tt{left:12px;top:calc(44px + var(--safe-t))}
  #touch .tt .btn{padding:7px 8px 8px}
  .joy{bottom:calc(var(--slot) + 52px + var(--safe-b))}
  .tb{bottom:calc(var(--slot) + 52px + var(--safe-b))}
  body.touch .chat{bottom:calc(var(--slot) + 188px + var(--safe-b))}
  body.touch .say{top:calc(104px + var(--safe-t))}
  .count{bottom:calc(var(--slot) + 22px + var(--safe-b));right:8px}
  body.touch .count{left:12px;top:calc(84px + var(--safe-t))}
  .line{bottom:calc(var(--slot) + 22px + var(--safe-b))}
  .tip{left:50%;top:calc(50% + 22px);transform:translateX(-50%);width:max-content;max-width:calc(100vw - 24px)}
  #title h1{font-size:64px;letter-spacing:4px;text-shadow:4px 4px 0 #2b2b2b}
  .splash{font-size:16px;text-shadow:var(--sh)}
  .gui{padding:18px 16px 18px}
  .craft{flex-direction:column;align-items:stretch;gap:4px}
  .arrow{display:none}
  .res{width:auto;flex-direction:row;gap:14px;margin-bottom:8px}
  .res .out{width:78px;height:78px}.res .out img{width:56px;height:56px}
  .cap{text-align:left;margin:0}
  .steve{gap:14px}
  .sl .out{width:96px;height:96px}.sl .out img{width:64px;height:64px}
  .lrow{grid-template-columns:40px minmax(0,1fr) 48px 64px}
  .lrow .w{display:none}
}
@media (max-width:420px){
  .s-ca .btn{padding-left:10px;padding-right:10px}
  .s-ca .inset{padding-left:8px;padding-right:4px}
  .sort{width:100%}.sort .btn{flex:1}
}
@media (max-height:520px){
  :root{--slot:40px}
  #title{padding-top:calc(8px + var(--safe-t));padding-bottom:calc(8px + var(--safe-b))}
  .t-top{margin-top:0;flex-direction:row;flex-wrap:wrap;justify-content:center;column-gap:20px}
  .t-pic{width:48px;height:48px;margin:0;border-width:3px;box-shadow:0 0 0 3px #c6c6c6,0 0 0 6px #000}
  #title h1{font-size:48px;letter-spacing:4px;text-shadow:4px 4px 0 #2b2b2b}
  .splash{font-size:16px;flex-basis:100%;margin-top:8px;text-shadow:var(--sh)}
  .menu{gap:6px}
  .menu .btn,.pause .btn{padding:8px 16px 9px}
  .t-note{min-height:0;margin:0}
  .pause{gap:6px}.pause h2{margin-bottom:6px}
  .gui{padding:14px 18px 16px}
  .rows{height:min(366px,calc(100vh - 150px));height:min(366px,calc(100dvh - 150px))}
  .mark{font-size:24px}
  .tr .btn,.tr .ca{padding:7px 8px 8px}
  #touch .tt{top:calc(44px + var(--safe-t))}
  #touch .tt .btn{padding:7px 8px 8px}
  body.touch .chat{bottom:calc(140px + var(--safe-b));left:calc(16px + env(safe-area-inset-left,0px))}
  body.touch .say{top:calc(54px + var(--safe-t));left:calc(172px + env(safe-area-inset-left,0px));right:calc(16px + env(safe-area-inset-right,0px))}
  body.touch .chat div{max-width:calc(50vw - 56px)}
  body.touch .count{top:calc(84px + var(--safe-t))}
  .line{bottom:calc(var(--slot) + 22px + var(--safe-b))}
}
