@font-face{font-family:MinecraftDefault;src:url('./fonts/MinecraftDefault-Regular.woff') format('woff');font-style:normal;font-weight:100 500;font-display:swap}
@font-face{font-family:MinecraftDefault;src:url('./fonts/MinecraftDefault-Bold.woff') format('woff');font-style:normal;font-weight:501 950;font-display:swap}
:root{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#fff;background:#8fc6df;color-scheme:dark;font-synthesis:none;--mint:#b3f79b;--ink:#172c2d;--safe-bottom:env(safe-area-inset-bottom,0px)}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}html,body{width:100%;height:100%;margin:0;overflow:hidden;overscroll-behavior:none}body{touch-action:none;user-select:none;-webkit-user-select:none}button,input{font:inherit}button{color:inherit;cursor:pointer;touch-action:manipulation;border:0}button:focus-visible,#trackball:focus-visible{outline:3px solid #d7ffba;outline-offset:4px}button:active{transform:scale(.95)}#game{position:relative;width:100%;height:100%;height:100dvh;overflow:hidden}#world{width:100%;height:100%;display:block;touch-action:none}.hud-top{position:absolute;top:calc(env(safe-area-inset-top,0px) + 20px);left:22px;right:18px;display:flex;align-items:center;justify-content:space-between;pointer-events:none;text-shadow:0 2px 5px #253b4566}.icon-button{width:44px;height:44px;border:1px solid #ffffff44;background:#173d424d;border-radius:14px;display:grid;place-items:center;pointer-events:auto;font-size:32px;backdrop-filter:blur(10px)}.icon-button svg{width:21px;height:21px}#crosshair{position:absolute;left:50%;top:45%;width:44px;height:44px;transform:translate(-50%,-50%);pointer-events:none}#crosshair span:before,#crosshair span:after{content:"";position:absolute;background:white;box-shadow:0 0 2px #152a36;left:21px;top:14px;width:2px;height:16px;border-radius:1px}#crosshair span:after{transform:rotate(90deg)}#crosshair svg{width:44px;height:44px;transform:rotate(-90deg);opacity:0}#crosshair circle{fill:none;stroke:var(--mint);stroke-width:3;stroke-dasharray:113.1;stroke-dashoffset:113.1}#toast{position:absolute;left:50%;top:calc(45% + 62px);transform:translateX(-50%) translateY(4px);border:1px solid #ffffff33;background:#172c2dd9;border-radius:20px;padding:9px 16px;font-size:14px;pointer-events:none;opacity:0;transition:opacity .2s,transform .2s;white-space:nowrap}#toast.visible{opacity:1;transform:translateX(-50%) translateY(0)}.bottom-shade{pointer-events:none;position:absolute;bottom:0;left:0;right:0;height:250px;background:linear-gradient(transparent,#132b2a80)}.controls{position:absolute;right:18px;bottom:calc(var(--safe-bottom) + 108px);display:flex;gap:18px;align-items:flex-end}.ball-cluster{display:flex;align-items:center;flex-direction:column;width:136px;gap:7px}#trackball{width:136px;height:136px;position:relative;border-radius:50%;border:1px solid #ecffe85e;box-shadow:0 4px 20px #0621204d,inset 0 0 0 5px #243e3a3d;background:#203e3940;touch-action:none;cursor:grab}#trackball:active{cursor:grabbing}#ball-canvas{display:block;width:100%;height:100%}.inventory-wrap{position:absolute;bottom:calc(var(--safe-bottom) + 17px);right:18px;width:322px;max-width:calc(100% - 36px)}#block-name{text-align:center;font-weight:600;font-size:12px;margin-bottom:8px;text-shadow:0 1px 5px #102d2d}#hotbar{display:flex;align-items:center;gap:5px;padding:6px;border:1px solid #ffffff45;background:#172c2da6;box-shadow:0 6px 30px #0a282b33;border-radius:15px;backdrop-filter:blur(14px)}.slot{height:46px;flex:1;min-width:0;border:1px solid #ffffff16;position:relative;display:flex;align-items:center;justify-content:center;background:#ffffff0a;border-radius:8px}.slot img{width:36px;height:36px;image-rendering:pixelated;pointer-events:none}.slot[aria-pressed=true]{border:2px solid var(--mint);background:#b3f79b20;box-shadow:0 0 12px #b3f79b15}.slot small{position:absolute;bottom:3px;right:4px;font-size:12px;color:#e9f2e0}.left-handed .controls{right:auto;left:18px;flex-direction:row-reverse}.left-handed .inventory-wrap{right:auto;left:18px}.left-handed .hud-top{flex-direction:row-reverse}dialog{position:fixed;inset:auto 0 0;margin:0 auto;padding:25px 24px calc(var(--safe-bottom) + 20px);width:100%;max-width:450px;max-height:92dvh;overflow-y:auto;border:1px solid #71908066;border-bottom:0;border-radius:26px 26px 0 0;background:#172c2df7;color:#eaf2e7;box-shadow:0 -20px 80px #0b262355;touch-action:pan-y}dialog::backdrop{background:#0e252766;backdrop-filter:blur(5px)}.sheet-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:23px}.eyebrow{font-size:12px;letter-spacing:1.6px;color:#b3f79b;font-weight:700}h1{font-size:27px;letter-spacing:-.8px;margin:6px 0 0}.setting{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:18px 0;font-size:14px;font-weight:600}.segmented{display:flex;border:1px solid #ffffff23;padding:3px;border-radius:10px;background:#0a1d2340}.segmented button{font-size:14px;padding:8px 15px;background:transparent;border-radius:7px;color:#b6c4bf}.segmented button[aria-pressed=true]{background:#b3f79b;color:#183a2c;font-weight:750}.slider-label{display:flex;justify-content:space-between;font-size:14px;font-weight:600;margin-top:22px}.slider-label output{font-weight:500;color:#b3f79b}input[type=range]{width:100%;height:30px;accent-color:#b3f79b;touch-action:pan-x;margin:6px 0 0}.field-note{color:#9eb5ad;font-size:12px;line-height:1.5;margin:0 0 10px}.toggle{padding:3px;width:43px;height:25px;border-radius:30px;background:#4c6058}.toggle span{display:block;height:19px;width:19px;border-radius:50%;background:white;transition:transform .15s}.toggle[aria-pressed=true]{background:#9ace86}.toggle[aria-pressed=true] span{transform:translateX(18px)}.instructions{border-top:1px solid #ffffff20;margin-top:22px;padding-top:7px}.instructions p{display:flex;flex-direction:column;gap:3px;margin:11px 0;font-size:14px}.instructions b{font-size:14px;color:#effce8}.instructions span{color:#a9bbb3}.desktop-help,.credit{font-size:12px;color:#a9bbb3;line-height:1.5}.credit{font-size:12px;color:#819b90}.primary-button{display:block;width:100%;background:#b3f79b;color:#193627;border-radius:12px;font-weight:750;font-size:15px;padding:15px;margin-top:19px}#loading{position:absolute;inset:0;background:#182f2e;display:grid;place-content:center;text-align:center;transition:opacity .4s;z-index:20}#loading span{font-size:26px;letter-spacing:3px;font-weight:950;color:#b3f79b}#loading p{font-size:14px;color:#a7c1b4}#loading.done{opacity:0;pointer-events:none}@media(min-width:700px){.controls{right:32px;bottom:132px}.inventory-wrap{right:32px;bottom:25px}.hud-top{left:32px;right:32px;top:28px}.left-handed .controls,.left-handed .inventory-wrap{left:32px}dialog{inset:50% auto auto 50%;transform:translate(-50%,-50%);border:1px solid #71908066;border-radius:25px;max-height:90dvh}}@media(max-height:600px){.controls{bottom:91px;gap:13px}.ball-cluster{width:112px}#trackball{width:112px;height:112px}.inventory-wrap{bottom:10px}.hud-top{top:12px}#block-name{margin-bottom:4px}.slot{height:40px}}

/* A single, unframed ball fills nearly the bottom third of portrait play. */
:root{--ball-size:min(68vw,29dvh,280px)}
.hud-top{justify-content:flex-end}
.controls{right:-14px;bottom:calc(var(--ball-size) * -.22);gap:0}
.inventory-wrap{bottom:calc(var(--ball-size) * .78 + 14px)}
.ball-cluster{width:var(--ball-size);gap:0}
#trackball{width:var(--ball-size);height:var(--ball-size);border:0;box-shadow:none;background:none}
.left-handed .controls{left:-14px;right:auto}
.left-handed .hud-top{flex-direction:row;justify-content:flex-start}
@media(max-height:600px){:root{--ball-size:min(48vw,31dvh,220px)}}

:root{font-family:MinecraftDefault,monospace}#block-name{transition:opacity .55s ease;pointer-events:none}#block-name.faded{opacity:0}.slot small{font-family:MinecraftDefault,monospace}

/* Translucent grey trackball keeps the world visible underneath. */
#ball-canvas{opacity:.48}

/* Calibration values share one layout for the game and its settings preview. */
.controls{right:var(--ball-inset,-14px);left:auto;bottom:var(--ball-bottom,calc(var(--ball-size) * -.22))}
.left-handed .controls{left:var(--ball-inset,-14px);right:auto}
.inventory-wrap{bottom:var(--inventory-bottom,calc(var(--ball-size) * .78 + 14px))}
#ball-canvas{opacity:var(--ball-opacity,.48)}
.direction-setting{align-items:flex-start;flex-direction:column}
.direction-setting .segmented{width:100%}.direction-setting button{flex:1;min-height:44px;padding:8px}
.ball-settings{margin-top:22px;border-top:1px solid #ffffff26;border-bottom:1px solid #ffffff26;padding:14px 0}
.ball-settings summary{cursor:pointer;font-size:14px;line-height:1.6;min-height:32px}
#control-preview{display:block;width:100%;height:200px;margin:12px auto 0;object-fit:contain}
.reset-button{display:block;width:100%;border:1px solid #789b86;background:transparent;border-radius:12px;padding:12px;margin-top:18px;font-size:14px;min-height:44px}
#settings .field-note{font-size:14px;line-height:1.6}#settings input[type=range]{height:38px;touch-action:pan-y}
#settings .slider-label{gap:14px;line-height:1.6}#settings output{white-space:nowrap}

h1{letter-spacing:0}#loading span{letter-spacing:2px}

#sneak-state{position:absolute;top:22%;left:50%;transform:translateX(-50%);font-size:14px;line-height:1.4;color:#e0ffd1;text-shadow:0 2px 2px #102019;pointer-events:none}#sneak-state[hidden]{display:none}

/* Combat leaves the center of the world and the trackball unobstructed. */
[hidden]{display:none!important}
#combat-health{position:absolute;left:50%;top:calc(env(safe-area-inset-top,0px) + 28px);transform:translateX(-50%);padding:7px 10px;border-radius:8px;background:#172c2db3;text-shadow:0 2px #112729;pointer-events:none;font-size:14px;white-space:nowrap}
#combat-health>span{color:#ff8174}#combat-health b{font-weight:400}#practice-label{display:block;font-size:10px;letter-spacing:1px;color:var(--mint);margin-top:5px;text-align:center}
#hurt-flash{position:absolute;inset:0;pointer-events:none;box-shadow:inset 0 0 90px 20px #d62b24;opacity:0}
#enemy-marker{position:absolute;transform:translate(-50%,-100%);pointer-events:none;white-space:nowrap;text-shadow:0 2px 2px #102518;text-align:center;font-size:11px;color:#e5ffd3}
#enemy-marker>div{height:4px;background:#132921b3;border:1px solid #d4ffab;margin:5px auto 0;width:70px}#enemy-marker i{display:block;height:100%;background:#c6ffad}
#combat-bar{display:flex;gap:5px;margin-bottom:6px;align-items:stretch;min-height:44px}#combat-bar .slot{flex:0 0 46px;height:44px;background:#172c2dbd;backdrop-filter:blur(10px)}#combat-bar img{width:32px;height:32px}
.combat-button{min-height:44px;flex:1;border:1px solid #ffffff4d;background:#172c2dca;backdrop-filter:blur(10px);border-radius:8px;font-size:12px;padding:8px 4px;position:relative;overflow:hidden}.combat-button:disabled{opacity:.38;cursor:default}.combat-button:disabled:active{transform:none}
#attack-button:after{content:"";position:absolute;bottom:0;left:0;width:var(--attack-ready,100%);height:3px;background:#b3f79b}#lock-button[aria-pressed=true]{border-color:var(--mint);color:var(--mint)}
.combat-settings{border:1px solid #b3f79b40;background:#10282455;border-radius:10px;padding:14px;margin-bottom:25px}.combat-settings summary{cursor:pointer;font-size:15px;line-height:1.6;min-height:32px;color:#d4ffbb}.combat-settings .setting{font-size:13px}.combat-settings .toggle{flex-shrink:0}
.encounter-actions{display:flex;gap:8px;margin:8px 0 12px}.encounter-actions .reset-button{margin:0;flex:1;font-size:12px;padding:10px 7px}
#toast{max-width:calc(100% - 32px);white-space:normal;text-align:center;line-height:1.5;width:max-content}
#defeat-dialog p{line-height:1.7}#defeat-dialog{padding-top:25px}#settings .toggle{min-height:32px;width:46px;padding:6px 3px}
@media(prefers-reduced-motion:reduce){#hurt-flash{box-shadow:inset 0 0 20px 4px #d62b24}}

/* Temporarily hide combat HUD while retaining the controls in settings. */
#combat-health,#enemy-marker,#hurt-flash{display:none!important}
#settings #equip-sword[aria-pressed=true]{border-color:var(--mint);color:var(--mint)}
