:root{font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#2c2e33;background:#e6e8ec;font-synthesis:none}*{box-sizing:border-box}body{margin:0;height:100dvh;overflow:hidden}button,select,textarea{font:inherit}button,select{cursor:pointer}button{border:0;border-radius:6px;color:inherit}header{height:64px;background:#f4f5f7;display:flex;align-items:center;justify-content:space-between;padding:0 clamp(13px,2.6vw,40px);border-bottom:1px solid #d5d8de}.identity,.toolbar,.heading,.meta,.actions,.hud{display:flex;align-items:center}.identity{gap:11px}.identity strong{font-family:Georgia,serif;font-weight:500;font-size:21px;letter-spacing:-.8px}.identity small{display:block;font-size:10px;letter-spacing:.13em;text-transform:uppercase;margin-top:1px}.mark{display:grid;place-items:center;width:35px;height:37px;background:#353840;color:#f3f4f6;clip-path:polygon(0 0,100% 0,100% 72%,50% 100%,0 72%);font:italic bold 24px Georgia}.toolbar{gap:12px}.place,#notesBtn{border:1px solid #cdd1d8;background:#fff;border-radius:6px;padding:8px 12px;font-size:13px;color:#2c2e33}.place{display:flex;gap:6px;align-items:center}.place select{border:0;background:transparent;color:inherit;max-width:165px;font-weight:550}.place span{font-size:18px;line-height:1}#count{border-radius:10px;background:#e5e7ec;color:#2c2e33;font-size:11px;padding:1px 6px;margin-left:4px}main{height:calc(100% - 64px);position:relative;overflow:hidden;background:#2b2e34 url('./assets/preview.jpg?v=134') center / cover}main.loaded{background:#f4f5f7;background-image:none}#surface{position:absolute;inset:0;display:grid;place-items:center;overflow:hidden}canvas{display:block;outline:0;touch-action:none;cursor:grab}canvas:active{cursor:grabbing}.hud{position:absolute;bottom:max(20px,env(safe-area-inset-bottom));left:clamp(13px,2.6vw,40px);right:clamp(13px,2.6vw,40px);justify-content:space-between;pointer-events:none}.hud button{pointer-events:auto}.hud #hints{padding:9px 13px;background:rgba(20,22,27,.48);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);border:0;color:#ffffff;border-radius:7px;font-size:12px;box-shadow:0 6px 20px rgba(0,0,0,.18)}.hud #hints span{padding:0 5px}kbd{font:11px ui-monospace,monospace;color:inherit}#capture{background:rgba(20,22,27,.48);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);border:0;color:#ffffff;font-weight:600;padding:10px 15px;border-radius:7px;box-shadow:0 6px 20px rgba(0,0,0,.18)}#capture:hover{background:rgba(28,31,38,.64)}#capture span{padding-right:5px}#capture kbd{border:1px solid rgba(255,255,255,.28);border-radius:4px;padding:1px 4px;margin-left:6px;color:#ffffff}.primary{background:#383b42;color:#ffffff;font-weight:600;padding:11px 16px;box-shadow:0 3px 12px rgba(0,0,0,.18)}button:disabled{opacity:.5;cursor:wait}#status{position:absolute;left:50%;bottom:75px;transform:translateX(-50%);padding:9px 15px;font-size:13px;z-index:3;background:rgba(20,22,27,.52);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);color:#ffffff;box-shadow:0 8px 24px rgba(0,0,0,.20);border:0;border-radius:8px}#load{position:absolute;left:clamp(18px,3.2vw,46px);top:clamp(18px,3.2vh,44px);width:min(520px,calc(100vw - 36px));padding:22px 24px;display:grid;gap:11px;background:rgba(20,22,27,.52);backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);color:#ffffff;border:0;border-radius:12px;box-shadow:0 12px 32px rgba(0,0,0,.22);z-index:4}.splash-heading{display:grid;gap:4px}#load .splash-title{font:600 19.5px/1.30 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;letter-spacing:-.015em;color:#ffffff}.splash-subtitle{font:500 16.5px/1.35 "PingFang HK","Noto Sans TC","Microsoft JhengHei",Inter,-apple-system,sans-serif;letter-spacing:.06em;color:rgba(255,255,255,.94)}#load #loadText{font-size:13px;color:#e2e5ea}.splash-credits{margin-top:6px;padding-top:12px;border-top:1px solid rgba(255,255,255,.20);display:grid;gap:6px;font-size:13.5px;line-height:1.52;color:rgba(244,246,250,.92)}.splash-credits .splash-ver{font-size:14.5px;font-weight:600;letter-spacing:.005em;color:#ffffff}.splash-credits .splash-author{font-size:14.5px;font-weight:500;color:rgba(255,255,255,.96)}progress{width:100%;height:6px;accent-color:#d8dce4}aside{position:absolute;right:16px;top:14px;width:min(325px,calc(100% - 32px));max-height:calc(100% - 100px);overflow:auto;background:#f7f8fa;border:1px solid #d4d7de;border-radius:9px;box-shadow:0 8px 36px rgba(24,26,31,.18);padding:17px;color:#2c2e33}.heading,.meta,.actions{justify-content:space-between;gap:12px}h1{font:500 24px Georgia,serif;letter-spacing:-.5px;margin:0;color:#2c2e33}.close{background:transparent;font:24px/1 sans-serif;padding:4px 8px;color:#4a4e57}.secondary{background:#e7e9ed;color:#2c2e33;padding:9px 12px;font-size:13px;font-weight:550}#list{margin:10px 0}#list>p{font-size:14px;line-height:1.5;color:#5c6068}.entry{width:100%;background:transparent;text-align:left;display:grid;grid-template-columns:68px 1fr;gap:10px;align-items:center;padding:10px 0;border-top:1px solid #dde0e6;border-radius:0}.entry img{width:68px;height:49px;object-fit:cover;border-radius:4px}.entry strong,.entry small{display:block}.entry strong{font-size:13px;color:#2c2e33}.entry small{font-size:12px;line-height:1.35;color:#5c6068;margin-top:3px;overflow-wrap:anywhere}.entry:hover{background:#eceef2}#dot{position:absolute;transform:translate(-50%,-50%);border:2px solid white;border-radius:50%;background:#cb461f;color:white;width:21px;height:21px;display:grid;place-items:center;font:bold 14px sans-serif;pointer-events:none}.meta{font-size:11px;color:#62666e;flex-wrap:wrap;margin-bottom:14px}label[for=comment]{display:block;font-size:13px;font-weight:650;margin-bottom:6px}textarea{display:block;width:100%;resize:vertical;border:1px solid #c5c9d1;border-radius:5px;padding:10px;background:white;color:#2c2e33}.actions{margin-top:13px}#error{color:#92331d;font-size:13px;margin-top:5px}#movement{display:none}button:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #6b7280;outline-offset:2px}[hidden]{display:none!important}@media(pointer:coarse){#movement{position:absolute;bottom:18px;left:15px;display:grid;grid-template-columns:repeat(3,40px);gap:3px}#movement button{background:rgba(36,38,42,.84);color:white;height:38px;touch-action:none}#movement button:first-child{grid-column:2}#movement button:nth-child(2){grid-column:1}#hints{visibility:hidden}}@media(max-width:550px){header{height:56px}.identity strong{font-size:16px}.identity small{font-size:9px}.identity{gap:6px}.mark{width:26px;height:30px;font-size:18px}.toolbar{gap:5px}.place,#notesBtn{padding:7px 5px;font-size:11px}.place select{width:94px}.place span{display:none}main{height:calc(100% - 56px)}.hud #hints{font-size:10px}#capture{font-size:12px;padding:10px}#capture kbd{display:none}}

#version{display:inline-block;margin-left:.25em;color:#5c6068;font-variant-numeric:tabular-nums;letter-spacing:.04em;text-transform:none}
#refreshBuild{margin-left:.5em;background:#e6e8ec;color:#2c2e33;padding:2px 5px;font-size:10px;letter-spacing:0}

#original,.sun-control,#tourBtn,#soundBtn,#shareBtn,#photoBtn,#creditsBtn{border:1px solid #cdd1d8;background:#fff;border-radius:6px;padding:8px 10px;font-size:13px;color:#2c2e33}
#tourBtn,#soundBtn,#shareBtn,#photoBtn,#creditsBtn{font-size:12.5px;font-weight:600;white-space:nowrap}
#creditsBtn{padding:8px 12px;font-size:13px;color:#2c2e33}
#shareBtn:hover,#photoBtn:hover,#tourBtn:hover,#soundBtn:hover,#creditsBtn:hover{background:#eef0f4}
#original[aria-pressed=true],#tourBtn[aria-pressed=true],#soundBtn[aria-pressed=true],#creditsBtn[aria-pressed=true]{background:#353840;color:white;border-color:#353840}.sun-control{display:flex;align-items:center;gap:6px}.sun-control span{font-size:11px;color:#5c6068}.sun-control select{border:0;background:transparent;color:inherit}
.floor-badge{display:none!important}
.credits-card{position:absolute;right:clamp(14px,2.4vw,32px);top:12px;width:min(512px,calc(100vw - 28px));max-height:calc(100% - 28px);overflow-y:auto;padding:21px 24px;display:grid;gap:10px;background:rgba(20,22,27,.52);backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);color:#ffffff;border:0;border-radius:12px;box-shadow:0 12px 34px rgba(0,0,0,.22);z-index:12}
.credits-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}
.credits-card .splash-title{font:600 18.5px/1.30 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;letter-spacing:-.015em;color:#ffffff}
.credits-card .splash-subtitle{font-size:16px}
.credits-card .splash-credits{font-size:14px;line-height:1.55;gap:6px}
.credits-card .splash-credits .splash-ver{font-size:15px}
.credits-card .splash-credits .splash-author{font-size:15px}
.credits-music{margin-top:8px;padding-top:11px;border-top:1px solid rgba(255,255,255,.18);display:grid;gap:7px;font-size:13.5px;line-height:1.56;color:rgba(244,246,250,.94)}
.credits-music-heading{font-size:14.5px;font-weight:650;letter-spacing:.02em;color:#ffffff}
.credits-music-title{font-size:14.5px;font-weight:600;color:#ffffff}
.credits-music a{color:#9fd0ff;text-decoration:underline;text-underline-offset:2px}
.credits-music a:hover{color:#cde7ff}
#creditsClose{background:transparent;color:#cfd3da;font-size:16px;padding:2px 6px;line-height:1;flex:none}
#creditsClose:hover{color:#ffffff;background:rgba(255,255,255,.10)}
#reference{position:absolute;inset:0;margin:0;background:#f4f5f7;display:grid;place-items:center;z-index:1}#referenceImage{display:block;width:100%;height:100%;object-fit:contain;min-height:0}
#reference figcaption{position:absolute;bottom:18px;left:50%;transform:translateX(-50%);border-radius:7px;padding:7px 11px;background:rgba(20,22,27,.50);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);border:0;color:#fff;font-size:12px;display:flex;align-items:center;gap:10px;max-width:90%;overflow-wrap:anywhere}
#reference figcaption button{padding:6px 9px;background:#e6e8ec;color:#2c2e33;white-space:nowrap}#notes{z-index:4}
@media(max-width:780px){.sun-control span{display:none}.toolbar{gap:5px}.place select{max-width:135px}#original,.sun-control,#tourBtn,#soundBtn,#shareBtn,#photoBtn,#creditsBtn{font-size:11px;padding:7px 6px}.floor-badge{height:32px;padding:0 6px;font-size:10.5px}}
@media(max-width:570px){header{height:auto;min-height:74px;flex-wrap:wrap;padding-block:5px;row-gap:4px}.identity{width:100%;height:27px}.identity small{display:inline;margin-left:7px}.identity strong{font-size:15px}.identity .mark{width:20px;height:23px}.toolbar{width:100%;justify-content:flex-end}.place{flex:1;min-width:0}.place select{width:100%;max-width:100%}main{height:calc(100% - 74px)}#reference figcaption{font-size:10px}}

@media (max-width:920px) {
  #curtainControl {position:fixed;top:70px;right:10px;z-index:2;background:#f4f5f7}
  #curtainControl span {display:inline}
}
@media (min-width:571px) and (max-width:640px) {
  .place select {max-width:95px}
}
@media (max-width:570px) {
  #curtainControl {top:82px}
  .sun-control #daylight {max-width:76px}
}

.archived-capture,.pinned-capture{display:block;width:fit-content;margin:0 0 10px 78px;color:#4a4e57;font-size:12px;text-underline-offset:2px}
#savedCapture{color:#e6e8ec;text-underline-offset:2px}
@media(max-width:570px){
  #reference figcaption:has(#savedCapture:not([hidden])){width:90%;display:grid;grid-template-columns:1fr auto;gap:2px 8px}
  #reference figcaption:has(#savedCapture:not([hidden])) #referenceCredit{grid-column:1/-1}
  #savedCapture:not([hidden]){display:flex;align-items:center;min-height:36px;width:fit-content}
}

#referenceImage{cursor:crosshair}
#reference[data-archived=true] #referenceImage{cursor:default}

#photoPins,#draftPhotoPins{position:absolute;inset:0;pointer-events:none}
.image-pin{pointer-events:auto;position:absolute;transform:translate(-50%,-50%);min-width:24px;height:24px;padding:0 3px;display:grid;place-items:center;border-radius:50%;border:2px solid white;color:white;background:#ad431d;font:bold 12px sans-serif;box-shadow:0 1px 4px rgba(0,0,0,.45)}
.image-pin[aria-pressed=true]{background:#b83c18;outline:2px solid #2c2e33}
#pinControls,#pinChoices{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
#pinControls{margin:0 0 10px}
.pin-tab,#pinControls .secondary{padding:5px 9px;font-size:13px}
.pin-tab{border-radius:50%;background:#e7e9ed;color:#2c2e33}
.pin-tab[aria-pressed=true]{background:#353840;color:white}
#photoReadout{flex-basis:100%;order:2;text-align:center;white-space:pre-wrap;max-height:6em;overflow:auto;max-width:min(65vw,620px)}
#reference figcaption:has(#photoReadout:not([hidden])){min-width:min(540px,90%);width:max-content}

#reference figcaption{flex-wrap:wrap;justify-content:center}
#areaName{overflow-wrap:anywhere}
@media(max-width:570px){#reference figcaption{width:max-content;max-width:94%;bottom:12px}#referenceCredit{width:100%;text-align:center}}

#draftInk,.saved-ink{position:absolute;pointer-events:none}#draftInk{inset:0;width:100%;height:100%}#draftInk.drawing{z-index:2;pointer-events:auto;touch-action:none;cursor:crosshair}#viewInk{left:50%;top:50%;transform:translate(-50%,-50%)}
.ink-tools{display:flex;gap:5px;margin:0 0 10px}.ink-tools button{min-height:34px;padding:5px 11px;background:#e7e9ed;color:#2c2e33}.ink-tools [aria-pressed=true]{background:#353840;color:white}.ink-tools button:disabled{opacity:.46}

/* Give the photograph the remaining viewport in both capture modes. Controls
   occupy their own rows so the image corners can still be marked at Fit. */
#editor {
  position:fixed; inset:0; width:100%; height:100dvh; max-width:none; max-height:none;
  margin:0; padding:0; border:0; border-radius:0; overflow:hidden;
  color:#2c2e33; background:#26282d;
}
#editor::backdrop {background:#26282d}
#form {display:grid; grid-template-rows:auto minmax(0,1fr) auto; height:100%}
.editor-bar,.editor-footer {display:flex; align-items:center; gap:12px; background:#f4f5f7}
.editor-bar {
  padding:max(6px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) 6px max(12px,env(safe-area-inset-left));
  border-bottom:1px solid #d4d7de;
}
.editor-title {min-width:0; flex:1}
.editor-title h1 {font-size:20px}
.editor-title small {display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#5c6068; font-size:11px}
#editor .ink-tools,.zoom-tools {display:flex; align-items:center; flex:none; gap:3px; margin:0}
#editor .ink-tools button,.zoom-tools button {min-height:36px; padding:4px 10px; font-size:13px}
.zoom-tools {border-left:1px solid #d4d7de; padding-left:10px}
.zoom-tools button {background:#e7e9ed; color:#2c2e33}
#zoomIn,#zoomOut {min-width:32px; font-size:19px}
#zoomLevel {min-width:4ch; text-align:center; font:12px ui-monospace,monospace}
#editor button:disabled {cursor:default}
#annotationViewport {position:relative; min-height:0; overflow:hidden; touch-action:none; user-select:none; overscroll-behavior:contain}
#still {position:absolute; top:0; left:0; line-height:0; transform-origin:top left}
#snapshot {display:block; width:100%; height:100%; max-width:none; max-height:none; cursor:crosshair; -webkit-user-drag:none}
#snapshot:focus {outline:0}
#annotationViewport[data-tool=pan] {cursor:grab}
#annotationViewport[data-tool=pan] #still {pointer-events:none}
#annotationViewport.is-panning {cursor:grabbing}
.editor-footer {
  position:relative; flex-wrap:wrap; gap:8px 12px;
  padding:6px max(12px,env(safe-area-inset-right)) max(6px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));
  border-top:1px solid #d4d7de;
}
#editor #pinControls {min-width:0; max-width:38%; margin:0; flex-wrap:nowrap}
#editor #pinChoices {max-width:15vw; flex-wrap:nowrap; overflow-x:auto; padding:3px 1px}
#editor #pinControls button {flex:none}
.note-text {display:flex; align-items:center; gap:8px; flex:1; min-width:100px}
#editor .note-text label {position:absolute; width:1px; height:1px; clip-path:inset(50%); overflow:hidden}
#editor textarea {flex:1; min-width:0; height:36px; resize:none; padding:8px; font-size:14px; line-height:18px}
#editor .actions {margin:0; gap:6px}
#editor .actions button {white-space:nowrap}
#editor .primary {padding:9px 13px; box-shadow:none; font-size:13px}
#editor #error:not(:empty) {position:absolute; bottom:calc(100% + 5px); right:8px; max-width:calc(100% - 16px); margin:0; padding:7px 10px; border-radius:5px; background:#fff4e8; pointer-events:none}
#editor #error:empty {display:none}
.screen-reader-only {position:absolute; width:1px; height:1px; margin:-1px; clip-path:inset(50%); overflow:hidden; white-space:nowrap}
@media(max-width:780px) {
  .editor-title small,#editor .ink-tools button span {display:none}
}
@media(max-width:620px) {
  .editor-title {position:absolute; width:1px; height:1px; clip-path:inset(50%); overflow:hidden}
  .editor-bar {justify-content:space-between; gap:4px; padding-inline:max(5px,env(safe-area-inset-left)) max(5px,env(safe-area-inset-right))}
  #editor .ink-tools button,.zoom-tools button {padding:4px 6px; font-size:12px}
  .zoom-tools {padding-left:4px}
  #zoomIn,#zoomOut {min-width:25px; font-size:17px}
  #editor .close {padding:4px}
  .editor-footer {gap:4px 6px}
  #editor #pinControls {flex-basis:100%; max-width:100%}
  #editor #pinChoices {max-width:46vw}
  #editor .actions button {padding:8px; font-size:12px}
}

/* Unified smooth neutral-grey progress bars for initial campus load & all background/asset loads */
#load progress{appearance:none;-webkit-appearance:none;width:100%;height:7px;border-radius:999px;overflow:hidden;border:0;background:rgba(255,255,255,.20)}
#load progress::-webkit-progress-bar{background:rgba(255,255,255,.20);border-radius:999px}
#load progress::-webkit-progress-value{background:linear-gradient(90deg,#c4c9d1,#ffffff);border-radius:999px;transition:width .14s ease-out}
#load progress::-moz-progress-bar{background:linear-gradient(90deg,#c4c9d1,#ffffff);border-radius:999px}
#bgProgress{position:absolute;left:50%;bottom:74px;transform:translateX(-50%);min-width:248px;max-width:min(360px,88vw);padding:10px 14px;border-radius:10px;background:rgba(20,22,27,.52);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);color:#ffffff;box-shadow:0 8px 24px rgba(0,0,0,.20);border:0;display:grid;gap:6px;z-index:5;pointer-events:none;transition:opacity .22s ease}
#bgProgress .bgp-row{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:12px;line-height:1.25}
#bgProgress .bgp-pct{font-variant-numeric:tabular-nums;font-weight:650;color:#e6e8ec;white-space:nowrap}
#bgProgress .bgp-track{width:100%;height:6px;border-radius:999px;background:rgba(255,255,255,.18);overflow:hidden}
#bgProgress .bgp-fill{height:100%;width:0%;border-radius:999px;background:linear-gradient(90deg,#c4c9d1,#ffffff);transition:width .14s ease-out}

/* Hierarchical camera navigation. Leave the whole row to controls. */
body {display:flex; flex-direction:column}
header {flex:none; height:auto; min-height:60px; gap:12px; padding:6px clamp(8px,2vw,28px); flex-wrap:wrap}
#world {height:auto; flex:1; min-height:0}
.view-nav {display:flex; gap:8px; align-items:center; flex:1 1 345px; min-width:0}
.view-choice {display:flex; flex-direction:column; min-width:0; gap:1px; padding:2px 8px; border:1px solid #cdd1d8; border-radius:6px; background:#fff}
.view-choice:first-child {flex:0 1 150px}
.view-choice:nth-of-type(2) {flex:1; max-width:380px}
#addPreset,#removePreset {width:30px; height:36px; border:1px solid #cdd1d8; background:#fff; color:#2c2e33; font-size:17px; font-weight:650; line-height:1; flex:none; display:grid; place-items:center}
.view-nav #original {height:36px; padding:0 11px; display:inline-flex; align-items:center; white-space:nowrap; flex:none; font-size:12.5px; font-weight:600}
#addPreset:hover {background:#e7e9ed}
#removePreset:hover {background:#f6e2de; color:#8b2b1a; border-color:#d8b4ad}
.quality-control {border:1px solid #cdd1d8; background:#fff; border-radius:6px; padding:8px 10px; font-size:13px; display:flex; align-items:center; gap:6px; color:#2c2e33}
.quality-control span {font-size:11px; color:#5c6068}
.quality-control select {border:0; background:transparent; color:inherit}
#reference figcaption #removePhoto {background:#8c3227; color:#fff}
#reference figcaption #removePhoto:hover {background:#a53c2f}
.view-choice span {font-size:10px; line-height:12px; color:#5c6068}
.view-choice select {min-width:0; width:100%; height:23px; font-weight:550; color:#2c2e33; background:transparent; border:0}
header .toolbar {margin-left:auto; width:auto; flex:none; gap:6px; flex-wrap:wrap}
header #version {font-size:12.5px; font-weight:550; white-space:nowrap}
header #curtainControl {position:static}
@media(max-width:760px) {
  header {gap:4px; padding-block:4px}
  .view-nav {flex-basis:100%}
  .view-choice:first-child {flex:0 1 35%}
  .view-choice:last-child {max-width:none}
  header .toolbar {width:100%; justify-content:flex-start}
  header #version {margin-left:auto}
  header .toolbar select {max-width:100px}
}
