:root{background:#a9c6e8;color:#203247}
body.arrows{background:linear-gradient(180deg,#93b4de 0%,#b3d2ef 48%,#c2e0f5 100%)}
#loading{position:fixed;inset:0;z-index:30;display:grid;place-items:center;background:linear-gradient(180deg,#93b4de 0%,#b3d2ef 48%,#c2e0f5 100%);perspective:600px;transition:opacity .24s ease,visibility .24s ease}
#loading.ready{opacity:0;visibility:hidden;pointer-events:none}
.loading-cube{position:relative;width:54px;height:54px;transform-style:preserve-3d;animation:loading-cube-turn 1.6s infinite ease-in-out}
.loading-cube i{position:absolute;inset:0;border:3px solid #7295bb;border-radius:7px;background:linear-gradient(145deg,#fff,#bdddf0);box-shadow:inset 0 0 0 2px #ffffffa8}
.loading-cube i:nth-child(1){transform:translateZ(27px)}
.loading-cube i:nth-child(2){transform:rotateY(180deg) translateZ(27px)}
.loading-cube i:nth-child(3){transform:rotateY(90deg) translateZ(27px)}
.loading-cube i:nth-child(4){transform:rotateY(-90deg) translateZ(27px)}
.loading-cube i:nth-child(5){transform:rotateX(90deg) translateZ(27px)}
.loading-cube i:nth-child(6){transform:rotateX(-90deg) translateZ(27px)}
@keyframes loading-cube-turn{0%{transform:rotateX(-19deg) rotateY(0deg)}50%{transform:rotateX(22deg) rotateY(180deg)}100%{transform:rotateX(-19deg) rotateY(360deg)}}
.arrows .top{top:calc(env(safe-area-inset-top) + 9px);left:10px;right:10px;height:42px;padding:0;background:none;border:0;box-shadow:none;pointer-events:none}
.arrows .top .back,.arrows .top #help,.arrows .heading p{display:none}
.arrows .heading{display:flex;justify-content:center;align-items:center;padding:0}
.arrows .heading h1{font-size:clamp(19px,4.4vw,25px);font-weight:850;letter-spacing:.1px;color:#253a55;text-shadow:0 1px 0 #fff9}
.arrows #stats{top:calc(env(safe-area-inset-top) + 54px);left:50%;z-index:3;display:flex;justify-content:center;gap:5px;min-width:0;padding:0;background:none;border:0;box-shadow:none;transform:translateX(-50%)}
#arrows-left{position:fixed;top:calc(env(safe-area-inset-top) + 88px);left:50%;z-index:5;display:flex;align-items:center;gap:5px;transform:translateX(-50%);padding:3px 9px;border-radius:12px;background:#fffdf2db;color:#263b54;font:800 17px/1 Arial,sans-serif;box-shadow:0 2px 7px #38516a24;pointer-events:none}
#arrows-left[hidden]{display:none}
#arrows-left svg{width:20px;height:20px}
.heart-slot{position:relative;display:inline-flex;width:29px;height:30px;align-items:center;justify-content:center;line-height:1;font-size:29px;font-family:Arial,sans-serif}
.heart-fill{position:absolute;z-index:1;color:#f0445d;filter:drop-shadow(0 2px 1px #bd4261)}
.heart-outline{color:#a9b5c2;filter:drop-shadow(0 1px 0 #fff)}
.heart-slot.empty .heart-fill{display:none}
.heart-slot.lost .heart-fill{animation:heart-loss .46s ease-in forwards}
@keyframes heart-loss{0%{transform:scale(1);opacity:1}28%{transform:scale(1.34);opacity:1}100%{transform:scale(.2);opacity:0}}
.arrows #scene{top:calc(env(safe-area-inset-top) + 88px);left:0;width:100%;height:calc(100dvh - env(safe-area-inset-top) - 137px)}
.arrows .zoom{top:auto;bottom:calc(env(safe-area-inset-bottom) + 17px);left:12px;border-radius:12px;background:#fff9;padding:6px;color:#3a4bd7}
.arrows .zoom input{height:66px;accent-color:#434fe5}
.arrows #controls{display:none}
.arrows .game-menu-button{top:calc(env(safe-area-inset-top) + 13px);left:16px;width:34px;height:32px;padding:0;border:0;border-radius:8px;background:#ffffffc9;color:#2e4261;font-size:17px;box-shadow:0 2px 7px #33496824}
.arrows #dialog .modal{background:#f9fcff;color:#243b53;border:1px solid #d7e5f0;box-shadow:0 24px 75px #1b355047}
.arrows #dialog .modal h2{color:#243b53;text-shadow:none;font-size:clamp(25px,6vw,31px)}
.arrows #dialog .modal p{color:#52677e}
.arrows #dialog .modal button{background:#309f75;color:#fff}
@media(max-height:540px){.arrows .top{top:calc(env(safe-area-inset-top) + 3px);height:35px}.arrows #stats{top:calc(env(safe-area-inset-top) + 36px)}#arrows-left{top:calc(env(safe-area-inset-top) + 68px)}.arrows #scene{top:calc(env(safe-area-inset-top) + 66px);width:100%;height:calc(100dvh - env(safe-area-inset-top) - 70px)}.arrows .game-menu-button{top:calc(env(safe-area-inset-top) + 5px)}}
.arrows .top{display:flex!important}
.arrows #stats{display:flex!important}
.arrows #message{display:block!important;top:calc(env(safe-area-inset-top) + 94px)}
#key-rack{position:fixed;top:calc(env(safe-area-inset-top) + 10px);right:14px;z-index:5;display:flex;gap:4px;align-items:center;justify-content:center;min-height:30px;padding:2px 5px;border:1px solid #ffffffc9;border-radius:10px;background:#ffffffa8;box-shadow:0 2px 8px #35507320;pointer-events:none}
#key-rack:empty{display:none}
.rack-key{width:28px;height:28px;display:grid;place-items:center;color:var(--key-color);opacity:.32;filter:grayscale(.7);transition:transform .28s ease,opacity .28s ease,filter .28s ease}
.rack-key svg{width:23px;height:23px;filter:drop-shadow(0 1px 1px #35466166)}
.rack-key.collected{opacity:1;filter:none;transform:scale(1.1)}
.rack-key.arriving{animation:key-arrive .42s ease-out}
@keyframes key-arrive{0%{transform:scale(.4)}45%{transform:scale(1.45)}100%{transform:scale(1.1)}}
#arrow-tools{position:fixed;right:14px;bottom:calc(env(safe-area-inset-bottom) + 14px);z-index:6;display:flex;gap:9px}
#arrow-tools button{position:relative;width:54px;height:54px;padding:0;border:2px solid #ffffffd9;border-radius:14px;background:linear-gradient(145deg,#fff,#c5d6ed);box-shadow:0 4px 0 #8aa5bd,0 7px 16px #30476555;color:#284467;display:grid;place-items:center;cursor:pointer}
#arrow-tools button:disabled{opacity:.5;filter:grayscale(1)}
#arrow-tools button.selected{outline:3px solid #ed7b71;transform:translateY(2px)}
#arrow-tools .tool-icon{font-size:31px;line-height:1;font-weight:800}
#arrow-tools .tool-icon svg{width:34px;height:34px;display:block}
#arrow-tools .tool-count{position:absolute;top:-8px;right:-7px;min-width:19px;height:19px;padding:0 3px;border-radius:10px;background:#1e3859;color:#fff;font:700 12px/19px Arial}
#power-choice[hidden]{display:none}
#power-choice{position:fixed;inset:0;z-index:25;display:grid;place-items:center;background:#102844a8;backdrop-filter:blur(5px);padding:18px}
.choice-panel{width:min(440px,100%);text-align:center;color:#263e5d}
.choice-panel h2{margin:0 0 15px;color:white;font-size:25px;text-shadow:0 2px 5px #172b47}
.choice-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.choice-card{border:3px solid #fefefe;border-radius:19px;padding:18px 11px 16px;background:linear-gradient(160deg,#fff,#cae2f4);box-shadow:0 8px 0 #6c92ac,0 18px 32px #0b234d88;color:#2a4462;cursor:pointer;min-height:174px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px}
.choice-card:active{transform:translateY(5px);box-shadow:0 3px 0 #6c92ac,0 9px 18px #0b234d88}
.choice-card .card-icon{font-size:51px;line-height:1;color:#f5b33e;text-shadow:0 2px 2px #794b1b77}
.choice-card .card-icon svg{width:53px;height:53px;display:block}
.choice-card b{font-size:18px}.choice-card small{font-size:13px;line-height:1.25}
.flying-key{position:fixed;z-index:28;width:26px;height:26px;color:var(--key-color);pointer-events:none;filter:drop-shadow(0 2px 2px #27364a66)}
.flying-key svg{width:100%;height:100%}
@media(max-width:450px){#key-rack{top:calc(env(safe-area-inset-top) + 49px);right:10px}.rack-key{width:22px;height:22px}.rack-key svg{width:19px;height:19px}}
