*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden;background:#121421;color:#fff;font-family:system-ui,sans-serif;overscroll-behavior:none}
body{height:100dvh;display:flex;flex-direction:column}#play-area{flex:1;min-height:0;display:flex;overflow:hidden}#game{position:relative;flex:1;min-width:0;min-height:0;display:flex;align-items:center;justify-content:center;overflow:hidden}#unity-canvas{width:100%;height:100%;display:block;outline:none;background:#121421;touch-action:none;-webkit-user-select:none;user-select:none}
#loading{position:absolute;inset:0;display:grid;place-content:center;text-align:center;background:#121421;gap:16px;padding:24px;z-index:3}#loading[hidden]{display:none}h1{font-size:clamp(22px,4vw,36px);margin:0}#loading p{color:#b9bfd4;margin:0}progress{width:min(420px,80vw);height:16px;accent-color:#8acf47;justify-self:center}#status{font-size:14px;white-space:pre-wrap;overflow-wrap:anywhere}
footer{flex:none;min-height:42px;display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:5px max(10px,env(safe-area-inset-right)) max(5px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left));background:#202438;font-size:12px;color:#c8cce0}footer span{flex:1}button{font:inherit;white-space:nowrap;border:1px solid #59607b;background:#303750;color:white;border-radius:6px;padding:7px 10px;cursor:pointer;touch-action:manipulation}button:focus-visible{outline:2px solid #a6e35b;outline-offset:2px}
dialog{background:#202438;color:#fff;border:1px solid #59607b;border-radius:12px;width:min(440px,90vw);max-height:85dvh;overflow:auto;padding:24px}dialog::backdrop{background:#0009}dialog p{line-height:1.7;white-space:pre-line}dialog menu{display:flex;justify-content:flex-end;gap:12px;padding:0;margin-bottom:0}
#rotate-hint{display:none;position:absolute;top:max(8px,env(safe-area-inset-top));left:50%;transform:translateX(-50%);background:#202438ed;border-radius:8px;padding:6px 10px;white-space:nowrap;font-size:12px;z-index:2}#rotate-hint button{border:0;padding:0 5px;background:transparent}#rotate-hint[hidden]{display:none!important}
@media(pointer:coarse),(max-width:900px){footer span{display:none}footer{justify-content:center;gap:6px}footer button{min-height:36px;padding:6px 8px}}
@media(orientation:portrait){body.touch #rotate-hint{display:block}}
@media(max-width:420px){footer{flex-wrap:wrap;gap:4px}footer button{font-size:11px;padding:5px 7px}#loading{gap:12px;padding:15px}}
/* Rewards live inside the game, beside the native menu and clear of touch input. */
#rewards{position:absolute;z-index:1;left:16px;top:60%;width:min(264px,calc(100% - 16px));padding:6px;background:#15233acc;border:1px solid #6ca38b;border-radius:8px;user-select:none}
#rewards[hidden],#reward-toast[hidden]{display:none}.reward-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}
.reward-grid button{min-height:36px;padding:6px 3px;border-color:#b0d46e;background:#34783d;font-size:11px;font-weight:700;box-shadow:inset 0 1px #ffffff20}
.reward-grid button:hover:not(:disabled){background:#46904c}.reward-grid button:active:not(:disabled){transform:translateY(1px)}.reward-grid button:disabled{background:#314a41;border-color:#526e53;color:#b5c8b0;cursor:default}
#reward-toast{position:absolute;left:50%;bottom:12px;transform:translateX(-50%);max-width:90%;padding:6px 10px;border:1px solid #b4df79;border-radius:6px;background:#173921;color:#fff;font-size:11px;text-align:center;pointer-events:none;z-index:2}
@media(orientation:landscape) and (max-height:500px){#rewards{width:244px;padding:5px}.reward-grid button{min-height:32px;font-size:10px;padding:5px 2px}}
