/* Discrete, screen-aligned geometry with quiet marks at project corners only. */
.sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
body.map-home{overflow:hidden}
html:has(body.map-home){overflow:hidden;scrollbar-gutter:auto}
body.map-home .grid-world{height:100svh;min-height:0;display:flex;flex-direction:column;overflow:clip}
body.map-home #main{flex:1;min-height:0;display:flex}
.projects-scene{width:100%;height:100%;min-height:0;padding:0;display:flex;flex-direction:column}
.header{flex-shrink:0}
body.map-home .footer{height:64px;flex-shrink:0;border:0}
body.map-home .footer .cell{width:64px;height:64px}
.map-viewport{position:relative;flex:1;min-height:0;overflow:hidden;isolation:isolate;touch-action:none;overscroll-behavior:contain;outline:none;cursor:grab;background:var(--bg)}
.map-viewport.dragging{cursor:grabbing}
.map-filters{height:64px;flex:none;display:flex;justify-content:flex-start;gap:0;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;scroll-snap-type:x mandatory;overscroll-behavior-x:contain}
.map-filters::-webkit-scrollbar{display:none}
.map-filter{width:64px;height:64px;flex:none;display:grid;grid-template-rows:32px 16px;align-content:center;justify-items:center;gap:0;scroll-snap-align:start;color:var(--muted);font-size:var(--type);letter-spacing:0;line-height:1.4;position:relative}
.map-filter-label{width:64px;height:32px;display:grid;place-items:center;white-space:pre-line;text-align:center;line-height:1.15}
.map-filter-count{color:var(--muted)}
.map-filter[aria-pressed=true] .map-filter-label{color:var(--accent)}
.map-filter:hover .map-filter-label,.map-filter:focus-visible .map-filter-label{color:var(--text)}
.map-filter[aria-pressed=true]:after{content:'';position:absolute;width:4px;height:4px;bottom:2px;background:var(--accent)}
.map-viewport.is-filtering{cursor:progress}
.map-viewport.is-filtering .map-reveal{opacity:0!important}
.map-filter:disabled{opacity:.3;cursor:default}
.map-empty{position:absolute;inset:0;display:grid;place-items:center;text-align:center;padding:16px;color:var(--muted);pointer-events:none}
.map-lattice{position:absolute;inset:0;width:100%;height:100%;z-index:5;pointer-events:none}
/* Each project square is one light pixel, with six uniform intensity steps. */
.map-reveal{position:absolute;inset:0;z-index:1;pointer-events:none;overflow:hidden;opacity:0;transition:opacity 280ms ease}
.map-reveal-tile{position:absolute;overflow:hidden;opacity:0;transition:opacity 140ms ease}
.map-reveal img{display:block;width:100%;height:100%;object-fit:cover;max-width:none;user-select:none;filter:grayscale(1) brightness(.65);transition:filter 220ms ease}
.map-reveal-tile.is-color img{filter:grayscale(0) brightness(.85)}
.map-test-label{position:absolute;left:8px;bottom:8px;font-size:8px;line-height:1;color:#e6e6e6;text-shadow:0 1px 4px #000000,0 0 8px #000000;letter-spacing:.06em}
.map-viewport[data-pitch="16"] .map-test-label,.map-viewport[data-pitch="8"] .map-test-label{display:none}
.map-viewport.is-lit .map-reveal{opacity:1}
@media(prefers-reduced-motion:reduce){.map-reveal,.map-reveal-tile,.map-reveal img{transition:none}}
.project-grid{position:absolute;display:block;margin:0;transform:none!important;background:none;isolation:auto;transition:none}
.project-cell{position:absolute;display:grid;place-items:center;background:var(--bg);color:#bdbdbd;box-shadow:none;border:0;cursor:crosshair;user-select:none;-webkit-user-select:none;transition:color 180ms ease}
.project-cell .project-code{position:relative;z-index:6;padding:2px;background:inherit;font-size:11px;letter-spacing:.03em;line-height:1}
.project-grid.compact .project-code{font-size:9px;letter-spacing:0}
.project-grid[data-pitch="8"] .project-code{font-size:7px;color:#aaa}
.project-cell:hover,.project-cell:focus-visible,.project-cell.previewed,.project-cell.selected,.project-cell:active{color:#e6e6e6;background:var(--bg)}
.project-cell:focus-visible{outline:1px solid var(--accent);outline-offset:-4px}
.map-toolbar{height:64px;flex:none;display:flex;border:0}
.map-meta{width:128px;flex:none;display:flex;flex-direction:column;justify-content:center;text-align:center;line-height:1.5;color:var(--muted);font-size:var(--type)}
.map-active{color:var(--text)}
.map-density{color:var(--muted)}
.map-toolbar p{flex:1;display:grid;place-items:center;text-align:center;padding:0 16px;color:var(--muted);font-size:var(--type);line-height:1.6}
.map-controls{display:flex}
.map-controls button{width:64px;height:64px;display:grid;place-items:center;text-align:center;font-size:var(--type);line-height:1.4}
.map-controls button:hover{background:#141414;color:var(--text)}
.map-controls button:disabled{opacity:.3;cursor:default}
.touch-instructions{display:none}
.preview-code{font-size:var(--type);color:var(--muted)}
.preview-title{font-size:var(--type);text-transform:uppercase;max-width:100%}
.preview-location{font-size:var(--type);color:var(--muted);text-transform:uppercase}
.project-placeholder{height:auto;min-height:128px;width:256px;max-width:100%;margin-top:0;background:transparent;padding:32px 16px;color:var(--text)}
.project-placeholder .selected-project{margin-bottom:16px;color:var(--muted)}
.project-name{text-transform:uppercase;color:var(--text)}
.project-location{margin-top:16px;color:var(--muted);text-transform:uppercase}
.project-pending{margin-top:32px;color:var(--muted)}
.project-summary{max-width:512px;padding:0;margin:0 auto var(--page-gutter);text-align:center;color:var(--muted);line-height:1.8}
.project-summary:empty{display:none}
.project-gallery{width:100%;max-width:1408px;margin:auto;display:flex;flex-direction:column;gap:var(--page-gutter);align-items:center}
.project-gallery:empty{display:none}
.project-gallery img{max-width:100%;width:auto;height:auto;max-height:calc(100svh - 128px);object-fit:contain;background:#111}
.help-dialog{max-height:90svh;overflow:auto}
.help-dialog dl>div{padding:16px 0}
@media(max-width:767px){
 .map-filters{justify-content:flex-start;margin-inline:-16px;width:calc(100% + 32px)}
 .map-filter{width:64px}
 .mouse-instructions{display:none}.touch-instructions{display:inline}
 .map-toolbar{height:96px;display:grid;grid-template-columns:1fr 144px;grid-template-rows:48px 48px}
 .map-meta{width:auto;grid-column:1;grid-row:1;font-size:var(--type);display:grid;grid-template-columns:1fr;align-content:center;line-height:1.4}
 .map-meta>span:first-child{display:none}
 .map-controls{grid-column:2;grid-row:1}
 .map-toolbar p{grid-column:1 / -1;grid-row:2;padding:0 8px;font-size:10px;line-height:1.5}
 .map-controls button{width:48px;height:48px}
 .project-gallery{width:100%;gap:var(--page-gutter)}
 .help-dialog dd{font-size:10px}
 .footer-center{display:none}
 .footer-name{flex:1;text-align:left;padding-left:16px}
}
@media(hover:none),(pointer:coarse){.mouse-instructions{display:none}.touch-instructions{display:inline}.map-viewport{cursor:default}}
