/* Original Shadowgate study: shared touch foundation, ink/stone values and restrained cyan/violet accents. */
:root{--ink:#090f1e;--panel:#101e33;--line:#41678b;--blue:#8cddff;--violet:#aa96e8;--text:#e5edf4;--muted:#a7b6ce}body.shadow-study{background:var(--ink);color:var(--text);font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif}button{background:#14273e;color:var(--text);border:1px solid #426381;border-radius:5px;min-width:48px;min-height:48px;box-shadow:inset 0 1px #89c8ef12,0 2px #030812;font-size:12px}button:active{background:#24415b}button:focus-visible{outline:2px solid #b3e8ff;outline-offset:2px}button:disabled{opacity:.45;cursor:default}header{left:14px;right:14px;top:max(12px,env(safe-area-inset-top))}header small{color:#94bedb;font-size:8px;letter-spacing:1.5px}h1{font-size:22px!important;letter-spacing:-.7px}#pause{background:#111d32f2}#hud{top:76px;left:14px;right:14px;border:1px solid #436585;border-left:3px solid #8bceef;border-radius:3px;background:#0c1729eb;padding:8px;font-size:10px}#board{top:119px;left:14px;max-width:calc(100% - 120px)}.player{background:#111d30e8;border-color:#425570;border-radius:3px;min-width:64px;min-height:44px;color:#dce6ef}.player.active{background:#20314b;border-top-color:#8cdcff}.player.dead{background:#31253e}#map{top:119px;right:14px;border-radius:4px;border-color:#58759b;background:#0b1529ed}#cameraControls{top:231px;right:14px;gap:5px}#cameraControls button{border-radius:4px;font-size:10px;min-height:44px}#zoomControls{bottom:265px;background:#0d1d30ed;border-color:#42698c;border-radius:4px;right:14px}#zoomControls button{border-radius:3px;min-width:44px;min-height:44px}#zoomReadout{color:#9fcee7}.portrait{width:60px;height:58px;flex:none;background-image:url('assets/character-atlas.png');background-size:300% 300%;background-position:0 0;filter:drop-shadow(0 2px 2px #020614);border-radius:8px}.hero-portrait{float:left;width:38px;height:34px;margin-right:7px}#progression{left:12px;right:12px;bottom:78px;max-width:480px;background:linear-gradient(110deg,#101e32f5,#10182def);border:1px solid #426b8d;border-left:3px solid #8bc9eb;border-radius:5px;padding:9px 10px}#progressReadout{font-size:10px;color:#bacfe2;min-height:30px;display:flex;align-items:center;letter-spacing:.2px}.skillrow{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;clear:both}.skillrow button{min-height:46px;font-size:12px;padding:7px 4px;border-radius:4px}#shopOpen{grid-column:1/-1;min-height:52px;font-size:14px;font-weight:750;letter-spacing:.3px;background:linear-gradient(100deg,#223957,#292c4a);border:1px solid #8dcff4;color:#e8f6ff}.nearby{box-shadow:inset 3px 0 #91d5f2,0 0 12px #7b8ce71c}#skillMenu{color:#bbd9f1;border-color:#5f7399}#useTonic{grid-column:1/-1}footer{left:12px;right:12px;bottom:max(10px,env(safe-area-inset-bottom));border:0;background:#0b1426dc;padding:4px 6px;border-radius:4px;max-width:480px}footer>div{gap:6px}footer button{font-size:11px;min-height:48px;padding:6px 10px}footer p,#help,#mode{display:none}#roomForm{margin:5px 0}#notice{z-index:7;bottom:265px;background:#132a44;color:#dcefff;border:1px solid #75a6c7;border-radius:3px;max-width:92%;font-size:12px}#overlay{background:#050c1be8;backdrop-filter:blur(4px)}article{background:#111e33;color:#e5eef5;border-color:#56769a;border-radius:7px}article small{color:#9fbbd2}article .sub{color:#a5bcd0}#panelDetail strong{color:#c5e9fb}#start{background:linear-gradient(100deg,#385773,#424167);border-color:#779bc0;box-shadow:0 3px #081326;color:#eff8ff}#skillPanel{background:#111f35;color:#e2ecf6;border-color:#5b7ca3;border-radius:7px}#skillPanel button{border-radius:4px}#shopPanel{position:fixed;inset:0;transform:none;width:auto;z-index:8;border:0;padding:12px;background:#020714b8;display:flex;align-items:flex-end;justify-content:center;box-shadow:none;border-radius:0;backdrop-filter:blur(3px);touch-action:pan-y}#shopPanel[hidden]{display:none}.supply-sheet{width:min(100%,480px);max-height:calc(100dvh - 24px);overflow:auto;overscroll-behavior:contain;background:linear-gradient(135deg,#15263d,#0d172c 68%);border:1px solid #6c97bd;border-top:3px solid #95d4f5;border-radius:10px 10px 5px 5px;box-shadow:0 16px 50px #01030bbf,inset 0 0 35px #6786bc0b;padding:17px}.supply-heading{display:flex;align-items:center;gap:10px;border-bottom:1px solid #36516e;padding-bottom:12px}.supply-heading small{color:#9cccf0;font-size:9px;letter-spacing:2px}.supply-heading h3{font-size:24px;letter-spacing:-.7px;margin:3px 0;color:#eef6fc}.supply-heading p{margin:3px 0 0;font-size:11px!important;color:#a3b9cf}#shopSummary{font-size:12px;margin:12px 0;color:#c9d8e7}.supply-choices{display:grid;gap:8px}.supply-choices button{display:flex;align-items:center;gap:9px;text-align:left;min-height:72px;padding:11px 12px;background:#13233a;border:1px solid #3d5a7a;box-shadow:none}.supply-choices button.selected{background:#20354f;border-color:#a4ddf8;box-shadow:inset 3px 0 #a4ddf8}.supply-icon{display:grid;place-items:center;width:30px;height:34px;color:#a1d9fa;font-size:30px;font-weight:400;flex:none}.supply-choices strong{display:block;font-size:14px;color:#edf4fc}.supply-choices small{display:block;font-size:10px;color:#abbcd2;letter-spacing:0;margin-top:5px}.supply-choices b{margin-left:auto;font-size:12px;white-space:nowrap;color:#e5c995;font-weight:650}#choiceDetail{font-size:11px!important;color:#b8cce0;line-height:1.5;margin:10px 0 4px;min-height:30px}#shopFeedback{font-size:12px!important;color:#a7d9ed;line-height:1.4;margin:6px 0 12px;min-height:34px}.supply-actions{display:grid;gap:7px}#confirmShop,#closeShop{float:none;width:100%!important;min-height:52px!important;margin:0;font-size:14px;font-weight:700}#confirmShop{background:linear-gradient(100deg,#31526e,#423e68);border-color:#97c4df}#closeShop{background:#101c30;color:#d3e0ef;border-color:#526d8b;font-weight:500}.supply-foot{font-size:10px!important;line-height:1.4;color:#9facc4;margin:10px 0 0;text-align:center}#loadError{background:#20172e;color:#eee;z-index:20}@media(max-width:420px){#map{width:84px;height:75px}#cameraControls{top:204px}.supply-sheet{padding:14px}.supply-heading h3{font-size:23px}#progression{bottom:78px}#zoomControls{bottom:264px}}@media(max-height:640px){header small{display:none}#hud{top:62px}#board,#map{top:101px}#map{width:72px;height:64px}#cameraControls{top:174px}#progression{bottom:72px;padding:6px 8px}#progressReadout{min-height:27px;font-size:9px}.hero-portrait{height:27px;width:32px}.skillrow button{min-height:44px;font-size:11px}#shopOpen{min-height:48px}#zoomControls{bottom:235px;padding:4px}footer{bottom:8px;padding:4px}footer button{min-height:48px}.supply-sheet{padding:12px}.supply-heading{padding-bottom:8px}.supply-heading .portrait{width:47px;height:47px}.supply-heading h3{font-size:20px}.supply-heading p{font-size:10px!important}#shopSummary{margin:8px 0;font-size:11px}.supply-choices button{min-height:64px;padding:8px}.supply-choices strong{font-size:12px}.supply-choices small{font-size:9px}.supply-choices b{font-size:11px}#choiceDetail{min-height:28px;margin:7px 0 3px;font-size:10px!important}#shopFeedback{font-size:11px!important;min-height:28px;margin:5px 0 8px}#confirmShop,#closeShop{min-height:48px!important;font-size:12px}.supply-foot{font-size:9px!important;margin:7px 0 0}}
@media(min-width:700px){#progression,footer{left:50%;right:auto;transform:translateX(-50%);width:480px}}

/* Free exploration clears the thumb-action sheet so off-lane beacons/landmarks stay visible. */
body[data-camera-mode="free"] #progression{display:none}body[data-camera-mode="free"] #cameraControls{top:auto;bottom:76px;right:12px}body[data-camera-mode="free"] #zoomControls{bottom:136px}

/* Noninteractive crew identity; leader lines preserve each actual world anchor. */
#runnerLabels{position:absolute;inset:0;pointer-events:none;overflow:hidden}#runnerLabels[hidden]{display:none}.runner-marker[hidden]{display:none}.runner-tag{position:absolute;left:0;top:0;width:52px;height:18px;line-height:16px;text-align:center;font-size:10px;font-weight:750;letter-spacing:.1px;border:1px solid var(--runner-color);border-left:3px solid var(--runner-color);border-radius:3px;color:#edf6fc;background:#081321ed;white-space:nowrap;box-shadow:0 1px 2px #020711;pointer-events:none}.runner-tag.selected{border-top-color:#f0faff;background:#20364bec}.runner-leader{position:absolute;left:0;top:0;height:1px;background:var(--runner-color);opacity:.65;transform-origin:0 0;pointer-events:none}

/* Phone clarity repair: messages occupy the title slot, never the course. */
#notice{left:14px;right:86px;top:max(12px,env(safe-area-inset-top));bottom:auto;transform:none;max-width:none;width:auto;height:44px;max-height:44px;display:flex;align-items:center;text-align:left;padding:0;font-size:12px;line-height:14px;background:none;border:0;box-shadow:none;overflow:hidden;z-index:7}
body.has-notice header h1,body.has-notice header small{visibility:hidden}
.runner-tag{padding:0;box-shadow:none;border-left-width:1px;border-radius:5px;font-size:10px;letter-spacing:0}
.runner-tag.selected{border:2px solid #e5f4ff;line-height:14px}
.runner-tag.down{border-radius:3px;background:#302038f2;color:#fff0e9;border-left-width:3px}
.runner-leader[hidden]{display:none}

#board .player{width:88px;min-width:88px;height:44px;display:grid;grid-template-columns:1fr auto;column-gap:3px;row-gap:0;align-content:center;padding:4px 6px;font-size:9px;line-height:12px}
#board .player .crew-identity{display:block;font-size:9px;color:inherit;white-space:nowrap}
#board .player em{display:block;grid-column:1/-1;font-size:8px;line-height:10px;letter-spacing:.5px;font-style:normal;color:#ffe3ee}
/* Four fixed crew cards occupy two rows, including DOWN; controls start after them. */
@media(max-width:420px){#cameraControls{top:219px}}
@media(max-height:640px){#cameraControls{top:198px}#zoomControls{bottom:223px}}
@media(max-width:420px){body:not([data-camera-mode="free"]) #cameraControls{left:14px;right:auto}}
@media(max-height:640px){body:not([data-camera-mode="free"]) #cameraControls{left:14px;right:auto}}
