:root{--paper:#f7f6f0;--ink:#243d37;--muted:#596a60;--line:#dedfd5;--accent:#b46b43;--green:#2f6353;--white:#fffefa;--shadow:0 12px 40px #16281d20}*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font-family:-apple-system,BlinkMacSystemFont,"Apple SD Gothic Neo","Malgun Gothic",sans-serif;font-size:14px}button,input,a{-webkit-tap-highlight-color:transparent}button,input{font:inherit}button{cursor:pointer;color:inherit}button:disabled{cursor:default;opacity:.45}button:focus-visible,a:focus-visible,input:focus-visible,summary:focus-visible{outline:3px solid #d58f42;outline-offset:3px}button{border:0;background:none}a{color:inherit;text-underline-offset:3px}img.icon{width:20px;height:20px;display:block}button .icon{pointer-events:none}header{height:72px;display:flex;align-items:center;justify-content:space-between;padding:0 28px;border-bottom:1px solid var(--line);background:var(--paper);position:relative;z-index:5}.brand{display:flex;align-items:center;gap:13px}.brand-mark{width:36px;height:36px;border:1px solid #526d59;border-radius:50%;display:grid;place-items:center}.brand strong{font-size:21px;font-weight:650;letter-spacing:-.7px}.brand small{font-size:10px;letter-spacing:2.4px;display:block;margin-top:3px;color:var(--muted)}.header-right{display:flex;align-items:center;gap:24px;font-size:12px}.prototype{font-size:10px;letter-spacing:1.5px;padding:5px 8px;border:1px solid var(--line);border-radius:3px}.text-button{display:flex;gap:7px;align-items:center;padding:8px 0}.text-button img{width:16px;height:16px}.shell{height:calc(100dvh - 72px);display:flex}.explorer{width:278px;flex-shrink:0;background:var(--paper);border-right:1px solid var(--line);display:flex;flex-direction:column;z-index:4}.explore-head{padding:26px 22px 17px}.eyebrow{font-size:10px;letter-spacing:2px;color:var(--muted);font-weight:650}.explore-head h1{font-size:26px;font-weight:500;letter-spacing:-1px;line-height:1.35;margin:12px 0 8px}.explore-head p{font-size:12px;color:var(--muted);line-height:1.7;margin:0}.search-wrap{position:relative;margin:3px 18px 14px}.search-wrap img{position:absolute;left:12px;top:12px;width:16px;height:16px;opacity:.65}.search-wrap input{width:100%;height:40px;border:1px solid var(--line);border-radius:5px;background:var(--white);padding:0 12px 0 36px;outline-offset:1px}.filters{display:flex;gap:5px;padding:0 18px 16px;border-bottom:1px solid var(--line)}.filter{border:1px solid transparent;border-radius:4px;padding:6px 9px;font-size:11px;color:var(--muted)}.filter[aria-pressed=true]{background:var(--ink);color:#fff}.list-caption{padding:16px 22px 9px;display:flex;justify-content:space-between;color:var(--muted);font-size:10px;letter-spacing:.6px}.place-list{overflow:auto;flex:1;min-height:0;padding:0 9px 12px;scrollbar-width:thin}.place-row{width:100%;display:flex;text-align:left;align-items:center;gap:12px;padding:12px;border-radius:5px;margin:1px 0}.place-row:hover{background:#eceee5}.place-row[aria-current=true]{background:#e3e9dd}.place-row .number{width:21px;font-family:Georgia,serif;font-size:11px;color:#8b9587}.place-row .names{flex:1;min-width:0}.place-row strong{font-size:13px;font-weight:600;display:block}.place-row small{font-size:10px;color:var(--muted);display:block;margin-top:4px}.count-badge{font-size:9px;border:1px solid #bfc7b8;border-radius:3px;padding:3px 4px;white-space:nowrap}.explorer-foot{padding:13px 22px;border-top:1px solid var(--line);font-size:10px;color:var(--muted);display:flex;justify-content:space-between}.explorer-foot a{text-decoration:none}.map-area{position:relative;flex:1;min-width:0;overflow:hidden;background:#c4c6aa}#map{position:absolute;inset:0}.maplibregl-canvas:focus{outline:none}.map-top{position:absolute;z-index:2;left:24px;top:22px;display:flex;align-items:center;gap:8px}.map-tag{padding:10px 13px;background:#f7f6f0ed;backdrop-filter:blur(10px);border-radius:5px;box-shadow:var(--shadow);font-size:11px;display:flex;gap:8px;align-items:center}.map-tag .dot{width:6px;height:6px;border-radius:50%;background:var(--green)}.mobile-explore{display:none}.map-status{position:absolute;left:24px;top:73px;z-index:2;background:#f7f6f0f5;padding:10px 13px;max-width:350px;border-radius:5px;font-size:12px;box-shadow:var(--shadow);line-height:1.6}.map-status[hidden]{display:none}.detail{position:absolute;right:24px;top:22px;width:320px;max-height:calc(100% - 174px);display:flex;flex-direction:column;background:var(--white);border-radius:8px;box-shadow:var(--shadow);z-index:3;overflow:hidden}.detail-heading{padding:23px 23px 18px;border-bottom:1px solid var(--line)}.detail-top{display:flex;align-items:center;justify-content:space-between}.detail-top .eyebrow{font-size:9px;letter-spacing:1.6px}.detail-heading h2{font-size:28px;font-weight:550;letter-spacing:-1.2px;margin:12px 0 3px}.detail-heading .english{font:italic 15px Georgia,serif;color:var(--muted)}.detail-heading .title-row{display:flex;align-items:start;justify-content:space-between}.detail-toggle{padding:2px 0 2px 10px}.detail-tabs{display:flex;padding:0 23px;border-bottom:1px solid var(--line);gap:20px;flex-shrink:0}.detail-tabs button{padding:12px 0 10px;color:var(--muted);font-size:11px;border-bottom:2px solid transparent}.detail-tabs button[aria-selected=true]{color:var(--ink);border-bottom-color:var(--ink)}.detail-body{padding:19px 23px 21px;overflow:auto;scrollbar-width:thin;line-height:1.75;font-size:12px}.detail-body p{margin:0 0 14px}.scripture{padding:14px 16px;border-left:2px solid #b88057;background:#f3f1e7;margin:15px 0}.scripture small{font-size:9px;letter-spacing:1px;color:var(--muted);display:block}.scripture a{font-size:15px;font-weight:600;display:inline-block;margin:4px 0 0;text-decoration:none}.scripture a:after{content:' ↗';font-size:12px;color:var(--accent)}.detail-note{font-size:10px;color:var(--muted);line-height:1.7}.metric-row{display:flex;border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:12px 0;margin:15px 0;gap:20px}.metric-row>div{flex:1}.metric-row small{font-size:9px;color:var(--muted);display:block;margin-bottom:4px}.metric-row strong{font-size:17px;font-weight:500}.metric-row strong.compact{font-size:12px}.candidate-intro{font-size:11px;color:var(--muted);margin-bottom:12px}.candidate-btn{width:100%;border:1px solid var(--line);border-radius:4px;text-align:left;padding:10px;display:flex;gap:10px;align-items:center;margin:7px 0}.candidate-btn[aria-pressed=true]{border-color:var(--green);background:#eaf0e6}.candidate-btn span:first-child{font:14px Georgia,serif;color:var(--accent)}.candidate-btn strong{font-size:11px;font-weight:600;display:block}.candidate-btn small{display:block;font-size:9px;color:var(--muted)}.wide-button{width:100%;padding:10px;border:1px solid var(--line);border-radius:4px;font-size:11px;display:flex;gap:7px;align-items:center;justify-content:center}.wide-button img{width:15px;height:15px}.source-link{display:block;padding:10px 0;border-bottom:1px solid var(--line);text-decoration:none;font-size:11px;line-height:1.6}.source-link:after{content:' ↗';color:var(--accent)}.source-title{font-size:12px;margin:18px 0 8px}.review-label{font-size:9px;background:#edeae0;padding:3px 6px;border-radius:3px;color:#726c54}.verse-list{display:flex;gap:6px;flex-wrap:wrap;margin:12px 0}.verse-list a{font-size:10px;background:#f1f2ea;text-decoration:none;padding:4px 6px;border-radius:3px}details summary{cursor:pointer;font-size:11px}.controls{position:absolute;z-index:2;right:24px;bottom:57px;display:flex;gap:8px}.control-group{display:flex;background:var(--white);border-radius:5px;box-shadow:var(--shadow);padding:3px}.control-group button{min-width:37px;height:35px;display:flex;justify-content:center;align-items:center;gap:6px;font-size:11px;border-radius:3px}.control-group button[aria-pressed=true]{background:var(--ink);color:white}.control-group button[aria-pressed=true] img{filter:brightness(0) invert(1)}.control-group button:hover{background:#e8ecdf;color:var(--ink)}.control-group button[aria-pressed=true]:hover{background:var(--green);color:white}.control-group button.wider{padding:0 11px}.viewstrip{position:absolute;bottom:57px;left:24px;z-index:2;display:flex;gap:6px;background:#f7f6f0ef;border-radius:5px;padding:5px;box-shadow:var(--shadow)}.viewstrip button{font-size:10px;padding:9px 11px;border-radius:3px}.viewstrip button[aria-pressed=true]{background:var(--ink);color:white}.viewstrip .view-label{font-size:9px;color:var(--muted);padding:10px 9px;letter-spacing:1px}.map-footer{position:absolute;bottom:26px;left:24px;font-size:10px;color:#fff;text-shadow:0 1px 4px #000;z-index:2;pointer-events:none}.maplibregl-ctrl-attrib{font-size:9px!important;max-width:100%}.maplibregl-ctrl-bottom-right{max-width:90%}.maplibregl-ctrl-scale{background:#f7f6f0cf!important;border-color:#304639!important;font-size:9px!important}.maplibregl-ctrl-bottom-left{left:14px;bottom:43px}.maplibregl-ctrl-bottom-left .maplibregl-ctrl{margin-bottom:62px}.map-pin{pointer-events:auto;white-space:nowrap;display:flex;align-items:center;gap:6px;background:#fcfbf3ed;border:1px solid #ffffffaa;border-radius:16px;padding:5px 9px 5px 5px;box-shadow:0 3px 8px #14291d25;font-size:10px;color:#213f34}.map-pin .pin-dot{width:9px;height:9px;border-radius:50%;background:#647d59;border:2px solid white}.map-pin.ambiguous .pin-dot{background:transparent;border:1px dashed var(--accent);width:11px;height:11px}.map-pin.selected{background:var(--ink);color:#fff;border-color:#e7e8c5;font-size:11px;z-index:1}.map-pin.selected .pin-dot{background:#d0aa69}.map-pin.candidate-pin{background:#fff7e4;border-color:#bd8455;color:#604b37;padding:5px 9px}.map-pin.candidate-pin.active{background:#a7633e;color:white}.map-pin .pin-num{font:12px Georgia,serif}.measure-card{position:absolute;z-index:4;left:24px;top:77px;padding:15px 17px;background:var(--white);box-shadow:var(--shadow);border-radius:5px;max-width:330px}.measure-card[hidden]{display:none}.measure-card strong{font-size:13px;display:block;margin-bottom:7px}.measure-card p{font-size:11px;line-height:1.6;margin:0;color:var(--muted)}.measure-card button{font-size:10px;text-decoration:underline;margin-top:8px;padding:0}.measure-point{width:25px;height:25px;background:#ae623a;border:2px solid white;border-radius:50%;color:#fff;display:grid;place-items:center;font-size:11px;box-shadow:0 2px 8px #0005}.empty{font-size:12px;color:var(--muted);padding:20px;line-height:1.7}dialog{border:1px solid var(--line);border-radius:10px;padding:30px;max-width:610px;width:calc(100% - 32px);max-height:85dvh;background:var(--white);color:var(--ink);box-shadow:var(--shadow)}dialog::backdrop{background:#10271e75;backdrop-filter:blur(5px)}dialog h2{margin:0 0 18px;font-size:24px}dialog h3{font-size:13px;margin:20px 0 8px}dialog p,dialog li{font-size:12px;line-height:1.9}dialog .close-dialog{position:absolute;right:18px;top:18px;padding:5px}.modal-links{display:flex;gap:10px;flex-wrap:wrap;margin-top:22px}.modal-links a{border:1px solid var(--line);padding:8px 12px;border-radius:4px;font-size:12px}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.mobile-hint{display:none}.explorer-backdrop{display:none}.detail.collapsed .detail-tabs,.detail.collapsed .detail-body{display:none}.detail.collapsed .detail-heading{padding:17px 23px;border-bottom:0}.detail.collapsed h2{font-size:21px;margin:8px 0 0}.detail.collapsed .english{display:none}.detail.collapsed .detail-toggle img{transform:rotate(180deg)}
@media(min-width:1600px){.explorer{width:305px}.detail{width:350px}.explore-head{padding-left:27px}.place-row{padding:14px}.detail-body{font-size:13px}.viewstrip button{padding:10px 16px}}
@media(max-width:1250px){.explorer{width:245px}.detail{width:290px;right:17px}.controls{right:17px;bottom:111px}.viewstrip{bottom:51px}.map-top{left:17px}.map-footer{left:17px}.viewstrip{left:17px}.detail{max-height:calc(100% - 180px)}.viewstrip button{padding:9px 8px}.viewstrip .view-label{display:none}.maplibregl-ctrl-bottom-left .maplibregl-ctrl{margin-bottom:62px}}
@media(max-width:900px){header{height:62px;padding:0 18px}.brand strong{font-size:18px}.brand small{font-size:8px}.brand-mark{width:32px;height:32px}.header-right{gap:14px}.prototype{display:none}.shell{height:calc(100dvh - 62px)}.explorer{position:absolute;left:0;top:62px;bottom:0;width:285px;transform:translateX(-100%);transition:transform .2s;z-index:9;box-shadow:var(--shadow)}body.explorer-open .explorer{transform:translateX(0)}.explorer-backdrop{position:fixed;inset:62px 0 0;background:#0a201e66;z-index:8}body.explorer-open .explorer-backdrop{display:block}.mobile-explore{display:flex;gap:6px;align-items:center;background:var(--white);padding:10px 12px;border-radius:5px;box-shadow:var(--shadow);font-size:11px}.mobile-explore img{width:15px;height:15px}.detail{width:300px}.map-top{top:17px}.map-tag{font-size:10px}.map-status{top:65px}.controls{bottom:109px}.viewstrip{bottom:51px}}
@media(max-width:600px){.desktop-hint{display:none}.mobile-hint{display:inline}.header-right .research-link{display:none}.header-right{font-size:11px}.brand{gap:9px}.map-top{left:12px;top:12px;gap:6px}.map-tag{padding:10px;font-size:9px}.detail{top:auto;bottom:13px;left:12px;right:12px;width:auto;max-height:43%;border-radius:8px}.detail-heading{padding:14px 18px 11px}.detail-heading h2{font-size:23px;margin:7px 0 0}.detail-heading .english{font-size:12px}.detail-heading .eyebrow{font-size:8px}.detail-tabs{padding:0 18px;gap:22px}.detail-tabs button{padding:9px 0 8px;font-size:10px}.detail-body{padding:13px 18px 18px}.detail-body p{margin-bottom:10px}.detail.collapsed .detail-heading{padding:13px 18px}.detail.collapsed h2{font-size:20px}.controls{top:62px;right:12px;bottom:auto;flex-direction:column;gap:5px}.control-group{flex-direction:column}.control-group button{width:34px;height:34px;min-width:34px}.control-group button.wider{padding:0 4px}.controls .desktop-control{display:none}.viewstrip{top:62px;left:12px;bottom:auto;padding:4px;max-width:calc(100% - 72px);gap:0;flex-wrap:wrap;box-shadow:0 3px 12px #20322117}.viewstrip button{font-size:9px;padding:8px}.viewstrip button:nth-of-type(n+4){display:none}.map-footer{bottom:calc(43% + 25px);font-size:9px;left:12px;right:58px}.maplibregl-ctrl-bottom-right{bottom:0;max-width:100%}.maplibregl-ctrl-attrib{font-size:8px!important}.maplibregl-ctrl-bottom-left{bottom:43%;left:3px}.maplibregl-ctrl-bottom-left .maplibregl-ctrl{margin-bottom:43px}.map-status{top:110px;left:12px;max-width:calc(100% - 72px);font-size:11px}.measure-card{top:110px;left:12px;max-width:calc(100% - 72px)}.map-pin{font-size:9px;padding:4px 7px 4px 4px}.map-pin.selected{font-size:10px}.source-title{margin-top:12px}.metric-row{margin:10px 0;padding:10px 0}.scripture{margin:10px 0;padding:10px 12px}.maplibregl-ctrl-attrib.maplibregl-compact{min-height:20px;padding-top:0;padding-bottom:0}body.detail-collapsed .map-footer{bottom:106px}body.detail-collapsed .maplibregl-ctrl-bottom-left{bottom:123px}body.detail-collapsed .maplibregl-ctrl-bottom-left .maplibregl-ctrl{margin-bottom:0}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}

.language-toggle{display:flex;align-items:center;gap:6px;border:1px solid var(--line);border-radius:5px;padding:6px 9px;white-space:nowrap;font-size:11px;flex-shrink:0}
.language-toggle [data-language-label]{color:var(--muted)}.language-toggle .active{color:var(--ink);font-weight:750}.language-divider{color:#b9bfb2}
html[lang=en] .explore-head h1{font-size:24px;letter-spacing:-.6px}html[lang=en] .detail-heading h2{font-size:25px;letter-spacing:-.5px}html[lang=en] .brand strong{letter-spacing:-.4px}html[lang=en] .detail-tabs{gap:13px}html[lang=en] .explorer-foot{padding-left:15px;padding-right:15px}
@media(max-width:600px){header{padding:0 12px}.header-right{gap:12px}.about-label{display:none}.text-button{padding:8px 0}.language-toggle{padding:6px 8px;gap:5px}html[lang=en] .brand strong{font-size:17px}html[lang=en] .brand small{font-size:7px;letter-spacing:1px}html[lang=en] .detail-heading h2{font-size:22px}html[lang=en] .viewstrip button{padding:8px 6px}}

.zoom-resolution-note{display:block;position:absolute;z-index:3;pointer-events:none;bottom:175px;left:24px;max-width:360px;width:fit-content;margin-bottom:7px;padding:6px 9px;border-radius:4px;background:#233f36df;color:#fff7df;line-height:1.5;text-shadow:none}.zoom-resolution-note[hidden]{display:none}#view-imagery-retry{pointer-events:auto;display:block;margin-top:6px;padding:6px 10px;min-height:36px;background:#fff7e8;color:#203b33;border:0;border-radius:3px;font:inherit;cursor:pointer}#view-imagery-retry[hidden]{display:none}
@media(max-width:600px){.zoom-resolution-note{left:12px;bottom:calc(45% + 50px);max-width:calc(100% - 76px);width:250px;font-size:10px}body.zoom-magnified .maplibregl-ctrl-bottom-left{transform:translateY(-48px)}}.ux-reading .zoom-resolution-note{visibility:hidden}

.imagery-notice{position:absolute;z-index:2;left:24px;top:73px;max-width:330px;padding:9px 12px;border-radius:5px;background:#f7f6f0ed;box-shadow:var(--shadow);font-size:11px;line-height:1.65}.imagery-notice[hidden],.esri-credit[hidden]{display:none}.map-status:not([hidden])~.imagery-notice{top:130px}.imagery-notice:not([hidden])~.map-status{top:151px}.esri-credit{position:absolute;z-index:4;bottom:0;left:0;max-width:calc(100% - 40px);padding:3px 7px;background:#fffffff0;color:#263f37;font-size:9px;line-height:1.35}.esri-credit a{white-space:nowrap;text-decoration:none}.esri-credit span{overflow-wrap:anywhere}
@media(max-width:600px){.imagery-notice{top:110px;left:12px;max-width:calc(100% - 72px);font-size:10px;padding:7px 10px}.imagery-notice:not([hidden])~.map-status{top:197px}.esri-credit{font-size:8px;max-width:calc(100% - 35px)}body.esri-imagery .detail{bottom:42px}body.esri-imagery .map-footer{bottom:calc(43% + 54px)}body.esri-imagery.detail-collapsed .map-footer{bottom:135px}body.esri-imagery .maplibregl-ctrl-bottom-left{bottom:calc(43% + 29px)}body.esri-imagery.detail-collapsed .maplibregl-ctrl-bottom-left{bottom:152px}}

@media(min-width:1200px){body.analysis-result .measure-analysis-grid{display:grid;grid-template-columns:minmax(0,1fr) 270px;gap:18px;align-items:start}body.analysis-result .measure-walking{margin-top:12px}body.analysis-result .measure-time-values{flex-direction:column;gap:8px}}
/* Terrain analysis shares the map canvas and keeps attribution visible. */
.nature-tools{padding:12px 18px;border-bottom:1px solid var(--line);font-size:11px}.nature-toggles{display:flex;gap:12px;margin:0 0 9px}.nature-toggles label{display:flex;align-items:center;gap:4px}.nature-tools input{accent-color:var(--green)}.nature-tools select{width:100%;margin-top:5px;padding:7px 8px;background:var(--white);color:var(--ink);border:1px solid var(--line);border-radius:4px;font:inherit}.nature-tools details{margin-top:8px;color:var(--muted)}.nature-tools details p,.nature-tools #region-description{font-size:10px;line-height:1.6;margin:6px 0 0}.nature-tools details summary{font-size:10px}.nature-tools details[open]{max-height:120px;overflow:auto}.nature-tools input{margin:0}
#place-measure-actions{padding:10px 23px;border-bottom:1px solid var(--line)}.endpoint-actions{display:flex;gap:8px}.endpoint-actions button{flex:1;border:1px solid #a8b8a4;border-radius:4px;font-size:11px;padding:8px 5px}.endpoint-actions button:hover:not(:disabled){background:#e8ecdf}.endpoint-hint{font-size:10px;text-decoration:underline;line-height:1.5;margin-top:7px;padding:0;color:var(--muted)}
.measure-card{top:77px;left:24px;width:340px;max-width:calc(100% - 90px);padding:0;border:1px solid #d7decf;border-radius:8px;overflow:auto;max-height:calc(100% - 125px)}.measure-card button{margin:0;text-decoration:none;padding:7px 9px;border:1px solid var(--line);border-radius:4px;font-size:11px}.measure-heading{position:sticky;top:0;background:var(--white);z-index:1;display:flex;justify-content:space-between;align-items:center;padding:13px 16px;border-bottom:1px solid var(--line);gap:10px}.measure-heading strong{margin:0;font-size:13px}.measure-heading small{display:block;font-size:11px;color:var(--muted);margin-top:5px}.measure-heading-actions{display:flex;gap:5px;flex-shrink:0}.measure-body{padding:12px 16px}.measure-endpoints{display:flex;gap:8px}.measure-endpoints button{flex:1;min-width:0;text-align:left;overflow-wrap:anywhere;line-height:1.5;background:#f3f5ed}.measure-endpoints .picking{border-color:var(--accent);background:#fbf0e5}.measure-card #measure-instruction{margin:8px 0;font-size:11px;line-height:1.6}.measure-metrics{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px;padding:12px 0;border-block:1px solid var(--line)}.measure-metrics small{display:block;font-size:10px;color:var(--muted);line-height:1.5}.measure-metrics strong{font-size:17px;margin:6px 0 0;font-weight:550}.measure-graph{margin:12px 0}.measure-chart-wrap{height:155px;position:relative}.measure-chart-wrap canvas{touch-action:pan-y}.measure-position-row{display:flex;gap:12px;align-items:center;margin:6px 0}.measure-position-row input{flex:1;min-width:50px;accent-color:var(--accent)}#measure-readout{font-size:11px;min-width:100px;text-align:right;white-space:nowrap}.profile-probe{display:block;width:15px;height:15px;background:#b46b43;border:3px solid white;border-radius:50%;box-shadow:0 0 0 4px #b46b4360;pointer-events:none}.measure-walking{padding:10px 12px;background:#f3f1e7;border-radius:4px;margin-top:10px}.measure-walking strong{font-size:11px;margin:0 0 6px}.measure-time-values{display:flex;flex-wrap:wrap;gap:6px 20px;font-size:11px}.measure-time-values b{font-weight:600;margin-left:5px}.measure-card #measure-caveat{font-size:10px;line-height:1.7;margin:8px 0 0}.measure-footer{display:flex;justify-content:space-between;align-items:center;gap:8px;margin:12px 0 0}.measure-footer>div{display:flex;gap:5px}.measure-method{border-top:1px solid var(--line);padding-top:9px;margin-top:10px;color:var(--muted);font-size:10px;line-height:1.7}.measure-method p{font-size:10px;margin:8px 0}.measure-card.folded .measure-body{display:none}.measure-card.selecting .measure-metrics,.measure-card.selecting .measure-graph,.measure-card.selecting .measure-walking,.measure-card.selecting .measure-method{display:none}.measure-card [hidden]{display:none!important}
body.analysis-result .measure-card{left:24px;right:24px;bottom:50px;top:auto;width:auto;max-width:none;max-height:52%}body.analysis-result .detail{display:none}body.analysis-result .controls,body.analysis-result .viewstrip{bottom:calc(var(--analysis-height,350px) + 64px)}body.analysis-result .maplibregl-ctrl-bottom-left{bottom:calc(var(--analysis-height,350px) + 47px)}body.analysis-result .maplibregl-ctrl-bottom-left .maplibregl-ctrl{margin-bottom:0}body.analysis-active .map-footer{display:none}
@media(max-width:1050px){.measure-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}.measure-chart-wrap{height:135px}}
@media(max-width:600px){#place-measure-actions{padding:8px 18px}.nature-tools{padding:8px 18px}.measure-card{left:12px;top:62px;width:calc(100% - 72px);max-width:none;max-height:calc(55% - 74px)}.measure-heading{padding:10px;gap:5px}.measure-heading strong{font-size:11px}.measure-heading-actions{gap:3px}.measure-card button{font-size:10px;padding:7px}.measure-body{padding:10px}.measure-endpoints{gap:5px}.measure-metrics{gap:7px;padding:10px 0}.measure-metrics small{font-size:9px}.measure-metrics strong{font-size:14px}.measure-card #measure-instruction{font-size:10px}.measure-chart-wrap{height:120px}body.analysis-active .viewstrip{display:none}body.analysis-result .measure-card{left:12px;right:12px;bottom:44px;top:auto;width:auto;max-height:45dvh}body.analysis-result .controls{top:62px;bottom:auto;flex-direction:row}body.analysis-result .maplibregl-ctrl-bottom-left{bottom:calc(var(--analysis-height,280px) + 50px)}body.analysis-active:not(.analysis-result) .measure-card .measure-heading small{display:none}body.analysis-active:not(.analysis-result) .measure-card #measure-collapse{display:none}.measure-time-values{gap:6px;font-size:10px}.measure-method summary{font-size:10px}}

.app-credits{display:flex;flex-direction:column;align-items:flex-start;gap:6px;padding:18px 0 12px;margin:18px 0;border-top:1px solid var(--line)}
#about .app-credits p{margin:0;font-size:13px;line-height:1.6}#about .app-credits .studio-tools{font-size:12px;color:var(--muted)}
/* Frame the supplied artwork without changing its original pixels. */
.studio-logo{display:block;position:relative;width:min(220px,100%);aspect-ratio:860/290;overflow:hidden;margin-bottom:4px;mix-blend-mode:multiply}.studio-logo img{position:absolute;width:178.60465%;max-width:none;height:auto;left:-39.53488%;top:-129.31034%}

/* Compact additions use the existing paper-and-green palette. */
.share-button{border:1px solid var(--line);border-radius:5px;padding:6px 9px;white-space:nowrap;font-size:11px}.header-right{gap:16px}.explorer{overflow-y:auto}.place-list{min-height:120px}.buildings-option{margin:0 0 10px}.buildings-option label{display:flex;align-items:center;gap:5px}.buildings-option p{margin:5px 0 0;color:var(--muted);font-size:10px;line-height:1.5}.nature-toggles{flex-wrap:wrap}.viewstrip .experience-open{background:#e6ecdf;border:1px solid #c6d1bd;font-weight:650;display:block}.buildings-caption{position:absolute;z-index:2;top:64px;left:24px;max-width:calc(100% - 390px);padding:5px 8px;font-size:10px;line-height:1.5;background:#f7f6f0ed;color:var(--ink);border-radius:4px;pointer-events:none}.buildings-caption[hidden],.example-note[hidden]{display:none}.example-note{position:absolute;z-index:2;top:102px;left:24px;width:300px;max-width:calc(100% - 390px);padding:12px 28px 12px 12px;border:1px solid #cbd3bf;background:#f7f6f0f2;border-radius:6px;box-shadow:var(--shadow)}.example-note strong{font-size:12px}.example-note p{font-size:11px;line-height:1.65;margin:5px 0 0;color:#53665b}.example-note button{position:absolute;right:5px;top:4px;font-size:20px}.experience-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:20px}.experience-option{display:grid;gap:7px;text-align:left;border:1px solid var(--line);border-radius:5px;padding:16px}.experience-option:hover{background:#edf1e5}.experience-option small{color:var(--accent);font:16px Georgia,serif}.experience-option strong{font-size:14px}.experience-option span{font-size:12px;line-height:1.7;color:var(--muted)}.dialog-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:20px}.dialog-actions button{border:1px solid var(--line);padding:8px 14px;border-radius:5px}#share-url{width:100%;font:12px/1.6 ui-monospace,monospace;padding:12px;border:1px solid var(--line);border-radius:5px;resize:vertical;color:var(--ink);background:#f6f7ef}.analysis-example-note{padding:8px 10px;background:#edf1e5;border-radius:4px;margin:0 0 10px!important;font-size:11px!important;line-height:1.6}.candidate-evidence{margin-top:18px;border-top:1px solid var(--line);padding-top:12px}.candidate-evidence h3{font-size:13px;margin:0 0 8px}.candidate-evidence details{border-top:1px solid var(--line);padding:10px 0}.candidate-evidence summary{font-weight:600;line-height:1.7}.candidate-evidence dl{font-size:11px;margin:12px 0}.candidate-evidence dt{font-weight:650;margin-top:10px}.candidate-evidence dd{margin:3px 0 0;color:#53665b}.evidence-access{display:block;color:var(--muted);font-size:9px;line-height:1.6;margin:4px 0 8px}body.analysis-active .example-note{display:none}
@media(max-width:900px){.buildings-caption{left:17px;max-width:calc(100% - 350px)}.example-note{left:17px;max-width:calc(100% - 350px)}}
@media(max-width:600px){.header-right{gap:7px}.share-button{padding:6px 7px;font-size:10px}.brand{gap:6px}.brand-mark{width:28px;height:28px}.brand strong{font-size:16px}html[lang=en] .brand strong{font-size:16px}.buildings-caption{left:12px;top:158px;max-width:calc(100% - 70px);font-size:9px}.example-note{top:194px;left:12px;width:auto;max-width:calc(100% - 70px);padding:8px 24px 8px 9px}.example-note p{font-size:10px}.experience-grid{grid-template-columns:1fr}.experience-option{padding:12px}.viewstrip button{padding:7px}.viewstrip button:nth-of-type(n+4){display:none}body.analysis-active .buildings-caption{display:none}dialog{padding:22px}}
.place-review .source-title{margin-top:0}.review-limit{padding:10px 12px;background:#f3f1e7;border-left:2px solid #b88057}.detail-top{gap:8px;flex-wrap:wrap}.review-label{flex-shrink:0}.region-sources{font-size:10px}#region-sources small{display:block;color:var(--muted);font-size:9px;line-height:1.5;margin-top:6px}#region-sources a{display:inline-block;font-size:10px;padding:4px 0}.place-review a,.candidate-evidence a{overflow-wrap:anywhere}

#map-startup-notice,#imagery-notice{position:static;display:flex;align-items:center;gap:12px;width:auto;max-width:none;margin:0 0 8px;padding:7px 10px;background:#ecefe7;color:#203b33;border:1px solid #c8cfbf;border-radius:5px;box-shadow:none;font-size:12px;line-height:1.5}#map-startup-copy,#imagery-notice-text{margin:0;flex:1;min-width:0}#map-startup-notice .wide-button,#imagery-notice .wide-button{flex:0 0 auto;width:auto;max-width:150px;margin:0;min-height:36px;padding:6px 10px;font-size:12px}.startup-pending #imagery-notice{display:none}@media(max-width:600px){#map-startup-notice,#imagery-notice{gap:8px;padding:6px 8px;font-size:11px}#map-startup-notice .wide-button,#imagery-notice .wide-button{max-width:115px;font-size:11px}}
/* Help */
.controls-help-button{border:1px solid #c4cebf;border-radius:4px;background:var(--white);padding:6px 10px;min-height:44px;white-space:nowrap}
.controls-help-button:hover{background:#e7eddf;border-color:var(--green)}
#controls-help{padding:0;max-width:730px;width:calc(100% - 24px);max-height:calc(100dvh - 24px)}
.controls-help-heading{position:sticky;top:0;z-index:1;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:15px 22px;border-bottom:1px solid var(--line);background:var(--paper)}
.controls-help-heading h2{font-size:21px;margin:0}.controls-help-heading button{min-width:44px;min-height:44px;display:grid;place-items:center;border:1px solid var(--line);border-radius:5px;background:var(--white)}
.controls-help-body{padding:18px 22px 22px}.controls-help-body>p:first-child{margin:0 0 16px;font-size:13px}
.controls-help-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.controls-help-card{padding:16px;border:1px solid #cbd3c4;border-radius:7px;background:#f1f4ec}
.controls-help-card h3{margin:0 0 12px;font-size:15px}.controls-help-card dl{margin:0}.controls-help-card dt{font-size:12px;font-weight:650;margin-top:12px}.controls-help-card dd{margin:4px 0 0;font-size:13px;line-height:1.65}
#controls-help kbd{font-family:inherit;font-size:12px;font-weight:600;white-space:nowrap;padding:2px 5px;background:var(--white);border:1px solid #b8c4b2;border-bottom-width:2px;border-radius:4px}
.controls-help-card .control-key-note{font-size:11px;line-height:1.6;margin:12px 0 0;color:#4f6156}.controls-help-axis{padding:12px 0;margin:0!important;border-bottom:1px solid var(--line);font-size:13px!important}.controls-help-body .controls-help-orbit{font-size:12px;margin:12px 0 0}.controls-help-touch{font-size:11px!important;color:#4f6156;margin:10px 0 0!important}
.desktop-hint .trackpad-hint{display:block;margin-top:3px}
@media(min-width:601px) and (min-height:541px){.map-footer .desktop-hint{display:inline-block}}
@media(max-width:600px){header{padding-inline:12px}.header-right{gap:7px}.controls-help-button{font-size:11px;padding:6px 8px;min-height:44px}.controls-help-grid{grid-template-columns:1fr}.controls-help-heading{padding:10px 14px}.controls-help-heading h2{font-size:19px}.controls-help-body{padding:14px}.controls-help-card{padding:13px}.controls-help-card h3{margin-bottom:8px}}
@media(max-width:380px){header{padding-inline:10px}.brand-mark{display:none}}
/* A general-map error must remain actionable even during imagery startup. */
.startup-pending #imagery-notice.basemap-notice{display:flex}
/* Map type control */
.brand small{display:none}
#map-style{display:block;margin-top:3px;min-height:30px;max-width:145px;padding:2px 21px 2px 6px;border:1px solid #b9c8b0;border-radius:4px;background:var(--white);font-family:inherit;font-size:12px;font-weight:500;line-height:1.4;color:var(--green);cursor:pointer}
#map-style[aria-busy=true]{border-color:#9a7038}
@media(max-width:600px){#map-style{font-size:11px;max-width:110px;min-height:30px;margin-top:1px}.brand strong{display:block;line-height:1.25}}

/* About: a short introduction with optional detail, using native disclosures. */
#about>h2{padding-right:24px}
#about .about-summary{font-size:14px;line-height:1.7;margin:0 0 18px}
#about .about-quickstart{list-style:none;margin:0 0 18px;padding:0}
#about .about-quickstart li{margin:0 0 14px}
#about .about-quickstart strong{font-size:13px;color:var(--green)}
#about .about-quickstart p{margin:3px 0 0;font-size:13px;line-height:1.7}
#about .about-interpretation{padding:10px 12px;background:#f1f2e8;border-left:2px solid #95a68c;font-size:12px;line-height:1.7}
#about .about-section{border-top:1px solid var(--line)}
#about .about-section>summary{padding:12px 2px;min-height:44px;cursor:pointer;font-size:13px;font-weight:600;line-height:1.6}
#about .about-section[open]>summary{color:var(--green)}
#about .about-section p{margin:0 0 12px;overflow-wrap:anywhere}
#about .about-section p,#about .about-section h3{padding-inline:2px}
#about .app-credits{margin:18px 0 10px}
@media(max-width:600px){#about{padding:22px 20px}#about>h2{font-size:22px}#about .about-quickstart p{font-size:13px}}

/* Keep the library close action outside the scrolling list, including load failures. */
#experience-dialog{padding:0;max-height:calc(100dvh - 32px);overflow:hidden}
#experience-dialog[open]{display:flex;flex-direction:column}
#experience-dialog .experience-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-shrink:0;padding:16px 30px}
#experience-dialog .experience-heading h2{margin:0;font-size:24px;line-height:1.4;min-width:0;overflow-wrap:anywhere}
#experience-close{flex-shrink:0;min-width:44px;min-height:44px;border:1px solid var(--line);border-radius:5px;padding:8px 14px}
#experience-body{min-height:0;overflow:auto;overscroll-behavior:contain;padding:0 30px 30px;scroll-padding-block:12px}
@media(max-width:600px){#experience-dialog .experience-heading{padding:12px 20px;gap:12px}#experience-dialog .experience-heading h2{font-size:22px}#experience-body{padding:0 20px 20px}}

/* App ownership is separate from provider credits on the map. */
#about .app-copyright{margin:12px 0 18px;color:var(--muted)}
#about .app-copyright p{margin:0 0 6px;font-size:12px;line-height:1.65}
/* Presentation */
.sidebar-toggle{flex-shrink:0;min-height:44px;padding:8px;border:1px solid #c4cebf;border-radius:5px;background:var(--white);font-size:12px}
.explorer>.sidebar-toggle{position:sticky;top:8px;z-index:2;align-self:flex-end;margin:8px 12px 0}
body.sidebar-collapsed .explorer{display:none}
body.analysis-viewport #measure-card{position:fixed;top:12px;right:24px;left:auto;bottom:112px;width:var(--analysis-reading-width);max-height:none;z-index:8}
body.analysis-viewport .measure-body{flex:1}
body.analysis-viewport .measure-heading{padding-top:14px;align-items:start;flex-wrap:wrap}
body.analysis-viewport .measure-heading-actions{max-width:100%;flex-wrap:wrap}
body.analysis-viewport .measure-heading-actions button{min-height:44px}
body.ux-panel-analysis.analysis-viewport .controls{top:auto;bottom:57px;left:24px;right:auto}
body.ux-panel-analysis.analysis-viewport .viewstrip{display:none}
body.ux-panel-analysis.analysis-viewport .maplibregl-ctrl-bottom-left{bottom:0}
:root{--ux-header-height:72px;--ux-start-height:108px}
body{height:100dvh;overflow:hidden}
[hidden]{display:none!important}
.shell{height:calc(100dvh - var(--ux-header-height) - var(--ux-start-height))}
.start-area{position:relative;z-index:6;padding:10px 24px 12px;border-bottom:1px solid var(--line);background:var(--paper)}
.start-welcome{margin:0 0 8px;font-size:12px;color:#56665d}
.start-actions{display:flex;gap:10px;align-items:stretch;max-width:1100px}
.mobile-desktop-notice{display:flex;align-items:flex-start;gap:4px;margin-top:8px;padding:8px 6px 8px 10px;border:1px solid var(--line);border-radius:5px;background:var(--white);line-height:1.5}
.mobile-desktop-notice>div{min-width:0;flex:1}
.mobile-desktop-notice p{margin:0;font-size:12px;color:var(--muted);word-break:keep-all;overflow-wrap:anywhere}
.mobile-desktop-notice button{flex:0 0 44px;min-height:44px;font-size:22px;line-height:1;border-radius:4px}
.mobile-desktop-notice button:hover{background:#e9eee2}
.start-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;flex:1}
.start-option{min-height:46px;padding:9px 14px;border:1px solid #c4cebf;border-radius:5px;text-align:left;background:var(--white);min-width:0}
.start-option:hover:not(:disabled){background:#e9eee2;border-color:var(--green)}
.start-option strong{display:block;font-size:13px;font-weight:650;line-height:1.35}
.start-option small{display:block;margin-top:3px;font-size:11px;color:#5c6d62}
.start-option[aria-pressed=true]{border-color:var(--green);background:#e7eddf}
.start-actions .experience-open{font-size:12px;padding:8px 12px;min-height:44px;text-decoration:underline;text-underline-offset:4px}
.ux-started .start-welcome,.ux-started .start-option small{display:none}
.ux-started .start-area{padding-block:7px}.ux-started .start-option{padding-block:8px}
.mobile-explore{display:none!important}
/* Sidebar scroll */
.explorer{min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
.explorer>*{flex-shrink:0}
.explorer .place-list{flex:0 0 auto;min-height:0;overflow:visible}
.explorer .nature-tools,.explorer .nature-tools details[open]{max-height:none;overflow:visible}
.explore-head{padding-top:18px}.explore-head h1{font-size:22px}.explore-head p{font-size:11px}
.detail-heading-actions{display:flex;align-items:center;gap:3px;flex-shrink:0}
.detail-heading-actions button{min-height:44px}.detail-toggle{min-width:36px;display:grid;place-items:center;padding:4px}
.reading-button{border:1px solid var(--line);border-radius:4px;padding:5px 7px;font-size:11px;max-width:95px;line-height:1.4}
#place-title:focus,#measure-title:focus{outline:2px solid #d58f42;outline-offset:3px}
.detail-heading .title-row>div:first-child{min-width:0}.detail-heading h2{overflow-wrap:anywhere}
.detail-body{font-size:13px;line-height:1.8}.detail-note{font-size:11px;color:#596c61}
.candidate-intro{font-size:12px;color:#53665b}
.candidate-evidence{border:0;margin:12px 0 0;padding:0}
.candidate-card{border:1px solid var(--line);border-radius:6px;padding:14px;margin:12px 0;background:#fffefa;scroll-margin-block:12px}
.candidate-card.is-selected{border-color:var(--green);box-shadow:inset 3px 0 var(--green);background:#f0f4e9}
.candidate-card-head{display:flex;gap:8px;align-items:start;justify-content:space-between;flex-wrap:wrap}
.candidate-card-head h4,.candidate-card-head h3{font-size:14px;margin:0;line-height:1.55;overflow-wrap:anywhere}
.candidate-selected{font-size:10px;line-height:1.5;background:#dce7d3;color:#274d3e;padding:3px 6px;border-radius:3px}
.candidate-card .candidate-facts{font-size:12px;margin:10px 0}.candidate-card dt{font-weight:650;margin-top:10px}.candidate-card dd{margin:3px 0 0;color:#4c6256}
.candidate-card .review-label{display:inline-block;font-size:10px;margin-top:6px}
.candidate-actions,.candidate-measure-actions{display:flex;gap:6px;flex-wrap:wrap;margin-top:12px}
.candidate-actions button,.candidate-measure-actions button{padding:9px 10px;border:1px solid #b9c8b0;border-radius:4px;font-size:12px;min-height:44px}
.candidate-actions button[aria-pressed=true]{background:#dfebd5;border-color:var(--green)}
.candidate-measure-actions button{flex:1;font-size:11px}
body:not(.analysis-active) .candidate-measure-actions{display:none}
.candidate-evidence details{padding:10px 0 0;margin-top:12px}.candidate-evidence summary{min-height:36px;display:list-item;font-size:12px}
.candidate-evidence .source-link{font-size:12px}.evidence-access{font-size:11px;color:#596c61}
.analysis-context-bar{padding:10px 18px;background:#edf1e5;border-bottom:1px solid var(--line);display:flex;gap:8px;align-items:center;justify-content:space-between;flex-shrink:0}
.analysis-context-bar p{font-size:11px;line-height:1.5;margin:0}.analysis-context-bar button{font-size:11px;min-height:44px;text-decoration:underline;flex-shrink:0;max-width:105px}
.measure-card{display:flex;flex-direction:column;overflow:hidden}
.measure-heading{flex-shrink:0}.measure-body{overflow:auto;min-height:0;overscroll-behavior:contain;scrollbar-width:thin}
.measure-heading-actions{flex-wrap:wrap;justify-content:flex-end}.measure-card .measure-heading button{min-height:36px}
.measure-start{display:grid;gap:8px;margin:0 0 14px}.measure-card .measure-start button{min-height:44px;font-size:12px;padding:10px;text-decoration:none;border:1px solid #b9c8b0;border-radius:4px}
.measure-start #measure-example{background:#e7eddf;font-weight:650}
.measure-card .measure-summary{font-size:16px;font-weight:550;line-height:1.7;color:var(--ink);margin:10px 0}
.measure-card .measure-warning{font-size:12px;color:#745331;border-left:2px solid #b88057;background:#f7f0df;padding:9px 11px;margin:8px 0 12px}
.measure-analysis-grid{display:block!important}.measure-chart-wrap{height:155px}
.measure-details{border-top:1px solid var(--line);margin-top:12px;padding-top:8px}.measure-details>summary{font-size:12px;min-height:36px;padding:8px 0}
.measure-details .measure-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}
.measure-card #measure-detail-explanation{font-size:12px;margin-bottom:10px}.measure-card #measure-caveat{font-size:11px}
.measure-card .measure-endpoints button,.measure-card .measure-footer button{min-height:40px}
body.ux-panel-place .measure-card{display:none}
body.ux-panel-analysis .detail{display:none}
body.ux-panel-place .detail{display:flex}
body.ux-panel-place.analysis-result .controls{top:auto;bottom:57px}
body.ux-panel-place.analysis-result .viewstrip{bottom:57px}
body.ux-panel-place.analysis-result .maplibregl-ctrl-bottom-left{bottom:43px}
body.ux-panel-place.analysis-result .maplibregl-ctrl-bottom-left .maplibregl-ctrl{margin-bottom:62px}
body.ux-panel-place .example-note:not([hidden]){display:block}
body.ux-panel-analysis .measure-card{left:24px;right:24px;bottom:42px;top:auto;width:auto;max-width:none;max-height:58%}
body.ux-panel-analysis .controls,body.ux-panel-analysis .viewstrip{bottom:calc(var(--analysis-height,280px) + 56px)}
body.ux-panel-analysis .maplibregl-ctrl-bottom-left{bottom:calc(var(--analysis-height,280px) + 45px)}
body.ux-panel-analysis .maplibregl-ctrl-bottom-left .maplibregl-ctrl{margin-bottom:0}
@media(max-width:1250px){body.ux-panel-place.analysis-result .controls{bottom:111px}body.ux-panel-place.analysis-result .viewstrip{bottom:51px}}
@media(max-width:900px){
 :root{--ux-header-height:62px}.explorer{top:calc(var(--ux-header-height) + var(--ux-start-height));max-height:calc(100dvh - var(--ux-header-height) - var(--ux-start-height))}.explorer-backdrop{top:calc(var(--ux-header-height) + var(--ux-start-height))}
 .start-area{padding-inline:16px}.start-option{padding:8px 10px}.start-option small{display:none}
 .explore-head{padding-block:12px}.explore-head h1{margin-block:5px;font-size:20px}.explore-head p{display:none}
}
@media(max-width:600px){
 .start-area{padding:8px 10px}.start-welcome{font-size:11px;margin-bottom:6px}.start-actions{gap:4px}.start-options{gap:4px}.start-option{padding:7px 5px;min-height:44px;text-align:center}.start-option strong{font-size:11px;line-height:1.4}.start-actions .experience-open{font-size:10px;width:55px;padding:4px;line-height:1.5;flex-shrink:0}
 .detail{max-height:45%;bottom:38px!important}.detail-heading{padding:10px 14px 8px}.detail-heading h2{font-size:22px}.detail-heading .english{font-size:11px}.detail-top{gap:4px}.review-label{font-size:9px}.reading-button{font-size:10px;max-width:75px}
 .detail-tabs{padding-inline:14px;gap:16px;flex-shrink:0}.detail-tabs button{min-height:40px;font-size:11px}.detail-body{padding:12px 14px 18px;min-height:0}
 .detail.collapsed .detail-heading{padding:8px 14px}.detail.collapsed .detail-heading-actions{display:flex}
 body.ux-panel-analysis .measure-card{left:10px;right:10px;bottom:38px;top:auto;max-height:45%;width:auto}
 .measure-heading{padding:10px;gap:6px;align-items:start}.measure-heading>div:first-child{min-width:0;flex:1}.measure-heading strong{font-size:12px!important}.measure-heading-actions{gap:3px;flex-wrap:nowrap;max-width:65%}.measure-card .measure-heading button{font-size:10px;padding:5px;min-height:44px;line-height:1.4}
 .measure-body{padding:10px 12px}.measure-card .measure-summary{font-size:14px}.measure-chart-wrap{height:145px}.measure-card .measure-endpoints button{font-size:11px;overflow-wrap:anywhere}
 body.ux-panel-analysis .controls,body.ux-panel-place.analysis-result .controls{top:58px;right:10px;bottom:auto;flex-direction:row}body.ux-panel-analysis .viewstrip{display:none}
 body.ux-panel-place.analysis-result .viewstrip{top:58px;bottom:auto}body.ux-panel-place.analysis-result .maplibregl-ctrl-bottom-left{bottom:calc(45% + 34px)}body.ux-panel-place.analysis-result .maplibregl-ctrl-bottom-left .maplibregl-ctrl{margin-bottom:0}
 .candidate-card{padding:12px}.candidate-card-head h4{font-size:14px}.candidate-facts{line-height:1.75}.analysis-context-bar{padding:7px 14px}
 .ux-reading #map{pointer-events:none}.ux-reading .controls,.ux-reading .viewstrip,.ux-reading .map-top,.ux-reading .example-note,.ux-reading .buildings-caption,.ux-reading .map-footer,.ux-reading .maplibregl-ctrl-scale{visibility:hidden}
 .ux-reading-place .detail,.ux-reading-analysis .measure-card{top:7px!important;bottom:max(36px,env(safe-area-inset-bottom))!important;left:8px!important;right:8px!important;max-height:none!important;height:auto!important;z-index:5}
 .ux-reading .detail-heading,.ux-reading .measure-heading{flex-shrink:0}.ux-reading .detail-body,.ux-reading .measure-body{flex:1;min-height:0;overflow:auto}
 .ux-reading .detail-heading .english{display:none}
 .ux-reading .measure-chart-wrap{height:185px}
 body.ux-panel-place.analysis-active .viewstrip{display:flex}
 .explorer{width:min(320px,calc(100% - 28px))}.explorer .search-wrap{flex-shrink:0}.explorer .filters{flex-shrink:0;padding-bottom:8px}.explorer .list-caption{padding-top:8px}.explorer .explorer-foot{flex-shrink:0}
}
@media(max-height:540px){.detail-heading .english,.detail-top,.explore-head p{display:none}.detail-heading{padding-block:7px}.detail-heading h2{margin-block:2px;font-size:20px}.explore-head{padding-block:7px}.explore-head h1{font-size:17px}.detail{max-height:calc(100% - 95px)}body.ux-panel-analysis .measure-card{max-height:calc(100% - 50px)}.start-welcome{display:none}}

/* Contrast */
.place-row .number{color:var(--muted)}
.review-label{color:#656046}
.experience-option small{color:#995a39}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:3px solid #995a1c;outline-offset:3px}

/* Foreground panel */
.ux-panel-journey #detail,.ux-panel-journey #measure-card{display:none!important}
.catalogue-region{padding:0 18px 12px;font-size:11px;flex-shrink:0}
.catalogue-region label{display:block;margin-bottom:5px}
.catalogue-region select{width:100%;font:inherit;color:var(--ink);background:var(--white);border:1px solid var(--line);padding:7px;border-radius:4px}
.catalogue-region small{display:block;color:var(--muted);font-size:9px;margin-top:5px}
.region-suggestions{margin:0 0 10px;padding:12px;border:1px solid var(--line);border-radius:5px;background:var(--white)}
.region-suggestions>small{display:block;font-size:10px;color:var(--muted)}
.region-suggestion{display:block;width:100%;min-height:44px;text-align:left;padding:6px 0;border:0;background:transparent;color:var(--ink);font:inherit;font-weight:600;cursor:pointer}
.region-suggestions p{margin:0;font-size:11px;line-height:1.6;color:var(--muted);overflow-wrap:anywhere}
.location-status{font-size:12px;font-weight:650;color:var(--green)}
.journey-result{border:1px solid #b9c9bd;background:#eef3e9}
.catalogue-label{max-width:240px;overflow:hidden;text-overflow:ellipsis;min-height:30px;display:block}
.ux-reading-journey #journey-panel{top:7px!important;bottom:max(36px,env(safe-area-inset-bottom))!important;left:8px!important;right:8px!important;max-height:none!important;width:auto!important;height:auto!important;z-index:5}
@media(max-width:600px){.catalogue-region{padding-bottom:8px}.catalogue-label{max-width:160px;min-height:30px}.catalogue-region small{font-size:9px}}
#place-title:focus,#measure-title:focus{outline-color:#995a1c}
.maplibregl-canvas:focus-visible{outline:3px solid #fff;outline-offset:-5px;box-shadow:inset 0 0 0 8px #244b3d}
.map-pin:focus-visible{outline-color:#244b3d;box-shadow:0 0 0 6px #fff}
.map-footer .desktop-hint,.map-footer .mobile-hint{padding:3px 6px;border-radius:3px;background:#243d37;text-shadow:none}
/* Landscape controls */
@media(max-width:900px) and (max-height:540px){
 .detail,body.ux-panel-analysis .measure-card{max-height:60%;bottom:38px!important}
 .controls,body.ux-panel-analysis .controls,body.ux-panel-place.analysis-result .controls{top:8px;right:10px;bottom:auto;flex-direction:row}
 .controls .control-group{flex-direction:row}
 .viewstrip,body.ux-panel-place.analysis-active .viewstrip,.map-top{display:none}
 .map-footer .desktop-hint,.map-footer .mobile-hint{display:none}
}
@media(max-width:600px),(max-width:900px) and (max-height:540px){
 .ux-reading #map{pointer-events:none}
 .ux-reading .controls,.ux-reading .viewstrip,.ux-reading .map-top,.ux-reading .example-note,.ux-reading .buildings-caption,.ux-reading .map-footer,.ux-reading .maplibregl-ctrl-scale{visibility:hidden}
 .ux-reading-place .detail,.ux-reading-analysis .measure-card{top:7px!important;bottom:max(36px,env(safe-area-inset-bottom))!important;left:8px!important;right:8px!important;max-height:none!important;height:auto!important;z-index:5}
 .ux-reading .detail-heading,.ux-reading .measure-heading{flex-shrink:0}
 .ux-reading .detail-body,.ux-reading .measure-body{flex:1;min-height:0;overflow:auto}
 .ux-reading .detail-heading .english{display:none}
}
/* Modern context */
.modern-context{margin:0 0 13px;padding:9px 11px;background:#edf1e9;border-left:2px solid #577256;border-radius:0 5px 5px 0;overflow-wrap:anywhere;color:#344a3d}
.modern-context-label{display:block;font-size:11px;line-height:1.5;font-weight:650;color:#465c4c}
.modern-context .modern-context-text{font-size:13px;line-height:1.55;margin:3px 0 0;color:#304438}
.modern-match,.modern-search-match{color:#36533f;overflow-wrap:anywhere}
.modern-search-match{font-size:12px;line-height:1.5;margin:0 0 10px}
.modern-matched-candidate{outline:1px solid #6c886d;outline-offset:2px}
.modern-context-evidence{border-top:1px solid #d5dacf;margin-top:20px;padding-top:12px;overflow-wrap:anywhere}
.modern-context-evidence h4{font-size:13px;line-height:1.5;margin:0 0 10px}
.modern-context-record{margin:12px 0;font-size:12px;line-height:1.65}
.modern-context-source{display:block;color:#315642;text-decoration:underline;text-underline-offset:3px}
.modern-context-source-meta,.modern-context-source-scope{display:block;font-size:11px;line-height:1.55;color:#536255;margin:3px 0 7px}
.modern-context-evidence a:focus-visible{outline:2px solid #406649;outline-offset:3px}

/* Search order */
#map-settings{border-bottom:1px solid var(--line)}
#map-settings>summary{padding:12px 18px;min-height:44px;font-weight:600;font-size:11px;line-height:1.5}
#map-settings>.nature-tools{border-bottom:0;padding-top:0}
.explorer.searching .explore-head{display:none}
.explorer.searching .search-wrap{margin-top:14px;margin-bottom:10px}
.explorer.searching .filters{flex-wrap:wrap;padding-bottom:8px}
.explorer.searching .catalogue-region{padding-top:8px;padding-bottom:4px}
.explorer.searching .catalogue-region select{min-height:40px}
.explorer.searching .catalogue-region small{display:none}
.explorer.searching .list-caption{padding-top:9px;padding-bottom:5px;gap:8px;letter-spacing:0;flex-wrap:wrap}
.search-filter-status{padding:0 18px;margin:5px 0 0;font-size:10px;line-height:1.5;color:var(--muted)}
.search-result-group>h3{font-size:10px;color:var(--muted);font-weight:650;margin:9px 12px 4px}
.journey-search-state,.place-list .empty{font-size:11px;line-height:1.7;margin:8px 12px;color:var(--muted)}
.place-list .empty p{margin:0 0 6px}.journey-search-state button{margin-top:8px}
.search-result-group,.region-suggestions{min-width:0;overflow-wrap:anywhere}
.explorer.searching .place-row{gap:8px;padding:10px 12px;min-height:44px}
.explorer.searching .region-suggestions{margin:12px 9px 4px}
.detail-body>.story-summary{margin-bottom:10px}
.detail-body>.location-status{font-size:11px;line-height:1.65;margin-bottom:12px;color:var(--green)}
.detail-body>details[data-detail-key]{border-top:1px solid var(--line);margin-top:12px;padding-top:4px}
.detail-body>details[data-detail-key]>summary{min-height:44px;padding:10px 0;line-height:1.6;overflow-wrap:anywhere}
@media(max-width:600px),(max-width:900px) and (max-height:540px){
 .explorer.searching .search-wrap{margin-top:10px;margin-bottom:7px}
 .explorer.searching .filters{gap:2px;padding-bottom:5px}
 .explorer.searching .filter{padding:7px 8px;min-height:36px}
 .explorer.searching .catalogue-region{padding-top:5px}
 .explorer.searching .catalogue-region label{display:inline;margin-right:5px;font-size:10px}
 .explorer.searching .catalogue-region select{width:auto;max-width:calc(100% - 58px);min-height:36px;padding:6px 4px;font-size:10px}
 .explorer.searching .list-caption{padding-top:6px;font-size:9px}
 .explorer.searching .search-result-group>h3{margin-top:5px}
}

/* Source cautions */
.detail-body .candidate-evidence .candidate-caution,
.detail-body .candidate-evidence dl{font-size:13px;line-height:1.6}
.candidate-caution{margin:12px 0;color:var(--ink)}
.candidate-caution-label{display:block;font-size:12px;line-height:1.6;margin-bottom:4px;font-weight:650}

.detail-body .detail-note,.detail-body .review-limit,.detail-body .candidate-intro,
.detail-body>.location-status,.candidate-access-types,.modern-context-source-scope,
.related-journey-link small,.related-journey-status{font-size:12px;line-height:1.6}
.candidate-access-types{margin:5px 0 10px;color:var(--muted);overflow-wrap:anywhere}
@media(max-width:600px),(max-width:900px) and (max-height:540px){
 .detail-body,.detail-body .candidate-facts,.detail-body .candidate-period,.detail-body .candidate-review-level,
 .detail-body .candidate-intro,.detail-body .candidate-card p,.detail-body .candidate-evidence p,
 .detail-body .place-review p{font-size:13px;line-height:1.6}
 .detail-body .detail-note,.detail-body .review-limit,.detail-body .candidate-access-types{font-size:12px;line-height:1.6}
 .detail-body .modern-context-record,.detail-body .evidence-access,.detail-body .modern-context-source-meta{font-size:12px;line-height:1.6}
 .detail-body .modern-context-source-scope{font-size:12px;line-height:1.6}
 .detail-body summary,.detail-body button{min-height:44px}
 .start-welcome{display:none}
 .start-area{padding-block:3px}
 .mobile-desktop-notice{padding-block:4px}
 .start-option strong{line-height:1.5}
 /* Attribution clearance */
 .maplibregl-ctrl-bottom-right{z-index:6}
 .maplibregl-ctrl-bottom-right>.maplibregl-ctrl-attrib{margin:2px;line-height:14px}
}

/* UI-01 desktop shell */
.shell-disclosure{position:relative}.shell-disclosure>summary{cursor:pointer;min-height:44px;padding:10px 12px;list-style:none;border-radius:5px}.shell-disclosure>summary::-webkit-details-marker{display:none}.shell-disclosure>summary::after{content:'⌄';margin-left:8px;float:right}.shell-popover{position:absolute;background:var(--white);border:1px solid var(--line);border-radius:8px;box-shadow:var(--shadow);padding:16px;max-height:calc(100dvh - 180px);overflow:auto;overscroll-behavior:contain;z-index:12}.shell-popover :is(button,select,a){min-height:44px}.shell-disclosure[open]>summary::after{content:"×"}
@media(min-width:1024px){
 body.ui-shell{--paper:#f8f7f2;--white:#fbfaf6;--ink:#243f35;--muted:#657067;--line:#e1e3da;--green:#243f35;--shadow:0 6px 24px #142c2220}
 .ui-shell header{height:76px;gap:20px;padding-inline:28px;background:var(--white);z-index:5}
 .ui-shell header:has(#shell-help[open]){z-index:9}
 .ui-shell .brand{flex-shrink:0}.ui-shell .brand small{display:none}.ui-shell .brand strong{font-size:21px}
 .ui-shell .header-right{gap:12px}.ui-shell .header-right>button{min-height:44px}
 #shell-nav{flex:1;min-width:0;margin-left:24px}#shell-nav .start-options{display:flex;gap:16px}
 #shell-nav .start-option{border:0;border-bottom:2px solid transparent;border-radius:0;background:none;min-height:76px;padding:10px 4px}
 #shell-nav .start-option strong{font-size:14px}#shell-nav .start-option small{display:none}#shell-nav .start-option[aria-pressed=true]{border-bottom-color:var(--ink)}
 .ui-shell #start-area{padding:0;border:0}.ui-shell #start-welcome,.ui-shell #start-area>.start-actions{display:none}
 .ui-shell #map-startup-notice,.ui-shell #imagery-notice{margin:0;padding:8px 24px;border-radius:0}
 #shell-help{order:-1}#shell-help .shell-popover{right:0;width:250px}#shell-help .shell-popover>a,#shell-help .shell-popover>button{display:flex;align-items:center;width:100%;padding:10px;text-align:left;font-size:14px}
 .ui-shell .explorer{width:296px;background:var(--white)}.ui-shell .explore-head{padding:12px 22px 16px}.ui-shell .explore-head h1{font-size:21px;margin:10px 0 0}.ui-shell .explore-head p{display:none}
 .ui-shell .filters{padding:0 22px 12px;gap:4px;flex-wrap:wrap;border:0}.ui-shell .filter{font-size:14px;min-height:40px;flex:1;background:#f1f2ec}.ui-shell .filter[aria-pressed=true]{background:var(--ink)}
 #shell-extra{width:100%;font-size:12px}#shell-extra>summary{padding:8px 0;min-height:36px}#shell-extra .shell-popover{left:0;width:240px}#shell-extra .filter{width:100%}
 .ui-shell .catalogue-region{padding:0 22px 8px}.ui-shell .catalogue-region select{min-height:44px;font-size:14px}
 .ui-shell .map-top{align-items:flex-start;z-index:2;max-width:calc(100% - 48px)}
 #shell-settings{order:1;background:var(--white);border-radius:6px}#shell-settings>summary{font-size:14px;max-width:260px}#shell-era{display:block;font-size:12px;color:var(--muted);max-width:230px;overflow-wrap:anywhere}
 #shell-settings .shell-popover{width:340px;max-width:calc(100vw - 64px);left:0;max-height:calc(100dvh - var(--ux-header-height) - var(--ux-start-height) - 110px)}
 #shell-style-label{display:block;font-weight:600;font-size:14px}#shell-settings #map-style{width:100%;max-width:none;min-height:44px;margin:8px 0 16px;font-size:14px}
 #shell-settings .historical-controls{margin-bottom:12px}#shell-settings .historical-controls-body{position:static;width:100%;max-height:none;box-shadow:none;padding:12px 0;border:0}
 #shell-settings #map-settings{margin:0}#shell-settings #map-settings>summary{min-height:44px;font-size:14px}#shell-settings .nature-tools{padding:8px 0;max-height:none}
 .ui-shell .map-top:has(#shell-settings[open]){z-index:7}
 .ui-shell .map-tag{order:2;font-size:12px;max-width:240px;flex-wrap:wrap;box-shadow:none}
 .ui-shell .historical-map-legend{top:112px}.ui-shell .map-status{top:112px}
 @media(min-height:720px){.ui-shell .explorer{overflow:hidden}.ui-shell .explorer .place-list{flex:1;overflow:auto;min-height:0}.ui-shell .explorer>.sidebar-toggle{position:static}}
 @media(max-width:1279px){.ui-shell .explorer{width:264px}.ui-shell header{padding-inline:18px;gap:12px}#shell-nav{margin-left:0}#shell-nav .start-options{gap:10px}.ui-shell .header-right{gap:6px}.ui-shell .brand strong{font-size:18px}.ui-shell .map-top{gap:6px}.ui-shell .map-tag{max-width:160px}}
}

/* Update notes: keep the close action above the scrolling content. */
#updates-dialog{width:min(680px,calc(100vw - 24px));max-height:calc(100dvh - 32px);padding:0;overflow:hidden}
#updates-dialog[open]{display:flex;flex-direction:column}
.updates-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-shrink:0;padding:20px 24px;border-bottom:1px solid var(--line)}
.updates-heading h2{margin:0;font-size:22px;line-height:1.4}
#updates-close{min-height:44px;padding:8px 14px;border:1px solid var(--line);border-radius:5px;white-space:nowrap}
#updates-body{min-height:0;overflow:auto;overscroll-behavior:contain;padding:0 24px 24px}
.updates-intro{font-size:14px;line-height:1.7;color:var(--muted);margin:20px 0}
.update-entry{padding:20px 0;border-top:1px solid var(--line)}
.update-entry time{font-size:12px;color:var(--muted)}
.update-entry h3{font-size:17px;line-height:1.5;margin:6px 0 8px}
.update-entry p{font-size:14px;line-height:1.75;margin:0;overflow-wrap:anywhere}
@media(max-width:600px){.updates-heading{padding:14px 18px}.updates-heading h2{font-size:20px}#updates-body{padding:0 18px 18px}.update-entry{padding:16px 0}}
/* Resizing is limited to the selected-place card; map controls retain their space. */
#detail.card-layout-ready{width:var(--card-width,320px);height:var(--card-height,560px);max-height:var(--card-max-height,calc(100% - 174px));min-width:0}
#detail.card-layout-ready.collapsed{height:auto}
#detail.card-layout-ready .detail-heading{flex-shrink:0;padding:16px 18px 12px}
#detail.card-layout-ready .detail-heading h2{font-size:26px;margin:9px 0 3px}
#detail.card-layout-ready .detail-heading .title-row{align-items:center;gap:5px}
#detail.card-layout-ready .detail-heading .english{font-size:13px}
#detail.card-layout-ready .detail-top{gap:8px}
#detail.card-layout-ready .detail-top .review-label{text-align:right;max-width:60%}
#detail.card-layout-ready .detail-body{flex:1;min-height:0;overscroll-behavior:contain;padding-bottom:27px;overflow-anchor:none}
#detail.card-layout-ready .detail-tabs{padding-inline:18px;gap:18px}
#detail.card-layout-ready .reading-button{min-width:58px;max-width:76px;font-size:10px;min-height:36px;padding:5px 6px}
#detail.card-layout-ready .detail-heading-actions{gap:2px}
#detail.card-layout-ready .detail-heading-actions .detail-toggle{min-width:28px;min-height:36px}
#detail.card-layout-ready .card-size-reset{width:28px;min-height:36px;padding:2px;font-size:21px;color:var(--muted)}
#detail.card-heading-compact .detail-heading{padding-block:7px}
#detail.card-heading-compact .detail-heading h2{font-size:19px;margin:0;letter-spacing:-.5px}
#detail.card-heading-compact .detail-top,#detail.card-heading-compact .english{display:none}
#detail.card-layout-ready .card-resize-width,#detail.card-layout-ready .card-resize-height{position:absolute;z-index:4;touch-action:none;outline-offset:-3px}
.card-resize-width{left:0;top:50%;margin-top:-24px;height:48px;width:24px;cursor:ew-resize}
.card-resize-width:after{content:'';position:absolute;width:3px;height:32px;left:3px;top:50%;margin-top:-16px;border-radius:4px;background:#bcc5b7;opacity:.65}
.card-resize-height{left:50%;margin-left:-32px;width:64px;bottom:0;height:24px;cursor:ns-resize}
.card-resize-height:after{content:'';position:absolute;height:3px;width:32px;bottom:3px;left:50%;margin-left:-16px;border-radius:4px;background:#bcc5b7;opacity:.65}
.card-resize-corner{position:absolute;left:0;bottom:0;width:28px;height:28px;display:grid;place-items:center;cursor:nesw-resize;touch-action:none;font-size:17px;color:#637660;border-radius:0 6px 0 0;z-index:5;outline-offset:-3px}
.card-resize-corner span{display:block;transform:rotate(90deg)}
.card-resize-corner:hover,.card-resize-corner:focus-visible{background:#e8eddf}
.card-resizing,.card-resizing *{user-select:none!important}
.card-sheet-chrome,.card-sheet-handle,.card-sheet-sizes{display:none}
@media(pointer:coarse){.card-resize-corner{width:44px;height:44px}}
@media(max-width:600px),(max-width:900px) and (max-height:540px){
 #detail.card-layout-ready{top:auto;left:10px;right:10px;width:auto;height:var(--card-sheet-middle,45%);max-height:var(--card-sheet-middle,45%);bottom:max(38px,env(safe-area-inset-bottom))!important}
 #detail.card-layout-ready .detail-heading{padding:2px 14px 7px}
 #detail.card-layout-ready .detail-heading h2{font-size:21px;margin:2px 0}
 #detail.card-layout-ready .detail-heading .english{font-size:11px}
 #detail.card-layout-ready .detail-top{display:none}
 #detail.card-layout-ready .detail-tabs{padding-inline:14px;gap:16px}
 #detail.card-layout-ready .detail-tabs button{min-height:36px;padding-block:8px}
 #detail.card-layout-ready .detail-body{padding:12px 14px 18px}
 #detail.card-layout-ready .card-sheet-chrome{display:flex;align-items:center;justify-content:space-between;gap:4px;padding:3px 8px;flex-shrink:0}
 #detail.card-layout-ready .card-sheet-handle{display:flex;align-items:center;justify-content:center;align-self:center;flex-shrink:0;width:48px;min-height:28px;height:28px;touch-action:none;cursor:ns-resize;outline-offset:-2px}
 .card-sheet-handle span{display:block;width:32px;height:4px;background:#9aab98;border-radius:4px}
 #detail.card-layout-ready .card-sheet-sizes{display:flex;gap:3px;justify-content:flex-end;min-width:0}
 .card-sheet-sizes button{font-size:10px;min-height:28px;padding:4px 8px;border:1px solid transparent;border-radius:4px;line-height:1.2}
 .card-sheet-sizes button[aria-pressed=true]{background:#e9eee2;border-color:#c5cebd;font-weight:650}
 #detail.card-layout-ready .detail-heading{border-bottom:0}
 #detail.card-heading-compact .detail-heading{padding-block:0}
 #detail.card-heading-compact .detail-heading h2{font-size:18px}
 #detail.card-layout-ready.collapsed{height:auto;max-height:none}
 #detail.card-layout-ready.collapsed .card-sheet-sizes{border-bottom:0}
 #detail.card-layout-ready.collapsed .detail-heading{padding-block:0}
 .ux-reading-place #detail.card-layout-ready{top:auto!important;left:10px!important;right:10px!important;bottom:max(38px,env(safe-area-inset-bottom))!important;height:var(--card-sheet-large,68%)!important;max-height:var(--card-sheet-large,68%)!important}
 #detail.card-short-map .detail-heading,#detail.card-short-map.card-heading-compact .detail-heading{padding:0 14px}
 #detail.card-short-map .detail-heading h2{font-size:18px;line-height:1.35;margin:0;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
 #detail.card-short-map .detail-heading .english{display:none}
 #detail.card-short-map .detail-heading-actions .detail-toggle{min-height:26px}
 #detail.card-short-map .card-sheet-chrome{padding-block:2px}
 #detail.card-short-map .card-sheet-handle{height:26px;min-height:26px}
 #detail.card-short-map .card-sheet-sizes button{min-height:26px}
 #detail.card-short-map .detail-tabs button{min-height:30px;padding-block:6px}
}
@media(max-height:540px){
 #detail.card-layout-ready .detail-heading{padding-block:5px}
 #detail.card-layout-ready .detail-heading h2{font-size:19px;margin-block:0}
 #detail.card-layout-ready .detail-top,#detail.card-layout-ready .detail-heading .english{display:none}
 #detail.card-layout-ready .detail-tabs button{padding-block:6px;min-height:30px}
 #detail.card-layout-ready .card-sheet-handle{height:26px;min-height:26px}
 .card-sheet-sizes button{min-height:26px}
 #detail.card-layout-ready.card-short-map .detail-heading{padding-block:0}
 #detail.card-layout-ready.card-short-map .detail-heading h2{font-size:18px}
}
/* Keep the phone's zoom and direction buttons above the middle-height card. */
@media(max-width:600px) and (min-height:541px){
 body.ux-panel-place:not(.ux-reading) .controls{top:106px;bottom:auto;left:12px;right:auto;max-width:calc(100% - 24px);flex-direction:row;gap:6px}
 body.ux-panel-place:not(.ux-reading) .controls .control-group{flex-direction:row}
}
@media(max-width:900px) and (max-height:540px){
 body.ux-panel-place:not(.ux-reading) .buildings-caption{top:56px;left:12px;max-width:calc(100% - 24px)}
}
/* STAB-C: keep mobile controls reachable at their existing card size limits. */
#detail.card-layout-ready.card-viewport{position:fixed;top:var(--card-top,12px);bottom:auto;z-index:8}
#detail.card-layout-ready #card-resize-top{top:0;bottom:auto;height:12px;width:100%;left:0;margin:0}
#detail.card-layout-ready #card-resize-top:after{top:3px;bottom:auto}
#detail.card-layout-ready .reading-button{max-width:88px}
@media(max-width:600px),(max-width:900px) and (max-height:540px){
 #detail.card-layout-ready .card-sheet-handle,#detail.card-layout-ready .card-sheet-sizes button,
 #detail.card-layout-ready .detail-heading-actions .detail-toggle,
 #detail.card-layout-ready .detail-tabs button{min-height:44px}
 #detail.card-layout-ready .card-sheet-handle{height:44px}
 #detail.card-layout-ready .card-sheet-sizes button,#detail.card-layout-ready .detail-tabs button{min-width:44px}
 #detail.card-layout-ready .detail-heading-actions .detail-toggle{min-width:44px}
 #detail.card-layout-ready .detail-tabs button{padding-block:8px}
}

/* UI-01 desktop reading. Existing mobile and split layout keep their owners. */
body.ui-place-closed #detail{display:none!important}
#place-reopen{position:absolute;right:24px;top:22px;z-index:6;min-height:44px;padding:10px 16px;background:var(--white);border:1px solid var(--line);border-radius:6px}
#place-read-scripture{flex:none;margin:0 24px 24px;width:auto;background:var(--ink);color:var(--white);border-radius:5px;min-height:44px;padding:10px;font-size:14px}
#reading-dock.reading-folded #place-read-scripture{display:none}
@media(min-width:1024px){
 #detail.card-layout-ready .detail-heading{padding:20px 24px 12px}
 #detail.card-layout-ready .title-row{display:block}
 #detail.card-layout-ready .detail-heading h2{font-size:32px;line-height:1.3;margin:16px 0 6px}
 #detail.card-layout-ready .detail-heading .english{font-size:16px;line-height:1.5}
 #detail.card-layout-ready .detail-heading-actions{margin-top:14px;justify-content:flex-start;gap:6px}
 #detail.card-layout-ready .detail-heading-actions button{font-size:12px;min-height:40px;min-width:40px}
 #detail.card-layout-ready .detail-tabs{padding-inline:24px;gap:20px}
 #detail.card-layout-ready .detail-tabs button{font-size:14px;min-height:44px}
 #detail.card-layout-ready .detail-body,#journey-panel #journey-body,#measure-card .measure-body{font-size:16px;line-height:1.8;padding:20px 24px}
 #detail.card-layout-ready .detail-body :is(.detail-note,.modern-context-text,.location-status),.journey-body :is(.journey-note,.detail-note){font-size:13px}
 #detail.card-layout-ready .scripture-verse,.journey-body .scripture-verse{font-size:17px;line-height:1.9}
 #detail.ui-card-wide .detail-heading h2{font-size:36px}
 #detail.ui-card-wide .scripture-verse,#journey-panel.ui-card-wide .scripture-verse{font-size:22px}
 #detail.card-heading-compact .detail-heading{padding-block:10px}#detail.card-heading-compact .detail-heading h2{font-size:24px;margin:0}
 #detail.card-heading-compact .detail-heading-actions{margin-top:8px}
 #detail.collapsed #place-read-scripture{display:none}
 .journey-heading,.measure-heading{padding:20px 24px}
 .journey-heading-actions,.measure-heading-actions{flex-wrap:wrap;gap:6px}
 .journey-heading-actions button,.measure-heading-actions button{min-height:40px;font-size:12px}
 #journey-panel:not(.journey-layout-short) #journey-title{font-size:26px;line-height:1.4}
 #journey-panel .journey-description,#journey-panel .journey-candidate p{font-size:16px;line-height:1.8}
 #journey-controls .journey-control-buttons>button{min-height:44px}
 body.ux-panel-analysis #measure-card{width:min(var(--ui-analysis-width,420px),calc(100% - 324px));max-width:640px}
 #detail.card-layout-ready{border-radius:8px}
 #place-close{margin-left:auto;font-size:24px!important}
}
/* The split panel occupies real layout space. Existing floating sizes stay intact. */
#reading-dock[hidden],#reading-separator[hidden],#reading-rail[hidden],#reading-layout-menu[hidden]{display:none!important}
.reading-layout-button{border:1px solid var(--line);border-radius:4px;padding:5px 8px;min-height:36px;font-size:11px;background:var(--white);white-space:nowrap}
.detail-heading-actions{flex-wrap:wrap;justify-content:flex-end}
#reading-dock{flex:none;min-width:0;min-height:0;position:relative;background:var(--white);overflow:hidden}
#reading-separator{flex:0 0 12px;position:relative;cursor:ew-resize;touch-action:none;background:var(--paper);outline-offset:-3px;z-index:5}
#reading-separator:after{content:'';position:absolute;top:45%;bottom:45%;left:4px;width:4px;border-radius:3px;background:#819782}
#reading-separator:focus-visible{outline:3px solid #995a1c}
.reading-dragging,.reading-dragging *{user-select:none!important;cursor:ew-resize!important}
body.reading-split #reading-dock>:is(#detail,#journey-panel,#measure-card){position:relative!important;inset:auto!important;width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;margin:0!important;border:0;border-radius:0;box-shadow:none;display:flex!important;flex-direction:column;z-index:auto;overflow:hidden}
#reading-dock :is(.detail-body,.journey-body,.measure-body){flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;font-size:16px;line-height:1.75;padding:20px 24px;overflow-anchor:none}
#reading-dock :is(.detail-body,.journey-body,.measure-body)>*{max-width:72ch;margin-left:auto;margin-right:auto}
#reading-dock :is(.story-summary,.journey-stage-summary,.scripture-verse){font-size:16px;line-height:1.75}
#reading-dock :is(.detail-note,.location-status,.journey-note,.modern-context-text){font-size:13px}
#reading-dock :is(.card-resize-width,.card-resize-height,.card-resize-corner,#journey-size-bar,.card-sheet-chrome,#detail-reading,#journey-reading,#measure-reading,#card-size-reset){display:none!important}
#reading-dock .reading-layout-button{min-height:44px}
#reading-dock :is(.detail-heading,.journey-heading,.measure-heading){flex-shrink:0}
#reading-dock .detail-heading .title-row{align-items:start}
#reading-dock .journey-heading-actions{display:flex;flex-wrap:wrap}
#reading-dock .journey-controls{flex-shrink:0}
body.reading-split .map-area{min-width:480px}
body.reading-split .controls{top:auto!important;bottom:108px!important;right:12px!important;flex-direction:row!important}
body.reading-split .viewstrip{bottom:60px!important;left:12px!important;right:12px;max-width:calc(100% - 24px);overflow-x:auto}
body.reading-split .map-footer{display:none}
body.reading-split .maplibregl-ctrl-bottom-left{bottom:152px!important;left:4px}
body.reading-split .maplibregl-ctrl-bottom-left .maplibregl-ctrl{margin-bottom:0!important}
body.reading-split .map-top{left:12px;right:12px;flex-wrap:wrap}
body.reading-split .map-status{left:12px;max-width:calc(100% - 24px)}
body.reading-split #reading-dock.reading-folded>:is(#detail,#journey-panel,#measure-card){display:none!important}
#reading-rail{height:100%;display:flex;flex-direction:column;align-items:center;gap:18px;padding:8px}
#reading-rail button{font-size:12px;min-height:44px;width:100%;border:1px solid var(--line);border-radius:4px;padding:5px;overflow-wrap:anywhere}
#reading-rail-title{writing-mode:vertical-rl;max-height:55%;overflow:hidden;font-size:16px}
#reading-rail-layout{margin-top:auto}
#reading-layout-menu{position:fixed;z-index:40;width:300px;padding:10px;background:var(--white);border:1px solid #a9b9a6;box-shadow:var(--shadow);border-radius:7px;font-size:13px}
#reading-layout-menu button{display:block;width:100%;min-height:44px;text-align:left;padding:8px 10px;border-radius:4px;font-size:13px}
#reading-layout-menu button[aria-pressed=true]{background:#e3ebdd;font-weight:650;box-shadow:inset 3px 0 var(--green)}
#reading-layout-menu p{margin:10px;line-height:1.6;color:var(--muted)}
#reading-layout-close{border-top:1px solid var(--line);text-align:center!important}

/* Expanded journey rules have higher specificity than the shared card rules. */
body.reading-split #reading-dock #journey-panel #journey-size-bar{display:none!important}
/* One scroll surface: Scripture is normal flow inside the existing card body. */
.scripture-reference{display:inline-flex;align-items:center;gap:5px;text-align:left;min-height:36px;padding:5px 0;color:var(--green);font:inherit;font-weight:600;line-height:1.55;border:0;background:none;cursor:pointer;overflow-wrap:anywhere}
.scripture-reference[aria-expanded=true]{text-decoration:underline;text-underline-offset:4px}
.scripture>.scripture-reference{font-size:16px;min-height:40px}
.verse-list>.scripture-reference{display:flex;font-size:12px}
.scripture-reader{display:block;flex:1 0 100%;grid-column:1/-1;width:100%;min-width:0;margin:9px 0 14px;padding:13px 12px;border:1px solid #c8d2c2;border-radius:5px;background:#fffefa;color:var(--ink);overflow-wrap:anywhere;scroll-margin-block:12px}
.scripture>.scripture-reader{padding:12px 0 0;border:0;border-top:1px solid #d8dace;border-radius:0;background:transparent;margin-bottom:0}
.scripture-reader-heading{display:flex;gap:10px;align-items:start;justify-content:space-between}
.scripture-reader-heading strong{font-size:13px;line-height:1.65}
.scripture-reader button{font:inherit;font-size:11px;min-height:36px;line-height:1.45;padding:6px 9px;border:1px solid #c1cbb8;border-radius:4px;color:var(--green);background:#fffefa;cursor:pointer}
.scripture-reader-heading button{flex-shrink:0;margin-top:-6px}
.scripture-reader .scripture-edition{display:block;font-size:10px;letter-spacing:0;line-height:1.6;color:#596a60;margin:3px 0 12px}
.scripture-reader .scripture-verse{font-size:14px;line-height:1.9;margin:9px 0;padding:0 3px}
.scripture-verse sup{font-size:10px;font-weight:600;color:#567062;user-select:none}
.scripture-verse:focus-visible{outline:2px solid #995a1c;outline-offset:3px}
.scripture-verse.is-selected{border-left:2px solid #a56c43;padding-left:9px;background:#f1f2e8}
.scripture-reader .scripture-missing{font-size:12px;font-style:italic;color:#61685a}
.scripture-reader-actions{display:flex;gap:6px;flex-wrap:wrap;margin-top:14px}
.scripture-reader .scripture-source{font-size:10px;line-height:1.6;color:#626c60;margin:12px 0 0}
.scripture-reader .scripture-source a{display:inline;font-size:inherit;font-weight:400;min-height:0;padding:0;background:none;text-decoration:underline}
.scripture-load{font-size:12px!important}
.journey-passages>.scripture-reference{padding:6px 8px;background:#f0eee2;border-radius:3px;font-size:11px}
@media(max-width:600px),(max-width:900px) and (max-height:540px){.scripture-reader button,.scripture-reference{min-height:44px}.scripture-reader{padding:12px 10px}.scripture-reader .scripture-verse{font-size:14px}}
/* The journey panel shares AtlasUX's single-front-panel layout. */
.journey-filters{margin-bottom:16px}.journey-filters label{display:block;font-size:13px;font-weight:600;line-height:1.6;margin:8px 0 4px}
.journey-filters input[type=search]{box-sizing:border-box;width:100%;max-width:100%;min-height:44px;border:1px solid #a9b59f;border-radius:4px;background:#fffefa;color:var(--ink,#213d31);padding:9px 10px;font:inherit;font-size:14px}
.journey-filters #journey-book{min-height:44px;margin-bottom:5px;font-size:14px}
.journey-body .journey-clear-filters{margin:8px 0 14px;min-height:44px}.journey-empty{padding:16px 0}
.journey-era-context{margin:0 0 18px;padding:11px 12px;border:1px solid #d6ddcf;border-radius:5px;background:#f0f3eb;overflow-wrap:anywhere}
.journey-era-context .journey-era-label{margin:0;font-size:13px;line-height:1.6}.journey-era-label strong,.journey-era-label>span{display:block}.journey-era-label>span{font-size:12px;color:#55664c}
.journey-era-context details{margin-top:4px}.journey-era-context details p{font-size:13px;line-height:1.65;margin-bottom:10px}.journey-era-context details p:last-child{margin-bottom:0}
.journey-era-context>details>summary{min-height:44px;box-sizing:border-box;font-size:13px}.journey-era-context>.journey-note{margin:5px 0}
.journey-era-actions{display:flex;flex-wrap:wrap;gap:7px;margin-top:8px}.journey-era-actions button{min-height:44px;max-width:100%;font-size:13px;white-space:normal}
.journey-era-compact:not(:has(>details[open])){display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 6px;align-items:start}
.journey-era-compact>.journey-era-label{grid-column:1 / -1}
.journey-era-compact:not(:has(>details[open]))>details,.journey-era-compact:not(:has(>details[open]))>.journey-era-actions{margin-top:0}
.journey-era-compact>.journey-era-actions button{padding-inline:8px;font-size:12px}
@media(max-width:900px) and (max-height:540px){
 .journey-era-compact:not(:has(>details[open])){display:block}
 .journey-era-compact>.journey-era-actions{margin-top:4px!important}
}
.journey-panel{position:absolute;top:22px;right:24px;width:350px;max-height:calc(100% - 174px);z-index:4;display:flex;flex-direction:column;overflow:hidden;border:1px solid #d4d9cc;border-radius:8px;background:var(--white,#fafaf4);box-shadow:var(--shadow,0 10px 34px #10271e24);color:var(--ink,#213d31)}
.journey-panel[hidden],.journey-context-bar[hidden],.journey-controls[hidden],.journey-legend[hidden]{display:none!important}
.journey-heading{padding:12px 19px 14px;border-bottom:1px solid var(--line,#dbe0d4);flex-shrink:0}
.journey-heading-actions{display:flex;gap:5px;align-items:center;flex-wrap:wrap}
.journey-heading-actions button{font-size:10px;min-height:34px;padding:5px 8px;border-radius:4px;background:#edf0e7}
.journey-heading-actions #journey-collapse{margin-left:auto}
.journey-heading h2{font-size:21px;line-height:1.4;letter-spacing:-.6px;margin:11px 0 8px;font-weight:600}
.journey-heading-meta{display:flex;align-items:center;justify-content:space-between;gap:10px}
#journey-progress{font:12px Georgia,serif;color:var(--muted,#627461)}
#journey-reading{font-size:10px;text-decoration:underline;min-height:32px}
.journey-body{flex:1;min-height:0;padding:18px 19px;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;font-size:12px;line-height:1.85}
.journey-body h3{font-size:17px;line-height:1.5;letter-spacing:-.3px;margin:0 0 13px}
.journey-body p{margin:0 0 13px;overflow-wrap:anywhere}
.journey-body button{min-height:40px;border:1px solid var(--line,#dbe0d4);border-radius:4px;padding:9px 11px;text-align:left;font-size:11px;line-height:1.5;background:#f3f5ed}
.journey-body button:hover{background:#e4eadb}
.journey-body select{width:100%;max-width:100%;height:auto;min-height:44px;background:#fffefa;border:1px solid #a9b59f;border-radius:4px;padding:9px 7px;color:var(--ink);font:inherit;margin:2px 0 11px}
.journey-body details{margin-top:12px}.journey-body summary{min-height:36px;display:list-item;line-height:1.7;padding:8px 0;font-size:11px;font-weight:600;cursor:pointer}
.journey-card{padding:3px 0 22px;margin-bottom:21px;border-bottom:1px solid var(--line,#dbe0d4)}
.journey-card:last-child{border-bottom:0;margin-bottom:0}.journey-card>button{display:block;width:100%;margin-top:12px;background:var(--ink,#213d31);color:white;font-weight:600}.journey-card>button:hover{background:#355941}
.journey-card>small{display:block;color:var(--muted,#627461);font-size:10px}
.journey-region{font-size:10px;letter-spacing:.3px;color:var(--muted,#627461)}
.journey-passages{display:flex;flex-wrap:wrap;gap:6px;margin:13px 0}
.journey-passages a{display:block;padding:6px 8px;background:#f0eee2;border-radius:3px;font-size:10px;text-decoration:none;line-height:1.6}
.journey-scope,.journey-limit,.journey-edge-note{color:#746343;background:#f7f1e4;padding:10px 12px;border-left:2px solid #bd996b;font-size:11px;line-height:1.75}
.journey-outline{padding-left:24px;margin:20px 0 18px}
.journey-outline li{padding:0 0 10px 3px;color:var(--muted,#627461)}
.journey-outline li::marker{font:italic 13px Georgia,serif}
.journey-outline button{display:block;width:100%;border:0;background:transparent;padding:5px 4px;color:var(--ink);min-height:38px}
.journey-outline small{display:block;font-size:9px;padding-left:4px;line-height:1.6}
.journey-summary{font-size:13px;line-height:1.9}.journey-transition{color:var(--muted,#627461);font-size:11px;border-top:1px solid var(--line,#dbe0d4);padding-top:12px}
.journey-place{border:1px solid var(--line,#dbe0d4);border-radius:5px;padding:12px;margin:15px 0}
.journey-place-heading{margin-bottom:9px}.journey-place-heading h4{font-size:14px;margin:0 0 5px;line-height:1.5}.journey-role{display:block;font-size:9px;color:#77664f}
.journey-selection{font-size:11px;font-weight:600;line-height:1.7}.journey-note{font-size:10px;color:var(--muted,#627461)}
.journey-candidate{border-top:1px solid var(--line,#dbe0d4);padding-top:13px;margin-top:8px}.journey-candidate h5{font-size:12px;margin:0 0 7px;line-height:1.6}.journey-candidate>small{display:inline-block;font-size:9px;padding:2px 6px;background:#ecece1;margin-bottom:7px}.journey-candidate p{font-size:11px;line-height:1.75}.journey-place>button{margin-top:12px}
.journey-source{border-top:1px solid var(--line,#dbe0d4);padding:11px 0;font-size:10px;line-height:1.7}.journey-source>a{display:block;overflow-wrap:anywhere;font-weight:600;text-decoration:none}.journey-source>small{display:block;font-size:9px;margin:5px 0;color:var(--muted,#627461)}.journey-source p{font-size:10px;margin:5px 0 0}
.journey-legend{flex-shrink:0;font-size:9px;line-height:1.7;color:#7b684a;margin:0;padding:9px 19px;background:#f6f0e3;border-top:1px solid #e2dbc9}
.journey-controls{flex-shrink:0;border-top:1px solid var(--line,#dbe0d4);padding:10px 14px;background:#f7f8f1}
.journey-control-buttons{display:grid;grid-template-columns:1fr 1.3fr 1fr;gap:6px}.journey-control-buttons button{min-height:42px;border:1px solid var(--line,#dbe0d4);border-radius:4px;font-size:11px;padding:6px 3px;background:#fffefa;line-height:1.45}.journey-control-buttons #journey-play{background:var(--ink,#213d31);color:white;border-color:var(--ink,#213d31)}.journey-control-buttons button:disabled{opacity:.38;cursor:default}#journey-play-state{font-size:9px;color:var(--muted,#627461);text-align:center;margin:8px 0 0;line-height:1.65}
.journey-context-bar{position:absolute;left:24px;top:116px;max-width:270px;z-index:3;background:#fcf8e9f5;border:1px solid #c0a372;box-shadow:var(--shadow);border-radius:5px;padding:3px}
.journey-context-bar button{min-height:38px;padding:7px 13px;font-size:11px;font-weight:600}
.journey-map-marker{pointer-events:auto;display:block;border:1px solid #c3975d;border-radius:15px;background:#fff6e5ed;padding:6px 9px;white-space:nowrap;color:#66482b;font-size:10px;font-weight:600;max-width:195px;overflow:hidden;text-overflow:ellipsis;box-shadow:0 2px 6px #10271e22;min-height:32px}
.journey-map-marker.current{background:#71492b;color:#fff9ec;border-color:#fff2cd;z-index:2;box-shadow:0 0 0 2px #ffffff80}
.journey-map-marker.candidates,.journey-map-marker.region{border-style:dashed;border-radius:5px;min-height:36px;background:#fff8eb;color:#684923;max-width:235px}
.journey-map-marker.candidates.current,.journey-map-marker.region.current{border-color:#71492b;box-shadow:0 0 0 2px #fff8e7,0 2px 8px #31200d33}
.journey-marker-name{display:block;overflow:hidden;text-overflow:ellipsis;line-height:1.4}.journey-marker-kind{display:block;font-size:9px;line-height:1.4;font-weight:400}
@media(max-width:600px){.journey-map-marker.candidates,.journey-map-marker.region{max-width:180px}}
.journey-map-marker.candidate-option{font-size:9px;min-height:32px;max-width:180px;background:#fffdf5;color:#684923;border:1px dotted #8c673d;font-weight:400}
.journey-map-explanation{padding:10px 12px;margin:0 0 14px;background:#edf0e6;border:1px solid #d9dfcf;border-radius:5px;font-size:11px;line-height:1.65}
.journey-map-explanation strong{display:block;margin-bottom:4px}.journey-map-explanation p{margin:0;font-size:10px}
.journey-stage-badge{display:inline-block;margin:0 0 4px 4px;padding:1px 6px;font-size:9px;border:1px solid #c6d0ba;border-radius:3px;background:#edf1e6;color:#435940;line-height:1.7}
.journey-stage-badge.candidates,.journey-stage-badge.region{border-style:dashed;background:#faf1df;color:#73522e}.journey-stage-badge.unlocated{background:#efefeb;color:#65675e;border-color:#d4d5ce}
.journey-outline li{position:relative}.journey-outline li:not(:last-child)::before{content:'';position:absolute;left:-13px;top:27px;bottom:-2px;border-left:1px solid #d3dacb}
.journey-legend-key{display:inline-flex;align-items:center;gap:5px;margin-right:10px;white-space:nowrap}.journey-legend-key i{display:inline-block;width:20px;border-top:2px solid #826139}.journey-legend-key.dotted i{border-top-style:dotted}.journey-legend-note{display:block}
.journey-visits{padding:12px;background:#f5eddb;border:1px solid #ccaf79;margin-bottom:17px;border-radius:5px}.journey-visits h3{font-size:12px}.journey-visits button{display:block;width:100%;margin:6px 0}
.journey-error{padding:11px;background:#f4e8d7;border:1px solid #dcc7a6;border-radius:4px;font-size:11px}
.journey-panel :focus-visible,.journey-context-bar :focus-visible,.journey-map-marker:focus-visible{outline:3px solid #b2753f;outline-offset:3px}
@media(min-width:601px) and (min-height:541px){#journey-reading{display:none}}
@media(max-width:1250px){.journey-panel{max-height:calc(100% - 164px)}}
@media(max-width:600px),(max-width:900px) and (max-height:540px){
 .journey-panel{left:10px;right:10px;top:auto;bottom:38px;width:auto;max-height:49%;border-radius:7px;z-index:4}
 .journey-heading{padding:7px 13px 8px}.journey-heading h2{font-size:17px;margin:5px 0}.journey-heading-actions{gap:4px}.journey-heading-actions button{min-height:32px;padding:5px 8px}
 .journey-heading-meta{gap:8px}#journey-reading{min-height:32px}.journey-body{padding:14px;line-height:1.8}.journey-body h3{font-size:16px}
 .journey-legend{padding:6px 13px;font-size:9px}.journey-controls{padding:7px 10px}.journey-control-buttons button{min-height:40px}#journey-play-state{margin-top:4px;font-size:9px}
 .journey-context-bar{left:10px;top:103px;max-width:220px}.journey-context-bar button{min-height:37px;padding:6px 9px;font-size:10px}
 body.journey-panel-open .controls{top:58px;right:10px;bottom:auto;flex-direction:row}body.journey-panel-open .viewstrip{display:none}
 body.ux-reading-journey .journey-panel{top:7px!important;bottom:max(36px,env(safe-area-inset-bottom))!important;max-height:none!important}
 body.ux-reading-journey .journey-body{flex:1;min-height:0}body.ux-reading-journey .journey-context-bar{display:none}
}
@media(max-width:380px){.journey-heading h2{font-size:15px}.journey-heading-actions button{padding:5px 6px;font-size:9px}.journey-heading{padding-inline:10px}.journey-legend{font-size:8px}.journey-control-buttons button{font-size:10px}}
@media(max-height:540px){.journey-panel{max-height:calc(100% - 64px);bottom:38px;top:auto}.journey-heading h2{font-size:16px;margin:3px 0}.journey-heading{padding-block:5px}.journey-legend{padding-block:5px}.journey-context-bar{top:55px}}
@media(prefers-reduced-motion:reduce){.journey-panel,.journey-map-marker{scroll-behavior:auto}}
/* Short desktop windows reserve space for map controls without reducing the story to a sliver. */
@media(min-width:901px) and (max-height:800px){
 .journey-panel{top:12px;max-height:calc(100% - 118px)}
 .journey-heading{padding:8px 15px 10px}.journey-heading-actions button{min-height:30px;padding:4px 7px}
 .journey-heading h2{font-size:19px;line-height:1.3;margin:7px 0 5px}.journey-heading-meta{min-height:16px}
 .journey-body{padding:14px 16px}.journey-controls{padding:7px 12px}.journey-control-buttons button{min-height:38px}
 #journey-play-state{margin-top:5px}.journey-legend{padding:7px 15px}
}

/* JNY completion: keep compact reading useful and reserve an unobstructed map area. */
@media(max-width:600px){
 .journey-panel{height:min(370px,calc(100% - 150px));max-height:none}
 .journey-heading{padding:5px 10px 6px}.journey-heading-actions button{min-height:28px;padding:4px 6px}
 .journey-heading h2{font-size:15px;line-height:1.3;margin:6px 0 3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .journey-heading-meta,#journey-reading{min-height:26px}#journey-reading{font-size:10px}
 .journey-body{padding:12px}.journey-legend{font-size:9px;padding:5px 11px;line-height:1.45}
 .journey-controls{padding:5px 9px}.journey-control-buttons button{min-height:38px}
 body.journey-panel-open .map-top{display:none}body.journey-panel-open .controls{top:8px}
 body.ux-reading-journey .journey-panel{height:auto}
}
@media(min-width:601px) and (max-width:900px) and (max-height:540px){
 .journey-panel{left:auto;right:8px;top:6px;bottom:30px;width:62%;max-width:560px;max-height:none;height:auto;display:grid;grid-template-columns:45% 55%;grid-template-rows:minmax(0,1fr) auto}
 .journey-heading{grid-column:1;grid-row:1;padding:6px 8px;overflow:auto;border-bottom:0;border-right:1px solid var(--line)}
 .journey-heading-actions{gap:2px;flex-wrap:nowrap}.journey-heading-actions button{font-size:9px;min-height:26px;padding:3px}
 .journey-heading h2{font-size:14px;line-height:1.3;margin:6px 0 4px}.journey-heading-meta{gap:4px}#journey-reading{font-size:9px;min-height:26px}
 .journey-body{grid-column:2;grid-row:1;padding:10px;font-size:11px;min-height:0}.journey-body h3{font-size:14px}
 .journey-legend{grid-column:1;grid-row:2;font-size:8px;line-height:1.45;padding:7px 8px;margin:0}
 .journey-controls{grid-column:2;grid-row:2;padding:5px 7px}.journey-control-buttons{gap:3px}.journey-control-buttons button{font-size:9px;min-height:38px}#journey-play-state{font-size:8px;line-height:1.4;margin-top:4px}
 body.journey-panel-open .controls{left:8px;right:auto;top:8px}body.journey-panel-open .controls .desktop-control{display:none}
 body.ux-reading-journey .journey-panel{width:auto;max-width:none;display:grid;grid-template-columns:35% 65%}
}

/* Keep camera meaning visible even when the description is scrolled. */
.journey-map-state{font-size:10px;line-height:1.5;margin:6px 0 0;color:#69532d}.journey-map-state[hidden]{display:none}.journey-map-summary{padding:10px 12px;border:1px solid #c9d1bb;background:#eef2e6;border-radius:4px;font-size:11px}

@media(max-width:600px) and (max-height:700px){.journey-legend{font-size:8px;line-height:1.3;padding-block:4px}.journey-map-state{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:9px}}
.journey-place>.modern-context{margin:7px 0 9px;padding:7px 9px}
.journey-place>.modern-context .modern-context-text{font-size:12px;line-height:1.5}
.journey-place .modern-context-evidence{margin-top:14px}

.journey-location-status{padding:6px 0;color:#69532d;font-size:11px;line-height:1.6}
.journey-body .journey-map-guidance{margin:6px 0 14px}.journey-map-guidance summary{min-height:44px;box-sizing:border-box}.journey-map-guidance .journey-map-explanation{margin:4px 0 0}
.related-journeys{margin-top:22px;padding-top:17px;border-top:1px solid var(--line,#dbe0d4)}
.related-journeys>h3{margin:0 0 12px;font-size:14px;line-height:1.6}
.related-journey-group{margin:0 0 10px;padding:0 0 10px;border-bottom:1px solid var(--line,#dbe0d4)}
.related-journey-group h4{margin:0 0 4px;font-size:12px;line-height:1.7}
.related-journeys summary{min-height:44px;box-sizing:border-box;padding:9px 0;font-size:12px;line-height:1.7;cursor:pointer}
.related-journeys summary small{display:block;padding-left:14px;font-size:10px;color:var(--muted,#627461)}
.related-journeys .related-journey-link{display:block;width:100%;min-height:44px;border:1px solid var(--line,#dbe0d4);border-radius:4px;padding:9px 11px;margin:6px 0;background:#f4f5ee;color:var(--ink,#213d31);text-align:left;white-space:normal;overflow-wrap:anywhere;font:inherit;font-size:12px;line-height:1.6}
.related-journey-link span,.related-journey-link small{display:block}.related-journey-link small{font-size:10px;color:var(--muted,#627461);margin-top:3px}
.related-journey-link:hover{background:#e9edde}.related-journeys :focus-visible{outline:3px solid #b2753f;outline-offset:3px}
.related-journey-status:empty{display:none}.related-journey-status{font-size:11px;line-height:1.7;padding:7px 0;color:#69532d}
/* Keep full-width, 44px stage controls within the existing short-phone card. */
@media(max-width:600px) and (max-height:700px){
 .journey-controls{display:grid;grid-template-columns:minmax(0,1fr);gap:4px}
 .journey-control-buttons{grid-column:1;grid-row:1;align-items:end;gap:3px}
 .journey-control-buttons button{min-height:44px;padding-inline:1px}
 #journey-play-state{grid-column:1 / -1;margin:0}
}
@media(max-width:600px) and (max-height:700px){
 .journey-heading{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:0 5px;padding:0 10px}
 .journey-heading-actions{grid-column:1 / -1;grid-row:1;flex-wrap:nowrap}
 .journey-heading h2{grid-column:1;grid-row:2;min-width:0;margin:0;font-size:14px}
 .journey-heading-meta{grid-column:2;grid-row:2;gap:4px;min-width:0;min-height:26px}
 #journey-progress,#journey-reading{font-size:9px}
 #journey-reading{padding:0 2px}
 .journey-map-state{grid-column:1 / -1;grid-row:3;margin:0;font-size:9px;line-height:1.3}
}
@media(max-width:600px) and (max-height:700px){
 .journey-body{padding:6px 10px}
 .journey-body h3{font-size:14px;line-height:1.4;margin-bottom:4px}
 .journey-summary{font-size:12px;line-height:1.65}
}
/* STAB-C: caution text is legible in both the map and reading layouts. */
.journey-scope,.journey-limit,.journey-edge-note,.journey-note,.journey-role,
.journey-location-status,.journey-selection,.journey-map-explanation,.journey-map-explanation p,
.journey-map-state,.journey-map-summary,.journey-legend,.journey-error{font-size:12px;line-height:1.5}
.journey-candidate p.journey-limit,.journey-candidate p.journey-note{font-size:12px;line-height:1.5}
.journey-legend-inline{display:none}
@media(max-width:600px),(max-width:900px) and (max-height:540px){
 #journey-legend{display:none!important}
 .journey-body>.journey-legend-inline{display:block;margin:14px 0 0;font-size:12px;line-height:1.5;padding:10px}
 .journey-body,.journey-summary,.journey-description,.journey-candidate p{font-size:13px;line-height:1.6}
 .journey-body .journey-note,.journey-body .journey-limit,.journey-body .candidate-access-types{font-size:12px;line-height:1.5}
 .journey-source,.journey-source p,.journey-source>small,.journey-candidate>small{font-size:12px;line-height:1.5}
 .journey-body button,.journey-body summary,.journey-heading-actions button,
 #journey-reading,.journey-control-buttons button,.journey-context-bar button{min-height:44px}
 .journey-heading-actions button{min-width:44px}
 .journey-map-state{white-space:normal;overflow:visible;text-overflow:clip}
}
@media(max-width:600px) and (max-height:700px){
 .journey-heading-meta{grid-row:2 / span 2;align-self:center}
 .journey-heading h2{align-self:end}
 .journey-map-state{grid-column:1;grid-row:3}
}
@media(min-width:601px) and (max-width:900px) and (max-height:540px){
 body.journey-panel-open .controls{flex-direction:column;align-items:flex-start;gap:5px}
 .journey-heading{grid-row:1 / -1;overflow:visible;min-width:0;padding-block:2px}
 .journey-heading-actions{display:grid;grid-template-columns:repeat(2,minmax(44px,1fr));gap:2px}
 .journey-heading-actions #journey-collapse{margin-left:0}
 .journey-heading h2{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-block:2px}
 .journey-heading-meta{gap:2px}
 .journey-map-state{margin-block:0}
}

/* VIS-01: narrative emphasis uses the existing heading and controls. */
#journey-progress.has-current-stage{font-family:inherit;font-weight:600;font-size:13px;line-height:1.5;color:#254837;overflow-wrap:anywhere;min-width:0}
.journey-stage-count{white-space:nowrap}
.journey-heading-meta{align-items:flex-start}
#journey-reading{flex-shrink:0}
/* Reserve two title lines outside the buttons, including at the journey ends. */
.journey-neighbor-titles{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;height:36px;margin-bottom:6px;color:var(--muted,#627461)}
.journey-neighbor-title{min-width:0;font-size:12px;line-height:18px;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow-wrap:anywhere}
#journey-next-title{text-align:right}
.journey-control-buttons{grid-template-columns:repeat(3,minmax(0,1fr))}
.journey-control-buttons button{box-sizing:border-box;min-width:0;height:44px;min-height:44px;padding:3px 2px;font-size:12px;line-height:1.4}
.journey-legend-emphasis{display:block;font-weight:600;color:#514328}
#journey-legend{display:none!important}
.journey-body>.journey-legend-inline{display:block;margin:16px 0 0;padding:10px;font-size:12px;line-height:1.5}
.journey-unlocated-notice{font-size:12px;line-height:1.5;border-left:3px solid #77846f;padding:7px 10px;background:#edf0e6}
.journey-direction{position:absolute;display:block;width:28px;height:24px;z-index:2;pointer-events:none;transform-origin:center;color:#a2440d}
.journey-direction[data-mode=sea]{color:#00697f}
.journey-direction svg{display:block;width:100%;height:100%;overflow:visible}
.journey-direction path{fill:none;stroke-linecap:round;stroke-linejoin:round}
.journey-direction-halo{stroke:#fffbed;stroke-width:7}
.journey-direction-ink{stroke:currentColor;stroke-width:3}
@media(max-width:600px),(max-width:900px) and (max-height:540px){
 .journey-neighbor-titles{display:none}
 #journey-progress.has-current-stage{font-size:12px;line-height:1.5}
 .journey-heading-meta{align-items:center}
 #journey-progress.has-current-stage{display:flex;align-items:flex-start;gap:3px}
 .journey-current-name{min-width:0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
 .journey-stage-count{flex-shrink:0}
}
@media(max-width:600px) and (max-height:700px){
 .journey-heading h2{grid-column:1 / -1;grid-row:2;margin-block:0}
 .journey-heading-meta{grid-column:1 / -1;grid-row:3;justify-content:space-between}
 .journey-map-state{display:none}
}

/* Bounded reading space: resize the card without resizing or moving the map. */
#journey-panel.journey-layout-ready:not(.journey-layout-mobile){top:var(--journey-top,22px);bottom:auto;width:var(--journey-width,420px);height:var(--journey-height,640px);max-height:none}
#journey-panel.journey-layout-ready #journey-reading{display:block;text-decoration:none;font-size:12px;min-height:44px}
#journey-panel.journey-layout-ready .card-resize-width,#journey-panel.journey-layout-ready .card-resize-height{position:absolute;z-index:4;touch-action:none;outline-offset:-3px}
#journey-panel [id^=journey-resize-][hidden]{display:none!important}
.journey-body>.journey-era-disclosure{margin:14px 0 18px;border-block:1px solid #ded7e5}
.journey-body>.journey-era-disclosure>summary{min-height:44px;padding:10px 2px;font-size:13px;color:#684882}
.journey-era-disclosure>.journey-era-context{margin:0 0 10px}
#journey-size-bar{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-shrink:0;min-height:36px;padding:0 12px;background:#eef1e9;border-top:1px solid #d4d9cc}
#journey-size-bar[hidden]{display:none!important}
#journey-resize-corner{min-height:36px;padding:5px 6px;color:#365647;font:inherit;font-size:12px;cursor:nesw-resize;touch-action:none;border-radius:4px}
#journey-resize-corner:hover,#journey-resize-corner:focus-visible{background:#dce5d5}
#journey-resize-corner>span:first-child{font-size:18px;margin-right:5px}
#journey-size-value{font-size:11px;color:#64735c;font-variant-numeric:tabular-nums}
#journey-panel.journey-layout-ready .card-resize-width{top:12px;bottom:48px;height:auto;margin:0;width:12px}
#journey-panel.journey-layout-ready .card-resize-height{height:10px}
@media(pointer:coarse){#journey-resize-corner{min-height:44px}}
#journey-panel.journey-layout-ready .journey-body{font-size:14px;line-height:1.8;padding:18px 22px 28px;scrollbar-gutter:stable;overflow-anchor:none}
#journey-panel.journey-layout-ready .journey-summary{font-size:15px;line-height:1.8}
#journey-panel.journey-layout-ready .journey-body h3{font-size:18px;line-height:1.5}
#journey-panel.journey-layout-ready .journey-body button,#journey-panel.journey-layout-ready .journey-body summary{font-size:13px;min-height:44px}
#journey-panel.journey-layout-ready .journey-description,#journey-panel.journey-layout-ready .journey-candidate p{font-size:14px;line-height:1.75}
#journey-panel.journey-layout-ready .journey-source,#journey-panel.journey-layout-ready .journey-source p,#journey-panel.journey-layout-ready .journey-source>small{font-size:12px;line-height:1.65}
#journey-panel.journey-layout-ready .journey-heading-actions button{font-size:12px;min-height:44px;padding:6px 9px}
#journey-panel.journey-layout-ready .journey-heading{padding:12px 20px}
#journey-panel.journey-layout-ready .journey-heading h2{font-size:22px;margin:9px 0 7px}
#journey-play-state{font-size:11px;line-height:1.5}
@media(max-width:600px),(max-width:900px) and (max-height:540px){
 #journey-panel.journey-layout-ready .journey-heading{padding:5px 12px 7px}
 #journey-panel.journey-layout-ready .journey-heading h2{font-size:17px;margin:5px 0}
 #journey-panel.journey-layout-ready .journey-heading-actions button{font-size:11px;padding:5px 7px}
 #journey-panel.journey-layout-ready .journey-body{padding:14px 16px 22px}
 #journey-panel.journey-layout-ready .journey-body h3{font-size:17px}
 #journey-panel.journey-layout-ready .journey-summary{font-size:14px;line-height:1.75}
}
@media(max-width:600px){
 #journey-panel.journey-layout-ready{height:min(440px,calc(100% - 150px))}
 body.ux-reading-journey #journey-panel.journey-layout-ready{height:auto}
}
@media(max-width:600px) and (max-height:700px){
 #journey-panel.journey-layout-ready .journey-heading{padding:0 10px}
 #journey-panel.journey-layout-ready .journey-heading h2{font-size:15px;margin:0}
 #journey-panel.journey-layout-ready .journey-body{padding:6px 12px}
 #journey-panel.journey-layout-ready .journey-body h3{font-size:16px}
 #journey-play-state{font-size:10px}
}
@media(min-width:901px) and (max-height:800px){
 #journey-panel.journey-layout-ready .journey-heading{padding:6px 16px}
 #journey-panel.journey-layout-ready .journey-heading h2{font-size:19px;margin:5px 0}
 #journey-panel.journey-layout-ready .journey-heading-actions button,#journey-panel.journey-layout-ready #journey-reading{min-height:36px}
 #journey-panel.journey-layout-ready .journey-body{padding:14px 18px 22px}
 .journey-neighbor-titles{display:none}
 .journey-control-buttons button{min-height:44px}
}
@media(min-width:601px) and (max-width:900px) and (max-height:540px){
 #journey-panel.journey-layout-ready .journey-heading{padding:2px 8px}
 #journey-panel.journey-layout-ready .journey-heading h2{font-size:15px}
 #journey-panel.journey-layout-ready .journey-heading-actions button{font-size:11px;padding:4px}
 #journey-panel.journey-layout-ready .journey-body{padding:10px 12px}
 #journey-play-state{font-size:10px;line-height:1.4;margin-top:2px}
 .journey-controls{padding-block:4px}
 body.ux-reading-journey .journey-controls{display:grid;grid-template-columns:minmax(0,1fr);gap:3px}
 body.ux-reading-journey .journey-control-buttons{grid-column:1;grid-row:1;align-items:center}
 body.ux-reading-journey #journey-play-state{grid-column:1 / -1;margin:0}
 body.ux-reading-journey #journey-panel.journey-layout-ready .journey-heading h2{margin-block:2px}
 body.ux-reading-journey .journey-map-state{display:none}
}

@media(max-width:600px) and (max-height:650px){
 #journey-panel.journey-layout-ready{height:min(440px,calc(100% - 138px))}
 #journey-panel.journey-layout-ready .journey-controls{padding-block:3px}
}
/* Share a 44px heading row instead of spending a second row on the reading
   button. The panel height and the map's reserved space remain unchanged. */
@media(max-width:600px) and (max-height:700px){
 #journey-panel.journey-layout-ready .journey-heading{grid-template-columns:minmax(0,1fr) auto;grid-template-rows:44px 22px 22px;gap:0 6px}
 #journey-panel.journey-layout-ready .journey-heading h2{grid-column:1;grid-row:2;align-self:end;min-width:0}
 #journey-panel.journey-layout-ready .journey-heading-meta{display:contents}
 #journey-panel.journey-layout-ready #journey-progress{grid-column:1;grid-row:3;align-self:start;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;line-height:20px}
 #journey-panel.journey-layout-ready #journey-reading{grid-column:2;grid-row:2 / span 2;align-self:center;min-height:44px;margin:0;font-size:11px}
 #journey-panel.journey-layout-ready .journey-current-name{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
}

.journey-era-explained{border-color:#c6b4d9;background:#f7f2fa;border-left:3px solid #77539a}
.journey-era-highlight{margin:10px 0!important;color:#4e3465;font-size:13px;line-height:1.65}.journey-era-highlight>strong,.journey-era-highlight>span{display:block}.journey-era-highlight>strong{font-size:14px;margin-bottom:4px}
.journey-era-reading>summary{color:#593979;font-weight:650}.journey-era-point{padding:10px 0;border-top:1px solid #ded1e9}.journey-era-point h4{margin:0 0 5px;font-size:13px;color:#49305f}.journey-era-point a{display:block;font-size:11px;line-height:1.5;margin:4px 0;overflow-wrap:anywhere}.journey-era-point p{margin:0 0 5px!important}

/* Low map height: keep the 44px controls and readable body inside the card. */
#journey-panel.journey-layout-short .journey-heading{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:6px;padding:4px 10px}
#journey-panel.journey-layout-short .journey-heading-actions{grid-column:1 / -1;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:3px}
#journey-panel.journey-layout-short .journey-heading-actions button,#journey-panel.journey-layout-short #journey-reading{min-width:0;min-height:44px;padding:4px 2px;font-size:11px;line-height:1.3;overflow-wrap:anywhere}
#journey-panel.journey-layout-short #journey-collapse{margin-left:0}
#journey-panel.journey-layout-short .journey-heading h2{grid-column:1;grid-row:2;min-width:0;font-size:17px;line-height:24px;margin:5px 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#journey-panel.journey-layout-short #journey-progress{display:block;font-size:12px;line-height:18px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#journey-panel.journey-layout-short .journey-heading-meta{grid-column:2;grid-row:2;align-self:center;min-width:0}
#journey-panel.journey-layout-short .journey-current-name{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
#journey-panel.journey-layout-short #journey-map-state{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
#journey-panel.journey-layout-short .journey-neighbor-titles,#journey-panel.journey-layout-short #journey-size-bar{display:none!important}
#journey-panel.journey-layout-short .journey-controls{padding:6px 10px}
#journey-panel.journey-layout-short #journey-play-state{font-size:11px;line-height:16px;margin:4px 0 0}
#journey-panel.journey-layout-short .journey-body{padding:12px 14px;min-height:0}
body.journey-short-layout .controls{top:auto;bottom:54px;left:12px;right:auto;flex-direction:column;align-items:flex-start;gap:5px}
body.journey-short-layout .controls .control-group{flex-direction:row}
body.journey-short-layout .viewstrip{display:none}

/* Opt-in desktop reading can cross the map's top edge without a modal backdrop. */
#journey-panel.journey-viewport{position:fixed;z-index:8}
#journey-panel.journey-layout-ready #journey-resize-top{top:0;bottom:auto;height:12px;width:100%;left:0;margin:0}
#journey-panel.journey-layout-ready #journey-resize-top:after{top:3px;bottom:auto}
#journey-panel.journey-viewport .journey-heading{padding:12px 16px 8px}
#journey-panel.journey-viewport .journey-heading h2{font-size:20px;margin:5px 0}
#journey-panel.journey-viewport .journey-heading-actions button,#journey-panel.journey-viewport #journey-reading{min-height:44px}
#journey-panel.journey-viewport .journey-controls{padding:8px 14px}
#journey-panel.journey-viewport .journey-neighbor-titles{display:none}
#journey-panel.journey-viewport #journey-play-state{margin:4px 0 0}
#journey-panel.journey-viewport #journey-size-bar{display:flex!important}
/* On a small desktop window, expansion must add reading space rather than
   spend the gain on a taller heading. The body retains the location status. */
@media(min-width:601px) and (max-width:900px) and (min-height:541px) and (max-height:700px){
 #journey-panel.journey-viewport .journey-heading{padding:8px 12px 6px}
 #journey-panel.journey-viewport #journey-map-state{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
}

/* One scroll surface: the optional sequence sits above the current reading. */
.journey-progress-wrap{display:flex;align-items:center;gap:8px;min-width:0;flex:1}
.journey-progress-wrap #journey-progress{flex:1;min-width:0}
#journey-outline-toggle{flex-shrink:0;min-height:44px;padding:5px 8px;font-size:12px;white-space:nowrap;border:1px solid #cbd3bf;border-radius:4px;background:#edf1e7}
#journey-outline-toggle[hidden],#journey-outline-panel[hidden]{display:none!important}
#journey-outline-panel{border-bottom:1px solid #cbd3bf;margin-bottom:18px;padding-bottom:12px}
.journey-outline-note{font-size:12px;color:var(--muted,#627461);margin-top:0}
.journey-outline li[data-current-stage=true]{background:#e8eee1;border-left:3px solid #365c48;padding-left:10px}
.journey-outline-current{display:inline-block;font-size:11px;color:#365c48;margin-right:6px}
#journey-panel.journey-layout-short #journey-outline-toggle{font-size:11px;padding:3px 6px}
@media(max-width:600px) and (max-height:700px){
 #journey-panel.journey-layout-ready .journey-heading{grid-template-rows:44px 22px 44px}
 #journey-panel.journey-layout-ready .journey-progress-wrap{grid-column:1;grid-row:3;gap:4px}
 #journey-panel.journey-layout-ready .journey-progress-wrap #journey-progress{align-self:center}
 #journey-panel.journey-layout-ready #journey-outline-toggle{font-size:11px;padding-inline:5px}
}

/* Scene emphasis is an optional display choice, independent of map style. */
.story-focus-controls{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:12px 0}
.story-focus-controls label{display:flex;align-items:center;gap:7px;min-height:44px;cursor:pointer;padding:4px 8px;border:1px solid #bcc9b5;border-radius:4px}
.story-focus-controls input{accent-color:#365c48;width:18px;height:18px}
.story-focus-controls button{padding:6px 10px;background:#edf1e7;border:1px solid #cbd3bf;border-radius:4px;color:inherit;cursor:pointer}
.story-focus-controls small{flex-basis:100%;color:#52634e}
/* VIS-02: editorial details stay in the card's one scrolling surface. */
.story-reading{margin:16px 0;border-top:1px solid var(--line,#d8dccf)}
.story-reading>details{border-bottom:1px solid var(--line,#d8dccf);padding:8px 0}
.story-reading summary{min-height:44px;align-content:center;cursor:pointer;font-weight:650;padding:8px 4px;line-height:1.5}
.story-reading p,.story-observation p{font-size:16px;line-height:1.75;overflow-wrap:anywhere}
.story-reading button,.story-observation button{min-height:44px;max-width:100%;text-align:left;white-space:normal;line-height:1.5}
.story-observation{margin:12px 0 4px}
.story-observation-question{color:#336458;font-weight:700;margin:0}
.story-observation button{margin:8px 0}
.story-reading-detail>p{color:#657063}
.story-sequence{padding-left:28px;margin:16px 0}
.story-sequence>li{padding:0 0 16px 8px;border-left:2px solid #d8dccf}
.story-sequence>li.current{border-color:#346959;background:#f1f5ed}
.story-sequence>li::marker{font-weight:700;color:#346959}
.story-sequence p{margin:8px 0}
.story-sequence details>button{display:block;width:100%;margin:6px 0}
.story-reading-passages{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0}
.story-reading-passages .scripture-reference{font-size:14px}
.story-people-nodes{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(170px,100%),1fr));gap:8px}
.story-people-nodes>details{border:1px solid #bdcbbd;border-radius:6px;padding:8px;background:#f8faf5;min-width:0}
.story-people-nodes p{margin:6px 0}
.story-relation-diagram{margin:18px 0;display:grid;gap:10px}
.story-relation{display:grid;grid-template-columns:1fr 1.2fr 1fr;gap:8px;align-items:center;text-align:center;font-size:16px;overflow-wrap:anywhere}
.story-relation-label{font-size:14px;color:#52685d;border-bottom:2px solid #91aa99;padding:4px 0}
.story-relationship-list{padding-left:20px}
.story-reading [aria-current=step]{font-weight:700}
.story-reading :focus-visible,.story-observation :focus-visible{outline:3px solid #bd863e;outline-offset:3px}
@media(max-width:600px){.story-people-nodes{grid-template-columns:1fr}.story-relation{gap:4px;font-size:15px}}

/* Evidence lives in the current card's scroll surface. */
.evidence-summary{margin:18px 0;border-block:1px solid #cbd3bf;padding:8px 0;overflow-wrap:anywhere}
.evidence-summary summary{min-height:44px;padding:10px 4px;line-height:1.6;font-weight:650;cursor:pointer}
.evidence-summary p,.evidence-summary-body{font-size:16px;line-height:1.75}
.evidence-summary h4{font-size:17px;line-height:1.5;margin:14px 0}
.evidence-summary small{display:block;font-size:13px;line-height:1.6;color:#53665b}
.evidence-summary button{min-height:44px;max-width:100%;padding:8px 12px;white-space:normal}
.evidence-summary a{display:inline-flex;align-items:center;min-height:44px;overflow-wrap:anywhere;text-decoration:underline;text-underline-offset:3px}
.evidence-summary .evidence-claim{padding:14px 0;border-bottom:1px solid #d8dccf}
.evidence-summary .evidence-kind{font-weight:650;color:#336458}
.evidence-summary .evidence-summary-limit{border-inline-start:3px solid #997244;padding-inline-start:12px;color:#46594e}
.evidence-summary .evidence-source-list{padding-left:20px}
.evidence-summary .evidence-source-list li{margin:14px 0}
.evidence-summary .evidence-source-list p{font-size:14px}
.evidence-selected{padding:10px 12px;background:#f0f2e9;margin-top:16px}
.evidence-summary details details{padding-inline-start:8px;border-inline-start:1px solid #cbd3bf}
.evidence-summary :focus-visible{outline:3px solid #bd863e;outline-offset:3px}

#journey-panel #journey-body .evidence-summary summary,#detail-body .evidence-summary summary{font-size:16px}
.historical-controls{position:relative;margin:0 0 8px;color:var(--ink);font-size:12px;line-height:1.5}
.historical-controls>summary{width:fit-content;max-width:100%;min-height:44px;display:flex;align-items:center;gap:10px;cursor:pointer;padding:5px 10px;border:1px solid var(--line);border-radius:5px;background:#f7f7f0;box-sizing:border-box;list-style:revert}
#historical-label{font-weight:650;white-space:nowrap}#historical-compact{color:var(--muted);overflow-wrap:anywhere}
.historical-controls-body{position:absolute;z-index:12;top:100%;left:0;width:min(430px,calc(100vw - 32px));max-height:min(60vh,470px);overflow:auto;box-sizing:border-box;background:var(--white);border:1px solid var(--line);border-radius:6px;padding:14px;box-shadow:var(--shadow)}
.historical-controls-body p{font-size:12px;line-height:1.65;margin:0 0 9px}.historical-actions{display:flex;flex-wrap:wrap;gap:7px}.historical-actions select,.historical-actions button{font:inherit;min-height:44px;max-width:100%;padding:7px 10px;border:1px solid #bac7b5;border-radius:4px;background:#f2f4e9;color:var(--ink)}
#historical-status{margin-top:9px;color:#67533b}#historical-details>summary{min-height:44px;display:flex;align-items:center;cursor:pointer;font-weight:600}#historical-details-body a{display:block;padding:4px 0;color:var(--green);overflow-wrap:anywhere}
/* Historical source credits use the map's native attribution control. */
.maplibregl-ctrl-bottom-right{z-index:6}
.historical-controls [hidden]{display:none!important}
@media(max-width:600px){.historical-controls{margin-bottom:5px;font-size:11px}.historical-controls>summary{padding:3px 8px;gap:8px}.historical-controls-body{width:min(380px,calc(100vw - 24px))}}
/* Compact screens reuse the upper-left map badge space for a 44px context
   control. Provider attribution remains in the official bottom control. */
@media(max-width:600px),(max-width:900px) and (max-height:540px){
 .map-top{display:none}
 .ux-reading .historical-controls{visibility:hidden}
 .historical-controls{position:absolute;left:10px;top:calc(100% + 7px);width:min(220px,calc(100vw - 120px));margin:0;z-index:7}
 .historical-controls>summary{width:100%;min-height:44px;display:block;padding:5px 8px;background:#fafbf4f5}
 #historical-label{display:block;font-size:10px;line-height:1.4}
 #historical-compact{display:block;font-size:11px;line-height:1.4}
 .historical-controls-body{width:calc(100vw - 20px);max-height:55vh}
}

/* The key remains outside the collapsed era picker, including at close zoom. */
.historical-map-legend{position:absolute;left:24px;top:74px;z-index:2;width:250px;max-width:calc(100% - 40px);padding:11px 12px;background:#fffdf9f5;border:1px solid #b39ecb;border-left:4px solid #77539a;border-radius:6px;box-shadow:0 3px 15px #30203d16;font-size:11px;line-height:1.5}
.historical-map-legend[hidden]{display:none}.historical-map-legend>strong{display:block;color:#49305f;font-size:12px}.historical-map-legend p{margin:5px 0}.historical-map-swatch{display:flex;align-items:center;gap:7px;color:#49305f}.historical-map-swatch>span:first-child{width:20px;height:13px;flex:none;background:#77539a55;border:2px solid #604179;border-radius:2px}.historical-map-legend button{display:block;min-height:44px;margin-top:4px;padding:5px 9px;border:1px solid #b39ecb;border-radius:4px;background:#f2ebf8;color:#49305f;font-size:12px;max-width:100%;white-space:normal}
.historical-context-marker{pointer-events:auto!important;min-height:44px;max-width:175px;min-width:100px;padding:6px 9px;color:#fff;background:#593979f2;border:1px solid #fff8;border-radius:5px;box-shadow:0 2px 5px #35244738;font-size:12px;line-height:1.4;text-align:left;z-index:1}
.historical-context-marker small{display:block;color:#eee0fb;font-size:9px;letter-spacing:.04em}.historical-context-marker strong{display:block;font-weight:650}.historical-context-marker span{display:block;color:#eee0fb;font-size:10px}.historical-context-marker:after{content:'';position:absolute;left:calc(50% - 4px);bottom:-5px;width:7px;height:7px;background:#593979;transform:rotate(45deg);border-right:1px solid #fff8;border-bottom:1px solid #fff8}
.ux-reading .historical-map-legend,.ux-reading .historical-context-marker{visibility:hidden!important}
@media(max-width:600px){.historical-map-legend{top:62px;left:10px;width:220px;max-width:calc(100% - 118px);padding:6px 8px;font-size:10px}.historical-map-legend>strong{display:none}.historical-map-legend button{font-size:11px;min-height:38px;padding:4px 6px}.historical-context-marker{font-size:11px;max-width:145px;padding:5px 7px}}
@media(min-width:601px) and (max-width:900px) and (max-height:540px){.historical-map-legend{top:112px;left:10px;width:220px;padding:6px 8px;font-size:10px}.historical-map-legend>strong{display:none}.historical-map-legend button{min-height:38px;font-size:11px}}

@media(min-width:601px) and (max-width:900px) and (max-height:540px){
 .historical-map-legend{top:110px;padding:5px 7px;width:220px}
 .historical-map-legend p{margin:3px 0}.historical-map-legend #historical-map-note{font-size:9px;line-height:1.35}
 .historical-map-legend button{min-height:34px;margin-top:2px;padding:3px 5px}
 body:has(.historical-map-legend:not([hidden])) .maplibregl-ctrl-bottom-left .maplibregl-ctrl-scale{margin-bottom:2px}
}

/* Keep the reference dot fixed while trying nearby label placements. */
.historical-context-anchor{width:0;height:0;pointer-events:none!important;z-index:1}
.historical-context-marker{position:absolute;left:0;top:0;width:max-content}
.historical-context-marker:after{display:none}
.historical-context-dot{position:absolute;width:7px;height:7px;left:-3.5px;top:-3.5px;border:1px solid #fff;border-radius:50%;background:#593979}
.historical-context-leader{position:absolute;left:0;top:0;height:1px;background:#593979;transform-origin:0 50%;box-shadow:0 1px #ffffffaa}
@media(min-width:601px) and (max-width:900px) and (max-height:540px){
 body:has(.historical-map-legend:not([hidden])) .maplibregl-ctrl-bottom-left{bottom:auto!important;top:54px;left:140px;transform:none!important}
}

/* Three political colours share one compact key. Editorial regional labels
   have no city dot or leader that could imply a surveyed site. */
#historical-map-fill{display:flex;flex-wrap:wrap;gap:3px 10px;margin:5px 0}
#historical-map-fill>.historical-polity-key{display:inline-flex;align-items:center;gap:5px;width:auto;height:auto;border:0;background:none;font-size:10px;color:var(--ink)}
.historical-polity-key:before{content:'';width:9px;height:9px;background:var(--polity-colour);border-radius:2px;flex:none}
.historical-region-key:before{width:14px;height:14px;border-radius:50%;background:radial-gradient(circle,var(--polity-colour),transparent 72%)}
button.historical-region-key{cursor:pointer;text-align:left;font:inherit;padding:3px 1px;text-decoration:underline;text-underline-offset:3px}
button.historical-region-key:focus-visible{outline:2px solid var(--polity-colour);outline-offset:2px}
.historical-context-editorial>.historical-context-dot,.historical-context-editorial>.historical-context-leader{display:none}
.historical-context-marker[data-context-kind=region]{border-radius:3px;border-left:3px solid #e6cfa9}
.historical-context-marker.historical-regional-marker{background:#314c46;border-left:5px solid var(--region-colour)}
.historical-context-marker.historical-regional-marker small,.historical-context-marker.historical-regional-marker span{color:#fff}

/* Direct context reading: an explicit dialog leaves map/journey selection intact. */
.historical-context-marker:hover{filter:brightness(1.12)}
.historical-context-marker:focus-visible{outline:3px solid #e6a055;outline-offset:3px}
.historical-map-actions{display:flex;gap:6px;align-items:stretch}
.historical-map-actions button{flex:1;min-width:0;padding:5px;font-size:11px}
@media(min-width:601px) and (max-width:900px) and (max-height:540px){
 .historical-map-legend{top:100px;width:min(246px,calc(37vw - 20px))}
 .historical-map-legend #historical-map-note{display:none}
}
#historical-reader{width:420px;max-width:calc(100vw - 28px);max-height:min(70dvh,600px);padding:0;border:1px solid #b39ecb;border-radius:8px;background:var(--white);color:var(--ink);box-shadow:var(--shadow);overflow:hidden}
#historical-reader[open]{display:flex;flex-direction:column}
#historical-reader::backdrop{background:#18251f25}
.historical-reader-head{display:flex;gap:14px;align-items:flex-start;justify-content:space-between;padding:16px 16px 6px;flex:none}
#historical-reader-title{font-size:20px;line-height:1.4;margin:0;outline-offset:3px;overflow-wrap:anywhere}
#historical-reader-close{flex:none;min-width:44px;min-height:44px;border:1px solid var(--line);border-radius:4px}
#historical-reader-era{padding:0 16px 12px;margin:0;font-size:11px;color:var(--muted);border-bottom:1px solid var(--line);flex:none}
#historical-reader-body{padding:14px 16px;overflow:auto;overscroll-behavior:contain;min-height:0;font-size:14px;line-height:1.7}
#historical-reader-body p{margin:0 0 12px}#historical-reader-body h3{font-size:15px;margin:12px 0 6px}
#historical-reader-body a{display:block;font-size:12px;overflow-wrap:anywhere;padding:6px 0;color:var(--green)}
#historical-reader-body summary{min-height:44px;padding:10px 0;font-size:12px;font-weight:650}
#historical-reader-body details p,.historical-reader-note{font-size:12px;color:var(--muted)}
#historical-reader-body button{display:block;width:100%;min-height:44px;padding:9px 11px;text-align:left;border:1px solid var(--line);border-radius:4px;margin:6px 0;background:#f5f2f8;font-size:13px;line-height:1.5}
@media(max-height:540px){#historical-reader{max-height:calc(100dvh - 24px)}}
.journey-era-current{border-left:3px solid #75529b;padding-left:10px}
.journey-era-stage-note{display:block;color:#62447f;font-weight:650;font-size:11px;margin-bottom:4px}
.historical-context-marker[aria-current=step]{outline:2px solid #e6a055;outline-offset:2px}
/* Keep phone map controls below the legend when the journey panel is closed. */
@media(max-width:600px) and (min-height:541px){
 body.journey-active:not(.journey-panel-open):not(.ux-reading) .controls{top:auto;bottom:55px;left:10px;right:auto;flex-direction:row}
 body.journey-active:not(.journey-panel-open):not(.ux-reading) .viewstrip{top:auto;bottom:105px;left:10px;right:auto}
}

/* A collapsed journey exposes the map; place-evidence and analysis views stay independent. */
body.journey-collapsed .detail{display:none!important}
/* The short journey layout keeps the full key and its reading action above map controls. */
body.journey-short-layout .historical-map-legend{left:12px;top:64px;width:280px;padding:8px 10px}
body.journey-short-layout .historical-map-legend>strong{display:none}

/* Scroll colour keys independently so source-reading actions stay reachable. */
.historical-map-legend:has(.historical-region-key){flex-direction:column;box-sizing:border-box;max-height:230px;overflow:hidden}
.historical-map-legend:has(.historical-region-key):not([hidden]){display:flex}
.historical-map-legend:has(.historical-region-key)>strong{flex:none}
#historical-map-fill:has(.historical-region-key){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:3px 8px;min-height:44px;overflow:auto;overscroll-behavior:contain;scroll-padding:3px;padding:2px;flex:1 1 auto}
#historical-map-fill>.historical-region-key{min-height:44px;margin:0;padding:3px 2px;line-height:1.35;min-width:0;overflow-wrap:anywhere}
.historical-map-legend:has(.historical-region-key) #historical-map-note{display:block;flex:none;font-size:10px;line-height:1.4;margin:5px 0}
.historical-map-legend:has(.historical-region-key) .historical-map-actions{flex:none}
.historical-map-legend:has(.historical-region-key) .historical-map-actions button{min-height:44px;margin-top:0}
@media(max-width:600px){
 .historical-map-legend:has(.historical-region-key){max-height:220px;padding:6px 8px}
}
/* Phone cards leave one 44px reading row between the era picker and story. */
@media(max-width:600px) and (min-height:541px) and (max-height:700px){
 body.journey-panel-open:not(.ux-reading-journey) .map-area:has(.historical-region-key):has(.historical-map-legend:not([hidden])) #journey-panel.journey-layout-ready{height:min(440px,calc(100% - 152px))}
}
@media(max-width:600px) and (min-height:541px){
 body.journey-panel-open .historical-map-legend:has(.historical-region-key){top:52px;height:58px;max-height:58px;padding:0}
 body.journey-panel-open #historical-map-fill:has(.historical-region-key){grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:calc(50% - 4px);height:44px;flex:none;margin:0;padding:0 2px;overflow-x:auto;overflow-y:hidden;scrollbar-width:none}
 body.journey-panel-open #historical-map-fill:has(.historical-region-key)::-webkit-scrollbar{display:none}
 body.journey-panel-open .historical-map-legend:has(.historical-region-key) #historical-map-note{order:-1;font-size:10px;line-height:12px;margin:0;padding:0 4px;white-space:nowrap}
 body.journey-panel-open .historical-map-legend:has(.historical-region-key) .historical-map-actions{display:none}
}
@media(max-height:540px){
 .historical-map-legend:has(.historical-region-key){top:62px;max-height:min(180px,calc(100% - 112px));padding:5px 8px}
 .historical-map-legend:has(.historical-region-key)>strong{display:none}
}
@media(min-width:601px) and (max-width:900px) and (max-height:540px){
 body.journey-panel-open .historical-map-legend:has(.historical-region-key){top:104px;max-height:min(180px,calc(100% - 126px))}
}
@media(min-width:901px) and (max-height:540px){
 .map-area:has(.historical-region-key):has(.historical-map-legend:not([hidden])) .map-top,
 .map-area:has(.historical-region-key):has(.historical-map-legend:not([hidden])) .viewstrip,
 .map-area:has(.historical-region-key):has(.historical-map-legend:not([hidden])) .map-footer{display:none}
 .historical-map-legend:has(.historical-region-key){top:8px;max-height:min(180px,calc(100% - 55px))}
 body.journey-short-layout .historical-map-legend:has(.historical-region-key){top:8px;max-height:calc(100% - 92px);padding:5px 8px}
 body.journey-short-layout .map-area:has(.historical-region-key):has(.historical-map-legend:not([hidden])) .controls{bottom:32px;flex-direction:row;gap:8px}
}
