*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden;background:#182431;color:#f8ebd3;font:13px system-ui,sans-serif}canvas{display:block;width:100%;height:100%;touch-action:none}[hidden]{display:none!important}header{position:fixed;top:max(15px,env(safe-area-inset-top));left:16px;display:grid;gap:3px;pointer-events:none;text-shadow:0 2px 8px #101823}header a{pointer-events:auto;color:#fff0cb;text-decoration:none;font:italic 22px Georgia}header span{font-size:10px;letter-spacing:.08em}nav{position:fixed;top:77px;left:14px;display:flex;gap:6px}button,select{border:1px solid #bba47e70;border-radius:17px;background:#202b3bd9;color:#fff0d6;padding:9px 11px;font:12px system-ui;touch-action:none;cursor:pointer}button:focus-visible,select:focus-visible{outline:2px solid #ffd48c}#notice{position:fixed;top:115px;left:15px;right:15px;pointer-events:none;text-shadow:0 2px 5px #000;font-size:11px}#loading{position:fixed;inset:0;z-index:20;background:#1d2b3a;display:grid;place-items:center}#pad{position:fixed;left:15px;bottom:max(32px,env(safe-area-inset-bottom));width:98px;height:98px;border:1px solid #e0c89d50;border-radius:50%;background:#1e293c70;display:grid;grid-template:repeat(3,1fr)/repeat(3,1fr)}#pad button{padding:0;border:0;background:none;font-size:24px}#pad [data-move=forward]{grid-area:1/2}#pad [data-move=left]{grid-area:2/1}#pad [data-move=right]{grid-area:2/3}#pad [data-move=back]{grid-area:3/2}#pad span{grid-area:2/2;place-self:center}footer{position:fixed;right:12px;bottom:30px;display:grid;gap:5px;justify-items:end}footer button{font-size:10px;padding:8px 10px}#debug{position:fixed;top:5px;left:10px;background:#10202ee8;font:9px/1.25 monospace;padding:8px;white-space:pre-wrap;max-width:calc(100% - 20px);pointer-events:none}#slotPanel{position:fixed;bottom:0;left:0;right:0;min-height:105px;padding:12px 16px;background:#172333f2;border-top:1px solid #b59c76;display:grid;gap:3px;font-size:12px}#slotPanel small{font-size:10px;color:#d6c5aa}#slotPanel button{justify-self:end;padding:7px 12px}body.inspect #pad,body.inspect footer{display:none}body.inspect nav{top:70px}.capture header,.capture nav,.capture #notice,.capture #pad,.capture footer,.capture #slotPanel{display:none}dialog{width:min(480px,calc(100vw - 24px));max-height:83vh;overflow:auto;background:#eee5d6;color:#40392f;border:1px solid #bba17a;border-radius:16px;padding:20px}dialog::backdrop{background:#0d172c70}dialog h2{font:22px Georgia,serif}dialog button,dialog select{background:#65523d;color:#fff1d9}dialog label{display:inline-flex;align-items:center;gap:6px;margin:8px 0}dialog a{display:block;color:#655038;margin:12px 0}.close{float:right}#map svg{width:100%;height:auto;max-height:310px}#slotGrid{display:grid;grid-template-columns:repeat(5,1fr);gap:4px;margin-top:15px}#slotGrid button{font-size:10px;padding:12px 3px;border-radius:7px;background:#657463}#slotGrid button.occupied{background:#9b7c48}#slotGrid button.selected{outline:3px solid #ffe2a5}#map .current{fill:#d89542}

/* Consumer controls are compact; presets/diagnostics exist only in review mode. */
header{top:max(12px,env(safe-area-inset-top));left:14px;max-width:78vw}header a{font-size:18px}header span{font-size:11px;letter-spacing:0}footer{left:12px;right:12px;bottom:max(16px,env(safe-area-inset-bottom));display:flex;justify-content:center;gap:5px}footer button{font-size:11px;flex:1;padding:10px 5px;max-width:170px}#pad{bottom:max(82px,calc(env(safe-area-inset-bottom) + 60px));width:90px;height:90px}#nearStaff,#doorAction{position:fixed;left:50%;transform:translateX(-50%);bottom:122px;z-index:4}#reviewTools{top:66px}#notice{top:105px}#slotPanel{padding-bottom:max(12px,env(safe-area-inset-bottom));max-height:29vh;overflow:auto;gap:5px}#slotPanel strong{font-size:14px}#slotPanel small{line-height:1.4}body.inspect header{max-width:70vw}body.inspect #reviewTools{display:none}body.inspect #nearStaff,body.inspect #doorAction{display:none}body.capture #nearStaff,body.capture #doorAction{display:none}dialog button{margin:5px 3px}dialog label{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0}dialog input:not([type=checkbox]),dialog textarea{width:100%;border:1px solid #aa977b;border-radius:6px;padding:9px;background:#faf5eb;color:#342e27;font:16px system-ui}dialog input[type=range]{padding:0}dialog select{font-size:14px}#photoCrop{width:min(100%,230px);height:auto;max-height:30vh;object-fit:contain;margin:auto;background:#d9cfbd;touch-action:auto}#confirmPhoto{display:block;max-width:160px;max-height:180px;margin:auto}#registration{max-height:92dvh;padding:17px}#registerSlot{font-size:11px;overflow-wrap:anywhere}#formStatus{font-size:12px;line-height:1.5;color:#7b4c27}#registration h2{font-size:21px;margin:12px 0}.formActions{display:flex;justify-content:space-between;position:sticky;bottom:-17px;padding:8px;background:#eee5d6}.fine{font-size:12px;line-height:1.6}body.review header a{font-size:18px}body.review #notice{display:block}#debug{max-height:73vh;overflow:hidden;font-size:8px;line-height:1.2}body.inspect #notice{display:none}#menuDialog button,#guideDialog button,#mineList button{display:block;width:100%;margin:9px 0}#pickerDialog p{font-size:12px}#slotGrid button{padding:13px 3px}.capture #where{display:none}
body.capture #notice{display:none!important}canvas:focus{outline:none}

