*{box-sizing:border-box;margin:0;padding:0}body{color:#fff;background-color:#1a1a1a;font-family:Segoe UI,Tahoma,Geneva,Verdana,sans-serif;overflow:hidden}.app-container{justify-content:center;align-items:center;width:100vw;height:100vh;display:flex}.game-world{background:radial-gradient(circle,#2c3e50 0%,#000 100%);border:4px solid #444;border-radius:8px;width:800px;height:600px;position:relative;overflow:hidden;box-shadow:0 0 50px #00000080}.player{color:#fff;z-index:10;background:radial-gradient(circle,#3498db,#2980b9);border-radius:50%;justify-content:center;align-items:center;font-weight:700;transition:width .1s,height .1s;display:flex;position:absolute;box-shadow:0 0 15px #3498dbb3}.enemy{color:#fff;border-radius:50%;justify-content:center;align-items:center;font-weight:700;transition:width .1s,height .1s;display:flex;position:absolute}.hud-container{z-index:101;pointer-events:auto;opacity:1;transition:opacity .2s,visibility .2s;position:absolute;top:0;left:0;container:hud/inline-size}.hud-container--hidden{visibility:hidden;pointer-events:none;opacity:0}.hud{flex-direction:column;gap:10px;max-width:calc(100vw - 40px);padding:20px;display:flex}.hud-size{color:#fff;background:#000c;border-radius:12px;padding:15px 25px}.hud-size h2{margin:0;font-size:1.2rem}.hud-stamina-track{background:#000c;border:2px solid #fff;border-radius:10px;width:200px;height:20px;overflow:hidden}.hud-stamina-fill{border-radius:8px;height:100%;transition:width .1s linear}.hud-status{text-shadow:0 0 5px #000;font-weight:700}.hud-status--exhausted{color:#ff8c00}.hud-status--hidden{color:#0ff}.hud-status--meal{color:gold}@container hud (width<=600px){.hud{gap:6px;padding:10px}.hud-size{padding:10px 16px}.hud-size h2{font-size:.9rem}.hud-stamina-track{width:140px;height:16px}}@container hud (width<=440px){.hud{gap:4px;padding:8px}.hud-size{border-radius:8px;padding:6px 12px}.hud-size h2{font-size:.8rem}.hud-stamina-track{border-width:1px;width:100px;height:12px}.hud-status{font-size:.75rem}}.game-over{z-index:1000;background:#000000d9;flex-direction:column;justify-content:center;align-items:center;display:flex;position:absolute;inset:0}.game-over h1{color:#e74c3c;margin-bottom:20px;font-size:3rem}.btn-restart{color:#fff;cursor:pointer;background:#2ecc71;border:none;border-radius:5px;padding:10px 30px;font-size:1.2rem;transition:background .2s}.btn-restart:hover{background:#27ae60}.digestion-overlay{z-index:90;background:radial-gradient(circle,#6c2d1273,#000000e6),#000000b8;justify-content:center;align-items:center;display:flex;position:absolute;inset:0}.digestion-panel{color:#fff4df;text-align:center;background:linear-gradient(145deg,#280f0af5,#0c0806fa);border:1px solid #ffbe7859;border-radius:18px;width:min(420px,100vw - 32px);padding:32px;box-shadow:0 24px 80px #0000008c}.digestion-panel--encounter{box-sizing:border-box;width:min(600px,100vw - 32px);max-height:calc(100vh - 32px);padding:24px;overflow-y:auto}.digestion-kicker{color:#ffb15f;letter-spacing:.18em;text-transform:uppercase;margin-bottom:8px;font-size:.8rem;font-weight:700}.digestion-panel h1{text-transform:capitalize;margin-bottom:14px;font-size:2rem}.digestion-panel p{color:#ffd8a8;margin-bottom:24px}.digestion-math-hud{background:#0003;border:1px solid #ffbe7833;border-radius:12px;justify-content:center;gap:10px;margin:0 0 16px;padding:12px;display:flex}.digestion-math-hud strong{color:#fff4df;margin-top:4px;font-size:1.35rem;display:block}.digestion-math-label{letter-spacing:.08em;text-transform:uppercase;color:#ffb15f;font-size:.7rem;font-weight:700}.digestion-feedback{color:#ffd8a8;margin:-8px 0 16px;font-size:.9rem}.digestion-feedback--solved{color:#8be28b}.digestion-feedback--failed{color:#ff8f8f}.digestion-enemy-lanes{gap:10px;max-height:min(46vh,460px);margin:0 0 16px;padding:4px 8px 8px;display:grid;overflow-y:auto}.digestion-enemy-lane{cursor:pointer;background:#00000038;border:1px solid #ffbe782e;border-radius:12px;padding:10px 12px 12px;transition:border-color .15s,background .15s,opacity .15s}.digestion-enemy-lane:hover,.digestion-enemy-lane:focus-visible{border-color:#ffbe788c;outline:none}.digestion-enemy-lane--selected{background:#d4af371a;border-color:#d4af37;box-shadow:0 0 0 1px #d4af3738}.digestion-enemy-lane--solved,.digestion-enemy-lane--failed{cursor:default;opacity:.72}.digestion-enemy-lane-heading{color:#fff4df;text-align:left;text-transform:capitalize;grid-template-columns:1fr auto auto;align-items:center;gap:12px;font-size:.78rem;display:grid}.digestion-enemy-status{letter-spacing:.06em;text-transform:uppercase;border-radius:999px;padding:3px 7px;font-size:.62rem;font-weight:800}.digestion-enemy-status--playing{color:#ffb15f;background:#ffb15f29}.digestion-enemy-status--solved{color:#8be28b;background:#8be28b24}.digestion-enemy-status--failed{color:#ff8f8f;background:#ff8f8f24}.digestion-enemy-board-scroll{scrollbar-color:#ffb15fb3 #00000038;scrollbar-width:thin;margin-top:6px;padding:58px 2px 8px;position:relative;overflow:auto hidden;container-type:inline-size}.digestion-enemy-board{justify-content:flex-start;width:max-content;min-width:100%;padding-left:max(42px,50cqw - 14px);padding-right:max(42px,50cqw - 18px);display:flex}.digestion-cell{box-sizing:border-box;color:#24130c;background:#fff4dfeb;border:1px solid #ffd8a847;border-radius:4px;flex:0 0 32px;justify-content:center;align-items:center;width:32px;height:32px;font-size:.62rem;font-weight:700;display:flex;position:relative}.digestion-cell+.digestion-cell{margin-left:4px}.digestion-cell:before{content:"";background:#ffd8a873;width:5px;height:2px;position:absolute;top:50%;right:100%;transform:translateY(-50%)}.digestion-cell:first-child:before{display:none}.digestion-cell--start{box-shadow:inset 0 -3px #ffb15fbf}.digestion-cell--traversed{border-color:#d4af37b8}.digestion-cell--unused-range{color:#24130c9e;opacity:.62;background:repeating-linear-gradient(-45deg,#fff4df9e 0 4px,#ffb15f33 4px 8px);border-style:dashed}.digestion-cell--enemy-marker{color:#fff;background:#a020f029;border-color:#a020f0}.digestion-cell--player-marker{color:#fff;background:#d4af3729;border-color:#d4af37}.digestion-cell--enemy-marker.digestion-cell--player-marker{background:linear-gradient(135deg,#d4af373d,#a020f03d)}.digestion-cell--range-hit{animation:.7s ease-out both digestion-range-hit}@keyframes digestion-range-hit{0%{box-shadow:0 0 #d4af37cc}45%{box-shadow:0 0 0 7px #d4af3747}to{box-shadow:0 0 0 2px #d4af3729}}.digestion-cell-value{z-index:1;position:relative}.digestion-rounding-effect{--rounding-start-x:0px;z-index:20;color:#fff4df;pointer-events:none;background:#24130cf0;border:1px solid #ffd8a8b3;border-radius:999px;align-items:center;gap:4px;min-width:max-content;padding:4px 7px;font-size:.68rem;line-height:1;animation:.9s ease-out both digestion-rounding-snap;display:flex;position:absolute;top:-28px;left:50%;box-shadow:0 0 14px #d4af377a}.digestion-rounding-effect--up{--rounding-start-x:-18px}.digestion-rounding-effect--down{--rounding-start-x:18px}.digestion-rounding-effect-symbol{color:#ffb15f}.digestion-rounding-effect strong{color:#d4af37}@keyframes digestion-rounding-snap{0%{opacity:0;transform:translate(calc(-50% + var(--rounding-start-x)), 5px) scale(.88)}22%{opacity:1}62%{opacity:1;transform:translate(-50%)scale(1.08)}to{opacity:0;transform:translate(-50%,-7px)scale(1)}}.digestion-marker{border-radius:50%;width:6px;height:6px;position:absolute;bottom:2px;transform:translate(-50%)}.digestion-marker--player{background:#d4af37;left:42%}.digestion-marker--enemy{background:#a020f0;left:58%}@media (prefers-reduced-motion:reduce){.digestion-rounding-effect,.digestion-operator--targeted,.digestion-operator--destroying,.digestion-operator--spawning,.digestion-cell--range-hit{animation-duration:1ms}}.digestion-model-viewport{pointer-events:none;z-index:10;width:84px;height:84px;position:absolute;bottom:20px}.digestion-model-viewport--player{transform:translate(-8px)}.digestion-model-viewport--enemy{transform:translate(8px)}.digestion-operator-arena{pointer-events:none;z-index:80;width:100vw;height:100vh;position:fixed;inset:0;overflow:hidden}.digestion-operator{--operator-x:0px;--operator-y:0px;border:2px solid color-mix(in srgb, var(--group-color) 75%, transparent);background:color-mix(in srgb, var(--group-color) 28%, #0000008c);color:#fff4df;white-space:nowrap;min-width:42px;height:42px;transform:translate3d(var(--operator-x), var(--operator-y), 0) translate(-50%, -50%);pointer-events:none;box-shadow:0 0 12px color-mix(in srgb, var(--group-color) 45%, transparent);will-change:transform;border-radius:999px;justify-content:center;align-items:center;padding:0 8px;font-size:.72rem;font-weight:800;display:flex;position:absolute;top:0;left:0}.digestion-operator--targeted{animation:.42s ease-in-out infinite alternate digestion-operand-targeted}.digestion-operator--destroying{animation:.22s ease-in forwards digestion-operand-destroy}.digestion-operator--destroyed{opacity:0}.digestion-operator--spawning{animation:.26s ease-out both digestion-operand-spawn}.digestion-organ-projectile{z-index:30;border:1px solid color-mix(in srgb, var(--group-color) 75%, white);background:var(--group-color);width:10px;height:10px;box-shadow:0 0 7px 3px color-mix(in srgb, var(--group-color) 72%, transparent), 0 0 18px 7px color-mix(in srgb, var(--group-color) 38%, transparent);pointer-events:none;will-change:transform;border-radius:50%;position:absolute;top:0;left:0}.digestion-organ-projectile:before{content:"";background:linear-gradient(90deg, transparent, color-mix(in srgb, var(--group-color) 65%, transparent));filter:blur(1px);border-radius:999px;width:28px;height:4px;position:absolute;top:50%;right:50%;transform:translateY(-50%)}@keyframes digestion-operand-targeted{0%{filter:brightness();box-shadow:0 0 12px color-mix(in srgb, var(--group-color) 45%, transparent)}to{filter:brightness(1.65);box-shadow:0 0 24px 5px color-mix(in srgb, var(--group-color) 72%, transparent)}}@keyframes digestion-operand-destroy{0%{opacity:1;filter:brightness()}45%{opacity:1;filter:brightness(3)}to{opacity:0;filter:brightness(4)blur(5px)}}@keyframes digestion-operand-spawn{0%{opacity:0;filter:brightness(2.5)blur(4px)}to{opacity:1;filter:brightness()blur()}}.digestion-direction-operand{font-size:.62rem;font-weight:800;line-height:1}.digestion-history{color:#ffd8a8;margin:-8px 0 16px;font-size:.82rem}.digestion-direction-pad{left:50%;bottom:max(24px, env(safe-area-inset-bottom));z-index:95;grid-template-rows:repeat(3,56px);grid-template-columns:repeat(3,56px);justify-content:center;gap:8px;margin:0;display:grid;position:absolute;transform:translate(-50%)}.digestion-direction-border{box-sizing:border-box;color:#fff;background:color-mix(in srgb, var(--group-color) 58%, #120a08f0);cursor:pointer;width:56px;height:56px;filter:drop-shadow(0 0 7px color-mix(in srgb, var(--group-color) 55%, transparent));touch-action:manipulation;-webkit-tap-highlight-color:transparent;border:0;justify-content:center;align-items:center;padding:3px;transition:filter .15s,transform .1s,background .15s;display:flex;position:relative;overflow:hidden}.digestion-direction-border:hover{background:color-mix(in srgb, var(--group-color) 76%, #120a08e6);filter:drop-shadow(0 0 11px color-mix(in srgb, var(--group-color) 75%, transparent))}.digestion-direction-border:active{transform:scale(.92)}.digestion-direction-border:focus-visible{outline-offset:4px;outline:3px solid #fff4df}.digestion-direction-border:disabled{cursor:not-allowed;filter:grayscale(.5);opacity:.48}.digestion-direction-border--up{grid-area:1/2}.digestion-direction-border--left{grid-area:2/1}.digestion-direction-border--down{grid-area:3/2}.digestion-direction-border--right{grid-area:2/3}.digestion-direction-btn{--group-color:#ffd8a8;background:color-mix(in srgb, var(--group-color) 15%, #161616);width:100%;height:100%;color:var(--group-color);cursor:pointer;box-sizing:border-box;border:none;flex-direction:column;justify-content:center;align-items:center;transition:background .15s,transform .1s;display:flex;position:relative;overflow:hidden}.digestion-direction-btn:hover{background:color-mix(in srgb, var(--group-color) 35%, #161616)}.digestion-direction-btn:active{background:color-mix(in srgb, var(--group-color) 50%, #161616);transform:scale(.94)}.digestion-direction-btn:disabled{opacity:.45;cursor:not-allowed}.digestion-direction-border--up,.digestion-direction-btn--up{clip-path:polygon(50% 0%,0% 50%,30% 50%,30% 100%,70% 100%,70% 50%,100% 50%)}.digestion-direction-border--down,.digestion-direction-btn--down{clip-path:polygon(50% 100%,0% 50%,30% 50%,30% 0%,70% 0%,70% 50%,100% 50%)}.digestion-direction-border--left,.digestion-direction-btn--left{clip-path:polygon(0% 50%,50% 0%,50% 30%,100% 30%,100% 70%,50% 70%,50% 100%)}.digestion-direction-border--right,.digestion-direction-btn--right{clip-path:polygon(100% 50%,50% 0%,50% 30%,0% 30%,0% 70%,50% 70%,50% 100%)}
