html { color:#000; background:#fff; font-family:"Times New Roman",Times,serif; font-size:16px; }
* { box-sizing:border-box; }
body { margin:24px; }
h1,h2,p,a { font:inherit; }
h1 { margin:0; }
a,a:visited { color:#000; text-decoration:none; }
a:hover,a:focus-visible { text-decoration:underline; }
a:focus-visible { outline:1px solid; outline-offset:5px; }
.home { min-height:calc(100svh - 48px); display:flex; flex-direction:column; }
.home main { width:100%; margin:auto 0; padding:28px 0; }
.stage { width:min(100%,920px); aspect-ratio:16/9; margin:0 auto 28px; display:flex; align-items:center; justify-content:center; }
#work-link { display:flex; align-items:center; justify-content:center; max-width:100%; max-height:100%; }
#work-image { display:block; width:auto; height:auto; max-width:100%; max-height:100%; object-fit:contain; }
nav ul { display:flex; justify-content:center; flex-wrap:wrap; gap:12px 28px; list-style:none; margin:0; padding:0; }
footer { width:100%; margin-top:auto; }
iframe { display:block; border:0; }
.breadcrumb { margin:28px 0; }
@media(max-width:600px) { body { margin:20px; } .home { min-height:calc(100svh - 40px); } .stage { aspect-ratio:4/3; } nav ul { gap:12px 20px; } }

#work-link { background:#f5f5f5; overflow:hidden; }
#work-image { width:100%; height:100%; object-fit:contain; }
.portfolio { max-width:1200px; margin:0 auto; }
.portfolio figure { margin:0 0 48px; scroll-margin-top:24px; }
.portfolio img { width:100%; height:auto; display:block; }
.portfolio figcaption { margin-top:8px; }

html { font-size:10px; }
body { padding-bottom:38px; }
button,input { font:inherit; }
.player { position:fixed; bottom:16px; left:24px; right:24px; width:auto; height:22px; display:flex; align-items:center; gap:12px; background:#fff; z-index:10; }
.player button { border:0; padding:0; background:none; color:#000; cursor:pointer; min-width:28px; text-align:left; }
#track-title { max-width:25%; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
#music-progress { flex:1; min-width:30px; height:12px; margin:0; accent-color:#000; }
#soundcloud-audio { position:absolute; width:1px; height:1px; opacity:0; pointer-events:none; }
@media(max-width:600px) { .player {left:20px;right:20px;gap:8px;} }

#entry-screen { position:fixed; inset:0; z-index:100; background:#fff; display:grid; place-items:center; }
#enter-archive { width:min(72vw,900px); padding:0; border:0; background:none; color:#000; cursor:pointer; font:inherit; }
#enter-archive img { display:block; width:100%; height:auto; max-height:70svh; object-fit:contain; }
#enter-archive span { display:block; margin-top:16px; }
.awaiting-entry > :not(#entry-screen):not(script) { visibility:hidden; }
#enter-archive:focus-visible { outline:1px solid #000; outline-offset:8px; }

nav ul { align-items:flex-start; }
nav li { text-align:center; }
nav li a { display:block; text-align:center; }
.category-name { display:block; }
.category-context { display:block; margin-top:4px; font-size:6pt; line-height:1.2; text-align:center; }

nav a.library-link, nav a.library-link:visited {color:#888;}
.library-login {margin:80px auto;max-width:260px;text-align:center;}
.library-login form {display:flex;flex-direction:column;align-items:center;gap:12px;}
.library-login input {border:1px solid #aaa;border-radius:0;background:#fff;padding:5px;font:inherit;width:180px;}
.library-login button {border:0;background:none;padding:4px 8px;font:inherit;cursor:pointer;}
.library-login button:hover {text-decoration:underline;}

[hidden] {display:none !important;}
#entry-screen .entry-content {width:min(72vw,900px);}
#entry-screen .entry-content > img {display:block;width:100%;max-height:70svh;object-fit:contain;}
#entry-screen nav {display:flex;justify-content:center;gap:32px;margin-top:16px;}
.mode-whatever .stage {width:min(94vw,1200px);height:calc(100svh - 90px);aspect-ratio:auto;margin:0 auto;}
.mode-whatever main {padding:0;}

.index-header {display:flex;align-items:baseline;justify-content:space-between;}
#entry-screen .entry-content {width:auto;}
#entry-screen nav {margin-top:0;}

#whatever-entry {display:inline-block;min-width:130px;text-align:center;}

body.reference-flash {background:#000;color:#fff;}
html:has(body.reference-flash) {background:#000;}
.reference-flash #work-link {background:#000;}
.reference-flash .player {background:#000;color:#fff;}
.reference-flash .player a,.reference-flash .player button {color:#fff;}
.reference-flash #music-progress {accent-color:#fff;}

.image-agenda {position:fixed;top:24px;left:24px;margin:0;color:#000;z-index:2;font:inherit;}
.reference-flash .image-agenda {color:#fff;}
.image-loading {outline:1px solid #b5b5b5;outline-offset:-1px;background:#f4f4f4 !important;}
.reference-flash .image-loading {outline-color:#555;background:#151515 !important;}
@media(max-width:600px){.image-agenda{top:20px;left:20px;}}

.image-agenda {left:0;right:0;width:100%;text-align:center;font-size:10pt;line-height:1.2;pointer-events:none;}
@media(max-width:600px){.image-agenda{left:0;right:0;}}

.mode-index .stage {width:50vw;height:50svh;aspect-ratio:auto;margin:0 auto 28px;}
.route-nav {display:flex;justify-content:center;align-items:baseline;gap:12px;flex-wrap:wrap;}
.route-nav ul {display:inline-flex;gap:20px;}
.route-breadcrumb {display:inline-flex;gap:8px;flex-wrap:wrap;}

.back-control{position:fixed;left:12px;top:50%;transform:translateY(-50%);font:inherit;font-size:10px;border:0;background:none;padding:4px;color:inherit;cursor:pointer;z-index:20;}.back-control:hover{text-decoration:underline;}.entrance .back-control{display:none;}

.header-links{display:flex;gap:16px;align-items:baseline;}.header-links a{font:inherit;}

.portfolio-link,.portfolio-link:visited{display:block;flex-basis:100%;color:#888;text-align:center;margin-top:12px;}

#work-link{position:relative;}

.mode-whatever main{padding-top:40px;}.mode-whatever .stage{height:calc(100svh - 130px);}

.map-agenda{position:fixed;top:24px;left:0;right:0;margin:0;text-align:center;font-size:10pt;line-height:1.25;pointer-events:none;z-index:2;}

#entry-screen nav a{font-size:20px;}

body:has(#image-map):not(.map-detail-open){overflow:hidden;}
.map-stage{position:fixed;inset:85px 42px 100px;}
#image-map{display:block;width:100%;height:100%;touch-action:none;outline:none;}
.map-joystick{position:fixed;right:36px;bottom:85px;width:76px;height:76px;border:1px solid #aaa;border-radius:50%;background:#ffffffdd;display:grid;place-items:center;touch-action:none;cursor:grab;}
.map-joystick span{display:block;width:24px;height:24px;border:1px solid #777;border-radius:50%;background:#fff;pointer-events:none;}
.map-joystick:active{cursor:grabbing;}.map-joystick:focus-visible{outline:1px solid #000;outline-offset:4px;}
.map-hint{position:fixed;right:36px;bottom:66px;width:76px;text-align:center;color:#888;pointer-events:none;}
body:has(#image-map) .route-nav{position:fixed;left:0;right:0;bottom:62px;pointer-events:none;}
body:has(#image-map) .route-nav a{pointer-events:auto;}
body:has(#image-map):not(.map-detail-open) .map-detail{display:none;}
.map-detail-open .map-stage{display:none;}
@media(max-width:600px){.map-stage{inset:90px 24px 110px}.map-joystick{right:22px;bottom:90px}.map-hint{right:22px;bottom:72px}.map-agenda{top:48px;}}

.map-joystick{left:50%;top:50%;right:auto;bottom:auto;transform:translate(-50%,-50%);width:64px;height:64px;background:rgba(255,255,255,.12);border-color:rgba(80,80,80,.5);z-index:3;}
.map-joystick span{background:rgba(255,255,255,.4);width:18px;height:18px;}
.map-hint{left:50%;top:calc(50% + 42px);right:auto;bottom:auto;transform:translateX(-50%);width:100px;}

.map-agenda,.image-agenda,.map-hint{background:transparent;}

.map-joystick{top:auto;bottom:100px;transform:translateX(-50%);}
.joystick-instructions{position:absolute;left:-28px;top:-28px;width:120px;height:120px;overflow:visible;pointer-events:none;background:transparent;}
.joystick-instructions text{font:10px "Times New Roman",Times,serif;fill:#333;}

body:has(#image-map):not(.map-detail-open) .map-stage{inset:0 0 48px;}
body:has(#image-map) .index-header{position:relative;z-index:4;background:transparent;}
body:has(#image-map) .map-agenda{z-index:4;background:transparent;}
body:has(#image-map) .route-nav{z-index:4;background:transparent;}
.map-joystick{left:auto;right:48px;top:auto;bottom:100px;transform:none;isolation:isolate;background:#fff;}
.map-joystick::before{content:"";position:absolute;inset:-28px;background:#fff;border-radius:50%;z-index:-1;pointer-events:none;}
.joystick-instructions{background:transparent;}
@media(max-width:600px){.map-joystick{right:42px;bottom:100px;}}

#image-map{pointer-events:none;touch-action:auto;}
.map-stage{pointer-events:none;}
.map-joystick,.map-random-drop{pointer-events:auto;}
.map-random-drop{position:fixed;left:20px;bottom:72px;width:120px;height:120px;border:1px solid #aaa;border-radius:50%;background:#fff;color:#000;font:inherit;font-size:10px;line-height:1.5;cursor:pointer;z-index:5;}
.map-random-drop:hover{border-color:#000;}.map-random-drop:focus-visible{outline:1px solid #000;outline-offset:5px;}
.map-random-drop[aria-busy=true]{cursor:progress;}
@media(max-width:600px){.map-random-drop{left:14px;}}

#entry-screen nav{gap:120px;}
@media(max-width:600px){#entry-screen nav{gap:60px;}}

/* Dark image-bank map; controls keep their white surfaces. */
body:has(#image-map):not(.map-detail-open){background:#000;color:#fff;}
body:has(#image-map):not(.map-detail-open) .map-stage{background:#000;}
body:has(#image-map):not(.map-detail-open) .index-header a,
body:has(#image-map):not(.map-detail-open) .map-agenda,
body:has(#image-map):not(.map-detail-open) .route-nav,
body:has(#image-map):not(.map-detail-open) .route-nav a,
body:has(#image-map):not(.map-detail-open) .back-control,
body:has(#image-map):not(.map-detail-open) .player,
body:has(#image-map):not(.map-detail-open) .player a,
body:has(#image-map):not(.map-detail-open) #music-toggle{color:#fff;background:transparent;}
body:has(#image-map):not(.map-detail-open) .map-random-drop,
body:has(#image-map):not(.map-detail-open) .map-joystick{color:#000;background:#fff;border-color:#aaa;}
body:has(#image-map):not(.map-detail-open) .map-random-drop:focus-visible,
body:has(#image-map):not(.map-detail-open) .map-joystick:focus-visible{outline-color:#fff;}
body:has(#image-map):not(.map-detail-open) #music-progress{accent-color:#fff;}

html:has(body #image-map):not(:has(body.map-detail-open)){background:#000;}

.mode-index nav[aria-label="work categories"] a:not([href="/image-bank/"]),
.mode-index nav[aria-label="work categories"] a:not([href="/image-bank/"]):visited{color:#999;}
body.mode-index:not(.route-page) .header-links a{color:#999;}
.mode-index nav[aria-label="work categories"] a[href="/image-bank/"],
.mode-index nav[aria-label="work categories"] a[href="/image-bank/"]:visited{color:#000;}

html:has(body.reference-page),html:has(body.reference-flash){background:#000;}
body.reference-page{background:#000;color:#fff;}
body.reference-page a,body.reference-page a:visited,
body.reference-page .map-agenda,body.reference-page .back-control,
body.reference-page .player,body.reference-page #music-toggle,
body.reference-page .library-login button{color:#fff;background:transparent;}
body.reference-page #work-link{background:#000;}
body.reference-page .library-login input{background:#000;color:#fff;border-color:#888;}
body.reference-page #music-progress{accent-color:#fff;}

.map-open-image{position:fixed;left:50%;bottom:95px;transform:translateX(-50%);z-index:5;pointer-events:auto;border:1px solid #aaa;border-radius:50%;width:76px;height:76px;background:#fff;color:#000;font:inherit;font-size:10px;cursor:pointer;}
.map-open-image:disabled{color:#888;cursor:default;}
.map-open-image:focus-visible{outline:1px solid #fff;outline-offset:5px;}

.map-loading{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);margin:0;color:#fff;background:transparent;font:inherit;z-index:4;}
.map-loading button{background:transparent;color:#fff;border:0;text-decoration:underline;font:inherit;pointer-events:auto;cursor:pointer;}
.map-joystick:disabled,.map-random-drop:disabled{pointer-events:none;}

.mode-index #work-link{background:transparent;border:0;outline:0;}

#work-link,#work-image,#image-map{user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;}
#work-image{-webkit-user-drag:none;}

.contact-message{position:fixed;inset:0;display:grid;place-items:center;pointer-events:none;}
.contact-message p{font-size:30pt;line-height:1.2;text-align:center;margin:0;max-width:calc(100vw - 80px);}

.map-agenda .map-mode-link{display:inline-block;margin-top:8px;text-decoration:underline;pointer-events:auto;}
.map-mode-nav{display:flex;justify-content:center;gap:16px;align-items:baseline;pointer-events:auto;}
body.doomscroll-page{overflow:hidden;background:#000;color:#fff;}
html:has(body.doomscroll-page){background:#000;}
.doomscroll-page .index-header{position:relative;z-index:4;}
.doomscroll-page .map-agenda{z-index:4;}
#doom-feed{position:fixed;inset:105px 0 185px;overflow-y:auto;scroll-snap-type:y mandatory;overscroll-behavior:contain;touch-action:pan-y;scrollbar-width:none;outline:0;}
#doom-feed::-webkit-scrollbar{display:none;}
.doom-panel{height:100%;width:100%;scroll-snap-align:center;scroll-snap-stop:always;}
.doom-panel canvas{display:block;width:100%;height:100%;pointer-events:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;}
.doom-directions{position:fixed;right:48px;bottom:72px;z-index:5;display:flex;flex-direction:column;gap:8px;}
.doom-directions button{width:56px;height:56px;border:1px solid #aaa;border-radius:50%;background:#fff;color:#000;font:24px "Times New Roman",serif;cursor:pointer;}
.doom-directions button:focus-visible{outline:1px solid #fff;outline-offset:4px;}
.doom-directions button:disabled{color:#888;cursor:default;}
.doom-status button{color:#fff;background:none;border:0;text-decoration:underline;pointer-events:auto;font:inherit;cursor:pointer;}
@media(max-width:600px){#doom-feed{inset:115px 0 205px;}.doom-directions{right:28px;}.doomscroll-page .map-random-drop{width:96px;height:96px;bottom:72px;}.doomscroll-page .map-open-image{width:68px;height:68px;bottom:86px;}}

.open-image-caption{position:fixed;left:50%;bottom:74px;transform:translateX(-50%);font:inherit;font-size:10px;line-height:1.2;color:#fff;background:transparent;white-space:nowrap;pointer-events:none;z-index:5;}
@media(max-width:600px){.doomscroll-page .open-image-caption{bottom:65px;}}

.doom-directions button[data-doom-auto]{font-size:10px;line-height:1.15;}

/* Expanded route branches keep each selected ancestor visible. */
.route-nav.route-tree{align-items:flex-start;flex-wrap:nowrap;gap:18px;min-height:160px;line-height:1.5;}
.route-tree .branch-column{display:flex;flex-direction:column;align-items:flex-start;gap:14px;}
.route-tree ul.branch-children{display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;flex-wrap:nowrap;gap:12px;margin:0;padding:0;}
.route-tree li.branch-row{display:flex;align-items:flex-start;gap:18px;text-align:left;white-space:nowrap;}
.route-tree a{text-align:left;display:inline-block;}
.route-tree a.branch-selected{text-decoration:underline;text-underline-offset:5px;text-decoration-thickness:1px;}
.route-tree .branch-portfolio{margin-top:8px;}
.route-tree .portfolio-link{margin:0;color:#888;}
@media(max-width:600px){.route-nav.route-tree{gap:12px;}.route-tree li.branch-row{gap:12px;}}

.phone-gallery-page main{padding:0;}
#photo-gallery{position:fixed;inset:80px 24px 170px;overflow:hidden;touch-action:pan-y;}
.photo-grid-track{display:grid;grid-auto-flow:column;grid-template-rows:repeat(var(--rows,3),var(--tile,160px));grid-auto-columns:var(--tile,160px);gap:12px;width:max-content;will-change:transform;}
.photo-grid-track a{display:block;width:100%;height:100%;overflow:hidden;}
.photo-grid-track img{width:100%;height:100%;object-fit:cover;display:block;}
.phone-gallery-page .route-tree{position:fixed;bottom:55px;left:0;right:0;min-height:0;max-height:100px;overflow:auto;background:#fff;}
.phone-gallery-page.photo-detail .stage{height:65svh;width:80vw;}
@media(max-width:600px){#photo-gallery{inset:75px 20px 185px;}}

.photo-grid-track{gap:32px;}
.photo-grid-track a{display:flex;align-items:center;justify-content:center;overflow:visible;}
.photo-grid-track img{width:auto;height:auto;max-width:100%;max-height:100%;object-fit:contain;}

.phone-gallery-page .route-tree{max-height:160px;}
#photo-gallery{bottom:220px;}

.photo-grid-track{align-self:center;}
#photo-gallery{display:flex;align-items:center;}

.photo-grid-track{gap:40px;}

.mode-whatever #work-link{background:transparent;border:0;outline:0;padding:0;}

.archive-browser{max-width:1100px;margin:80px auto;padding:0 20px 70px;}.archive-items{list-style:none;padding:0;}.archive-items li{margin:10px 0;display:flex;align-items:baseline;gap:8px;overflow-wrap:anywhere;}.archive-checkbox{width:11px;height:11px;accent-color:#888;cursor:pointer;flex:none;}.archive-session-controls{position:fixed;left:24px;bottom:44px;z-index:25;font:10px 'Times New Roman',serif;display:flex;gap:5px;align-items:baseline;background:transparent;color:inherit;}.archive-session-controls form{display:inline;}.archive-session-controls button{font:inherit;color:inherit;border:0;background:none;padding:0;cursor:pointer;}.admin-route-label{display:inline-flex;align-items:baseline;gap:6px;}.admin-photo-cell{position:relative;width:100%;height:100%;}.admin-photo-cell>.archive-checkbox{position:absolute;right:0;top:0;z-index:4;}.pending-file{color:#888;}.archive-breadcrumb{margin-bottom:24px;}.admin-save-state{margin-left:8px;color:#888;}.archive-browser .library-login{margin:0 auto;}