#clusterDebug{position:fixed;left:10px;right:10px;bottom:160px;background:#142638e8;padding:8px;font:10px/1.4 monospace;white-space:pre-wrap;pointer-events:none;z-index:9}

#occupancyStatus{position:fixed;top:48px;right:12px;max-width:65vw;background:#172333ed;border:1px solid #c9ba9755;border-radius:9px;padding:6px;font-size:10px;z-index:5}#occupancyStatus button{padding:4px 7px;font-size:10px;margin-left:5px}#lightDebug{position:fixed;left:10px;bottom:235px;background:#10202ee8;color:#fff3cd;padding:7px;font:9px/1.25 monospace;white-space:pre-wrap;pointer-events:none}#lightReviewTag{position:fixed;right:10px;top:8px;z-index:9;background:#412957e8;padding:5px 8px;border-radius:6px;font-size:10px;pointer-events:none}#slotGrid button.unknown{background:#555b68}#deleteRegistration{background:#794a41}
/* Registration fields and stored messages: text only, no visibility changes. */
#registration .fieldError{color:#a32926;font-size:14px;margin:4px 0 14px;line-height:1.45}#registration [aria-invalid="true"]{border:2px solid #a32926}#petIntro{min-height:110px;resize:vertical}#confirmMessage{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;max-height:22vh;overflow:auto}#slotDescription{white-space:pre-wrap;overflow-wrap:anywhere;max-height:18vh;overflow:auto}#registration label[for]{display:block;margin-top:10px}#registration input:not([type="checkbox"]){max-width:100%}
#registration .formActions #demoNext{margin-left:auto;min-width:86px;min-height:42px}#registration .formActions{gap:10px}
#slotPanel{grid-template-columns:repeat(3,minmax(0,1fr))}#slotPanel>strong,#slotPanel>span,#slotPanel>small{grid-column:1/-1}#slotPanel #slotDescription{font-size:12px;line-height:1.45}#slotPanel button{width:100%;padding:7px 5px;font-size:10px;white-space:normal}#slotPanel #registerHere{grid-column:1}#slotPanel #addPhotoHere{grid-column:2}#slotPanel #back{grid-column:3}

/* v012 registration and connection status. */
[data-development][hidden]{display:none!important}#connectionStatus{display:block;max-width:72vw;font-size:10px;line-height:1.5;color:#f3e5c9}body.development #connectionStatus{background:#50355a;padding:3px 6px}dialog{box-sizing:border-box;max-width:calc(100vw - 16px);overflow-x:hidden}#registration{width:460px;max-width:calc(100vw - 16px);max-height:calc(var(--usable-height,100dvh) - 16px);overflow-y:auto}#registration *{box-sizing:border-box;min-width:0}#registration button{min-height:44px}#photoCrop{display:block;max-width:100%;height:auto}#photoFile{max-width:100%;font-size:14px}#mineList button{white-space:normal;overflow-wrap:anywhere}#connectionStatus:empty{display:none}@media(max-width:390px){#registration{padding:14px}.formActions{bottom:-14px}#registration h2{font-size:20px}header a{font-size:16px}}

/* Analog joystick; footer and iPhone safe area remain clear. */
#pad{display:block;width:120px;height:120px;left:max(14px,env(safe-area-inset-left));bottom:calc(env(safe-area-inset-bottom,0px) + 82px);touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;overscroll-behavior:contain;background:rgba(247,241,222,.7);border:2px solid rgba(90,112,90,.5);box-shadow:0 3px 18px #263e3320;}
#pad>span{display:block;position:absolute;left:50%;top:50%;width:48px;height:48px;margin:-24px;border-radius:50%;background:rgba(97,128,106,.85);border:2px solid #fff9;box-shadow:0 2px 8px #263e3340;pointer-events:none;transform:translate(0px,0px);}
#pad.active{background:rgba(247,241,222,.88);}
