:root{font-family:system-ui,-apple-system,"Segoe UI",sans-serif;color:#513c48;background:#d7c6df;--safe-top:env(safe-area-inset-top,0px);--safe-right:env(safe-area-inset-right,0px);--safe-bottom:env(safe-area-inset-bottom,0px);--safe-left:env(safe-area-inset-left,0px);--berry:#ae416e;--line:#e9dace;--cream:#fff7eb}
*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden}body{overscroll-behavior:none}button,select,input,textarea{font:inherit;color:inherit}button,select{min-height:44px;border:1px solid var(--line);border-radius:13px;background:#fffdf7;padding:9px 12px}button{cursor:pointer;font-weight:650;-webkit-tap-highlight-color:transparent}button:disabled,select:disabled,input:disabled{opacity:.45;cursor:wait}button:focus-visible,select:focus-visible,input:focus-visible,summary:focus-visible{outline:3px solid var(--berry);outline-offset:3px}[hidden]{display:none!important}
#stage{position:relative;width:100%;height:var(--app-height,100dvh)}#unity-canvas{display:block;width:100%;height:100%;background:#d7c6df;outline:none;touch-action:none}#hud{position:absolute;left:calc(var(--safe-left) + 24px);right:calc(var(--safe-right) + 24px);top:calc(var(--safe-top) + 20px);display:flex;align-items:flex-start;justify-content:space-between;gap:12px;pointer-events:none}.brand{display:flex;gap:11px;align-items:center}.brand-mark{display:grid;place-items:center;width:46px;height:46px;border-radius:17px;background:var(--cream);color:var(--berry);font-size:35px;font-weight:850;line-height:1;padding-bottom:7px;box-shadow:0 3px 12px #513c4812}.brand strong{display:block;font-size:18px;letter-spacing:-.4px}.brand small{display:block;font-size:11px;margin-top:3px}.performance{background:#fff7ebed;border:1px solid #fff9ed;border-radius:16px;padding:10px 14px;box-shadow:0 4px 18px #50303910;min-width:128px}#fps{display:block;font-size:22px;line-height:1.1;font-variant-numeric:tabular-nums}#brief{display:block;max-width:200px;font-size:10px;margin-top:5px;color:#816778}
#loading{position:absolute;inset:0;z-index:2;display:grid;place-items:center;background:#f3e5eadf;padding:25px}.load-card{display:flex;align-items:center;gap:14px;flex-direction:column;max-width:400px;width:100%;padding:45px 30px;background:var(--cream);border:1px solid #fff;border-radius:30px;text-align:center;box-shadow:0 15px 60px #66455215}.load-card strong{font-size:27px;line-height:1.2;letter-spacing:-.8px}.load-card p{font-size:14px;line-height:1.5;margin:0}.load-card small{font-size:11px;color:#927686}.load-card progress{accent-color:var(--berry);width:100%;height:8px;border:0;margin:9px 0}.eyebrow{font-size:9px;font-weight:800;letter-spacing:1.6px;color:#a17d8c}
#dock{position:absolute;z-index:4;bottom:calc(var(--safe-bottom) + 18px);left:50%;transform:translateX(-50%);display:flex;align-items:stretch;gap:4px;background:#fff7ebf7;padding:6px;border:1px solid #fff;border-radius:23px;box-shadow:0 7px 30px #50303920;max-width:calc(100% - 24px)}.dock-button{border:0;background:transparent;display:flex;flex-direction:column;gap:3px;align-items:center;justify-content:center;min-width:74px;min-height:61px;padding:6px 11px;font-size:10px;font-weight:650;border-radius:17px}.dock-button span{font-size:23px;line-height:1.15;font-weight:500}.dock-button[aria-expanded=true]{background:#eedbcf;color:#903257}.dock-button:hover{background:#f0e3d8}
#panel{position:absolute;z-index:3;right:calc(var(--safe-right) + 22px);top:calc(var(--safe-top) + 88px);bottom:calc(var(--safe-bottom) + 108px);width:352px;max-width:calc(100% - 24px);padding:24px;background:#fff7ebfa;border:1px solid #fff;border-radius:24px;box-shadow:0 14px 46px #51314822;overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}.panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}h1{font-size:23px;letter-spacing:-.6px;line-height:1.2;margin:4px 0 0}.close{font-size:26px;line-height:1;font-weight:400;background:transparent;border:0;padding:2px;width:40px;min-height:40px;color:#866775}.intro{font-size:13px;line-height:1.6;margin:0 0 18px;color:#806575}.note{font-size:11px;line-height:1.6;color:#887180;margin:14px 0}.notice{padding:13px;border-radius:14px;background:#e4eedf;font-size:12px;line-height:1.65;margin:18px 0;color:#597360}label{display:flex;flex-direction:column;gap:7px;font-size:12px;font-weight:600;margin:16px 0 7px;min-width:0}select{width:100%;padding:10px}.slider-label{display:flex;flex-direction:row;align-items:center;justify-content:space-between;margin-top:22px}.slider-label output{font-size:11px;font-weight:650;font-variant-numeric:tabular-nums;color:var(--berry);padding:4px 8px;border-radius:7px;background:#f0e1e3;min-width:43px;text-align:center}input[type=range]{width:100%;margin:4px 0 0;height:26px;accent-color:var(--berry);cursor:pointer}.range-captions{display:flex;justify-content:space-between;font-size:10px;color:#a28c98;margin-top:0}.panel-footer{border-top:1px solid var(--line);margin-top:23px;padding-top:10px}.text-button{background:transparent;border:0;padding:6px 0;text-align:left;font-size:11px;color:#927080;font-weight:500}
dl{margin:18px 0}dl>div{display:flex;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid var(--line);font-size:11px}dt{max-width:67%;color:#866c79}dd{margin:0;font-weight:700;text-align:right;font-variant-numeric:tabular-nums}.accent{width:100%;background:var(--berry);color:#fff;border-color:var(--berry);font-size:12px}details{margin-top:16px}summary{min-height:40px;padding:11px 0;font-size:12px;cursor:pointer;font-weight:650}input:not([type=range]),textarea{width:100%;min-height:42px;border:1px solid var(--line);background:#fffdf7;border-radius:10px;padding:9px;font-size:12px;font-weight:400}.check{flex-direction:row;align-items:center;line-height:1.6;font-weight:400}.check input{width:20px;min-height:20px;flex-shrink:0;accent-color:var(--berry)}.exports{display:flex;gap:6px;margin-top:16px}.exports button{flex:1;font-size:11px;padding:8px 6px}textarea{height:220px;font-family:monospace;font-size:10px}
#unity-canvas{touch-action:none}
#movement-control{position:absolute;z-index:1;left:calc(var(--safe-left) + 24px);bottom:calc(var(--safe-bottom) + 110px);display:flex;align-items:center;flex-direction:column;gap:8px;user-select:none;-webkit-user-select:none}
#joystick{position:relative;display:block;width:136px;height:136px;min-height:0;padding:0;border:1px solid #fff8edbd;border-radius:50%;background:#fff7eb52;box-shadow:0 4px 24px #63495710;touch-action:none;--stick-x:0px;--stick-y:0px;cursor:grab}
#joystick:active{cursor:grabbing;background:#fff7eb75}#joystick:disabled{opacity:.3;cursor:wait}.stick-ring{position:absolute;inset:18px;border:1px solid #876b7b25;border-radius:50%;pointer-events:none}#stick-knob{position:absolute;width:54px;height:54px;left:calc(50% - 27px);top:calc(50% - 27px);border-radius:50%;border:2px solid #fff9f0;background:#bd6b8acc;box-shadow:0 3px 9px #68405226;transform:translate(var(--stick-x),var(--stick-y));pointer-events:none}#movement-hint{font-size:10px;color:#674958;background:#fff7ebbd;padding:5px 9px;border-radius:10px;pointer-events:none;white-space:nowrap}.stick-hint-mobile{display:none}
@media(max-width:600px){#hud{left:calc(var(--safe-left) + 15px);right:calc(var(--safe-right) + 15px);top:calc(var(--safe-top) + 13px)}.brand{gap:8px}.brand-mark{width:39px;height:39px;border-radius:14px;font-size:29px}.brand strong{font-size:15px}.brand small{font-size:9px}.performance{padding:8px 10px;min-width:104px}#fps{font-size:18px}#brief{max-width:140px;font-size:9px}#dock{bottom:calc(var(--safe-bottom) + 10px);width:calc(100% - 20px);gap:1px;border-radius:21px;padding:5px}.dock-button{flex:1;min-width:0;padding:5px 1px;min-height:57px;font-size:9px}.dock-button span{font-size:22px}#panel{right:12px;left:12px;width:auto;top:auto;bottom:calc(var(--safe-bottom) + 88px);max-height:58%;padding:19px;border-radius:22px}.panel-head{margin-bottom:10px}h1{font-size:21px}.intro{font-size:12px}.slider-label{margin-top:14px}.panel-footer{margin-top:16px}#movement-control{left:calc(var(--safe-left) + 16px);bottom:calc(var(--safe-bottom) + 94px)}#joystick{width:128px;height:128px}.stick-hint-desktop{display:none}.stick-hint-mobile{display:inline}}
@media(max-height:520px){#hud{top:8px}.brand small{display:none}.brand-mark{width:36px;height:36px;font-size:28px}.performance{padding:6px 10px}#brief{font-size:9px}#dock{bottom:8px}.dock-button{min-height:49px}#panel{top:60px;bottom:80px;max-height:none;padding:16px}.panel-head{margin-bottom:8px}}
@media(max-height:520px){#movement-control{bottom:calc(var(--safe-bottom) + 86px);gap:4px}#joystick{width:106px;height:106px}#stick-knob{width:44px;height:44px;left:calc(50% - 22px);top:calc(50% - 22px)}#movement-hint{font-size:9px}.stick-hint-desktop{display:none}.stick-hint-mobile{display:inline}}

body[data-scene]:not([data-scene='game']) #hud, body[data-scene]:not([data-scene='game']) #movement-control, body[data-scene]:not([data-scene='game']) #dock, body[data-scene]:not([data-scene='game']) #panel { display: none !important; }


/* Keep the game render surface portrait if a mobile host rejects orientation locking.
   No rotated transforms: Unity touch coordinates remain aligned with the canvas. */
.mimi-portrait-fallback body { display:flex; justify-content:center; align-items:center; background:#eadcc7; }
.mimi-portrait-fallback #stage { flex:none; width:var(--mimi-portrait-width); height:var(--mimi-portrait-height); max-width:100vw; overflow:hidden; }
