/* ---- design.css ---- */
@font-face{font-family:SerifThai;src:url(NotoSerifThai.woff2) format('woff2');font-weight:400 700;font-display:swap}
@font-face{font-family:Plex;src:url(IBMPlexSansThaiLooped-Regular.woff2) format('woff2');font-display:swap}
@font-face{font-family:Cormorant;src:url(CormorantGaramond.woff2) format('woff2');font-weight:100 900;font-display:swap}
:root{--paper:#faf5e9;--sand:#f0e4c9;--art:#f6e6c3;--ink:#203f39;--muted:#535e50;--meta:#6b5d43;--rust:#a6452b;--line:#cbbfa6;--lime:#e4e4aa;--serif:SerifThai,serif;--body:Plex,sans-serif}
*{box-sizing:border-box}html{scroll-behavior:smooth;scroll-padding-top:110px}body{margin:0;background:var(--paper);color:var(--ink);font:1.0625rem/1.8 var(--body);-webkit-font-smoothing:antialiased}button,input,select{font:inherit;color:inherit}button,a,input,select,summary{-webkit-tap-highlight-color:transparent}a{color:inherit;text-underline-offset:5px}a:hover{color:var(--rust)}button{cursor:pointer}button:disabled{opacity:.35;cursor:default}a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible,[tabindex]:focus-visible{outline:3px solid var(--rust);outline-offset:5px}h1,h2,h3{font-family:var(--serif);font-weight:600;line-height:1.45;overflow-wrap:anywhere}h1{font-size:clamp(2.1rem,4.2vw,3.4rem);margin:18px 0 22px}h2{font-size:clamp(1.6rem,2.6vw,2.3rem);margin:0 0 20px}h3{font-size:1.18rem;margin:0 0 10px}p{margin:0 0 20px}img{display:block;max-width:100%;height:auto}figure{margin:0}[hidden]{display:none!important}main{max-width:1336px;margin:auto;padding:0 48px}.section{margin:100px 0}.chapter,.eyebrow{display:block;font-size:.8125rem;color:var(--rust)}.chapter{letter-spacing:.055em;margin-bottom:16px}.eyebrow{letter-spacing:0}.small{font-size:.875rem;color:var(--muted)}.text-link{font-size:.9375rem;text-decoration:none;border-bottom:1px solid currentColor;line-height:1.8;padding-bottom:3px;display:inline-block}.button{background:var(--ink);color:var(--paper);display:inline-flex;gap:28px;align-items:center;justify-content:space-between;min-height:52px;padding:13px 22px;border:1px solid var(--ink);text-decoration:none;font-size:.9375rem;transition:background .2s,transform .2s}.button:hover{color:var(--paper);background:var(--rust);border-color:var(--rust);transform:translateY(-2px)}.button span{font-size:1.3rem}.button-outline{background:transparent;color:var(--ink)}.skip{position:fixed;top:-100px;left:16px;padding:10px 20px;background:var(--paper);z-index:100}.skip:focus{top:8px}.site-header{display:flex;align-items:center;gap:30px;padding:16px max(32px,calc((100vw - 1240px)/2));border-bottom:1px solid var(--line);background:rgba(250,245,233,.97);position:sticky;top:0;z-index:30;backdrop-filter:blur(12px)}.brand{display:flex;align-items:center;gap:12px;text-decoration:none;white-space:nowrap;font:600 1.35rem/1.3 var(--serif)}.brand-mark{font-family:var(--serif);font-size:1.1rem;border:1px solid var(--ink);border-radius:50%;width:46px;height:46px;display:grid;place-items:center}.brand small{font:normal .6rem/1.8 var(--body);letter-spacing:.1em;display:block;margin-top:3px}.site-header nav{margin-left:auto;display:flex;gap:25px;align-items:center;font-size:.875rem;white-space:nowrap}.site-header nav a{text-decoration:none;padding:8px 0;position:relative}.site-header nav a:after{content:'';position:absolute;bottom:2px;left:0;width:100%;height:1px;background:var(--rust);transform:scaleX(0);transform-origin:left;transition:transform .2s}.site-header nav a:hover:after,.site-header nav a[aria-current]:after{transform:scaleX(1)}.header-map{padding:10px 15px;border:1px solid var(--ink);text-decoration:none;font-size:.8125rem;white-space:nowrap}
.hero{position:relative}.hero-topline{display:flex;justify-content:space-between;align-items:center;font-size:.7rem;letter-spacing:.12em;padding:22px 0;color:var(--muted);border-bottom:1px solid var(--line)}.hero-layout{display:grid;grid-template-columns:1fr 1fr;gap:16px;min-height:600px;align-items:center;padding:30px 0 40px}.hero-copy{position:relative;z-index:2;padding:20px 0}.hero-eyebrow{display:flex;align-items:center;gap:10px;font-size:.875rem;color:var(--muted);margin-bottom:24px}.hero-eyebrow i{height:7px;width:7px;border-radius:50%;background:var(--rust)}.hero h1{font-size:clamp(3.3rem,7.5vw,6.5rem);font-weight:600;line-height:1.3;margin:0 0 24px}.hero-title-bottom{display:flex;align-items:center;gap:18px;font-size:clamp(1.7rem,3.1vw,2.8rem);white-space:nowrap}.hero-title-bottom em{font:italic 500 clamp(3.7rem,7vw,6.5rem)/.95 Cormorant,serif;color:var(--rust)}.hero-copy>p{font-size:1.0625rem;color:var(--muted);line-height:1.9}.hero-actions{display:flex;align-items:center;gap:26px;margin:30px 0 36px;flex-wrap:wrap}.hero-footnote{display:flex;gap:14px;align-items:center;font-size:.75rem;line-height:1.8;color:var(--muted)}.tiny-star{font-size:2.3rem;color:var(--rust)}.hero-collage{height:535px;position:relative;isolation:isolate}.collage-ring{position:absolute;width:94%;aspect-ratio:1;top:20px;left:2%;border:1px solid var(--line);border-radius:50%}.collage-ring:before,.collage-ring:after{content:'';position:absolute;inset:23px;border:1px dashed var(--line);border-radius:50%}.collage-ring:after{inset:48px;border-style:solid;opacity:.4}.postcard{position:absolute;background:#fcf6e8;border:1px solid #c7b594;padding:10px 10px 0;text-decoration:none;transition:transform .4s;transform-origin:center;box-shadow:0 12px 20px #4834190c}.postcard img{width:100%;object-fit:cover;background:var(--art)}.postcard>span{display:block;padding:9px 4px;font-size:.75rem}.postcard b{font-weight:400;color:var(--rust);margin-right:12px}.postcard-main{width:83%;top:48px;left:7%;transform:rotate(-5deg);z-index:3}.postcard-main img{aspect-ratio:1.65}.postcard-left{width:43%;top:298px;left:0;transform:rotate(-10deg);z-index:4}.postcard-left img{aspect-ratio:1.35}.postcard-right{width:49%;top:290px;right:1%;transform:rotate(10deg);z-index:5}.postcard-right img{aspect-ratio:1.4}.postcard:hover{transform:rotate(0deg) translateY(-8px);z-index:6}.stamp{position:absolute;top:2px;right:-1%;width:106px;height:106px;border:3px double var(--rust);border-radius:50%;display:flex;flex-direction:column;justify-content:center;text-align:center;color:var(--rust);font: .66rem/1.3 var(--body);transform:rotate(15deg);z-index:6;background:var(--paper)}.stamp strong{font:600 1.13rem/1.5 var(--serif);margin:2px 0}.collage-note{position:absolute;bottom:7px;left:29%;font-size:.875rem;color:var(--rust);transform:rotate(-5deg)}.collage-spark{position:absolute;top:265px;right:13%;font-size:3.5rem;color:var(--rust)}.hero-bottom{display:flex;align-items:center;justify-content:space-between;padding:20px 0;border-top:1px solid var(--line);border-bottom:3px double var(--line);font-size:.9375rem}.hero-bottom i{font-style:normal;color:var(--rust)}.hero-bottom a{font-size:.8125rem;text-decoration:none}
.section-heading{display:flex;justify-content:space-between;align-items:end;gap:32px;margin-bottom:32px}.section-heading .chapter{margin-bottom:12px}.section-heading h2{margin:0}.section-heading>p{max-width:340px;color:var(--muted);font-size:.875rem;margin:0 0 3px}.route-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:28px}.route-card{text-decoration:none;display:block}.route-art{position:relative;background:var(--sand);overflow:hidden;border-radius:50% 50% 0 0}.route-art img{width:100%;aspect-ratio:1.3;object-fit:cover;mix-blend-mode:multiply;transition:transform .5s}.route-no{position:absolute;left:18px;bottom:0;font:italic 500 4.6rem/.9 Cormorant;color:var(--paper);text-shadow:1px 1px var(--rust)}.route-copy{padding:20px 0 0}.route-copy h3{font-size:1.3rem;margin-top:8px}.route-footer{display:flex;justify-content:space-between;border-top:1px solid var(--line);padding:14px 0;font-size:.8125rem;color:var(--muted)}.route-footer span{font-size:1.3rem;color:var(--rust)}.route-card:hover img{transform:scale(1.035)}
.map-teaser{position:relative;display:grid;grid-template-columns:1fr 1fr;gap:48px;align-items:center;background:var(--ink);color:var(--paper);min-height:530px;padding:54px 70px;overflow:hidden;margin:90px 0}.map-teaser .chapter{color:var(--lime)}.map-teaser h2{font-size:clamp(1.9rem,3vw,2.8rem)}.map-teaser h2 em{font-style:normal;color:var(--lime)}.map-teaser p{font-size:1rem;color:#d2d9ca;max-width:25em}.map-teaser .button{background:var(--lime);color:var(--ink);border-color:var(--lime)}.map-caption{display:block;font-size:.75rem;color:#d2d9ca;margin-top:18px}.map-paper{display:block;padding:10px;background:var(--paper);transform:rotate(7deg);height:410px;max-width:380px;justify-self:end;overflow:hidden;position:relative;transition:transform .4s}.map-paper img{width:100%;height:100%;object-fit:cover;object-position:center 45%}.map-paper:hover{transform:rotate(2deg)}.paper-tag{position:absolute;bottom:10px;left:10px;right:10px;background:var(--paper);color:var(--ink);font-size:.7rem;padding:10px 12px;letter-spacing:.12em}.map-compass{position:absolute;font-size:8rem;bottom:-70px;left:42%;color:var(--lime);opacity:.25;pointer-events:none}
.explorer-tools{border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:18px 0}.filter-tabs{display:flex;gap:8px;flex-wrap:wrap}.filter-tabs button{border:1px solid transparent;background:transparent;padding:10px 14px;font-size:.875rem;min-height:44px;border-radius:0;white-space:nowrap}.filter-tabs button:hover{background:var(--sand)}.filter-tabs button[aria-pressed=true]{background:var(--ink);color:var(--paper)}.filter-tabs sup{margin-left:5px;font:1rem Cormorant}.explorer-status{display:flex;justify-content:space-between;gap:16px;font-size:.75rem;color:var(--muted);padding:18px 0}.places-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:36px 24px}.place-card{min-width:0}.place-image{display:block;position:relative;background:var(--art);overflow:hidden;border-radius:2px}.place-image img{width:100%;aspect-ratio:1.15;object-fit:contain;mix-blend-mode:multiply;transition:transform .5s}.place-image:hover img{transform:scale(1.055)}.card-index{position:absolute;top:12px;left:12px;border:1px solid var(--ink);border-radius:50%;width:30px;height:30px;display:grid;place-items:center;font:.875rem Cormorant;background:var(--paper)}.image-arrow{position:absolute;bottom:12px;right:12px;width:32px;height:32px;display:grid;place-items:center;border-radius:50%;background:var(--ink);color:var(--paper);transition:transform .3s}.place-image:hover .image-arrow{transform:rotate(45deg);background:var(--rust)}.card-copy{padding:18px 0;border-bottom:1px solid var(--line)}.card-copy .eyebrow{font-size:.75rem;margin-bottom:8px}.card-copy h3{font-size:1.08rem;line-height:1.65}.card-copy h3 a{text-decoration:none}.card-copy p{font-size:.875rem;line-height:1.7;color:var(--muted);margin:0}.index-link{margin-top:32px}.search-label{display:flex;flex-direction:column;font-size:.875rem;gap:8px}.explorer-tools>.search-label{max-width:600px;margin-bottom:18px}.search-label input,input[type=search],select{border:1px solid var(--line);background:var(--paper);padding:13px 16px;font-size:1rem;min-height:50px;min-width:0;width:100%;border-radius:0}.empty-state{text-align:center;padding:56px 24px;background:var(--sand)}.empty-state button{background:var(--ink);border:0;color:var(--paper);padding:12px 24px}
.traditions-list{border-top:1px solid var(--ink);margin-bottom:24px}.tradition{border-bottom:1px solid var(--line)}.tradition summary{display:grid;grid-template-columns:54px 1fr 280px 32px;gap:24px;align-items:center;list-style:none;cursor:pointer;padding:24px 0}.tradition summary::-webkit-details-marker{display:none}.event-no{font:italic 2.7rem Cormorant;color:var(--rust)}.event-name{font:600 1.18rem/1.6 var(--serif)}.event-period{font-size:.875rem;color:var(--muted);max-width:260px}.expand-icon{border:1px solid var(--line);border-radius:50%;height:32px;width:32px;display:grid;place-items:center;transition:transform .3s}.tradition[open] .expand-icon{transform:rotate(45deg);background:var(--ink);color:var(--paper)}.tradition[open]{background:#f2ead9}.tradition[open] summary{padding-left:16px;padding-right:16px}.event-body{padding:0 24px 26px 78px;font-size:.9375rem;max-width:920px}.food-feature{display:grid;grid-template-columns:1fr 1fr;gap:70px;align-items:center;background:var(--sand);padding:50px 60px;margin:100px 0;position:relative}.food-feature-image{position:relative}.food-feature-image img{mix-blend-mode:multiply;border-radius:50%;aspect-ratio:1;object-fit:cover}.food-stamp{position:absolute;right:-5px;top:-15px;background:var(--rust);color:var(--paper);border-radius:50%;width:92px;height:92px;display:grid;place-content:center;text-align:center;font:.8125rem/1.5 var(--body);letter-spacing:.12em;transform:rotate(12deg)}.food-feature h2{font-size:clamp(2rem,3.7vw,3.3rem)}.food-counts{display:flex;gap:32px;margin:24px 0 30px}.food-counts span{font-size:.75rem;display:flex;flex-direction:column}.food-counts b{font:500 2.7rem Cormorant;color:var(--rust)}.about-strip{display:grid;grid-template-columns:.7fr 1.1fr 1.2fr;gap:40px;align-items:start;margin:100px 0}.about-strip h2{font-size:1.9rem}.about-strip p{font-size:1rem;color:var(--muted)}
.intro{padding:60px 0 38px;max-width:1000px}.intro>.eyebrow{font-size:.75rem;letter-spacing:.07em;text-decoration:none;color:var(--rust)}.intro h1{margin:20px 0}.intro .lead{font-size:1.15rem;color:var(--muted)}.source{display:flex;flex-direction:column;border-top:1px solid var(--line);padding:30px 0;margin:70px 0 40px}.source h2{font-size:1.125rem}.source p{font-size:.875rem;color:var(--muted);max-width:62em;margin:0}.source a{margin:0 4px}.breadcrumbs{display:flex;gap:12px;flex-wrap:wrap;font-size:.75rem;color:var(--muted);padding:28px 0}.breadcrumbs a{text-decoration:none}.place-hero{display:grid;grid-template-columns:1fr 1fr;gap:60px;align-items:center;padding:24px 0 50px;border-bottom:1px solid var(--line)}.place-hero h1{font-size:clamp(2rem,3.1vw,3rem);line-height:1.55}.place-hero .english{font:italic 1.75rem Cormorant;color:var(--rust);margin-bottom:26px}.place-lead{font-size:1.125rem;color:var(--muted)}.place-hero-art{background:var(--art);padding:16px}.place-hero-art img{width:100%;aspect-ratio:1.1;object-fit:contain;mix-blend-mode:multiply}.place-hero-art figcaption{display:flex;justify-content:space-between;gap:20px;border-top:1px solid var(--line);padding:16px 4px 2px;font-size:.6875rem;letter-spacing:.06em}.story-layout{display:grid;grid-template-columns:240px minmax(0,720px);gap:80px;margin-top:70px;justify-content:space-between}.story-aside{display:flex;flex-direction:column;gap:14px;align-items:start;position:sticky;top:125px;align-self:start;font-size:.875rem}.story-aside a{text-decoration:none}.story .chapter{margin-bottom:12px}.story h2{font-size:1.65rem;margin:0 0 22px}.story h2:not(:first-of-type){margin-top:42px}.story>p{font-size:1.18rem;line-height:1.95}.document-excerpt{border:1px solid var(--line);padding:16px 20px;font-size:.9375rem;margin:24px 0}.document-excerpt summary{cursor:pointer}.document-excerpt p{margin:16px 0 0;color:var(--muted)}.story dl{display:grid;grid-template-columns:1fr 1.1fr;gap:16px 24px;padding:24px;background:var(--sand);font-size:1rem}.story dt{color:var(--muted)}.story dd{margin:0}.mini-map-link{display:flex;gap:24px;align-items:center;border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:18px 0;text-decoration:none;margin-top:38px}.mini-map-link img{width:92px;height:100px;object-fit:cover;object-position:center 40%}.mini-map-link small{display:block;font-size:.8125rem;color:var(--muted);margin-top:8px}.mini-map-link b{font-weight:400}.story .source{margin-top:36px}.story .source h2{font-size:1.125rem}.related-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:28px}.related-events{display:flex;gap:16px;flex-wrap:wrap;margin-top:36px;padding-top:24px;border-top:1px solid var(--line);font-size:.9375rem}.related-events .eyebrow{width:100%}.page-turn{display:grid;grid-template-columns:1fr 1fr;border-top:1px solid var(--line);gap:40px;padding:28px 0}.page-turn a{text-decoration:none;display:flex;flex-direction:column;gap:12px}.page-turn a:last-child{text-align:right}.page-turn span{font-size:.75rem;color:var(--rust)}.page-turn b{font:600 1.125rem/1.6 var(--serif)}
.route-notice{max-width:50em;font-size:.9375rem;color:var(--muted)}.route-jumps{display:flex;gap:28px;flex-wrap:wrap;font-size:.875rem;border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:18px 0;margin:32px 0 60px}.route-jumps a{text-decoration:none}.route-chapter{display:grid;grid-template-columns:1fr 1.15fr;gap:70px;border-bottom:1px solid var(--line);padding:0 0 70px;margin:70px 0}.route-chapter-visual{align-self:start;position:sticky;top:120px}.route-chapter-visual img{width:100%;aspect-ratio:1.2;object-fit:cover;mix-blend-mode:multiply;margin-bottom:20px}.giant-number{font:italic 7rem/1 Cormorant;color:var(--rust)}.stops{list-style:none;padding:0}.stops li{display:flex;gap:24px;position:relative;padding:18px 0;border-bottom:1px solid var(--line)}.stops li>span{font:1.9rem Cormorant;color:var(--rust)}.stops h3{font-size:1.1rem}.stops h3 a{text-decoration:none}.stops p{font-size:.875rem;color:var(--muted);margin:0}.calendar-note{font-size:.9375rem;color:var(--muted)}.event-note{display:grid;grid-template-columns:1fr 2fr;gap:64px;background:var(--sand);padding:50px;align-items:center;margin:10px 0 70px}.calendar-symbol{font-size:11rem;text-align:center;line-height:1;color:var(--rust)}.event-note h2{font-size:1.8rem}.event-note p{font-size:1rem}
.eat-intro{display:grid;grid-template-columns:1.4fr 1fr;gap:60px;align-items:center;padding:30px 0}.eat-intro .intro{padding:30px 0 10px}.eat-intro>div>p{font-size:.9375rem;color:var(--muted)}.eat-intro-art{position:relative;max-width:360px;justify-self:end}.eat-intro-art img{mix-blend-mode:multiply;border-radius:50%}.eat-intro-art .food-stamp{top:0;right:0}.filters{display:grid;grid-template-columns:1.6fr 1fr auto;align-items:end;gap:20px;padding:24px;background:var(--sand);margin-top:24px}.filters label{display:flex;flex-direction:column;gap:8px;font-size:.875rem}.filters .button{height:52px}.shop-group{margin:56px 0}.shop-group h2{display:flex;gap:20px;align-items:center;border-bottom:1px solid var(--ink);padding-bottom:15px}.count{font:italic 2.7rem Cormorant;color:var(--rust)}.shop-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));list-style:none;padding:0;gap:0 44px}.shop-list li{display:flex;align-items:center;gap:22px;padding:17px 0;border-bottom:1px solid var(--line);font-size:1.0625rem}.shop-number{font:1.8rem Cormorant;color:var(--rust);min-width:27px}#results{font-size:.875rem;margin-top:16px;color:var(--muted)}#empty{background:var(--sand);text-align:center;padding:36px}
.map-workspace{border:1px solid var(--line);margin:0}.map-toolbar{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:14px 20px;background:var(--ink);color:var(--paper)}.map-zones,.map-zoom{display:flex;gap:8px;align-items:center}.map-toolbar button{background:transparent;color:inherit;border:1px solid #668073;min-height:42px;padding:8px 15px;font-size:.875rem}.map-toolbar button[aria-pressed=true]{background:var(--lime);color:var(--ink);border-color:var(--lime)}.map-zoom button{width:42px;padding:4px;font-size:1.3rem}.map-zoom output{min-width:62px;text-align:center;font-size:.8125rem}.map-stage{position:relative;overflow:auto;background:#e7e0d2;background-image:radial-gradient(#bdb6a7 .7px,transparent .7px);background-size:16px 16px;height:720px}.map-stage:not(.ready) img{max-width:100%;height:auto;margin:auto}.map-stage.ready{overflow:hidden;touch-action:none;cursor:grab}.map-stage.dragging{cursor:grabbing}.map-stage.ready .map-image{position:absolute;left:0;top:0;width:1312px;height:1872px;max-width:none;transform-origin:0 0;will-change:transform;user-select:none}.map-help{display:flex;justify-content:space-between;gap:16px;padding:12px 20px;font-size:.8125rem;background:var(--sand)}.map-source-caption{margin:16px 0}.map-place-index{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:40px}.map-place-index h3{padding-bottom:15px;border-bottom:1px solid var(--line)}.map-place-index ul{list-style:none;margin:0;padding:0;font-size:.9375rem}.map-place-index li{padding:8px 0}.map-place-index a{text-decoration:none}.about-layout{display:grid;grid-template-columns:1fr 1.1fr;gap:80px;margin:24px 0 80px;align-items:start}.about-illustration{position:sticky;top:120px}.about-illustration img{mix-blend-mode:multiply;margin-bottom:20px}.prose h2{font-size:1.6rem;margin:32px 0 20px}.prose h2:first-child{margin-top:0}.prose p{line-height:1.95}
.site-footer{background:var(--ink);color:var(--paper);margin-top:80px;padding:50px max(48px,calc((100vw - 1240px)/2)) 26px}.footer-top{display:flex;gap:60px;align-items:center;justify-content:space-between;padding-bottom:40px}.footer-name{font:600 clamp(2rem,4vw,3.5rem) var(--serif);text-decoration:none}.footer-name em{font:italic 500 1.6em Cormorant;color:var(--lime)}.footer-top p{font-size:1rem;color:#d4dacd;margin:0}.round-link{width:50px;height:50px;border:1px solid #7e9181;border-radius:50%;display:grid;place-items:center;text-decoration:none;font-size:1.5rem}.footer-bottom{display:flex;justify-content:space-between;gap:24px;border-top:1px solid #566f5c;padding-top:24px;font-size:.75rem;color:#d4dacd}.footer-bottom a{text-decoration:none}.site-footer a:hover{color:var(--lime)}
@keyframes arrive{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}.hero-copy{animation:arrive .7s ease both}.explorer .place-card:not([hidden]){animation:arrive .35s ease both}
@media(min-width:1600px){.hero-layout{min-height:660px}.hero-collage{transform:scale(1.04)}}
@media(max-width:1100px){main{padding:0 32px}.site-header{gap:20px;padding:14px 32px}.site-header nav{gap:18px}.header-map{display:none}.hero-layout{min-height:560px}.hero-collage{height:470px}.postcard-main{top:64px}.postcard-left{top:260px}.postcard-right{top:265px}.collage-note{bottom:0}.collage-spark{top:245px}.stamp{width:88px;height:88px;font-size:.6rem}.stamp strong{font-size:1rem}.hero h1{font-size:5.2rem}.hero-title-bottom{font-size:2rem}.hero-title-bottom em{font-size:5rem}.hero-eyebrow{font-size:.8rem}.hero-bottom{font-size:.875rem}.map-teaser{padding:40px;gap:35px}.map-paper{height:360px}.places-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.story-layout{gap:40px;grid-template-columns:180px minmax(0,1fr)}.place-hero{gap:35px}.tradition summary{grid-template-columns:44px 1fr 220px 32px;gap:18px}.food-feature{padding:40px;gap:40px}.about-strip{gap:25px}.about-strip h2{font-size:1.6rem}.filters{grid-template-columns:1.4fr 1fr}.filters .button{grid-column:1/-1;justify-self:start}.event-note{gap:35px}.map-stage{height:680px}}
@media(max-width:800px){.site-header{display:grid;grid-template-columns:1fr auto;gap:10px 20px;padding:12px 24px}.site-header nav{grid-row:2;grid-column:1/-1;overflow:auto;margin:0;gap:26px;padding-bottom:3px;max-width:100%}.header-map{display:block;grid-column:2;grid-row:1;font-size:.75rem;padding:8px 12px}.brand{font-size:1.13rem}.brand-mark{width:38px;height:38px;font-size:.9rem}.brand small{font-size:.55rem}.hero-layout{grid-template-columns:1fr;min-height:auto;gap:0;padding-top:30px}.hero-copy{max-width:600px}.hero h1{font-size:5.3rem}.hero-title-bottom{font-size:2.4rem}.hero-title-bottom em{font-size:5.5rem}.hero-collage{max-width:570px;width:100%;justify-self:center;height:520px}.postcard-main{top:48px}.postcard-left{top:285px}.postcard-right{top:290px}.stamp{width:104px;height:104px}.hero-copy{padding:0}.hero-actions{margin:24px 0}.hero-footnote{margin-bottom:26px}.hero-bottom{gap:10px}.hero-bottom a{display:none}.section{margin:70px 0}.section-heading{align-items:start;flex-direction:column;gap:14px}.section-heading>p{max-width:none}.route-cards{gap:18px}.route-copy h3{font-size:1.08rem}.route-copy .eyebrow{font-size:.75rem}.route-no{font-size:3.3rem}.map-teaser{padding:40px 30px;gap:24px;min-height:450px}.map-teaser h2{font-size:1.8rem}.map-paper{height:310px}.map-teaser p{font-size:.9375rem}.places-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:30px 20px}.filter-tabs{flex-wrap:nowrap;overflow:auto;padding-bottom:6px}.filter-tabs button{flex-shrink:0}.tradition summary{grid-template-columns:40px 1fr 28px;gap:14px}.event-period{grid-column:2;grid-row:2;max-width:none}.event-name{font-size:1.05rem}.expand-icon{grid-column:3;grid-row:1}.event-no{grid-row:1/3}.event-body{padding-left:54px}.food-feature{padding:30px;gap:30px}.food-feature h2{font-size:2rem}.food-feature p{font-size:.9375rem}.food-counts{gap:24px}.food-stamp{width:76px;height:76px;font-size:.65rem}.about-strip{grid-template-columns:1fr 1.3fr}.about-strip>.chapter{grid-column:1/-1}.place-hero{grid-template-columns:1fr;gap:30px}.place-hero h1{font-size:2.5rem}.place-hero-art{max-width:650px;width:100%}.place-hero-art img{max-height:520px}.story-layout{grid-template-columns:1fr;gap:30px;margin-top:40px}.story-aside{position:static;flex-direction:row;flex-wrap:wrap;gap:12px 22px;padding-bottom:20px;border-bottom:1px solid var(--line)}.story-aside .chapter{width:100%;margin-bottom:0}.related-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.route-chapter{gap:30px}.giant-number{font-size:5rem}.route-chapter-copy h2{font-size:1.5rem}.stops li{gap:15px}.stops h3{font-size:1rem}.eat-intro{gap:24px}.eat-intro-art .food-stamp{right:0}.eat-intro .intro h1{font-size:2.2rem}.map-toolbar{flex-wrap:wrap;gap:12px}.map-stage{height:600px}.map-place-index{grid-template-columns:repeat(2,minmax(0,1fr));gap:30px}.map-help{flex-direction:column;gap:4px}.about-layout{gap:35px}.event-note{grid-template-columns:1fr 3fr;padding:32px}.calendar-symbol{font-size:6rem}.footer-top{gap:24px;flex-wrap:wrap}.footer-name{font-size:2.4rem}.footer-top p{font-size:.875rem}.footer-bottom{flex-wrap:wrap;font-size:.75rem}}
@media(max-width:520px){main{padding:0 20px}.site-header{padding:10px 20px}.site-header nav{font-size:.8125rem;gap:25px}.hero-topline{font-size:.625rem;letter-spacing:.06em;padding:18px 0}.hero-layout{padding-top:25px;padding-bottom:22px}.hero h1{font-size:clamp(3.3rem,15vw,4.6rem);margin:0 0 20px}.hero-title-bottom{font-size:clamp(1.6rem,7.2vw,2.1rem);gap:12px}.hero-title-bottom em{font-size:4rem}.hero-eyebrow{font-size:.75rem;margin-bottom:20px}.hero-copy>p{font-size:1rem}.hero-actions{gap:20px}.hero-actions .button{font-size:.875rem;padding:12px 16px;gap:18px}.hero-actions .text-link{font-size:.875rem}.hero-footnote{font-size:.6875rem}.hero-collage{height:370px;margin-top:4px}.postcard{padding:7px 7px 0}.postcard>span{font-size:.625rem;padding:7px 2px}.postcard-main{top:45px;left:5%;width:87%}.postcard-main b{display:none}.postcard-left{top:205px;width:45%;left:2%}.postcard-right{top:205px;width:48%;right:1%}.collage-ring{top:15px}.stamp{width:78px;height:78px;font-size:.5rem;right:-1%}.stamp strong{font-size:.875rem}.collage-note{font-size:.6875rem;bottom:0;left:25%}.collage-spark{font-size:2.2rem;top:185px;right:10%}.hero-bottom{font-size:.6875rem;padding:16px 0;gap:6px}.hero-bottom i{font-size:.7rem}.section{margin:55px 0}.section-heading{margin-bottom:24px}.section-heading h2{font-size:1.65rem}.chapter{font-size:.6875rem}.section-heading>p{font-size:.875rem}.route-cards{grid-template-columns:1fr;gap:22px}.route-card{display:grid;grid-template-columns:130px minmax(0,1fr);gap:20px;align-items:center}.route-art{border-radius:50% 50% 0 0}.route-art img{aspect-ratio:.95}.route-no{font-size:3.2rem;left:10px}.route-copy{padding:0}.route-copy h3{font-size:1.08rem}.route-footer{padding:8px 0}.map-teaser{grid-template-columns:1fr;padding:30px 26px;gap:36px;margin:60px 0}.map-teaser h2{font-size:2rem}.map-paper{justify-self:center;width:80%;height:300px;transform:rotate(5deg);margin:0 0 12px}.map-compass{bottom:240px;left:auto;right:-12px;font-size:7rem}.map-caption{font-size:.6875rem}.places-grid{gap:26px 16px}.place-image img{aspect-ratio:.95}.card-index{top:8px;left:8px;width:25px;height:25px;font-size:.75rem}.image-arrow{right:8px;bottom:8px;width:27px;height:27px}.card-copy{padding:13px 0}.card-copy h3{font-size:.9375rem;line-height:1.7}.card-copy .eyebrow{font-size:.6875rem}.card-copy p{font-size:.8125rem;line-height:1.8}.explorer-status{font-size:.6875rem;gap:8px}.explorer-status>span:last-child{display:none}.filter-tabs button{font-size:.8125rem;padding:8px 12px}.food-feature{grid-template-columns:1fr;padding:28px;margin:60px 0;gap:20px}.food-feature-image{max-width:280px;justify-self:center;order:2;margin-top:12px}.food-feature-copy h2{font-size:2.2rem}.food-counts{gap:36px}.about-strip{grid-template-columns:1fr;gap:14px;margin:60px 0}.about-strip>.chapter{margin-bottom:0}.about-strip h2{font-size:1.8rem}.about-strip p{font-size:1rem}.intro{padding:36px 0 24px}.intro h1{font-size:2rem;line-height:1.55}.intro .lead{font-size:1rem}.breadcrumbs{padding:20px 0;font-size:.6875rem}.place-hero{padding-top:10px;padding-bottom:30px}.place-hero h1{font-size:2rem}.place-hero .english{font-size:1.45rem;margin-bottom:20px}.place-lead{font-size:1rem}.place-hero-art{padding:10px}.place-hero-art figcaption{font-size:.6rem;letter-spacing:0;gap:10px;padding-top:10px}.story-layout{margin-top:28px}.story-aside{font-size:.8125rem;gap:12px 18px}.story h2{font-size:1.5rem}.story>p{font-size:1.0625rem}.story dl{grid-template-columns:1fr;gap:8px;padding:20px}.story dd{margin-bottom:12px}.mini-map-link{gap:16px}.mini-map-link img{width:75px;height:85px}.mini-map-link b{font-size:.9375rem}.mini-map-link small{font-size:.75rem}.source{margin-top:42px;padding-top:24px}.source p{font-size:.8125rem}.related-grid{gap:24px 16px}.related-events{font-size:.875rem}.page-turn{gap:20px}.page-turn b{font-size:.9375rem}.page-turn span{font-size:.6875rem}.event-no{font-size:2.3rem}.tradition summary{padding:20px 0;grid-template-columns:32px 1fr 28px;gap:8px 12px}.event-name{font-size:1rem}.event-period{font-size:.8125rem}.expand-icon{width:28px;height:28px}.event-body{padding:0 12px 22px 44px;font-size:.875rem}.route-jumps{gap:14px;font-size:.8125rem;margin-bottom:36px}.route-chapter{grid-template-columns:1fr;gap:28px;padding-bottom:40px;margin:44px 0}.route-chapter-visual{position:relative;top:0;padding-left:64px}.route-chapter-visual img{max-height:240px;object-fit:contain}.giant-number{position:absolute;left:0;top:0;font-size:4.5rem}.route-chapter-copy h2{font-size:1.65rem}.stops h3{font-size:1.06rem}.event-note{grid-template-columns:1fr;padding:28px;gap:20px}.calendar-symbol{font-size:4rem;text-align:left}.event-note h2{font-size:1.5rem}.eat-intro{grid-template-columns:1fr;gap:0;padding:0}.eat-intro-art{max-width:220px;justify-self:center;margin:8px 0 28px}.eat-intro .intro h1{font-size:2rem}.eat-intro .intro{padding-top:32px}.eat-intro>div>p{font-size:.875rem}.filters{grid-template-columns:1fr;padding:20px;gap:16px;margin-top:10px}.filters .button{grid-column:auto;justify-self:stretch;justify-content:center}.shop-list{grid-template-columns:1fr}.shop-group{margin:40px 0}.shop-list li{font-size:1rem;gap:18px;padding:15px 0}.shop-group h2{font-size:1.6rem}.map-toolbar{padding:12px;gap:12px}.map-zones{width:100%;display:grid;grid-template-columns:repeat(3,1fr);gap:7px}.map-toolbar button{font-size:.8125rem;padding:8px}.map-zoom{margin-left:auto}.map-zoom button{font-size:1.2rem}.map-stage{height:520px}.map-help{padding:12px;font-size:.75rem}.map-source-caption{font-size:.75rem}.map-place-index{grid-template-columns:1fr;gap:28px}.map-place-index h3{font-size:1.2rem}.map-place-index ul{font-size:.9375rem}.about-layout{grid-template-columns:1fr;gap:35px}.about-illustration{position:static;max-width:350px}.prose h2{font-size:1.5rem}.site-footer{margin-top:60px;padding:36px 20px 24px}.footer-top{display:grid;grid-template-columns:1fr auto;gap:20px;padding-bottom:28px}.footer-name{font-size:2rem}.footer-top p{grid-column:1;grid-row:2;font-size:.875rem}.round-link{grid-column:2;grid-row:1}.footer-bottom{flex-direction:column;gap:12px;font-size:.75rem}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*:before,*:after{animation:none!important;transition:none!important}}
.collage-note{display:none}
.site-header nav{min-width:0;overflow-x:auto}
.brand-mark{width:2.875rem;height:2.875rem;flex-shrink:0}
.hero-layout{grid-template-columns:repeat(auto-fit,minmax(min(100%,30rem),1fr))}
.hero-title-bottom{white-space:normal;flex-wrap:wrap}
.hero-collage{width:100%;max-width:600px;justify-self:center}
.stamp{width:6.625rem;height:6.625rem;font-size:.75rem}
@media(max-width:520px){.hero-footnote{display:none}.hero-collage{margin-top:12px}.hero-actions{margin-bottom:12px}}
@media(max-width:800px){.brand-mark{width:2.375rem;height:2.375rem}}
@media(max-width:520px){.stamp{width:5.25rem;height:5.25rem;font-size:.625rem}.card-copy p{font-size:.875rem}}
/* Phase 3 · complete place reading pages */
.full-place-hero .research-photo{margin:0}.research-photo img{display:block;width:100%;height:auto;max-height:520px;object-fit:contain}.research-photo{margin:24px 0}.research-photo figcaption{display:block!important;font-size:.8rem!important;line-height:1.7;letter-spacing:0!important;padding:12px 0}.research-photo small{display:block;color:var(--muted)}.research-layout{display:grid;grid-template-columns:150px minmax(0,1fr) 280px;gap:28px;align-items:start;margin:48px 0}.research-body{grid-column:2;grid-row:1;min-width:0}.visit-card{grid-column:3;grid-row:1;position:sticky;top:110px;max-height:calc(100dvh - 130px);overflow:auto;padding:22px;background:var(--sand);border:1px solid var(--line);font-size:.84rem;overflow-wrap:anywhere}.visit-card h2{font-size:1.35rem;margin:0 0 20px}.visit-card dl{margin:0}.visit-card dl>div{padding:10px 0;border-top:1px solid var(--line)}.visit-card dt{font-weight:600}.visit-card dd{margin:5px 0 0}.visit-card .directions a,.visit-card dl>div>a{display:block;margin:8px 0}.research-rail{grid-column:1;grid-row:1;position:sticky;top:115px;max-height:calc(100dvh - 135px);overflow:auto;display:flex;flex-direction:column;gap:12px;font-size:.75rem}.research-rail a{text-decoration:none;border-left:2px solid transparent;padding-left:10px}.research-rail a[aria-current]{border-color:var(--rust);color:var(--rust);font-weight:600}.research-section{margin:0 0 72px;scroll-margin-top:125px}.research-section>h2{font-size:1.9rem;line-height:1.6;margin:0 0 28px}.research-section h3{font-size:1.2rem;line-height:1.7}.research-section p{line-height:1.95}.fact-status{display:inline-block;font-size:.7rem;line-height:1.6;padding:4px 9px;border-radius:3px;background:#eee9de;color:#615b4f;vertical-align:middle}.fact-status.confirmed{background:#dfeade;color:#235038}.fact-status.unverified{background:#fff0b9;color:#725611}.fact-status.disputed{background:#ffdec3;color:#8b4018}.muted,.missing-photo{color:var(--muted)}.era-axis{position:relative;display:grid;grid-template-columns:1fr 1fr;gap:34px 28px}.era-axis:before{content:'';position:absolute;left:50%;top:0;bottom:0;width:1px;background:var(--line)}.era-card{position:relative;grid-column:1;background:#f1ebdf;padding:24px;min-width:0;border-top:3px solid var(--ink)}.era-card:nth-child(2){grid-column:2;grid-row:2}.era-card:nth-child(3){grid-row:3}.era-card:before{content:'';position:absolute;right:-20px;top:0;width:12px;height:12px;background:var(--ink);border:3px solid var(--paper);border-radius:50%}.era-card:nth-child(2):before{right:auto;left:-20px}.era-card h3{font-size:1.45rem;margin:14px 0}.era-years{color:var(--rust);font-size:.85rem}.era-sources{border-top:1px solid var(--line);padding-top:16px;font-size:.75rem;overflow-wrap:anywhere}.point-timeline{display:flex;gap:22px;overflow-x:auto;list-style:none;padding:10px 2px 22px;margin:0;scroll-snap-type:x proximity}.point-timeline li{flex:0 0 270px;border-top:3px solid var(--ink);padding:20px;background:var(--sand);scroll-snap-align:start}.point-timeline p,.point-timeline a{font-size:.9rem}.photo-grid,.research-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px}.photo-grid figure{margin:0 0 20px}.photo-grid img{height:240px;object-fit:contain;background:var(--sand)}.gallery-tabs{display:flex;gap:12px;margin-bottom:24px}.gallery-tabs button{font:inherit;padding:10px 20px;background:transparent;border:1px solid var(--ink);color:var(--ink);cursor:pointer}.gallery-tabs button[aria-selected=true]{background:var(--ink);color:var(--paper)}.research-note{padding:22px;border:1px solid var(--line);overflow-wrap:anywhere}.research-note h3{margin-top:0}.research-note a{font-size:.8rem}.nearby-links{display:flex;flex-wrap:wrap;gap:16px 30px;padding-left:20px}.source-table{overflow:auto}.source-table table{border-collapse:collapse;width:100%;font-size:.8rem;text-align:left}.source-table th,.source-table td{padding:12px 10px;border-bottom:1px solid var(--line);vertical-align:top;min-width:85px}.source-table tbody th{font-weight:400;min-width:170px}.unknowns{background:var(--sand);padding:22px;margin-top:24px}.unknowns li{margin:12px 0}.research-section details summary{cursor:pointer;padding:14px 0}.research-section details p{padding:0 15px}.photo-dialog{max-width:min(1000px,92vw);max-height:90dvh;background:var(--paper);color:var(--ink);padding:22px;border:1px solid var(--line)}.photo-dialog::backdrop{background:#102923df}.photo-dialog img{max-height:65dvh;width:100%;object-fit:contain}.photo-dialog button{font:inherit;padding:8px 18px;cursor:pointer}.photo-dialog figure{margin:15px 0 0}.photo-dialog figcaption{font-size:.85rem}.research-layout :focus-visible,[data-gallery] :focus-visible,.photo-dialog :focus-visible{outline:3px solid #a45132;outline-offset:4px}[hidden]{display:none!important}
@media(min-width:1250px){.research-layout{grid-template-columns:140px minmax(0,1fr) 260px;gap:24px}.era-card{padding:22px}}
@media(max-width:1100px){.research-layout{grid-template-columns:minmax(0,1fr) 280px}.research-rail{grid-column:1/-1;grid-row:1;position:static;flex-direction:row;flex-wrap:wrap;max-height:none}.research-body{grid-column:1;grid-row:2}.visit-card{grid-column:2;grid-row:2}.era-axis{display:block}.era-axis:before,.era-card:before{display:none}.era-card{margin-bottom:24px}}
@media(max-width:800px){.research-layout{display:flex;flex-direction:column;gap:28px;margin-top:28px}.visit-card{position:static;max-height:none;width:100%;padding:22px}.research-rail{width:100%;font-size:.8rem}.research-body{width:100%}.research-section{margin-bottom:50px}.research-section>h2{font-size:1.65rem}.point-timeline{display:grid;overflow:visible}.point-timeline li{border-top:0;border-left:3px solid var(--ink)}.photo-grid,.research-cards{grid-template-columns:1fr}.era-card{padding:24px}.era-card h3{font-size:1.5rem}.photo-grid img{height:auto;max-height:420px}.full-place-hero .research-photo figcaption{font-size:.75rem!important}}
@media(prefers-reduced-motion:reduce){.research-layout *,[data-gallery] *{scroll-behavior:auto;animation:none;transition:none}}


/* Map CSS (รอบ UX 2026-09-23: ชุดเดียว · มือถือแผนที่ขึ้นก่อน · จองที่กันหน้ากระตุก) */
#interactive-map-app { min-height: 760px; }
.map-filter-bar { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 20px; gap: 12px; }
.map-filter-buttons { display: flex; gap: 6px; flex-wrap: wrap; }
.map-filter-buttons button { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; background: transparent; border: 1px solid var(--line); padding: 8px 14px; font: inherit; font-size: 0.9rem; color: var(--ink); border-radius: 999px; cursor: pointer; white-space: nowrap; }
.map-filter-buttons button:hover { background: var(--sand); }
.map-filter-buttons button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.map-filter-buttons sup { font-size: 0.7em; opacity: .75; }
.map-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.map-count { margin: 0; font-size: 0.875rem; color: var(--muted); white-space: nowrap; }
.map-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 28px; align-items: start; }
.map-main { order: 2; min-width: 0; }
.map-sidebar { order: 1; max-height: 680px; overflow-y: auto; border-right: 1px solid var(--line); padding-right: 14px; }
#map-container { height: 640px; width: 100%; background: var(--sand); }
.map-list-heading, .missing-coords-heading { font-family: var(--body); font-size: 0.95rem; font-weight: 600; margin: 0 0 6px; color: var(--muted); }
.missing-coords-heading { margin-top: 28px; color: var(--rust); border-bottom: 1px solid var(--rust); padding-bottom: 5px; }
.map-list { list-style: none; padding: 0; margin: 0; }
.map-list li { border-bottom: 1px solid var(--line); }
.map-list li button { display: flex; align-items: flex-start; gap: 10px; width: 100%; min-height: 48px; padding: 12px 6px; background: none; border: 0; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.map-list li button .map-dot { margin-top: 7px; }
.map-list li button span { display: flex; flex-direction: column; gap: 2px; }
.map-list li small { color: var(--muted); font-size: 0.8rem; }
.map-list li button:hover, .map-list li.is-active button { background: var(--sand); }
.map-list li button:focus-visible { outline: 2px solid var(--rust); outline-offset: -2px; }
.map-list-missing li { padding: 10px 6px; display: flex; flex-direction: column; gap: 2px; }
.map-controls { margin-top: 14px; padding: 14px 16px; background: var(--sand); font-size: 0.9rem; display: grid; gap: 10px; }
.map-check, .map-range { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.map-check input { width: 20px; height: 20px; accent-color: var(--ink); }
.map-range input { flex: 1; accent-color: var(--ink); }
.map-note { margin: 0; font-size: 0.8rem; color: var(--ink); opacity: .82; }
.full-map-link { text-decoration: underline; color: var(--rust); justify-self: start; }
.maplibregl-popup-content { padding: 0; overflow: hidden; border-radius: 6px; box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.maplibregl-popup-close-button { background: rgba(0,0,0,.55); color: #fff; width: 32px; height: 32px; border-radius: 50%; margin: 6px; font-size: 20px; line-height: 1; }
.map-popup img { display: block; width: 100%; height: 140px; object-fit: cover; background: var(--sand); }
.map-popup-body { padding: 12px 14px 14px; color: #203f39; }
.map-popup-body .eyebrow { display: block; margin-bottom: 4px; font-size: .75rem; color: #a6452b; }
.map-popup-body h3 { margin: 0 0 6px; font-family: var(--serif); font-weight: 600; font-size: 1.1rem; line-height: 1.35; }
.map-popup-body p { margin: 0 0 12px; font-size: 0.875rem; line-height: 1.55; color: #3d4a44; }
.popup-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.popup-actions .button { min-height: 40px; padding: 8px 14px; font-size: 0.85rem; }
.popup-actions .button-outline { background: transparent; color: #203f39; border: 1px solid currentColor; }
.maplibregl-ctrl-group button { width: 40px; height: 40px; }
.maplibregl-marker { cursor: pointer; }
.maplibregl-marker:focus-visible { outline: 3px solid var(--rust); outline-offset: 2px; border-radius: 50%; }

@media (max-width: 800px) {
  #interactive-map-app { min-height: 1100px; }
  .map-filter-bar { flex-direction: column; align-items: stretch; margin-inline: -20px; padding-inline: 20px; }
  .map-filter-buttons { flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 2px; mask-image: linear-gradient(90deg, #000 88%, transparent); -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); }
  .map-filter-buttons::-webkit-scrollbar { display: none; }
  .map-filter-buttons button { scroll-snap-align: start; }
  .map-layout { grid-template-columns: 1fr; gap: 20px; }
  .map-main { order: 1; }
  .map-sidebar { order: 2; max-height: none; overflow: visible; border-right: none; padding-right: 0; }
  #map-container { height: min(62vh, 520px); min-height: 360px; }
}

/* Trip Page CSS */
.trip-controls { display: flex; gap: 15px; flex-wrap: wrap; margin-bottom: 30px; }
.trip-summary { background: var(--sand); padding: 20px; margin-bottom: 30px; }
.trip-summary p { margin: 0; }
.trip-list { display: flex; flex-direction: column; gap: 20px; margin-bottom: 40px; }
.trip-item { display: grid; grid-template-columns: 120px 1fr auto; gap: 25px; align-items: center; border: 1px solid var(--line); padding: 15px; background: var(--paper); }
.trip-item-art img { width: 100%; height: 120px; object-fit: cover; background: var(--sand); }
.trip-item-info h2, .trip-item-info h3 { margin: 0 0 10px; font-size: 1.25rem; }
.trip-item-info p { margin: 0; color: var(--muted); }
.trip-item-actions { display: flex; gap: 10px; flex-direction: column; }
.trip-item-actions .button-outline { padding: 5px 15px; font-size: 0.8125rem; min-height: auto; border: 1px solid var(--line); border-radius: 0; background: transparent; }
.trip-item-actions .button-outline:hover:not(:disabled) { background: var(--sand); }
.trip-item-actions .button-remove { color: var(--rust); border-color: var(--rust); }
.trip-item-actions .button-remove:hover { background: var(--rust); color: var(--paper); }
.trip-rest-stop { background: #f2ead9; padding: 30px; text-align: center; border: 1px dashed var(--rust); margin-bottom: 40px; }
.trip-rest-stop h2, .trip-rest-stop h3 { margin: 10px 0; font-size: 1.5rem; }

@media (max-width: 600px) {
  .trip-item { grid-template-columns: 100px 1fr; }
  .trip-item-actions { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 15px; }
}

@media print {
  .site-header, .site-footer, .trip-controls, .trip-item-actions, .trip-rest-stop, .skip { display: none !important; }
  .print-coords { display: block !important; font-family: monospace; font-size: 10pt; color: #555; margin-top: 5px; }
  body { background: white !important; color: black !important; font-size: 12pt; }
  main { padding: 0; max-width: 100%; margin: 0; }
  .trip-item { border: none; border-bottom: 1px solid #ccc; padding: 10px 0; gap: 15px; break-inside: avoid; }
  .trip-summary { background: transparent; border: 1px solid #ccc; padding: 15px; }
  .trip-item-art img { height: 80px; width: 80px; }
  .trip-list { gap: 0; }
}

/* ============ Phase 8 · tourist-facing homepage ============ */
.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}

/* Quick start */
.quick-start{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;max-width:1180px;margin:0 auto;padding:34px 24px 8px}
.quick-card{position:relative;display:flex;align-items:center;gap:14px;min-height:76px;padding:16px 18px;border:1px solid rgba(32,63,57,.18);border-radius:16px;background:#fffdf7;text-decoration:none;color:inherit;transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease}
.quick-card:hover,.quick-card:focus-visible{transform:translateY(-3px);border-color:rgba(32,63,57,.42);box-shadow:0 12px 26px -18px rgba(32,63,57,.6)}
.qs-icon{flex:0 0 40px;height:40px;border-radius:12px;background:#eee6d3;position:relative}
.qs-icon::after{content:"";position:absolute;inset:11px;border:1.8px solid #203f39;border-radius:3px}
[data-qs="map"] .qs-icon::after{border-radius:2px;clip-path:polygon(0 12%,33% 0,66% 14%,100% 2%,100% 88%,66% 100%,33% 86%,0 98%)}
[data-qs="places"] .qs-icon::after{border-radius:50% 50% 50% 50%/60% 60% 40% 40%}
[data-qs="eat"] .qs-icon::after{border-radius:0 0 14px 14px;border-top-width:3px}
[data-qs="trip"] .qs-icon::after{border-radius:4px;border-left-width:4px}
.qs-text{display:flex;flex-direction:column;gap:2px;line-height:1.35}
.qs-text b{font-size:1.02rem;letter-spacing:.01em}
.qs-text small{color:#5d6b62;font-size:.8rem}
.qs-badge{position:absolute;top:10px;right:12px;min-width:22px;height:22px;padding:0 6px;display:grid;place-items:center;border-radius:11px;background:#203f39;color:#f6f1e6;font-size:.74rem;font-weight:700}

/* City feed */
.city-feed-grid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);gap:40px;align-items:start}
.cf-title{font-size:.82rem;letter-spacing:.16em;text-transform:uppercase;color:#7d6a4f;margin:0 0 16px;font-weight:600}
.story-tiles{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-bottom:18px}
.story-tile{display:flex;flex-direction:column;gap:10px;text-decoration:none;color:inherit;border:1px solid rgba(32,63,57,.14);border-radius:14px;overflow:hidden;background:#fffdf7;transition:transform .18s ease,box-shadow .18s ease}
.story-tile:hover,.story-tile:focus-visible{transform:translateY(-3px);box-shadow:0 14px 30px -20px rgba(32,63,57,.62)}
.story-tile-lead{grid-column:1 / -1;flex-direction:row;align-items:stretch}
.story-tile .sc-img{display:block;overflow:hidden;background:#eee6d3;flex:0 0 auto}
.story-tile .sc-img img{display:block;width:100%;height:150px;object-fit:cover}
.story-tile-lead .sc-img{flex:0 0 46%}
.story-tile-lead .sc-img img{height:100%;min-height:210px}
.story-tile .sc-body{display:flex;flex-direction:column;gap:7px;padding:4px 16px 18px}
.story-tile-lead .sc-body{justify-content:center;padding:22px 22px 22px 20px}
.story-tile .chapter{font-size:.72rem;letter-spacing:.14em;text-transform:uppercase;color:#a3492f}
.story-tile b{font-family:SerifThai,serif;font-size:1.05rem;line-height:1.45;font-weight:600}
.story-tile-lead b{font-size:1.34rem}
.story-tile p{margin:0;font-size:.87rem;line-height:1.62;color:#4c574f}
.story-tile small{font-size:.76rem;color:var(--muted)}

.news-list{list-style:none;margin:0 0 16px;padding:0;display:flex;flex-direction:column}
.news-row{display:grid;grid-template-columns:88px minmax(0,1fr);gap:14px;padding:14px 0;border-top:1px solid rgba(32,63,57,.14)}
.news-row:first-child{border-top:0;padding-top:0}
.news-date{font-size:.78rem;color:var(--meta);letter-spacing:.02em;padding-top:2px}
.news-main{display:flex;flex-direction:column;gap:5px;min-width:0}
.news-main b{font-size:.94rem;line-height:1.55;font-weight:600}
.news-meta{font-size:.79rem;color:var(--muted)}
.news-meta a{color:#a3492f}
.news-out{font-size:.78rem;color:#203f39;text-decoration:underline;text-underline-offset:3px;width:fit-content}

@media (max-width:900px){
  .quick-start{grid-template-columns:1fr 1fr;padding:24px 18px 4px}
  .city-feed-grid{grid-template-columns:1fr;gap:34px}
  .story-tiles{grid-template-columns:1fr}
  .story-tile-lead{flex-direction:column}
  .story-tile-lead .sc-img{flex:0 0 auto}
  .story-tile-lead .sc-img img{height:190px;min-height:0}
  .story-tile-lead .sc-body{padding:4px 16px 18px}
  .news-row{grid-template-columns:1fr;gap:4px}
  .news-date{padding-top:0}
}
@media (prefers-reduced-motion:reduce){
  .quick-card,.story-tile{transition:none}
  .quick-card:hover,.story-tile:hover{transform:none}
}

/* --- V2 Story & News styles --- */

/* Base story v2 layout */
.story-layout-v2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding: 0 1rem;
  max-width: 1200px;
  margin: 0 auto;
}
@media (min-width: 900px) {
  .story-layout-v2 { grid-template-columns: 2fr 1fr; gap: 4rem; }
}
.story-hero-v2 {
  padding: 2rem 1rem;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}
.story-hero-v2 h1 { font-family: SerifThai, serif; font-size: 2.2rem; color: #203f39; margin-bottom: 0.5rem; }
.story-hero-v2 .lead { font-size: 1.1rem; color: #3a5c53; }
.story-meta { font-size: 0.9rem; color: var(--muted); }

.hero-photo-v2 { margin: 0 auto 2rem; max-width: 1000px; }
.hero-photo-v2 img, .section-photo-v2 img { width: 100%; height: auto; border-radius: 8px; }
.hero-photo-v2 figcaption, .section-photo-v2 figcaption { font-size: 0.8rem; color: var(--muted); text-align: center; margin-top: 0.5rem; }
.credit { display: block; font-size: 0.75rem; color: var(--muted); }

.story-lede-v2 p {
  font-size: 1.15rem;
  line-height: 1.7;
  color: #203f39;
  font-family: SerifThai, serif;
}

.story-section-v2 h2 { font-family: SerifThai, serif; color: #203f39; margin-top: 2rem; }
.story-section-v2 p { line-height: 1.6; margin-bottom: 1rem; }

.story-flags-v2 { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 1rem; }
.story-flag-v2 { font-size: 0.8rem; padding: 4px 8px; border-radius: 4px; display: inline-block; }
.flag-unverified { background-color: #fff9c4; color: #7f6000; }
.flag-disputed { background-color: #ffe0b2; color: #a13c00; }

.pull-quote-v2 {
  margin: 2rem 0;
  padding: 1.5rem;
  border-left: 4px solid #a3492f;
  background: #f6f1e6;
  font-family: SerifThai, serif;
  font-size: 1.3rem;
  color: #203f39;
  font-style: italic;
}

.evidence-box-v2 {
  background: #fff;
  border: 1px solid #dcd7ce;
  padding: 1.5rem;
  border-radius: 8px;
  position: sticky;
  top: 2rem;
  margin-bottom: 2rem;
}
.evidence-box-v2 h3 { margin-top: 0; color: #a3492f; }
.ev-items-v2 { list-style: none; padding: 0; margin: 0; }
.ev-items-v2 li { margin-bottom: 1.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid #eee; }
.ev-items-v2 li:last-child { border: none; padding-bottom: 0; margin-bottom: 0; }
.ev-claim { font-weight: bold; margin-bottom: 0.5rem; }
.ev-status { display: inline-block; font-size: 0.75rem; padding: 2px 6px; border-radius: 4px; font-weight: bold; margin-bottom: 0.5rem; }
.ev-status.unverified { background: #fff9c4; color: #7f6000; }
.ev-status.disputed { background: #ffe0b2; color: #a13c00; }
.ev-explain { font-size: 0.9rem; }

.story-places-v2, .story-sources-v2 { margin-top: 3rem; }
.mini-cards-v2 { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.place-card-mini { background: #fff; border: 1px solid #eee; border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; }
.place-card-mini img { height: 120px; object-fit: cover; }
.place-card-mini div { padding: 1rem; display: flex; flex-direction: column; flex-grow: 1; }
.place-card-mini h4 { margin: 0 0 1rem 0; font-size: 1rem; }
.place-card-mini button { margin-top: auto; min-height: 44px; }

.unknowns-box-v2 { margin-top: 2rem; background: #faf8f5; border: 1px dashed #ccc; padding: 1rem; border-radius: 8px; }
.unknowns-box-v2 summary { font-weight: bold; cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.unknowns-box-v2 ul { padding-left: 1.5rem; margin-top: 0.5rem; }

.story-sidebar-v2 { display: flex; flex-direction: column; gap: 2rem; }
.story-toc-v2 { position: sticky; top: 2rem; background: #f6f1e6; padding: 1rem; border-radius: 8px; }
.story-toc-v2 h2 { margin-top: 0; font-size: 1.1rem; }
.story-toc-v2 ul { list-style: none; padding: 0; margin: 0; }
.story-toc-v2 li { margin-bottom: 0.5rem; }
.story-toc-v2 a { text-decoration: none; color: #3a5c53; display: block; min-height: 32px; display: flex; align-items: center; }
.story-toc-v2 a:hover, .story-toc-v2 a.active { color: #a3492f; font-weight: bold; }

@media (min-width: 768px) {
}

.news-page { max-width: 800px; margin: 0 auto; padding: 2rem 1rem; }
.news-filters { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 2rem; }
.news-filters button { padding: 0.5rem 1rem; min-height: 44px; border: 1px solid #203f39; border-radius: 20px; background: transparent; color: #203f39; cursor: pointer; transition: 0.2s; }
.news-filters button[aria-pressed="true"] { background: #203f39; color: #f6f1e6; }
.news-list-full { display: flex; flex-direction: column; gap: 1.5rem; }
.news-item { padding-bottom: 1.5rem; border-bottom: 1px solid #dcd7ce; display: grid; gap: 1rem; }
@media (min-width: 600px) {
  .news-item { grid-template-columns: 100px 1fr; }
}
.news-item time { font-weight: bold; color: var(--muted); }
.news-item h2 { margin: 0 0 0.5rem 0; font-size: 1.2rem; }
.news-item p { margin: 0 0 0.5rem 0; }

@media (prefers-reduced-motion: reduce) {
}

/* ============ Story index cards ============ */
.story-grid-v2{
  display:grid;gap:26px;grid-template-columns:1fr;
  max-width:1180px;margin:34px auto 12px;padding:0 24px;
  align-items:stretch;
}
.story-card-v2{
  display:flex;flex-direction:column;overflow:hidden;
  background:#fffdf7;border:1px solid rgba(32,63,57,.15);border-radius:16px;
  transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;
}
.story-card-v2:hover{transform:translateY(-3px);border-color:rgba(32,63,57,.34);box-shadow:0 16px 34px -22px rgba(20,36,31,.65)}
.story-card-v2:focus-within{border-color:#203f39;box-shadow:0 0 0 3px rgba(32,63,57,.16)}

.card-art-v2{flex:0 0 auto;background:#eee6d3;overflow:hidden}
.card-art-v2 img{display:block;width:100%;height:210px;object-fit:cover;border-radius:0}

.card-content-v2{display:flex;flex-direction:column;gap:9px;padding:20px 22px 20px;flex:1 1 auto}
.card-content-v2 .chapter{font-size:.72rem;letter-spacing:.15em;text-transform:uppercase;color:#a3492f}
.card-content-v2 h2{margin:0;font-family:SerifThai,serif;font-size:1.24rem;line-height:1.5;font-weight:600}
/* The whole card is clickable through this one link, so nothing else is
   underlined and the heading stays the only anchor a screen reader announces. */
.card-content-v2 h2 a{color:inherit;text-decoration:none}
.card-content-v2 h2 a::after{content:"";position:absolute;inset:0}
.card-content-v2 h2 a:focus-visible{outline:none}
.story-card-v2{position:relative}
.card-content-v2 p{margin:0;font-size:.92rem;line-height:1.7;color:#4c574f}
.card-meta-v2{
  margin-top:auto;padding-top:16px;display:flex;justify-content:space-between;align-items:baseline;
  gap:12px;font-size:.82rem;color:var(--muted);border-top:1px solid rgba(32,63,57,.1)
}
.card-go{color:#203f39;font-weight:600}
.story-mins{letter-spacing:.02em}

@media (min-width:860px){
  .story-grid-v2{grid-template-columns:1fr 1fr}
  .story-card-v2-lead{
    grid-column:1 / -1;
    display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);align-items:stretch;
  }
  .story-card-v2-lead{max-height:330px}
  .story-card-v2-lead .card-art-v2{height:100%}
  .story-card-v2-lead .card-art-v2 img{height:100%;min-height:0}
  .story-card-v2-lead .card-content-v2{justify-content:center;padding:34px 36px;gap:12px}
  .story-card-v2-lead .card-content-v2 h2{font-size:1.72rem;line-height:1.4}
  .story-card-v2-lead .card-content-v2 p{font-size:1rem}
}
@media (prefers-reduced-motion:reduce){
  .story-card-v2{transition:none}
  .story-card-v2:hover{transform:none}
}

/* ============ /rest/ · a break during the old town walk ============ */
.rest-stops{
  display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:18px;
  margin:22px 0 44px;
}
.rest-stop{
  display:flex;flex-direction:column;gap:8px;padding:20px 22px;
  background:#fffdf7;border:1px solid rgba(32,63,57,.15);border-radius:14px;
}
.rest-stop h3{
  margin:0;font-family:SerifThai,serif;font-size:1.06rem;line-height:1.5;font-weight:600;
}
.rest-stop p{margin:0;font-size:.89rem;line-height:1.66;color:#4c574f}
.rest-stop p + p{font-size:.82rem;color:var(--muted)}
.rest-stop a{
  margin-top:auto;padding-top:6px;width:fit-content;font-size:.8rem;
  color:#203f39;text-decoration:underline;text-underline-offset:3px;
}

.siwara-card{
  display:flex;flex-direction:column;gap:12px;align-items:flex-start;
  padding:24px 26px;margin:20px 0 46px;
  background:#eee6d3;border-radius:16px;border:1px solid rgba(32,63,57,.16);
}
.siwara-card p{margin:0;font-size:.96rem;line-height:1.75;max-width:62ch}
.siwara-card a{
  display:inline-flex;align-items:center;min-height:44px;padding:0 18px;
  background:#203f39;color:#f6f1e6;border-radius:999px;
  font-size:.88rem;text-decoration:none;
}
.siwara-card a:hover{background:#2b544c}

/* Four stops laid out as a walk, not four full width photographs. */
.short-walk{
  display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:20px;
  margin:22px 0 40px;counter-reset:stop;
}
.walk-point{
  display:flex;flex-direction:column;overflow:hidden;
  background:#fffdf7;border:1px solid rgba(32,63,57,.15);border-radius:14px;
}
.walk-point > a{display:block;background:#eee6d3;line-height:0}
.walk-point img{display:block;width:100%;height:172px;object-fit:cover}
.walk-point > div{display:flex;flex-direction:column;gap:7px;padding:16px 18px 18px;flex:1}
.walk-point h3{margin:0;font-family:SerifThai,serif;font-size:1rem;line-height:1.5;font-weight:600}
.walk-point h3::before{
  counter-increment:stop;content:counter(stop,decimal-leading-zero);
  display:block;font-family:inherit;font-size:.72rem;letter-spacing:.14em;color:#a3492f;margin-bottom:3px;
}
.walk-point h3 a{color:inherit;text-decoration:none}
.walk-point h3 a:hover{text-decoration:underline;text-underline-offset:3px}
.walk-point p{margin:0;font-size:.84rem;line-height:1.6;color:#5d6b62}
.walk-point button{
  margin-top:auto;align-self:flex-start;min-height:40px;padding:0 15px;
  border:1px solid rgba(32,63,57,.32);border-radius:999px;background:transparent;
  color:#203f39;font:inherit;font-size:.82rem;cursor:pointer;
}
.walk-point button:hover{background:rgba(32,63,57,.07)}
.walk-point button[aria-pressed="true"]{background:#203f39;color:#f6f1e6;border-color:#203f39}

@media (max-width:600px){
  .rest-stops,.short-walk{grid-template-columns:1fr}
  .walk-point img{height:200px}
}
@media (prefers-reduced-motion:reduce){
  .siwara-card a,.walk-point button{transition:none}
}

/* ============ Curated picks and the printable leaflet ============ */
.rest-stop.pick{padding:0;overflow:hidden}
.pick-art{display:block;background:#eee6d3;line-height:0}
.pick-art img{display:block;width:100%;height:168px;object-fit:cover}
.pick-body{display:flex;flex-direction:column;gap:7px;padding:18px 20px 20px;flex:1}
.pick-meta{font-size:.79rem;color:var(--muted)}
.pick-tip{font-size:.84rem;line-height:1.62;color:#5d6b62;padding-left:12px;border-left:2px solid #e8a931}

.leaflet-block{
  display:grid;grid-template-columns:minmax(0,240px) minmax(0,1fr);gap:26px;align-items:center;
  padding:24px 26px;margin:20px 0 44px;
  background:#fffdf7;border:1px solid rgba(32,63,57,.16);border-radius:16px;
}
.leaflet-art{display:block;line-height:0}
.leaflet-art img{display:block;width:100%;border-radius:10px;box-shadow:0 12px 26px -18px rgba(20,36,31,.7)}
.leaflet-copy{display:flex;flex-direction:column;gap:12px}
.leaflet-copy p{margin:0;line-height:1.75}
.leaflet-actions{display:flex;flex-wrap:wrap;gap:14px;align-items:center;margin:6px 0}
.leaflet-actions .button{
  display:inline-flex;align-items:center;min-height:46px;padding:0 22px;
  background:#203f39;color:#f6f1e6;border-radius:999px;text-decoration:none;font-size:.9rem;
}
.leaflet-actions .button:hover{background:#2b544c}

.leaflet-pages{display:grid;grid-template-columns:1fr;gap:22px;margin:26px 0 30px}
.leaflet-pages figure{margin:0}
.leaflet-pages img{display:block;width:100%;height:auto;border-radius:12px;border:1px solid rgba(32,63,57,.14)}
.leaflet-pages figcaption{margin-top:8px;font-size:.8rem;color:var(--muted)}

@media (max-width:720px){
  .leaflet-block{grid-template-columns:1fr;gap:18px}
  .leaflet-art img{max-width:260px}
}

/* The picture link was shrinking to its image's intrinsic width, so each card
   showed a differently sized photo pinned to the left. Give it a definite width. */
.rest-stop.pick{display:flex;flex-direction:column;align-items:stretch}
.rest-stop .pick-art{display:block;width:100%;flex:0 0 auto;align-self:stretch}
.rest-stop .pick-art img{display:block;width:100%;height:180px;object-fit:cover;object-position:center}

.jump-links{display:flex;flex-wrap:wrap;gap:12px 20px;padding:8px 0 36px;min-width:0}
.jump-links a{text-decoration:none;border:1px solid var(--line);padding:12px 16px;min-height:44px;display:inline-flex;align-items:center}
.crosslinks{margin:36px 0;padding:8px 0 0;min-width:0;overflow-wrap:anywhere}
.crosslinks-list{list-style:none;margin:0 0 22px;padding:0;display:grid;gap:8px;min-width:0}
.crosslinks-list a{display:block;padding:12px 14px;background:var(--sand);text-decoration:none;min-height:44px;overflow-wrap:anywhere}
.crosslinks-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:16px;min-width:0}
.crosslinks-card{display:flex;flex-direction:column;min-width:0;overflow:hidden;text-decoration:none;border:1px solid var(--line);background:var(--paper)}
.crosslinks-card img{width:100%;height:auto;aspect-ratio:1.15;object-fit:cover}
.crosslinks-card span{padding:12px 14px;font-size:.9375rem;overflow-wrap:anywhere}
@media(max-width:520px){
  .crosslinks-grid{grid-template-columns:1fr}
  .jump-links{gap:10px}
}

/* ภาพขยาย: ให้ภาพแนวตั้ง เช่นโปสเตอร์กำหนดการ อ่านออกเต็มจอ */.photo-dialog{max-height:96dvh;padding:14px 18px;overflow:auto}.photo-dialog img{max-height:82dvh;width:auto;max-width:100%;margin:0 auto;display:block}.photo-dialog-full{display:inline-block;margin-top:8px;font-size:.85rem}

/* สารบัญบทความติดจอเฉพาะจอกว้าง · จอมือถือเรียงคอลัมน์เดียว ถ้า sticky จะลอยทับกล่องหลักฐาน */@media (max-width: 899px){.story-toc-v2{position:static}}

/* การ์ดของจากคนในเมือง (story_product) */.story-product{display:grid;gap:18px;margin:40px 0;padding:22px;background:#fff7d6;border:2px solid #1c3b33;border-radius:14px}.story-product .sp-photos{display:grid;grid-template-columns:1fr 1fr;gap:10px}.story-product figure{margin:0}.story-product img{display:block;width:100%;height:auto;border-radius:10px;background:#f6c500}.story-product figcaption{font-size:.75rem;line-height:1.5;color:#5c5a52;margin-top:6px}.story-product .sp-tag{display:inline-block;font-size:.75rem;font-weight:700;letter-spacing:.04em;color:#fff;background:#b3261e;padding:4px 10px;border-radius:999px}.story-product h2{margin:10px 0 8px;font-size:1.45rem;line-height:1.45}.story-product p{margin:0 0 16px;line-height:1.85}.story-product .sp-actions{display:flex;flex-wrap:wrap;gap:12px 18px;align-items:center}.story-product .sp-buy{display:inline-block;background:#b3261e;color:#fff;font-weight:700;text-decoration:none;padding:12px 20px;border-radius:999px}.story-product .sp-buy:hover{background:#8f1d17}@media (min-width:900px){.story-product{grid-template-columns:1.1fr 1fr;align-items:center;padding:28px}}
.story-product .sp-photos{grid-template-columns:2fr 1fr;align-items:start}

/* หน้าทริปว่าง (รอบ UX 2026-09-23) */
.trip-empty { text-align: left; padding: 32px 24px; border: 1px dashed var(--line); background: var(--sand); max-width: 640px; }
.trip-empty h2 { margin: 0 0 10px; font-size: 1.5rem; }
.trip-empty p { margin: 0 0 20px; color: var(--muted); }
.trip-empty-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.trip-empty-actions .button { min-height: 48px; }
.trip-empty-actions .button-outline { background: transparent; color: var(--ink); border: 1px solid var(--ink); }

/* 404: ช่องค้นหากับปุ่มแถวเดียว */
.search-row { display: flex; gap: 8px; align-items: flex-end; max-width: 720px; }
.search-row .search-label { flex: 1; margin: 0; }
.search-row .button { min-height: 52px; flex: none; }

/* ปุ่มรองข้างปุ่มหลักในหัวหน้าสถานที่/เขาหลัก (นำทาง) · ขนาดกดง่ายเท่าปุ่มหลัก */
.place-hero-actions .button-outline { min-height: 48px; padding: 12px 20px; font-size: inherit; background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.place-hero-actions .button-outline:hover { background: var(--sand); }

/* ลิงก์นำทาง/แหล่งข้อมูลย้ายเข้า <dd> (dl ต้องมีแค่ dt/dd) · คงหน้าตาเดิมของ dl>div>a */
.visit-card dd.directions, .visit-card dd.visit-sources { margin: 0; }
.visit-card dd.directions a, .visit-card dd.visit-sources a, .visit-card dd.visit-sources .source-offline { display: block; margin: 8px 0; }

/* รอบ UX 2026-09-23 (Muse มือถือรอบ 2) ------------------------------------ */
/* /eat/: จุดหน้าร้านลอยกลางแถว → ชิดบรรทัดชื่อร้าน · ลิงก์ใต้ร้านสูงแค่ 20px → เป้ากด ≥ 32px */
.shop-list li { align-items: flex-start; }
.shop-list li .shop-number { line-height: 1.1; }
.shop-list .shop-nav, .shop-list .shop-src a { display: inline-flex; align-items: center; min-height: 32px; padding: 4px 0; }
.shop-extra > span:last-child { gap: 2px; }
/* /routes/ /from-khao-lak/: ทั้งแถวจุดหมายกดได้ + มีลูกศรบอกว่าไปต่อได้ */
.stops li { position: relative; }
.stops li h3 a::after { content: ""; position: absolute; inset: 0; }
.stops li h3 a::before { content: "↗"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); color: var(--rust); font-size: 1rem; }
.stops li h3 { padding-right: 28px; }
.stops li:hover { background: var(--sand); }
.stops li .place-hero-actions, .stops li button { position: relative; z-index: 1; }
/* การ์ดข้อมูลใช้จริง: แถวรวมช่องที่ยังไม่ยืนยัน + โดเมนของแหล่งข้อมูล */
.visit-card .visit-pending dt { color: var(--muted); font-weight: 400; font-size: .85rem; }
.visit-card .visit-pending dd { color: var(--muted); font-size: .9rem; line-height: 1.7; }
.visit-card dd.visit-sources .src-item { display: block; margin: 8px 0; }
.visit-card dd.visit-sources .src-item a, .visit-card dd.visit-sources .src-item .source-offline { display: inline; margin: 0; }
.visit-card dd.visit-sources .src-item small { color: var(--muted); font-size: .75rem; margin-left: 4px; }
/* /eat/ มือถือ: ภาพประกอบ 220px ดันช่องค้นหาร้านตกจอแรก → ย่อไว้มุมขวา */
@media (max-width: 800px) {
  .eat-intro { grid-template-columns: 1fr 108px; gap: 14px; align-items: start; padding-bottom: 8px; }
  .eat-intro-art { max-width: 108px; margin-top: 34px; }
  .eat-intro-art .food-stamp { transform: scale(.55); transform-origin: top right; }
}
/* หน้าทริป: เนื้อหาเรนเดอร์ด้วย JS · จองความสูงไว้กันท้ายหน้ากระโดด (CLS 0.19) */
#trip-app { min-height: 420px; }
/* กลุ่มหมุดบนแผนที่ (clustering) · ปุ่มกลม 44px กดง่าย */
.map-cluster { width: 44px; height: 44px; border-radius: 50%; border: 3px solid #faf5e9; background: #203f39; color: #faf5e9; font: 600 1rem/1 var(--body); cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.28); display: grid; place-items: center; }
.map-cluster:hover { background: #a6452b; }
.map-cluster:focus-visible { outline: 3px solid #a6452b; outline-offset: 2px; }

/* home answer-first block (SEO/AI 2026-10-13) */
.home-answer{max-width:1180px;margin:0 auto;padding:22px 24px 0}
.home-answer h2{font-size:1.05rem;margin:0 0 6px}
.home-answer p{max-width:70ch;color:var(--muted);margin:0 0 4px;display:inline}
.home-answer p+p::before{content:" "}
@media (max-width:700px){.home-answer{padding:16px 18px 0}}

/* ---- ui.css ---- */
/* ============ Search overlay + mobile tab bar ============ */
.searchbox{position:fixed;inset:0;z-index:900;display:flex;align-items:flex-start;justify-content:center}
.searchbox[hidden]{display:none!important}
.searchbox-backdrop{position:absolute;inset:0;background:rgba(24,36,32,.52);backdrop-filter:blur(3px)}
.searchbox-panel{position:relative;width:min(620px,92vw);margin-top:12vh;background:#fffdf7;border:1px solid rgba(32,63,57,.2);border-radius:18px;box-shadow:0 30px 70px -30px rgba(20,36,31,.75);padding:18px 18px 14px}
.searchbox-panel input{width:100%;box-sizing:border-box;font:inherit;font-size:1.06rem;padding:13px 15px;border:1px solid rgba(32,63,57,.28);border-radius:12px;background:#f6f1e6;color:#1d2b25}
.searchbox-panel input:focus-visible{outline:2px solid #203f39;outline-offset:2px}
.searchbox-status{margin:10px 2px 6px;font-size:.8rem;color:var(--muted)}
.searchbox-results{list-style:none;margin:0;padding:0;max-height:46vh;overflow:auto}
.searchbox-results li a{display:flex;align-items:baseline;justify-content:space-between;gap:14px;padding:11px 12px;border-radius:10px;text-decoration:none;color:inherit;min-height:44px;box-sizing:border-box}
.searchbox-results li.is-active a{background:#eae2cd}
.sr-name{font-size:.97rem;line-height:1.45}
.sr-kind{flex:0 0 auto;font-size:.74rem;letter-spacing:.08em;text-transform:uppercase;color:var(--meta)}
.searchbox-hint{margin:10px 2px 0;font-size:.74rem;color:#8a9791}
body.searchbox-open{overflow:hidden}

/* Header actions */
.header-tools{display:flex;align-items:center;gap:8px}
.icon-button{position:relative;display:grid;place-items:center;width:42px;height:42px;border:1px solid rgba(32,63,57,.24);border-radius:11px;background:transparent;color:inherit;cursor:pointer;text-decoration:none}
.icon-button:hover,.icon-button:focus-visible{border-color:rgba(32,63,57,.5);background:rgba(32,63,57,.05)}
.icon-button .ib-glyph{font-size:1rem;line-height:1}
.icon-button .qs-badge{top:-6px;right:-6px}

/* Mobile tab bar */
.tabbar{display:none}
@media (max-width:900px){
  .tabbar{position:fixed;left:0;right:0;bottom:0;z-index:800;display:grid;grid-template-columns:repeat(4,1fr);
    background:#fffdf7;border-top:1px solid rgba(32,63,57,.18);padding:6px 4px calc(6px + env(safe-area-inset-bottom));
    box-shadow:0 -8px 22px -18px rgba(20,36,31,.7)}
  .tabbar a,.tabbar button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;
    min-height:52px;border:0;background:transparent;color:#3c4a43;font:inherit;font-size:.72rem;text-decoration:none;cursor:pointer;position:relative}
  .tabbar [aria-current="page"]{color:#203f39;font-weight:700}
  .tabbar .tb-glyph{font-size:1.08rem;line-height:1}
  .tabbar .qs-badge{top:2px;right:calc(50% - 22px);position:absolute}
  body{padding-bottom:70px}
}
@media (prefers-reduced-motion:reduce){.searchbox-backdrop{backdrop-filter:none}}

/* Auto-harvested news rows */
.news-sum{font-size:.84rem;line-height:1.6;color:#55625a}
.news-auto-tag{align-self:flex-start;font-size:.68rem;letter-spacing:.07em;padding:2px 8px;border-radius:999px;background:#efe6cd;color:#7a6234;border:1px solid rgba(122,98,52,.28)}
.news-row.is-auto .news-date{color:#7a6234}

/* ============ Directory entries added by research ============ */
.shop-extra > span:last-child{display:flex;flex-direction:column;gap:5px;min-width:0}
.shop-note{font-size:.86rem;line-height:1.6;color:#4c574f}
.shop-meta{font-size:.79rem;color:var(--muted)}
.shop-nav,.shop-src{font-size:.76rem;width:fit-content}
.shop-nav{color:#203f39;text-decoration:underline;text-underline-offset:3px;min-height:32px;display:inline-flex;align-items:center}
.shop-src{color:var(--meta);letter-spacing:.04em}
a.shop-src:hover{color:#a3492f}
.shop-warn{font-size:.72rem;padding:2px 8px;border-radius:999px;background:#f3e6d6;color:#8a5a29;width:fit-content}
.shop-list li.shop-extra{padding-top:12px;padding-bottom:12px}
@media (max-width:600px){
  .shop-extra > span:last-child{gap:6px}
  .shop-nav{min-height:44px}
}

/* ============ Header that survives a nine-item menu ============ */
.nav-toggle{display:none;place-items:center;width:42px;height:42px;border:1px solid rgba(32,63,57,.24);border-radius:11px;background:transparent;color:inherit;cursor:pointer;font:inherit}
.nav-toggle .ib-glyph{font-size:1.05rem;line-height:1}
.site-header{gap:14px}
.site-header nav{display:flex;flex-wrap:wrap;gap:2px 16px;min-width:0}
@media (max-width:1180px){
  .site-header nav a{font-size:.92rem}
  .site-header nav{gap:2px 12px}
}
@media (max-width:1040px){
  .site-header .header-map{display:none}
}
@media (max-width:900px){
  /* The bottom tab bar carries navigation on small screens, so the top menu
     collapses into a disclosure instead of scrolling off the edge. */
  .site-header nav{
    position:absolute;left:0;right:0;top:100%;z-index:700;
    flex-direction:column;gap:0;align-items:stretch;
    background:#fffdf7;border-bottom:1px solid rgba(32,63,57,.18);
    box-shadow:0 18px 30px -24px rgba(20,36,31,.8);
    padding:6px 18px 12px;max-height:70vh;overflow:auto;
  }
  .site-header nav[hidden]{display:none}
  .site-header nav a{padding:13px 4px;min-height:46px;display:flex;align-items:center;border-bottom:1px solid rgba(32,63,57,.1)}
  .site-header nav a:last-child{border-bottom:0}
  .site-header{position:relative}
  .nav-toggle{display:grid}
}

/* ============ Touch targets ============ */
/* Standalone action links need a real tap area on a phone. Links inside running
   text are left alone: padding them out would break the line rhythm, and
   inline links are exempt from the minimum target size anyway. */
@media (max-width:900px){
  a.text-link,
  a.news-out,
  a.shop-nav,
  a.index-link,
  .story-place-links a,
  .route-jumps a,
  .card-go{
    display:inline-flex;align-items:center;min-height:44px;
  }
  a.shop-src{display:inline-flex;align-items:center;min-height:36px}
  .maplibregl-ctrl button{width:36px;height:36px}
}
@media (max-width:900px){
  /* Place names sit inside the news meta line, so they get a taller hit area
     without becoming block elements that would break the sentence. */
  .news-meta a{display:inline-block;padding:6px 0;line-height:1.4}
  .news-row{padding:16px 0}
}

.place-hero-actions{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin-top:14px}
.place-hero-actions .button{margin:0}

.news-out-offline,.source-offline small{color:var(--muted,#6b7c78);font-size:.86em}
.source-offline{white-space:normal}

.story-outlinks{display:flex;flex-wrap:wrap;gap:18px;margin-top:8px}
.story-outlinks a{font-size:.95rem;border-bottom:1px solid currentColor;text-decoration:none;padding-bottom:2px}

/* ============ Story galleries ============ */
.story-gallery-v2{margin:42px 0 12px;padding-top:28px;border-top:1px solid rgba(32,63,57,.18)}
.story-gallery-v2 h2{margin:0 0 22px}
.story-gallery-group + .story-gallery-group{margin-top:34px}
.story-gallery-group h3{margin:0 0 14px;font-size:1.15rem;color:var(--ink,#203f39)}
.story-gallery-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.story-gallery-card{min-width:0;margin:0;background:#fffdf7;border:1px solid rgba(32,63,57,.14);border-radius:12px;overflow:hidden}
.story-gallery-card img{display:block;width:100%;height:auto;aspect-ratio:4/3;object-fit:cover}
.story-gallery-card figcaption{display:grid;gap:7px;padding:11px 12px 13px;font-size:.84rem;line-height:1.5}
.story-gallery-card .credit{font-size:.73rem;color:var(--muted,#6b7c78)}
@media (max-width:700px){.story-gallery-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.story-gallery-card figcaption{padding:9px;font-size:.78rem}}
@media (max-width:420px){.story-gallery-grid{grid-template-columns:1fr}.story-gallery-card img{aspect-ratio:16/10}}

.story-gallery-v2{margin-top:2.5rem;padding-top:1.5rem;border-top:1px solid var(--line,rgba(32,63,57,.18))}
.story-gallery-v2 h2{margin-top:0}
.story-gallery-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.story-gallery-card{margin:0;min-width:0}
.story-gallery-card img{display:block;width:100%;height:auto;aspect-ratio:4 / 3;object-fit:cover;border-radius:10px}
.story-gallery-card figcaption{display:grid;gap:4px;margin-top:8px;font-size:.9rem;line-height:1.45}
.story-gallery-card .credit{color:var(--muted,#6b7c78);font-size:.82rem}
@media (max-width:560px){.story-gallery-grid{grid-template-columns:1fr;gap:20px}.story-gallery-card img{aspect-ratio:4 / 3}}

/* แกลเลอรีในกระทู้ · ภาพผลงานเป็นตัวเนื้อหาเอง ไม่ใช่ของประกอบ จึงให้พื้นที่เต็ม */
.story-gallery-v2{margin:52px 0}
.story-gallery-v2 h2{font-size:1.45rem;margin:0 0 22px}
.story-gallery-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:28px}
.story-gallery-card{margin:0;min-width:0}
.story-gallery-card img{width:100%;height:auto;background:var(--art);border-radius:2px}
.story-gallery-card figcaption{display:flex;flex-direction:column;gap:4px;border-top:1px solid var(--line);
  padding-top:12px;margin-top:12px;font-size:.8125rem;line-height:1.65;color:var(--muted)}
.story-gallery-card .credit{font-size:.75rem;color:var(--muted)}
@media(max-width:520px){.story-gallery-grid{grid-template-columns:1fr;gap:32px}}

/* ---- theme.css ---- */
/* ============================================================
   Night theme · the old town after the shops close
   The palette is not an inversion: it takes the lamp light of the
   culture street at night, warm ink over deep green, so the
   illustrations still read as ink on paper rather than glowing.
   ============================================================ */

:root{
  color-scheme: light;
  --shadow-soft: 0 12px 20px #4834190c;
  --header-bg: rgba(250,245,233,.97);
  --card-bg: #fcf6e8;
  --card-edge: #c7b594;
  --open-row: #f2ead9;
  --on-ink: #d2d9ca;
  --map-stage: #e7e0d2;
  --map-dot: #bdb6a7;
  --art-blend: multiply;
}

:root[data-theme="dark"]{
  color-scheme: dark;
  --paper:#141d1a;
  --sand:#1d2a25;
  --art:#e8dcc0;          /* illustrations keep a warm ground so ink stays legible */
  --ink:#eae3d2;
  --muted:#9aa89c;
  --meta:#bfae8a;
  --rust:#e0895f;
  --line:#33453d;
  --lime:#cfe08a;
  --shadow-soft: 0 14px 26px #0006;
  --header-bg: rgba(20,29,26,.94);
  --card-bg:#1b2723;
  --card-edge:#3a4d44;
  --open-row:#1b2723;
  --on-ink:#c6d2c4;
  --map-stage:#101815;
  --map-dot:#2b3a33;
  --art-blend: normal;
}

@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    color-scheme: dark;
    --paper:#141d1a; --sand:#1d2a25; --art:#e8dcc0; --ink:#eae3d2;
    --muted:#9aa89c; --meta:#bfae8a; --rust:#e0895f; --line:#33453d; --lime:#cfe08a;
    --shadow-soft: 0 14px 26px #0006;
    --header-bg: rgba(20,29,26,.94);
    --card-bg:#1b2723; --card-edge:#3a4d44; --open-row:#1b2723;
    --on-ink:#c6d2c4; --map-stage:#101815; --map-dot:#2b3a33;
    --art-blend: normal;
  }
}

/* Values that were written as literals before the theme existed. */
.site-header{background:var(--header-bg)}
.postcard{background:var(--card-bg);border-color:var(--card-edge);box-shadow:var(--shadow-soft)}
.tradition[open]{background:var(--open-row)}
.map-teaser p,.map-caption,.footer-top p,.footer-bottom{color:var(--on-ink)}
.map-stage{background:var(--map-stage);background-image:radial-gradient(var(--map-dot) .7px,transparent .7px)}
.place-image img,.route-art img,.food-feature-image img,.eat-intro-art img,
.about-illustration img,.place-hero-art img,.route-chapter-visual img{mix-blend-mode:var(--art-blend)}

/* Cards written against the cream palette in later passes. */
:root[data-theme="dark"] .story-card-v2,
:root[data-theme="dark"] .rest-stop,
:root[data-theme="dark"] .quick-card,
:root[data-theme="dark"] .story-tile,
:root[data-theme="dark"] .walk-point,
:root[data-theme="dark"] .leaflet-block,
:root[data-theme="dark"] .searchbox-panel,
:root[data-theme="dark"] .tabbar,
:root[data-theme="dark"] .card-art-v2,
:root[data-theme="dark"] .pick-art{background:var(--card-bg);border-color:var(--line)}
:root[data-theme="dark"] .siwara-card,
:root[data-theme="dark"] .qs-icon,
:root[data-theme="dark"] .chip{background:var(--sand)}
:root[data-theme="dark"] .searchbox-results li.is-active a{background:var(--sand)}
:root[data-theme="dark"] .news-auto-tag{background:#2c2a1d;color:#d8c48a;border-color:#4a442f}
:root[data-theme="dark"] .shop-warn{background:#3a2a1c;color:#e0b483}
:root[data-theme="dark"] .searchbox-panel input{background:var(--sand);border-color:var(--line)}
:root[data-theme="dark"] .filters,
:root[data-theme="dark"] .empty-state,
:root[data-theme="dark"] #empty,
:root[data-theme="dark"] .event-note,
:root[data-theme="dark"] .food-feature,
:root[data-theme="dark"] .story dl,
:root[data-theme="dark"] .map-help{background:var(--sand)}
:root[data-theme="dark"] input,
:root[data-theme="dark"] select,
:root[data-theme="dark"] .search-label input{background:var(--sand);border-color:var(--line);color:var(--ink)}

/* The theme switch itself */
.theme-toggle{
  display:grid;place-items:center;width:42px;height:42px;
  border:1px solid var(--line);border-radius:11px;background:transparent;
  color:inherit;cursor:pointer;font:inherit;line-height:1;
}
.theme-toggle:hover{border-color:var(--rust)}
.theme-toggle .tt-day{display:none}
.theme-toggle .tt-night{display:block}
:root[data-theme="dark"] .theme-toggle .tt-day{display:block}
:root[data-theme="dark"] .theme-toggle .tt-night{display:none}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]) .theme-toggle .tt-day{display:block}
  :root:not([data-theme="light"]) .theme-toggle .tt-night{display:none}
}

/* ============ Page transitions ============ */
@view-transition{ navigation: auto }
@media (prefers-reduced-motion: reduce){
  @view-transition{ navigation: none }
}
::view-transition-old(root),
::view-transition-new(root){ animation-duration:.22s }

/* The header now carries theme, search, trip and map buttons, so the menu
   needs to give way earlier rather than wrap onto a second line. */
@media (max-width:1400px){
  .site-header nav{gap:16px;font-size:.84rem}
  .header-tools{gap:6px}
}
@media (max-width:1240px){
  .site-header .header-map{display:none}
  .site-header nav{gap:13px;font-size:.82rem}
}
@media (max-width:1080px){
  .site-header .theme-toggle{display:none}   /* the tab bar area keeps it on phones */
}
@media (max-width:900px){
  .site-header .theme-toggle{display:grid}
}

/* Phones: the bottom tab bar already carries ทริป, so the header drops its copy
   rather than pushing the row past the viewport. */
@media (max-width:460px){
  .site-header .header-tools{gap:5px}
  .site-header .header-tools .icon-button[href$="/trip/"]{display:none}
  .site-header .lang-switch{margin-left:2px}
  .site-header .brand small{display:none}
}

/* Secondary links live in the drawer on wide screens and appear inline once the
   whole menu becomes a drawer on narrow ones. */
@media (min-width:901px){
  .site-header nav .nav-more{display:none}
  .site-header nav.is-open{
    position:absolute;right:24px;top:100%;z-index:700;
    display:flex;flex-direction:column;align-items:stretch;gap:0;
    min-width:230px;padding:8px 16px 12px;
    background:var(--paper);border:1px solid var(--line);border-radius:14px;
    box-shadow:var(--shadow-soft);
  }
  .site-header nav.is-open .nav-more{display:flex}
  .site-header nav.is-open a{padding:11px 2px;border-bottom:1px solid var(--line);min-height:44px;align-items:center}
  .site-header nav.is-open a:last-child{border-bottom:0}
  .site-header nav.is-open a:after{display:none}
  .nav-toggle{display:grid}
}
.site-header{position:relative}

/* บนจอสัมผัส ปุ่มควบคุมต้องกดโดนง่าย · เกณฑ์ 44x44px
   ลิงก์ที่แทรกอยู่ในประโยคไม่นับ เพราะเป็นข้อความไม่ใช่ปุ่ม */
@media (max-width:900px){
  .site-header .theme-toggle,
  .site-header .nav-toggle,
  .site-header .icon-button{width:44px;height:44px}
  .site-header .lang-switch{min-width:44px;min-height:44px;display:inline-grid;place-items:center}
  .site-header nav a{min-height:44px}
  .tab-bar a{min-height:48px}
}

/* บนจอแคบ ปุ่มสลับภาษาของภาษาที่เปิดอยู่ไม่มีอะไรให้กด · เหลือไว้แต่ปุ่มที่พาไปอีกภาษา
   ไม่งั้นแถบเครื่องมือกว้างเกินจอ (เจอตอนหน้าอังกฤษล้น 20px ที่ 390px) */
@media (max-width:460px){
  html[lang="en"] .site-header .lang-switch[hreflang="en"],
  html[lang="th"] .site-header .lang-switch[hreflang="th"]{display:none}
}
