/* Đồng Lộc listening surface: real place imagery, direct actions and readable stories. */
.heritage-audioguide .app{min-height:100dvh;padding-bottom:calc(82px + env(safe-area-inset-bottom));}
.heritage-audioguide .main{padding:24px 0 32px;flex:1;}
.heritage-audioguide .main-inner{width:min(calc(100% - 40px),1080px);gap:20px;align-content:start;}
.heritage-audioguide .main-inner.is-empty{display:flex;flex-direction:column;gap:18px;}
.guide-welcome{width:100%;color:var(--dl-green);}
.guide-welcome-intro{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:44px;align-items:center;}
.guide-welcome-photo{margin:0;position:relative;min-width:0;align-self:stretch;}
.guide-welcome-photo>img{display:block;width:100%;height:370px;object-fit:cover;border-radius:12px;}
.guide-welcome-photo figcaption{margin-top:6px;color:var(--dl-muted);font-size:11px;line-height:1.5;}
.guide-welcome-copy{padding:12px 0;}
.guide-welcome-copy h1{font-size:clamp(32px,4.5vw,48px);font-weight:730;line-height:1.16;letter-spacing:-.025em;max-width:11ch;margin:0 0 16px;text-wrap:balance;}
.guide-welcome-copy>p{max-width:34ch;color:#536158;font-size:17px;line-height:1.65;margin:0 0 24px;}
.guide-start-actions{display:flex;gap:10px;flex-wrap:wrap;}
.guide-start-actions>button{flex:1;display:flex;align-items:center;justify-content:center;gap:10px;min-height:54px;padding:13px 16px;border-radius:7px;font-size:16px;font-weight:650;cursor:pointer;}
.guide-start-actions svg{width:23px;height:23px;flex:none;}
.guide-start-primary{background:var(--dl-red);border:1px solid var(--dl-red);color:#fff;}
.guide-start-primary:hover{background:#873728;}
.guide-start-secondary{background:var(--dl-white);border:1px solid #bec7ba;color:var(--dl-green);}
.guide-start-secondary:hover{background:#eeeee5;}
.guide-location-option{margin-top:22px;border-top:1px solid var(--dl-line);padding-top:16px;}
.guide-location-option>button{display:flex;align-items:center;width:100%;gap:10px;min-height:44px;padding:0;background:transparent;border:0;color:var(--dl-green);font-weight:650;cursor:pointer;}
.guide-location-option svg{width:21px;height:21px;flex:none;}
.guide-location-option svg:last-child{margin-left:auto;width:18px;}
.guide-location-option>p{margin:2px 0 0 31px;color:var(--dl-muted);font-size:13px;line-height:1.6;}
.guide-start-reading{margin-top:32px;}
.guide-reading-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px;}
.guide-reading-heading h2{font-size:19px;line-height:1.4;margin:0;}
.guide-reading-heading button{display:flex;align-items:center;gap:8px;min-height:44px;padding:4px 0;border:0;background:transparent;font-size:13px;color:var(--dl-red);font-weight:600;cursor:pointer;}
.guide-reading-heading svg{width:17px;height:17px;}
.guide-reading-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px;}
.guide-reading-stop{display:flex;align-items:center;text-align:left;gap:12px;width:100%;min-width:0;padding:16px 0;background:transparent;border:0;border-top:1px solid var(--dl-line);color:var(--dl-green);cursor:pointer;}
.guide-reading-stop>img{width:64px;height:64px;object-fit:cover;border-radius:6px;flex:none;}
.guide-reading-stop>span{min-width:0;flex:1;}
.guide-reading-stop strong{display:block;font-size:15px;font-weight:650;line-height:1.45;}
.guide-reading-stop small{display:block;font-size:12px;line-height:1.5;color:var(--dl-muted);margin-top:4px;}
.guide-reading-stop>svg{width:20px;height:20px;flex:none;color:#596b5a;}
.guide-reading-stop:hover strong{text-decoration:underline;text-underline-offset:4px;}
.guide-reading-stop:disabled{opacity:.55;cursor:wait;}
.heritage-audioguide .gps-panel{padding:10px 14px;border:0;border-radius:7px;background:#e9eee4;min-height:0;}
.heritage-audioguide .gps-panel[data-error="true"]{background:#faebe5;}
.heritage-audioguide .gps-status{font-size:13px;}
.heritage-audioguide .gps-status strong{font-weight:600;}
.heritage-audioguide .media-zone{border:0;border-radius:0;overflow:visible;}
.heritage-audioguide .media-box{height:300px;min-height:0;border:0;border-radius:10px;background:#e9ece2;}
.heritage-audioguide .media-tabs{margin-top:12px;gap:0;border-bottom:1px solid var(--dl-line);}
.heritage-audioguide .tab-btn{border:0;border-radius:0!important;background:transparent;color:#58655b;box-shadow:none;font-size:14px;}
.heritage-audioguide .tab-btn.is-active{background:transparent;color:var(--dl-green);box-shadow:inset 0 -2px var(--dl-green);}
.heritage-audioguide .content-zone{min-height:0;padding:12px 0 0;border:0;background:transparent;}
.heritage-audioguide .content-title{font-size:clamp(24px,3vw,30px)!important;line-height:1.35;margin:4px 0 18px;}
.heritage-audioguide .content-card{font-size:17px!important;line-height:1.85!important;color:#303b36;}
.heritage-audioguide .audio-zone{padding:6px 8px;background:#e9eee4;border:0;border-radius:7px;}
.heritage-audioguide .audio-btn{min-width:40px!important;min-height:40px!important;width:40px;height:40px;flex-basis:40px;}
.heritage-audioguide .audio-btn svg{width:17px;height:17px;}
.heritage-audioguide .footer{position:fixed;inset:auto 0 0;z-index:30;background:var(--dl-white);border-top:1px solid var(--dl-line);padding:7px 0 max(7px,env(safe-area-inset-bottom));}
.heritage-audioguide .footer-inner{display:flex;width:min(calc(100% - 24px),900px);gap:8px;padding:0;}
.heritage-audioguide .fbtn{min-height:55px;gap:5px;padding:5px 2px;}
.heritage-audioguide .ficon{width:24px;height:24px;color:#526459;}
.heritage-audioguide .ficon svg{width:23px;height:23px;}
.heritage-audioguide .flabel{font-size:11px!important;font-weight:600;color:var(--dl-green);}
.heritage-audioguide #btnScan .ficon,.heritage-audioguide #btnScan .flabel{color:var(--dl-red);}
.heritage-audioguide #btnScan{background:#f6e9e1;}
.heritage-audioguide .heritage-return{min-height:68px;}
.heritage-audioguide .heritage-return a{font-size:13px;}
.heritage-audioguide .heritage-return strong{font-size:12px;max-width:220px;}
@media(min-width:850px){.heritage-audioguide .main-inner:not(.is-empty){grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);grid-template-rows:auto auto auto;grid-template-areas:"intro intro" "media audio" "media content";gap:16px 32px;}.heritage-audioguide .media-zone{position:sticky;top:20px;}.heritage-audioguide .content-zone{padding-top:0;}}
@media(max-width:700px){.heritage-audioguide .main{padding:18px 0 24px;}.heritage-audioguide .main-inner{width:calc(100% - 32px);gap:16px;}.guide-welcome-intro{display:flex;flex-direction:column;gap:0;align-items:stretch;}.guide-welcome-photo>img{height:clamp(175px,25dvh,225px);}.guide-welcome-photo figcaption{font-size:10px;}.guide-welcome-copy{padding:22px 0 0;}.guide-welcome-copy h1{font-size:34px;max-width:17ch;margin-bottom:12px;}.guide-welcome-copy>p{font-size:15px;margin-bottom:20px;max-width:34ch;}.guide-location-option{margin-top:18px;padding-top:12px;}.guide-start-reading{margin-top:28px;}.guide-reading-list{display:block;}.guide-reading-stop{padding:12px 0;}.guide-reading-stop>img{width:58px;height:58px;}.guide-reading-stop strong{font-size:15px;}.guide-reading-heading h2{font-size:18px;}.heritage-audioguide .media-box{height:clamp(190px,28dvh,260px);}.heritage-audioguide .content-zone{padding-top:4px;}.heritage-audioguide .heritage-return{padding:10px 16px;min-height:62px;}.heritage-audioguide .heritage-return strong{font-size:11px;max-width:170px;}}
@media(max-width:370px){.guide-start-actions>button{padding:12px 10px;font-size:15px;gap:8px;}.guide-welcome-copy h1{font-size:30px;}.heritage-audioguide .footer-inner{width:calc(100% - 16px);gap:2px;}.heritage-audioguide .flabel{font-size:10px!important;}}

.guide-scan-fallback{display:block;min-height:44px;margin:18px auto 0;padding:10px 18px;border:1px solid #bec7ba;border-radius:7px;background:var(--dl-white);color:var(--dl-green);font-weight:600;cursor:pointer;}

/* Shared language picker from the approved AudioGuide: flags and native language names. */
.heritage-audioguide{--dl-paper:#faf9f6;--dl-white:#fff;--dl-green:#2b463b;--dl-line:#e3e6df;}
.heritage-audioguide .overlay{background:rgba(28,37,32,.48);}
#langOverlay .modal{width:min(420px,calc(100vw - 32px));border:0;border-radius:20px;background:#fff;box-shadow:0 16px 48px #17251c1a;}
#langOverlay .modal-head{display:flex;align-items:center;gap:12px;padding:22px 22px 16px;border:0;background:#fff;font-size:16px;font-weight:650;line-height:1.5;border-radius:20px 20px 0 0;}
#modalLangTitle{flex:1;color:#202a24;}
#langOverlay .modal-body{padding:0 22px 22px;}
#langOverlay .lang-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}
#langOverlay .langOpt{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;min-height:120px;min-width:0;width:100%;padding:18px 10px;border:1px solid #dfe4e1;border-radius:14px;background:#fff;color:#202a24;font:inherit;cursor:pointer;}
#langOverlay .langIconWrap{width:64px;height:48px;flex:none;border-radius:5px;overflow:hidden;background:#f5f6f3;}
#langOverlay .langIcon{display:block;width:100%;height:100%;object-fit:contain;}
#langOverlay .langText{font-size:15px;font-weight:600;line-height:1.4;text-align:center;}
#langOverlay .langFallback{font-size:16px;font-weight:600;}
#langOverlay .langOpt[aria-pressed=true]{border-color:#869b89;background:#f4f7f1;}
#langOverlay .langOpt:hover{border-color:#93a294;background:#f8faf6;}
#langOverlay .langOpt:focus-visible{outline:3px solid #a65040;outline-offset:3px;}
#langOverlay .x{flex:none;min-width:32px;min-height:32px;width:32px;height:32px;padding:0;border:0;border-radius:50%;background:#f3f4ef;color:#526257;font-size:22px;}
.heritage-audioguide .guide-welcome-copy h1{font-size:clamp(30px,4vw,42px);font-weight:650;letter-spacing:-.02em;line-height:1.2;}
.heritage-audioguide .guide-welcome-copy>p{font-size:16px;color:#627064;}
.heritage-audioguide .guide-start-actions>button{border-radius:12px;min-height:52px;font-size:15px;font-weight:600;}
.heritage-audioguide .guide-start-primary{background:#a65040;border-color:#a65040;}
.heritage-audioguide .guide-start-secondary{border-color:#d3dbd0;}
.heritage-audioguide .content-title{font-weight:650;}
.heritage-audioguide .audio-zone{background:#eff3ec;border-radius:12px;}
.heritage-audioguide .footer{border-top-color:#e8ebe4;}
.heritage-audioguide .fbtn{border-radius:12px;}
.heritage-audioguide #btnScan{background:#f7ede7;}
.heritage-audioguide .flabel{text-transform:none;letter-spacing:0;font-weight:500;}
@media(max-width:700px){.heritage-audioguide .guide-welcome-copy h1{font-size:30px;}.heritage-audioguide .guide-welcome-copy>p{font-size:15px;}.heritage-audioguide .main-inner{gap:18px;}}
@media(max-width:360px){#langOverlay .modal-head{padding:18px 18px 14px;font-size:15px;}#langOverlay .modal-body{padding:0 18px 18px;}#langOverlay .lang-options{gap:10px;}#langOverlay .langOpt{min-height:112px;}}

/* A listening session owns the viewport; the narration text is its scroll surface. */
html.guide-reading,body.heritage-audioguide.guide-reading{height:100%;overflow:hidden;overscroll-behavior:none;}
body.heritage-audioguide.guide-reading .app{height:100dvh;min-height:0;overflow:hidden;padding:0;}
body.heritage-audioguide.guide-reading .heritage-return{flex:0 0 auto;}
body.heritage-audioguide.guide-reading .main{flex:1 1 0;min-height:0;overflow:hidden;padding:12px 0;}
body.heritage-audioguide.guide-reading .main-inner:not(.is-empty){display:flex;flex-direction:column;flex:0 1 auto;min-height:0;height:100%;overflow:hidden;gap:10px;}
body.heritage-audioguide.guide-reading .media-zone{flex:0 0 auto;position:static;min-height:0;overflow:hidden;}
body.heritage-audioguide.guide-reading .media-box{height:clamp(100px,23dvh,220px);min-height:0;flex-shrink:0;aspect-ratio:auto;}
body.heritage-audioguide.guide-reading #imageAttribution{margin:6px 2px!important;font-size:11px!important;line-height:1.45!important;flex-shrink:0;}
body.heritage-audioguide.guide-reading .media-tabs{margin-top:6px;flex-shrink:0;}
body.heritage-audioguide.guide-reading .tab-btn{min-height:38px;padding:8px;}
body.heritage-audioguide.guide-reading .audio-zone{position:static;flex:0 0 auto;}
body.heritage-audioguide.guide-reading .content-zone{display:flex;flex-direction:column;flex:1 1 0;min-height:0;overflow:hidden;padding:0;}
body.heritage-audioguide.guide-reading .playback-source{flex-shrink:0;margin:0 0 4px;line-height:1.4;}
body.heritage-audioguide.guide-reading .content-title{flex-shrink:0;margin:2px 0 12px;line-height:1.3;}
body.heritage-audioguide.guide-reading .content-card{flex:1 1 0;min-height:0;overflow-y:auto!important;overflow-x:hidden;max-height:none!important;padding:0 8px 16px 0;border-radius:0;background:transparent;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#aebcaf transparent;-webkit-overflow-scrolling:touch;}
body.heritage-audioguide.guide-reading .footer{position:static;flex:0 0 auto;inset:auto;}
@media(min-width:850px),(max-height:560px) and (min-width:600px){
    body.heritage-audioguide.guide-reading .main-inner:not(.is-empty){display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);grid-template-areas:"intro intro" "demo demo" "media audio" "media content";grid-template-rows:auto auto auto minmax(0,1fr);gap:10px 28px;}
    body.heritage-audioguide.guide-reading .gps-panel{grid-area:intro;}
    body.heritage-audioguide.guide-reading .demo-tools{grid-area:demo;}
    body.heritage-audioguide.guide-reading .media-zone{grid-area:media;display:flex;flex-direction:column;height:100%;min-height:0;}
    body.heritage-audioguide.guide-reading .media-box{flex:1 1 0;height:auto;min-height:50px;}
    body.heritage-audioguide.guide-reading .audio-zone{grid-area:audio;}
    body.heritage-audioguide.guide-reading .content-zone{grid-area:content;height:100%;min-height:0;}
}
@media(max-height:600px){
    body.heritage-audioguide.guide-reading .heritage-return{min-height:44px;padding-block:3px;}
    body.heritage-audioguide.guide-reading .main{padding:6px 0;}
    body.heritage-audioguide.guide-reading .main-inner:not(.is-empty){gap:6px 18px;}
    body.heritage-audioguide.guide-reading .content-title{font-size:20px!important;margin-bottom:6px;}
    body.heritage-audioguide.guide-reading .content-card{font-size:16px!important;line-height:1.65!important;}
    body.heritage-audioguide.guide-reading .footer{padding-block:3px;}
    body.heritage-audioguide.guide-reading .fbtn{min-height:48px;}
}

.heritage-audioguide .guide-audio-start{display:flex;align-items:center;justify-content:center;width:100%;min-height:44px;margin:0 0 8px;padding:10px 16px;border:0;border-radius:9px;background:#a65040;color:#fff;font:inherit;font-size:15px;font-weight:600;cursor:pointer;}
.heritage-audioguide .guide-audio-start[hidden]{display:none;}
.heritage-audioguide .guide-audio-start:focus-visible{outline:3px solid #2b463b;outline-offset:3px;}

.heritage-audioguide #heritageGuideTitle{display:flex;flex-direction:column;align-items:flex-end;flex-shrink:0;line-height:1.5;}
.heritage-audioguide #heritageGuideTitle>span{display:block;white-space:nowrap;}

.heritage-audioguide .guide-welcome-copy>#welcomeDescription{max-width:none;width:100%;text-wrap:wrap;}

/* Keep the same viewport frame while loading, choosing a language, or listening. */
body.heritage-audioguide{height:100dvh;overflow:hidden;}
.heritage-audioguide .app{height:100dvh;min-height:0;padding:0;overflow:hidden;}
.heritage-audioguide .main{min-height:0;overflow:hidden;}
.heritage-audioguide .main-inner.is-empty{flex:0 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;}
.heritage-audioguide .footer{position:static;flex-shrink:0;}
.heritage-audioguide .heritage-return{padding-top:max(8px,env(safe-area-inset-top));}
@media(max-width:700px){
    body.heritage-audioguide.guide-reading .content-card{font-size:17px!important;line-height:1.75!important;}
    body.heritage-audioguide.guide-reading .content-title{font-size:23px!important;margin-bottom:10px;}
    body.heritage-audioguide.guide-reading #imageAttribution{font-size:12px!important;line-height:1.4!important;}
    .heritage-audioguide .audio-btn{min-width:44px!important;min-height:44px!important;width:44px;height:44px;flex-basis:44px;}
    .heritage-audioguide .audio-row{gap:6px;}
    .heritage-audioguide .footer-inner{gap:4px;}
    .heritage-audioguide .fbtn{min-width:0;min-height:55px;}
    .heritage-audioguide .flabel{white-space:nowrap;}
}
@media(max-height:600px){
    body.heritage-audioguide.guide-reading .content-card{font-size:16px!important;line-height:1.65!important;}
    body.heritage-audioguide.guide-reading .content-title{font-size:20px!important;}
}
