*{box-sizing:border-box}body{margin:0;background:#101211;color:#fff;font:14px/1.5 system-ui,sans-serif}main{height:100svh;overflow:hidden}#photo,#photoPrevious{position:absolute;width:100%;height:100%;object-fit:cover;object-position:center;transition:opacity .5s,transform .5s ease}body.fit #photo,body.fit #photoPrevious{object-fit:contain}.shade{position:absolute;inset:0;pointer-events:none;background:linear-gradient(180deg,rgba(0,0,0,.38),transparent 24%,transparent 40%,rgba(0,0,0,.7))}button,a{-webkit-tap-highlight-color:transparent}button{color:inherit;font:inherit;cursor:pointer;border:1px solid #ffffff3d;background:#181b1b66;backdrop-filter:blur(14px);border-radius:24px;min-height:44px;padding:9px 17px}button:hover{background:#ffffff2b}button:focus-visible,a:focus-visible{outline:2px solid white;outline-offset:4px}header{position:absolute;top:max(26px,env(safe-area-inset-top));left:36px;right:36px;display:flex;justify-content:space-between;align-items:center}.brand{font-size:32px;letter-spacing:-2px;font-weight:650;color:white;text-decoration:none;text-shadow:0 1px 12px #0005}.brand span{font-size:10px;letter-spacing:0;vertical-align:top;margin-left:5px}.tools{display:flex;gap:8px}#help{width:44px;padding:0}.caption{position:absolute;bottom:272px;left:40px;pointer-events:none;text-shadow:0 2px 15px #0008}.eyebrow{font-size:9px;letter-spacing:2.2px;font-weight:600;opacity:.75}h1{font:400 clamp(28px,3.2vw,49px)/1.15 Georgia,serif;margin:10px 0}#status{margin:0;color:#ddd;font-size:12px}.explore{position:absolute;bottom:86px;right:40px;width:min(490px,calc(100% - 80px))}.palette-line{display:flex;align-items:center;gap:15px;margin-bottom:18px}#palette{display:flex;gap:9px}#palette button{min-height:26px;width:26px;height:26px;padding:0;border:2px solid #fff7;border-radius:50%;box-shadow:0 1px 5px #0005}#palette button[aria-pressed=true]{outline:2px solid white;outline-offset:4px}#clear{padding:0 8px;min-height:30px;font-size:11px}.next-heading{display:flex;justify-content:space-between;margin-bottom:10px}#direction{font-size:10px;color:#d4d4d4}#connections{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.card{padding:0;border-radius:7px;overflow:hidden;text-align:left;background:#12151599}.card img{width:100%;height:76px;display:block;object-fit:cover}.card span{display:block;padding:7px 9px;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}footer{position:absolute;bottom:max(22px,env(safe-area-inset-bottom));left:36px;right:36px;display:flex;gap:8px;align-items:center}footer button{font-size:11px}#shuffle{margin-left:auto}#count{padding-left:9px;opacity:.6}.ui,.shade{transition:opacity .6s}body.quiet .ui,body.quiet .shade,body.idle .ui,body.idle .shade{opacity:0;pointer-events:none}body:has(:focus-visible) .ui{opacity:1;pointer-events:auto}dialog{background:#181c1b;color:#eee;border:1px solid #ffffff30;border-radius:16px;padding:40px;max-width:520px;width:calc(100% - 32px);max-height:80svh}dialog::backdrop{background:#0008;backdrop-filter:blur(8px)}dialog h2{font:36px Georgia,serif}dialog p{line-height:1.8;color:#ddd}.muted{font-size:12px;opacity:.6}.close{position:absolute;right:12px;top:12px;padding:0;width:36px;min-height:36px}#history{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}#history img{width:100%;height:70px;object-fit:cover}#history button{padding:3px;border-radius:6px;font-size:10px}#error{position:absolute;inset:40%;background:#222;padding:20px;z-index:5}button:disabled{opacity:.35;cursor:default}@media(min-width:900px){.caption{bottom:110px;max-width:40%}}@media(max-width:600px){header{left:20px;right:20px;top:max(16px,env(safe-area-inset-top))}.brand{font-size:28px}.tools button{font-size:11px}.caption{left:22px;bottom:276px}.caption .eyebrow{font-size:8px}h1{font-size:30px}.explore{left:22px;right:22px;width:auto;bottom:84px}.palette-line{gap:12px;margin-bottom:16px}.eyebrow{letter-spacing:1.6px;font-size:8px}#direction{font-size:9px}.card img{height:66px}.card span{font-size:9px;padding:7px}footer{left:16px;right:16px;bottom:max(18px,env(safe-area-inset-bottom));gap:6px}footer button{font-size:10px;padding:8px 12px}dialog{padding:30px 23px}}@media(max-height:500px){.caption{bottom:90px;max-width:38%}.caption .eyebrow{display:none}.explore{width:45%;bottom:74px;left:auto;right:22px}.palette-line{margin-bottom:6px}.card img{height:42px}.next-heading{margin-bottom:4px}header{top:10px}h1{font-size:26px}footer{bottom:10px}}@media(prefers-reduced-motion:reduce){*{transition:none!important}}

#palette button{position:relative}#palette button::after{content:"";position:absolute;inset:-10px}
#palette{gap:18px}.palette-line{flex-wrap:wrap}#palette button::after{inset:-8px}

.journey-tools{display:flex;align-items:center;gap:8px;min-width:0}
.icon-button{width:44px;min-width:44px;height:44px;padding:11px;display:inline-flex;align-items:center;justify-content:center}
.icon-button svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.icon-button svg[hidden]{display:none}
#autoplay[aria-pressed=true]{background:#ffffff30;border-color:#ffffffa0}
#notice{position:fixed;bottom:90px;left:50%;transform:translateX(-50%);padding:10px 18px;border:1px solid #ffffff40;border-radius:24px;background:#181c1bf2;color:white;font-size:12px;z-index:10;pointer-events:none;white-space:nowrap}
#shareUrl{width:100%;margin-top:8px;padding:12px;background:#101211;border:1px solid #ffffff60;border-radius:6px;color:white;font:inherit}
@media(max-width:600px){.journey-tools{gap:4px}footer{gap:4px}footer button{padding-left:9px;padding-right:9px}.icon-button{padding:11px}#trailButton{white-space:nowrap}#shuffle{font-size:9px;padding-left:8px;padding-right:8px}}
@media(max-width:359px){footer{flex-wrap:wrap}.explore{bottom:132px}.caption{bottom:324px}#shuffle{margin-left:auto}}

@media(max-width:400px){#shuffle{font-size:0;width:44px;min-width:44px;padding:10px}#shuffle::after{content:"↗";font-size:17px}}

.icon-button{color:#fff;flex-shrink:0}
.icon-button>span{display:inline-flex;align-items:center;justify-content:center}
.icon-button>span[hidden]{display:none}
#autoplay .play-icon svg{fill:currentColor;stroke:none}
#autoplay .pause-icon svg{stroke-width:3}

#photoPrevious{pointer-events:none;transition:none}#photoPrevious[hidden]{display:none}

.credit-link{color:inherit;text-underline-offset:3px;text-decoration-color:#ffffff80}.credit-link:hover{text-decoration-color:currentColor}body:not(.quiet):not(.idle) .credit-link{pointer-events:auto}


.info-symbol{font:600 21px/1 Georgia,serif}
.photo-details{position:fixed;inset:auto 28px 82px auto;margin:0;width:min(460px,calc(100vw - 48px));max-height:calc(100svh - 120px);padding:32px;animation:details-appear .18s ease-out}
.photo-details h2{font-size:30px;margin:12px 24px 14px 0;overflow-wrap:anywhere}
#detailsDescription{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.7}
.photo-details .details-note{font-size:12px;color:#b7c0bb;line-height:1.6}
#detailsTags{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0}
#detailsTags button{min-height:44px;padding:8px 13px;font-size:12px;overflow-wrap:anywhere;max-width:100%}
#detailsTags button[aria-pressed=true]{border-color:#fff;background:#ffffff26}
#detailsRelated{margin-top:22px;border-top:1px solid #ffffff26;padding-top:16px}
#detailsRelated[hidden]{display:none}
#detailsRelatedTitle{font-size:13px;font-weight:500;overflow-wrap:anywhere}
#detailsConnections{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
#detailsConnections .card span{white-space:normal;font-size:11px}
#detailsConnections .card img{height:90px}
@keyframes details-appear{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:600px){.photo-details{inset:auto 0 0;margin:0;width:100%;max-width:none;max-height:80svh;border-radius:20px 20px 0 0;padding:28px 24px max(24px,env(safe-area-inset-bottom));animation:details-slide .2s ease-out}.photo-details h2{font-size:28px}#trailButton{font-size:9px;padding-left:8px;padding-right:8px}#count{padding-left:5px}}
@keyframes details-slide{from{transform:translateY(32px);opacity:0}to{transform:translateY(0);opacity:1}}
@media(prefers-reduced-motion:reduce){.photo-details{animation:none}}


#status{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media(max-width:899px){.caption{max-width:calc(100% - 44px)}}


/* Keep vertical gestures and pinch zoom native; reserve horizontal photo drags. */
#photo{touch-action:pan-y pinch-zoom;user-select:none;-webkit-user-select:none;-webkit-user-drag:none}

#heart[aria-pressed=true]{color:#ffb6c7;border-color:#ffb6c780}
#heart[aria-pressed=true] svg{fill:currentColor;animation:heart-pulse .25s ease-out}
#heart:disabled{opacity:.7}
@keyframes heart-pulse{50%{transform:scale(1.15)}}
@media(prefers-reduced-motion:reduce){#heart svg{animation:none!important}}

/* Keep the journey heading and close control outside the scrolling photo grid. */
#journey[open]{display:flex;flex-direction:column;overflow:hidden}
#journey .journey-heading{flex:none;display:flow-root;padding-right:28px}
#journey #history{flex:0 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;align-content:start;grid-auto-rows:max-content;padding:6px;margin:-6px;scrollbar-gutter:stable}
@media(max-height:500px){#journey h2{margin:12px 0 18px}}

/* Match the journey's desktop scrollbar to the modal palette. */
#journey #history{color-scheme:dark;scrollbar-color:#718078 #181c1b}
#journey #history::-webkit-scrollbar{width:12px}
#journey #history::-webkit-scrollbar-track{background:#181c1b}
#journey #history::-webkit-scrollbar-thumb{background:#718078;border:3px solid #181c1b;border-radius:12px}
#journey #history::-webkit-scrollbar-thumb:hover{background:#9caaa2}
#journey #history::-webkit-scrollbar-corner{background:#181c1b}
@media(forced-colors:active){
  #journey #history{scrollbar-color:auto;color-scheme:normal}
  #journey #history::-webkit-scrollbar-thumb{background:ButtonText;border-color:Canvas}
  #journey #history::-webkit-scrollbar-track,#journey #history::-webkit-scrollbar-corner{background:Canvas}
}
