/* 3d-poc */
*{box-sizing:border-box}
html,body{margin:0;height:100%;overflow:hidden;background:#efe3c6;color:#3b2a18;font-family:Georgia,"EB Garamond","Palatino Linotype",serif;-webkit-text-size-adjust:100%}
#app{display:flex;flex-direction:column;height:100dvh}
header{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:7px 14px 6px;flex:none;border-bottom:1px solid #c4a874}
h1{margin:0;font-size:1.3125rem;font-weight:normal}
h1 span{color:#8a5a2c;font-style:italic}
#intro{margin:1px 0 0;font-size:.9375rem;color:#6b5236}
header{position:relative}
.hb{display:flex;align-items:center;gap:8px;flex:none}
#cbody h2[tabindex="-1"]:focus,#phead h2[tabindex="-1"]:focus{outline:none;box-shadow:none}
/* narrow screens: the title and the language button share the first row, the sentence runs full width under them */
@media (max-width:699px){header{display:grid;grid-template-columns:1fr auto;align-items:center;column-gap:10px}.ttl{display:contents}h1{grid-area:1/1}.hb{grid-area:1/2}#intro{grid-area:2/1/3/3}}
main{position:relative;flex:1;min-height:0;overflow:hidden}
#lang{min-height:44px;min-width:44px;padding:0 14px;border:1px solid #8a6a3c;border-radius:22px;background:#f7edd4;color:#4a3218;font:600 1rem/1 Georgia,serif;cursor:pointer;touch-action:manipulation}
/* One focus ring for every control: ink, with a paper gap so it reads on the map and on a filled button alike. */
button:focus-visible,a:focus-visible,input:focus-visible,summary:focus-visible{outline:2px solid #7d3a16;outline-offset:2px;box-shadow:0 0 0 2px #fff4dc}
.maplibregl-canvas:focus-visible{outline:3px solid #7d3a16;outline-offset:-3px}
/* The map's controls: one column down the right edge, every target 44px. When the window is too
   short for the column it wraps into a second one to the left rather than running off the bottom,
   so nothing is lost at 200-400% browser zoom. The box itself lets clicks through to the map. */
#tools{position:absolute;top:10px;right:10px;bottom:44px;left:10px;z-index:5;display:flex;flex-direction:column;flex-wrap:wrap-reverse;align-items:flex-start;align-content:flex-start;gap:8px;pointer-events:none}
#tools>*{pointer-events:auto;flex:none}
#zoom{display:flex;flex-direction:column;align-items:center;gap:6px}
#zslide{writing-mode:vertical-lr;direction:rtl;width:28px;height:90px;margin:0;accent-color:#7d3a16;cursor:pointer;touch-action:none}
@media (max-height:760px){#zslide{display:none}}
#zoom button,#jump,#mode,.lyr,#lgbtn{border:1px solid #8a6a3c;background:rgba(250,243,226,.96);color:#4a3218;font:600 1rem/1.15 Georgia,serif;cursor:pointer;touch-action:manipulation}
#zoom button{display:grid;place-items:center;width:44px;height:44px;padding:0;border-radius:10px}
#zoom svg{width:18px;height:18px}
#jump,#mode,.lyr,#lgbtn{min-height:44px;padding:4px 16px;border-radius:22px}
#jump{background:#7d3a16;color:#fff4dc;border-color:#5a2a10}
#mode{min-width:60px}
#mode[aria-pressed="true"]{background:#7d3a16;color:#fff4dc;border-color:#5a2a10}
/* how much the 3D ground is raised: shown only in 3D */
#exag{display:grid;grid-template-columns:1fr auto;align-items:baseline;column-gap:10px;row-gap:2px;width:168px;padding:8px 14px 6px;border:1px solid #8a6a3c;border-radius:14px;background:rgba(250,243,226,.96);color:#4a3218;font:600 .875rem/1.2 Georgia,serif}
#exag[hidden]{display:none}
#exval{font-variant-numeric:tabular-nums}
#exslide{grid-column:1/-1;width:100%;height:28px;margin:0;accent-color:#7d3a16;cursor:pointer}
/* LiDAR relief and aerial photo switches. On: filled, with a tick, so the state is not colour alone.
   Too far out to show: a dashed edge and a line of text saying so, at full contrast. */
.lyr{display:grid;grid-template-columns:auto auto;justify-content:start;align-items:center;column-gap:6px;text-align:left}
.lyr svg{display:none;width:14px;height:14px}
.lyr[aria-pressed="true"] svg{display:block}
.lyr small{grid-column:1/-1;font-weight:normal;font-size:.8125rem;color:#5f4526}
.lyr.far{border-style:dashed}
.lyr[aria-pressed="true"]{background:#4f5a2c;color:#f6f0d8;border-color:#3a431f}
.lyr[aria-pressed="true"] small{color:#ebe4c8}
/* the open card must not sit on the controls: beside it on a wide screen, above it on a narrow one */
@media (min-width:700px){#stage>#map{right:var(--cw)}#tools{right:calc(var(--cw) + 10px)}}
@media (max-width:699px){#stage.carded #tools{bottom:calc(var(--ch,60%) + 8px)}#stage.carded #lgbtn{bottom:calc(var(--ch,60%) + 10px)}#stage.carded #legend{bottom:calc(var(--ch,60%) + 62px)}#stage.carded .maplibregl-ctrl-bottom-right{bottom:var(--ch,60%)}}
@media (max-width:699px) and (max-height:500px){#card:not(.peek){max-height:85%}}
@media (max-height:560px){#mini{display:none}}
/* A window too short to hold the map and its controls (400% browser zoom, a small phone on its
   side): the page scrolls instead, the map keeps a usable height, and the zoom buttons wrap one by one. */
@media (max-height:380px){html,body{height:auto;overflow:auto}#app{height:auto;min-height:100dvh}main{flex:none;height:300px}#zoom{display:contents}}
/* legend: what the marks mean, in words, bottom left */
#lgbtn{position:absolute;left:10px;bottom:10px;z-index:5}
#lgbtn[aria-expanded="true"]{background:#efe0bb}
#legend{position:absolute;left:10px;bottom:62px;z-index:6;width:min(20rem,calc(100% - 20px));max-height:calc(100% - 76px);overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#c4a874 transparent;padding:12px 14px 10px;background:#faf3e0;border:1px solid #8a6a3c;border-radius:12px;box-shadow:0 10px 24px -8px rgba(60,40,20,.45)}
#legend[hidden]{display:none}
#legend h2{margin:0 0 6px;font-size:1.0625rem;font-weight:normal;color:#6b4a25}
#legend ul{list-style:none;margin:0;padding:0}
#legend li{display:flex;align-items:center;gap:10px;padding:5px 0;font-size:1rem;line-height:1.25}
#legend svg{flex:none;width:28px;height:18px}
#legend p{margin:8px 0 0;padding-top:8px;border-top:1px solid #e0cfa3;font-size:.9375rem;line-height:1.35;color:#5f4526}
/* the pages that are not the map, and the version, sit under it */
footer{flex:none;display:flex;justify-content:flex-end;align-items:center;flex-wrap:wrap;gap:0 6px;min-height:40px;padding:0 10px env(safe-area-inset-bottom);border-top:1px solid #c4a874}
footer a,footer button{display:inline-flex;align-items:center;min-height:40px;padding:0 10px;border:0;border-radius:6px;background:none;color:#5a3d1c;font:.9375rem/1 Georgia,serif;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px;cursor:pointer;font-variant-numeric:tabular-nums}
footer a:hover,footer button:hover{color:#7a3b14;background:#efe0bb}
#tip.touch{font-size:1rem;cursor:pointer}
#tip button{display:block;width:100%;min-height:44px;margin-top:7px;background:#e9c89b;color:#2b1d10;border:0;border-radius:8px;padding:0 16px;font:600 1rem Georgia,serif;cursor:pointer}
details.tech{margin-top:16px;border-top:1px solid #e0cfa3}
details.tech summary{padding:12px 0;font-size:1rem;color:#6b4a25;cursor:pointer}
details.tech .facts{margin-top:0}
details.tech .tag{margin-top:0}
@media (forced-colors:active){
  [aria-pressed="true"],#lgbtn[aria-expanded="true"]{forced-color-adjust:none;background:Highlight;color:HighlightText;border-color:HighlightText}
  .lyr[aria-pressed="true"] small{color:HighlightText}
  button:focus-visible,a:focus-visible,input:focus-visible,summary:focus-visible{outline:3px solid Highlight;box-shadow:none}
}
@media (prefers-contrast:more){
  #intro,#legend p,.lyr small,.src,.facts small,.actnote,#cbody li small{color:#3b2a18}
  #zoom button,#jump,#mode,.lyr,#lgbtn,#lang,#exag{border-width:2px;border-color:#3b2a18}
}
#map{position:absolute;inset:0;background:#f0e4c8}
#band{position:absolute;left:10px;top:10px;z-index:4;background:rgba(250,243,226,.92);border:1px solid #c4a874;border-radius:12px;padding:4px 11px;font-size:.875rem;color:#5a3d1c;pointer-events:none}
/* --cw: the side panel's width on a wide screen: 40% of the window, never narrower than the facts
   table needs nor wider than a comfortable line */
#stage{--cw:clamp(360px,40vw,800px)}
#tip{position:absolute;z-index:6;max-width:280px;background:rgba(43,29,16,.94);color:#fbf3dc;border-radius:7px;padding:7px 10px;font-size:.9375rem;line-height:1.35;pointer-events:none;box-shadow:0 2px 8px rgba(0,0,0,.35)}
#tip i{color:#e9c89b}#tip small{display:block;color:#cdbb9a;font-size:.8125rem}
#tip.touch{pointer-events:auto}
#card{position:absolute;z-index:7;display:flex;flex-direction:column;background:#faf3e0}
#cbody{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#c4a874 transparent}
#card[hidden],#tip[hidden]{display:none}
#grab{display:none}
#cbody{padding:6px 28px 28px}
#cbody h2{margin:0;font-size:1.5rem;line-height:1.2;font-weight:normal;text-wrap:balance}
#cbody .de{font-style:italic;color:#7a4a20;font-size:1.0625rem;margin-top:1px}
.badge{display:inline-block;margin-top:7px;padding:2px 9px;border-radius:11px;background:#7d140c;color:#fff4dc;font-size:.8125rem}
.tag{display:inline-block;margin:8px 6px 0 0;padding:2px 9px;border-radius:11px;background:#e9dab3;font-size:.8125rem}
.tag.lost{background:#8d8880;color:#fffaf0}
.pdesc.lostloc{margin-top:0}
.facts{margin:12px 0 4px;border-collapse:collapse;width:100%;font-size:1rem}
.facts td{padding:5px 0;border-top:1px solid #e0cfa3;vertical-align:top;word-break:break-word}
.facts th{font-weight:normal;text-align:left;vertical-align:top;border-top:1px solid #e0cfa3;padding:5px 8px 5px 0;color:#6b4a25;width:38%;word-break:break-word}
.facts small{color:#7a6a55;display:block;font-size:.8125rem;line-height:1.3}
.facts.osm td,.facts.osm th{font-size:.875rem;font-family:ui-monospace,Menlo,monospace}
#cbody h3{font-size:.875rem;margin:22px 0 6px;color:#7a5a32;font-weight:normal;text-transform:uppercase;letter-spacing:.6px}
#cbody ul{margin:0;padding-left:18px;font-size:1rem}#cbody li{margin:3px 0}#cbody li small{color:#7a6a55}
.illus{font-size:.875rem;font-style:italic;color:#7a6a55;margin:8px 0 0}
.src{margin-top:22px;font-size:.8125rem;color:#7a6a55;line-height:1.4;border-top:1px solid #e0cfa3;padding-top:8px}
.src a,#cbody a{color:#7a3b14;text-underline-offset:2px;text-decoration-thickness:1px}
#cbody code{font-size:.8125rem;word-break:break-all}
.maplibregl-ctrl-attrib{background:rgba(250,243,226,.85)!important;font-family:Georgia,serif;font-size:.8125rem}
.maplibregl-ctrl-attrib a{color:#6b4a25}
@media (min-width:700px){#card{top:0;right:0;bottom:0;width:var(--cw);border-left:1px solid #8a6a3c;box-shadow:-10px 0 24px -10px rgba(60,40,20,.4);animation:cardInX .28s cubic-bezier(.16,1,.3,1)}}
@media (max-width:699px){
  h1{font-size:1.125rem}#intro{font-size:.875rem}
  #card{left:0;right:0;bottom:0;max-height:60%;border-top:1px solid #8a6a3c;border-radius:16px 16px 0 0;box-shadow:0 -8px 22px -8px rgba(60,40,20,.4);animation:cardInY .28s cubic-bezier(.16,1,.3,1)}
  #grab{display:block;flex:none;width:100%;height:26px;margin:0;padding:0;border:0;border-radius:16px 16px 0 0;background:none;cursor:pointer;touch-action:none}
  #grab .grab{display:block;width:42px;height:4px;border-radius:2px;background:#c4a874;margin:0 auto}
  #card.peek #cbody,#card.peek .tabs,#card.peek .pnav{display:none}
  #card.peek #phead{border-bottom:0;cursor:pointer;touch-action:none}
  #cbody{padding:4px 16px 22px}
}
/* memory markers (fabricated design fixture — docs/ideas/memory-markers.md) */
.badge.fict{background:#5a2a52}
#cbody p.mem{font-size:1.0625rem;line-height:1.52;margin:12px 0 0}
#cbody .plate{margin:12px 0 0}
#cbody .plate img{display:block;width:100%;height:auto;border:1px solid #c4a874;border-radius:3px}
#cbody .plate figcaption{margin-top:3px;font-size:.8125rem;color:#7a6a55}
#cbody ul.memlist{list-style:none;margin:6px 0 0;padding:0}
#cbody ul.memlist li{margin:0;padding:7px 0;border-top:1px solid #e0cfa3}
#cbody ul.memlist a{font-size:1.0625rem;text-decoration:none}
#cbody ul.memlist a:hover{text-decoration:underline}

/* overview minimap (bottom right): the whole region, with the current view drawn on it */
#mini{position:absolute;right:10px;bottom:40px;z-index:5;background:rgba(250,243,226,.94);border:1px solid #c4a874;border-radius:10px;padding:4px 5px 3px;box-shadow:0 1px 6px rgba(60,40,20,.22);opacity:0;visibility:hidden;pointer-events:none;transition:opacity .22s}
#mini.on{opacity:1;visibility:visible;pointer-events:auto}
#minittl{display:block;font:italic .8125rem/1.2 Georgia,serif;color:#7a5a32;text-align:center;letter-spacing:.3px;margin-bottom:2px}
#minisvg{display:block;cursor:pointer}
#minisvg .mreg{fill:#e6d7ad;stroke:#9c7638;stroke-width:1}
#minisvg .mvil circle{fill:#8a5a2c}
#minisvg .mvp{fill:rgba(125,20,12,.16);stroke:#7d140c;stroke-width:1.2}
#minisvg .mdot{fill:#7d140c;stroke:#fff4dc;stroke-width:1.2}
@media (min-width:700px){#card:not([hidden]) ~ #mini{right:calc(var(--cw) + 10px)}}
@media (max-width:699px){
  #mini{bottom:34px;padding:3px 4px 2px}
  #minisvg{width:106px;height:auto}
  #card:not(.peek) ~ #mini{opacity:0;visibility:hidden;pointer-events:none}
}
/* ---------- the card of a marker: what it is, what to do with it, then the detail ---------- */
@keyframes cardInX{from{transform:translateX(28px);opacity:0}}
@keyframes cardInY{from{transform:translateY(36px);opacity:0}}
@media (prefers-reduced-motion:reduce){#card{animation:none!important}}
#card ::selection{background:#e2c98f;color:#2b1d10}
.obj + .obj{margin-top:22px;padding-top:20px;border-top:1px solid #c4a874}
#cbody h2.sub{font-size:1.25rem;padding-right:0}
.kind{display:flex;align-items:center;gap:8px;margin:8px 0 0;font-size:1rem;line-height:1.3;color:#6b4a25}
.kind .ci{flex:none;width:24px;height:24px}
.pdesc{margin:14px 0 0;font-size:1.0625rem;line-height:1.5}
.acts{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0 0}
.acts.tight{margin-top:8px}
#cbody .act{display:inline-flex;align-items:center;gap:6px;min-height:44px;max-width:100%;padding:6px 16px;border:1px solid #8a6a3c;border-radius:22px;background:#f7edd4;color:#4a3218;font:600 .9375rem/1.2 Georgia,serif;text-decoration:none;overflow-wrap:anywhere;transition:background-color .15s,border-color .15s}
#cbody .act:hover{background:#efe0bb}
#cbody .act.pri{background:#7d3a16;color:#fff4dc;border-color:#5a2a10}
#cbody .act.pri:hover{background:#672e10}
.ext{flex:none;width:11px;height:11px}
.actnote{margin:7px 0 0;font-size:.8125rem;line-height:1.35;color:#6b5a45}
.obj .facts{margin-top:18px}
.obj .facts:empty{display:none}
#cbody ul.pfacts{list-style:none;margin:0;padding:0}
#cbody ul.pfacts li{margin:0;padding:10px 0;border-top:1px solid #e0cfa3}
.pfacts p{margin:0;font-size:1.0625rem;line-height:1.5}
#cbody .fsrc{display:inline-flex;align-items:center;gap:5px;min-height:32px;margin-top:2px;font-size:.8125rem;color:#6b4a25;text-decoration:none}
#cbody .fsrc:hover{text-decoration:underline}
.pdesc + .pdesc{margin-top:10px}
/* photographs: one fills the column, two or three share a row; the credit sits under each */
.pphotos{display:grid;gap:8px;margin:14px 0 0}
.pphotos.n2{grid-template-columns:1fr 1fr}.pphotos.n3{grid-template-columns:repeat(3,1fr)}
.pphotos figure{margin:0;min-width:0}
.pphotos a{display:block}
.pphotos img{display:block;width:100%;height:auto;aspect-ratio:4/3;object-fit:cover;border:1px solid #c4a874;border-radius:3px;background:#e9dab3}
.pphotos.n1 img{aspect-ratio:3/2;max-height:420px}
.pphotos figcaption{margin-top:4px;font-size:.8125rem;line-height:1.35;color:#6b5a45;overflow-wrap:anywhere}
@media (max-width:1100px){.pphotos.n3{grid-template-columns:1fr 1fr}.pphotos.n3 figure:first-child{grid-column:1/-1}.pphotos.n3 figure:first-child img{aspect-ratio:3/2}}
.ppl b{font-weight:600}
.ppl .yrs{color:#6b4a25;font-size:.9375rem;font-variant-numeric:tabular-nums;white-space:nowrap}
.ppl p + p{margin-top:2px}
.pdesc,.pfacts p{max-width:74ch}
/* a village card's list of places: each row is a door to that place's full card */
#cbody ul.vplaces{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:0 20px}
#cbody ul.vplaces li{margin:0;border-top:1px solid #e0cfa3}
#cbody .vplaces a{display:flex;gap:12px;align-items:flex-start;padding:10px 0;color:inherit;text-decoration:none}
#cbody .vplaces a:hover b{text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:2px}
.vth{flex:none;width:72px;height:54px;object-fit:cover;border:1px solid #c4a874;border-radius:3px;background:#efe3c6}
.vth.vic{display:grid;place-items:center}
.vtx{min-width:0;display:block}
.vtx b{display:block;font-weight:normal;font-size:1.0625rem;line-height:1.25;color:#7a3b14}
.vtx small{display:block;margin-top:2px;font-size:.8125rem;color:#6b5a45}
.vds{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin-top:3px;font-size:.9375rem;line-height:1.4;color:#4a3a26}

/* ---------- the side panel: region list → village → place ----------
   The panel's header holds the way back, the trail and (on a village) the tabs; only the body
   under it scrolls. See docs/ideas/side-panel.md. */
#phead{flex:none;padding:14px 28px 0;border-bottom:1px solid #e0cfa3}
#phead.flat{border-bottom:0}
.pnav{display:flex;align-items:center;gap:12px;min-height:44px;margin-bottom:4px}
.pback{flex:none;display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:0 16px 0 11px;border:1px solid #c4a874;border-radius:22px;background:#faf3e0;color:#5a3d1c;font:1rem/1 Georgia,serif;cursor:pointer;touch-action:manipulation;transition:background-color .15s,border-color .15s}
.pback:hover{background:#efe0bb;border-color:#8a6a3c}
.pback svg{width:16px;height:16px}
.crumbs{min-width:0;margin:0;padding:0;list-style:none;display:flex;align-items:center;font-size:.9375rem;color:#6b5a45;white-space:nowrap;overflow:hidden}
.crumbs li{display:flex;align-items:center;min-width:0}
.crumbs li + li::before{content:"›";margin:0 7px;color:#a88a5a}
.crumbs li:last-child{overflow:hidden;text-overflow:ellipsis;color:#3b2a18}
.crumbs button{padding:4px 0;border:0;background:none;color:#7a3b14;font:inherit;cursor:pointer;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px}
.crumbs button:hover{color:#5a2a10}
.ptitle{padding:8px 0 16px}
.ptitle h2{margin:0;font-size:2rem;line-height:1.15;font-weight:normal;text-wrap:balance}
.ptitle .de{font-style:italic;color:#7a4a20;font-size:1.1875rem;margin-top:2px}
.ptitle .badge,.ptitle .tag{margin-top:10px}
.peekhint{display:none}
.tabs{display:flex;gap:28px}
.tabs button{position:relative;min-height:44px;padding:8px 0 12px;border:0;background:none;color:#6b5236;font:1.0625rem/1.2 Georgia,serif;cursor:pointer;touch-action:manipulation}
.tabs button:hover{color:#3b2a18}
.tabs button[aria-selected="true"]{color:#3b2a18}
.tabs button[aria-selected="true"]::after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:3px;border-radius:2px 2px 0 0;background:#7d3a16}
.tabs .n{display:inline-block;min-width:22px;margin-left:6px;padding:0 6px;border-radius:10px;background:#e9dab3;font-size:.8125rem;line-height:20px;text-align:center;color:#5a3d1c;font-variant-numeric:tabular-nums}
.plead{margin:0 0 6px;font-size:1rem;line-height:1.5;color:#4a3a26;max-width:62ch}
/* the region view: a gazetteer, like the index at the back of an atlas. The village name is a
   button; its ::after covers the whole row so the row is the target. */
.gz{width:100%;border-collapse:collapse;font-variant-numeric:tabular-nums}
.gz th{text-align:left;font-weight:normal;font-size:.8125rem;color:#6b5a45;padding:12px 8px 8px;border-bottom:1px solid #c4a874;vertical-align:bottom}
.gz th.r,.gz td.r{text-align:right}
.gz tr{position:relative}
.gz td{padding:7px 8px;border-bottom:1px solid #e0cfa3;vertical-align:baseline;font-size:1rem}
.gz th:first-child,.gz td:first-child{padding-left:10px}
.gz td.q{color:#8f7c60}
.gz button{padding:0;border:0;background:none;font:inherit;text-align:left;cursor:pointer;color:inherit}
.gz button::after{content:"";position:absolute;inset:0}
.gz button:focus-visible{outline:none;box-shadow:none}
.gz tr:has(button:focus-visible) td{box-shadow:inset 0 2px 0 #7d3a16,inset 0 -2px 0 #7d3a16}
.gz tr:has(button:focus-visible) td:first-child{box-shadow:inset 2px 2px 0 #7d3a16,inset 0 -2px 0 #7d3a16}
.gz tr:has(button:focus-visible) td:last-child{box-shadow:inset -2px 2px 0 #7d3a16,inset 0 -2px 0 #7d3a16}
.gz b{font-weight:normal;font-size:1.0625rem;color:#7a3b14}
.gz i{margin-left:8px;font-size:.9375rem;color:#7a4a20}
.gz .cap{display:inline-block;width:12px;height:12px;margin-left:6px;vertical-align:-1px;color:#7d140c}
.gz tbody tr:hover td{background:#efe0bb}
.gz tbody tr:hover b{text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px}
.gz tbody tr:hover td:first-child{border-radius:6px 0 0 6px}.gz tbody tr:hover td:last-child{border-radius:0 6px 6px 0}
/* the village view */
#cbody .pfacts-v{margin-top:14px}
#cbody .pfacts-v tr:first-child th,#cbody .pfacts-v tr:first-child td{border-top:0}
.vsrc{margin:10px 0 0;font-size:.8125rem;color:#6b5a45;line-height:1.45}
#cbody h3.vh{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin:28px 0 0;padding-bottom:8px;border-bottom:1px solid #c4a874;font-size:1.1875rem;color:#3b2a18;text-transform:none;letter-spacing:0}
#cbody h3.vh small{font-size:.8125rem;color:#6b5a45}
#cbody ul.vplaces{display:block}
#cbody ul.vplaces li{border-top:0;border-bottom:1px solid #e0cfa3}
#cbody .vplaces a{align-items:center;padding:10px 8px;border-radius:6px}
#cbody .vplaces a:hover{background:#efe0bb}
.vth.vic{width:44px;height:44px;border-radius:50%;background:#f3e6c4}
.pempty{margin:12px 0 0;font-size:.9375rem;color:#6b5a45;line-height:1.5}
/* related: the nearest villages, with distance and a needle pointing their way */
#cbody ul.nb{list-style:none;margin:0;padding:0}
#cbody ul.nb li{margin:0;border-bottom:1px solid #e0cfa3}
.nb button{display:flex;align-items:center;gap:16px;width:100%;padding:12px 8px;border:0;border-radius:6px;background:none;color:inherit;font:inherit;text-align:left;cursor:pointer;font-variant-numeric:tabular-nums}
.nb button:hover{background:#efe0bb}
.nb button:hover b{text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px}
.nb .km{flex:none;width:58px;text-align:right;font-size:1.125rem;line-height:1.1}
.nb .km small{display:block;font-size:.75rem;color:#6b5a45}
.nb svg{flex:none;width:28px;height:28px;color:#7d3a16}
.nb .tx{flex:1;min-width:0}
.nb b{font-weight:normal;font-size:1.0625rem;color:#7a3b14}
.nb i{margin-left:6px;font-size:.9375rem;color:#7a4a20}
.nb .meta{display:block;margin-top:2px;font-size:.875rem;color:#6b5a45}
.later{margin:22px 0 0;padding:14px 16px;border:1px dashed #c4a874;border-radius:10px;font-size:.875rem;color:#6b5a45;line-height:1.5}
@media (max-width:699px){
  #phead{padding:0 16px}
  .ptitle{padding:4px 0 10px}.ptitle h2{font-size:1.5rem}.ptitle .de{font-size:1.0625rem}
  .tabs{gap:22px}
  #card.peek .ptitle{padding-bottom:14px}
  #card.peek .peekhint{display:block;margin-top:2px;font-size:.8125rem;color:#6b5a45}
  #card.peek .ptitle .de,#card.peek .ptitle .badge,#card.peek .ptitle .tag{display:none}
  .gz th:nth-child(3),.gz td:nth-child(3){display:none}
  .gz i{display:block;margin-left:0}
}
@media (forced-colors:active){.gz tbody tr:hover td,.nb button:hover,#cbody .vplaces a:hover{outline:2px solid Highlight;outline-offset:-2px}}

/* ---------- homepage ----------
   html.home: the page in front of the map. The map itself is the first screen, held still under a
   veil, with the way in beneath it; the sections follow. Without the class the map has the whole
   window, as before, and everything below is put away. One map, one page: nothing loads twice. */
#hback,#hnav,#cta,#veil,#home{display:none}
html:not(.home) #hback{display:inline-flex;align-items:center;gap:6px;flex:none;min-height:44px;min-width:44px;padding:0 14px 0 10px;border:1px solid #8a6a3c;border-radius:22px;background:#f7edd4;color:#4a3218;font:600 1rem/1 Georgia,serif;cursor:pointer;touch-action:manipulation}
#hback svg{width:18px;height:18px;flex:none}
html:not(.home) .ttl{flex:1;min-width:0}
@media (max-width:699px){html:not(.home) header{grid-template-columns:auto 1fr auto}html:not(.home) #hback{grid-area:1/1;justify-content:center;padding:0}#hback span{display:none}html:not(.home) h1{grid-area:1/2}html:not(.home) .hb{grid-area:1/3}html:not(.home) #intro{grid-area:2/1/3/4}}
html.home,html.home body{height:auto;overflow:visible}
html.home{scroll-behavior:smooth}
html.home #app{position:relative;height:100vh;height:100svh;min-height:480px}
html.home header{position:absolute;top:0;left:0;right:0;z-index:60;display:flex;justify-content:flex-end;gap:8px;padding:10px 12px;padding-top:max(10px,env(safe-area-inset-top));border:0;pointer-events:none}
html.home header>*{pointer-events:auto}
html.home .ttl,html.home footer,html.home #tools,html.home #card,html.home #lgbtn,html.home #legend,html.home #mini,html.home #tip,html.home #band{display:none!important}
html.home #stage>#map{right:0}
html.home #lang{background:rgba(250,243,226,.96)}
html.home #hnav{display:flex;gap:4px;padding:3px;border:1px solid #8a6a3c;border-radius:24px;background:rgba(250,243,226,.94)}
#hnav a{display:grid;place-items:center;min-height:38px;padding:0 14px;border-radius:20px;color:#3b2a18;text-decoration:none;font-size:1rem}
#hnav a:hover{background:#efe0bb}
@media (max-width:699px){html.home #hnav{display:none}}
html.home #veil{display:block;position:absolute;inset:0;z-index:50;width:100%;border:0;padding:0;background:linear-gradient(to bottom,rgba(239,227,198,0) calc(100% - 72px),#efe3c6);cursor:pointer}
html.home #cta{display:block;flex:none;position:relative;padding:4px 20px 18px;padding-bottom:max(18px,env(safe-area-inset-bottom));text-align:center;font-size:1.125rem;line-height:1.5}
#cta h1{font-size:clamp(2.1rem,7vw,4rem);line-height:1.05}
#cta h1 span{color:#80501f}
#cta h1 i{font-style:normal}
#cta p{margin:6px auto 14px;max-width:34rem;color:#6b5236;text-wrap:balance}
#cta .acts{display:flex;flex-wrap:nowrap;justify-content:center;gap:10px;margin:0}
.hbtn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:52px;padding:0 26px;border:1px solid #8a6a3c;border-radius:26px;background:#faf3e0;color:#4a3218;font:600 1.125rem/1 Georgia,serif;cursor:pointer;touch-action:manipulation;text-decoration:none;white-space:nowrap}
.hbtn.pri{background:#7d3a16;border-color:#5a2a10;color:#fff4dc}
.hbtn.pri:hover{background:#6c3112}
.hbtn:not(.pri):hover{background:#efe0bb}
.hbtn svg{width:18px;height:18px;flex:none}
.hmore{display:inline-block;margin-top:12px;font-size:.9375rem;color:#6b5236;text-decoration:none}
.hmore:hover{color:#3b2a18}
#hsaid{position:absolute;left:50%;bottom:calc(100% + 6px);z-index:61;transform:translateX(-50%);padding:6px 14px;border-radius:16px;background:#3b2a18;color:#fff4dc;font-size:.9375rem;white-space:nowrap}
#hsaid:empty{display:none}
@media (max-width:480px){html.home #cta{padding-left:16px;padding-right:16px}#cta .acts{gap:8px}#cta .acts .pri{flex:1}#cta .hbtn{padding:0 14px;gap:6px;font-size:1rem}#cta h1 span{display:block}#cta h1 i{display:none}}
@media (max-height:560px){#cta p,.hmore{display:none}#cta h1{font-size:1.6rem;margin-bottom:8px}}

html.home #home{display:block;font-size:1.125rem;line-height:1.5}
.hsec{scroll-margin-top:12px}
.hwrap{max-width:1120px;margin:0 auto;padding:0 20px}
#home h2{margin:0 0 10px;font-weight:normal;font-size:clamp(1.9rem,5vw,3rem);line-height:1.1;text-wrap:balance}
.hsub{margin:0;max-width:38rem;color:#6b5236}
.hvill{padding:clamp(48px,9vw,96px) 0 clamp(40px,7vw,72px)}
/* the village names: the more described places a village has, the larger its name (--s, 0 to 1) */
#hcloud{display:flex;flex-wrap:wrap;align-items:baseline;gap:clamp(14px,2.4vw,26px) clamp(18px,3.4vw,40px);min-height:8rem;margin:clamp(22px,4vw,40px) 0 18px;padding:0;list-style:none}
#hcloud a{display:inline-flex;flex-direction:column;padding:4px 0;color:#3b2a18;text-decoration:none;line-height:1.05}
#hcloud .n{font-size:calc(1.3rem + var(--s,0) * clamp(1.1rem,4.2vw,2.7rem));border-bottom:1px solid transparent}
#hcloud .d{margin-top:3px;font-size:.9375rem;font-style:italic;color:#6b5236;line-height:1.2}
#hcloud .d b{font-style:normal;font-weight:normal;font-variant-numeric:tabular-nums}
#hcloud a:hover .n,#hcloud a:focus-visible .n{color:#7d3a16;border-bottom-color:#7d3a16}
#hcloud a.nf .n{color:#5f4526}
.hkey{margin:0;max-width:44rem;font-size:.9375rem;color:#6b5236}
.hwhat{padding:clamp(40px,7vw,80px) 0;background:#f7edd4;border-top:1px solid #c4a874;border-bottom:1px solid #c4a874}
.htiles{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-top:clamp(20px,3.5vw,36px)}
.htiles article{padding:22px 22px 24px;border:1px solid #c4a874;border-radius:14px;background:#faf3e0}
.htiles .big{display:block;font-size:clamp(2.6rem,6vw,4rem);line-height:1;color:#7d3a16;font-variant-numeric:lining-nums}
.htiles h3{margin:10px 0 6px;font-weight:600;font-size:1.25rem;line-height:1.2}
.htiles p{margin:0;color:#4f3c24}
@media (max-width:820px){.htiles{grid-template-columns:1fr}.htiles article{display:grid;grid-template-columns:5.2rem 1fr;column-gap:14px;align-items:start;padding:18px}.htiles .big{font-size:2.4rem;grid-row:1/3}.htiles h3{margin-top:2px}}
.habout{padding:clamp(44px,8vw,88px) 0 28px;padding-bottom:max(28px,env(safe-area-inset-bottom));background:#3b2a18;color:#eadfc4}
.habout h2{color:#fff4dc}
.habout a{color:#f1c98f}
.habout a:focus-visible{outline-color:#f1c98f;box-shadow:0 0 0 2px #3b2a18}
.hcols{display:grid;grid-template-columns:1.2fr 1fr 1fr;gap:28px 40px;margin-top:26px}
.hcols h3{margin:0 0 8px;font-weight:normal;font-size:.875rem;letter-spacing:.14em;text-transform:uppercase;color:#c9b48a}
.hcols ul{margin:0;padding:0;list-style:none}
.hcols li a{display:inline-block;padding:7px 0;text-decoration:none}
.hcols li a:hover{text-decoration:underline}
.hcols li small{display:block;margin-top:-4px;color:#bfae8c;font-size:.875rem}
.hwho{margin:0;max-width:30rem}
.hblog{margin-top:14px;background:transparent;color:#fff4dc!important;border-color:#c9b48a}
.hfine{margin:36px 0 0;padding-top:16px;border-top:1px solid #5d4830;font-size:.875rem;color:#bfae8c}
@media (max-width:820px){.hcols{grid-template-columns:1fr 1fr}.hcols>div:first-child{grid-column:1/-1}}
@media (max-width:480px){.hcols{grid-template-columns:1fr}}
@media (prefers-reduced-motion:reduce){html.home{scroll-behavior:auto}}
@media (max-width:359px){#cta .acts{flex-wrap:wrap}#cta .acts .pri{flex:1 0 100%}}
