/* The passport, medals, collections and forms use the established edition styles.
   Only U.S. atlas and photo interactions need additional layout rules. */
#places{flex:1}.check{flex-direction:row;align-items:center;gap:6px;letter-spacing:0}.filters select{max-width:100%}
.atlas-layout{display:grid;grid-template-columns:320px minmax(0,1fr);gap:24px;margin-top:22px}
.region-list{max-height:70vh;overflow:auto}.region-option{width:100%;min-width:0}.region-option.selected{border-color:var(--accent);box-shadow:inset 3px 0 var(--accent)}
.region-detail{align-self:start;position:sticky;top:calc(var(--header-height,112px) + 20px);min-width:0}.region-detail>h2{font:500 28px/1.2 var(--display)}
.map-wrap{height:340px;overflow:hidden;position:relative;border:1px solid var(--line);margin:4px 0;background:#e8ecdf;touch-action:none}
.ava-map{width:100%;height:100%;cursor:grab}.ava-map.dragging{cursor:grabbing}.map-tools{position:absolute;top:10px;right:10px;display:flex;gap:5px}.map-caption{font-size:12px;color:var(--muted)}
.context-link{display:inline-block;border:1px solid var(--line);padding:7px 10px;border-radius:2px;background:var(--card);font-size:13px;margin:4px}
.region-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:10px}#journalList{margin-top:14px}.entry>div{min-width:0}.entry h4{overflow-wrap:anywhere}.entry p{margin:8px 0}.entry .text-btn{font-size:inherit}
.text-btn{border:0;background:none;color:var(--accent);padding:4px 0;text-align:left;font-size:14px;text-decoration:underline;text-underline-offset:4px}
#guide>.rules{margin-top:20px}#cloudPanel{border-top:1px solid var(--line);margin-top:8px;padding-top:8px}
/* Keep the label close to the fields while entering wine details. */
#wineDialog{scrollbar-gutter:stable}
#wineDialog:has(.entry-layout.has-photo){width:min(1100px,calc(100vw - 28px))}
.photo-actions{display:flex;gap:8px;flex-wrap:wrap}.entry-layout{display:grid;grid-template-columns:1fr;gap:24px;min-width:0}.entry-layout.has-photo{grid-template-columns:minmax(260px,1fr) minmax(320px,1fr)}
.entry-fields{display:flex;flex-direction:column;gap:14px;min-width:0}.entry-fields .tasting-extras>label,.entry-fields .tasting-extras>.row2{margin-top:14px}
#photoReference{align-self:start;position:sticky;top:16px;min-width:0}.photo-zoom{display:block;border:0;padding:0;background:var(--paper-2);width:100%;cursor:zoom-in}.photo-zoom img{display:block;max-height:65dvh;width:100%;object-fit:contain}.reference-actions{display:flex;gap:6px;flex-wrap:wrap;margin:10px 0}
.origin-results{max-height:220px;overflow:auto;border:1px solid var(--line);border-radius:4px}.origin-results button{display:block;text-align:left;width:100%;background:var(--card);border:0;border-bottom:1px solid var(--line);padding:12px}.origin-results small{display:block;color:var(--muted);font-size:12px}#originPicked{padding:10px;background:var(--paper-2);font-size:14px}
#wineChoice label{flex-direction:row;align-items:center;font-weight:400}#formError{color:var(--danger)}
#photoDialog{width:min(1100px,calc(100vw - 28px));padding:12px}.zoom-tools{display:flex;justify-content:space-between;gap:12px}.zoom-scroll{overflow:auto;max-height:80dvh}.zoom-scroll img{display:block;max-width:100%;width:100%;object-fit:contain}.zoom-scroll.zoomed img{max-width:none;width:200%}
/* Detail dialogs follow the same paper and type as the wine form. */
#collectionContent,#receiptContent{position:relative;padding-top:32px}#collectionContent>h2,#receiptContent>h2{font:500 28px/1.2 var(--display);margin-right:25px}.collection-close{position:sticky;float:right;top:16px;margin:16px 16px 0 0;z-index:2}.collection-medal img{width:140px;height:153px;object-fit:contain}.detail-count{display:flex;justify-content:space-between;align-items:center;gap:12px}.detail-count strong{font:500 26px/1.2 var(--display);color:var(--accent)}.detail-count span{font-size:13px;color:var(--muted)}#collectionDialog progress{display:block;width:100%;height:6px;accent-color:var(--accent)}.detail-actions{display:flex;gap:10px;flex-wrap:wrap;border-top:1px solid var(--line);padding-top:18px;margin-top:10px}.detail-places{display:flex;flex-wrap:wrap;gap:6px}.detail-places button{min-height:44px}.quest-wines{padding-left:22px}.quest-wines li{padding:12px 0;border-bottom:1px solid var(--line);font-size:14px}.quest-wines span{display:block;font-size:12px;color:var(--muted);margin-top:6px}
.receipt-stamp{font:600 25px/1.2 var(--display);color:var(--accent);text-align:center;max-width:270px;margin:12px auto;border:3px double var(--accent);border-radius:50%;padding:28px;transform:rotate(-3deg)}.receipt-stamp small{display:block;font:10px/1.5 var(--mono);margin-top:10px}.receipt-medal{display:flex;align-items:center;gap:18px;padding:14px;background:var(--paper-2)}.receipt-medal img{height:110px;width:100px;object-fit:contain}.receipt-medal strong{font:600 23px/1.2 var(--display)}.receipt-progress{list-style:none;padding:0}.receipt-progress li{display:flex;gap:12px;justify-content:space-between;padding:12px 0;border-bottom:1px solid var(--line);font-size:13px}.receipt-progress strong{white-space:nowrap}
@media(max-width:800px){.atlas-layout{grid-template-columns:230px minmax(0,1fr);gap:15px}.entry-layout.has-photo{grid-template-columns:1fr}#photoReference{position:static}.photo-zoom img{max-height:180px}}
@media(max-width:580px){.atlas-layout{display:flex;flex-direction:column}.region-list{max-height:280px}.region-detail{position:static;width:100%}.map-wrap{height:300px}.filters .check{width:100%}.photo-zoom img{max-height:160px}.entry-fields .row2{grid-template-columns:1fr}.detail-actions .btn{flex:1}}
@media(prefers-reduced-motion:reduce){.receipt-stamp{transform:none}}

/* Keep the query and its matches together above the mobile keyboard. */
#atlasQ{scroll-margin-top:160px}.region-detail{scroll-margin-top:150px}
@media(max-width:800px){
 #atlas.atlas-search-active{position:fixed;z-index:30;top:var(--search-top,0px);left:var(--search-left,0px);width:var(--search-width,100vw);height:var(--search-height,100dvh);box-sizing:border-box;background:var(--paper);padding:12px max(12px,env(safe-area-inset-right)) 8px max(12px,env(safe-area-inset-left));display:flex;flex-direction:column;overflow:hidden;overscroll-behavior:contain}
 .atlas-search-active .section-heading{margin:0 0 8px;flex:none}.atlas-search-active .section-heading .eyebrow,.atlas-search-active .chapter-number{display:none}.atlas-search-active h2{font-size:24px;margin:0}
 .atlas-search-active .filters{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;flex:none;padding:0;background:none;border:0}
 .atlas-search-active .filters .search{min-width:0;width:100%;margin:0;padding:12px;font-size:16px}
 .atlas-search-active .filters select,.atlas-search-active .filters .check{display:none}
 .atlas-search-active .atlas-search-done{padding:10px 14px;margin:0}
 .atlas-search-active .atlas-layout{display:flex;flex-direction:column;flex:1;min-height:0;margin-top:8px;gap:0}
 .atlas-search-active .atlas-layout>div{display:flex;flex-direction:column;flex:1;min-height:0}
 .atlas-search-active #atlasCount{margin:0 0 6px;font-size:14px;flex:none}
 .atlas-search-active .region-list{flex:1;min-height:0;max-height:none;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;touch-action:pan-y}
 .atlas-search-active .region-detail{display:none}.atlas-search-active #moreRegions{flex:none;margin-top:6px}
 .atlas-search-active .region-option{min-height:64px;padding:10px 12px}
}

/* Use the existing regional stamp composition and typography from edition.css.
   Empty fields stay empty in the record, but do not reserve visual rows. */
.us-wine-stamp .stamp-content{width:76%}
.us-wine-stamp.stamp-chablis .stamp-content{width:82%}
.us-wine-stamp .stamp-field-empty{display:none}
.us-wine-stamp .stamp-top{font-size:8px}
.us-wine-stamp .stamp-name{font-size:17px}
.us-wine-stamp .stamp-name.long-name{font-size:14px}
.stamp-display .us-wine-stamp .stamp-name{font-size:25px}
.stamp-display .us-wine-stamp .stamp-name.long-name{font-size:21px}
.stamp-display .us-wine-stamp .stamp-region,.stamp-display .us-wine-stamp .stamp-top,.stamp-display .us-wine-stamp .stamp-date{font-size:11px}
#places.stamp-grid{grid-template-columns:repeat(2,minmax(0,1fr));column-gap:0}
#places .regional-stamp.stamp{max-width:205px;width:100%;aspect-ratio:1}
#places .empty-stamp{width:100%;height:auto!important;max-width:150px;aspect-ratio:1}
#places .stamp-slot:not(.empty-slot){padding:12px 7px}
#collectionContent .stamp-display,#receiptContent .stamp-display{display:flex;justify-content:center;margin:20px 0}
.label-help{font-size:14px;color:var(--muted);margin-top:0}
.us-wine-stamp:focus-visible{outline:2px solid var(--accent);outline-offset:6px}
@media(max-width:760px){#places .stamp-slot:not(.empty-slot){padding:9px 5px}#places .empty-stamp{max-width:126px}.us-wine-stamp .stamp-name{font-size:14px}.us-wine-stamp .stamp-name.long-name{font-size:12px}.us-wine-stamp .stamp-top,.us-wine-stamp .stamp-region{font-size:7px}.stamp-display .us-wine-stamp .stamp-name{font-size:25px}.stamp-display .us-wine-stamp .stamp-name.long-name{font-size:21px}.stamp-display .us-wine-stamp .stamp-top,.stamp-display .us-wine-stamp .stamp-region{font-size:11px}}
/* Napa is a full regional chapter within the American collection. */
.napa-chapter{border:1px solid var(--accent);margin-top:24px;scroll-margin-top:170px;background:var(--card)}
.napa-chapter-header{display:flex;justify-content:space-between;gap:28px;padding:30px;background:var(--accent);color:#fff9eb}
.napa-chapter-header .eyebrow{color:#e3c88e}.napa-chapter-header h2{font:500 clamp(36px,5vw,58px)/1.12 var(--display);margin:10px 0 16px;color:inherit}
.napa-chapter-header p{font-size:16px;line-height:1.6;max-width:540px;margin:0}.napa-chapter-count{display:flex;flex-direction:column;gap:8px;flex:0 0 210px;justify-content:center}
.napa-chapter-count>strong{font:500 44px/1.1 var(--display)}.napa-chapter-count>strong span{font-size:25px;color:#e3c88e}.napa-chapter-count>span{font-size:14px;line-height:1.5}
.napa-chapter-body{padding:24px 30px}.napa-progress-button{width:100%;display:flex;justify-content:space-between;align-items:center;gap:20px;text-align:left;border:0;background:none;padding:4px 0 12px;color:var(--ink)}
.napa-progress-button strong{font:600 24px/1.3 var(--display)}.napa-progress-button small{display:block;font-size:14px;color:var(--muted);margin-top:6px}.napa-progress-button .mono{white-space:nowrap;color:var(--accent);font-size:16px}
.napa-chapter progress{display:block;width:100%;height:7px;accent-color:var(--accent);margin:4px 0 22px}.napa-chapter-actions{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin-bottom:20px}.napa-chapter-actions>a{font-size:14px;min-height:44px;display:inline-flex;align-items:center;text-underline-offset:4px}
.napa-district-guide{border-top:1px solid var(--line);padding-top:18px}.napa-district-guide>summary{font:600 22px/1.35 var(--display);cursor:pointer;padding:6px 0}.napa-district-guide h3{font:500 23px/1.3 var(--display);margin:24px 0 14px}
.napa-district-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.napa-district{display:grid;grid-template-columns:28px minmax(0,1fr);gap:8px 10px;padding:16px;text-align:left;background:var(--paper);border:1px solid var(--line);min-height:105px;color:var(--ink)}
.napa-district strong{font:600 19px/1.3 var(--display);overflow-wrap:anywhere}.napa-district>span:last-child{grid-column:2;font-size:14px;color:var(--muted);line-height:1.5}.napa-district-number{font:14px/1.5 var(--mono);color:var(--muted)}.napa-district.discovered{border-color:var(--accent);background:var(--paper-2)}
.napa-district.discovered>span:last-child{color:var(--accent)}.napa-shared-note{font-size:16px;line-height:1.6;color:var(--muted);max-width:720px}.napa-shared-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.napa-district:hover{border-color:var(--accent)}.napa-district:focus-visible,.napa-progress-button:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.regional-journeys{grid-template-columns:repeat(2,minmax(0,1fr));margin-top:24px}.regional-journeys .challenge-card{min-width:0}.regional-journeys strong{overflow-wrap:anywhere}
@media(max-width:700px){.napa-chapter-header{flex-direction:column;padding:24px;gap:22px}.napa-chapter-count{flex-basis:auto;border-top:1px solid #ffffff40;padding-top:18px}.napa-chapter-body{padding:20px}.napa-district-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.napa-district{grid-template-columns:1fr;padding:13px;gap:6px}.napa-district-number{display:none}.napa-district>span:last-child{grid-column:1}.napa-district strong{font-size:18px}.regional-journeys{grid-template-columns:1fr}}
@media(max-width:380px){.napa-chapter-header,.napa-chapter-body{padding:16px}.napa-district-grid{grid-template-columns:1fr}}

/* Main chapters and their actual containment branches. */
.atlas-chapter{border-bottom:1px solid var(--line);padding:12px 0}
.atlas-chapter>summary{cursor:pointer;padding:10px 12px;color:var(--accent)}
.atlas-chapter>summary strong{font:600 24px/1.35 var(--display)}
.atlas-chapter>summary span{display:block;font-size:14px;line-height:1.5;color:var(--muted);margin:5px 0 0 18px}
.chapter-main{margin:8px 12px;min-height:44px}.chapter-context{font-size:14px;line-height:1.6;margin:8px 12px 14px;color:var(--muted)}
.region-tree,.region-tree ul{list-style:none;margin:0;padding:0}
.region-tree ul{margin-left:14px;padding-left:8px;border-left:1px solid var(--line)}
.region-tree .region-option{width:100%;min-width:0;text-align:left;white-space:normal}
.region-tree .region-option>span:first-child{min-width:0}.region-tree .an,.region-tree .ac{overflow-wrap:anywhere}
.region-tree .ac{font-size:14px;line-height:1.5}.region-context .an{font-size:18px}.region-context{background:var(--paper-2)}
.shared-region-heading{margin:18px 12px 6px;font:600 21px/1.4 var(--display)}
.region-hierarchy{padding:12px 0;font-size:14px;line-height:1.6;overflow-wrap:anywhere}
.region-hierarchy>strong{color:var(--accent)}.region-hierarchy ol{display:flex;flex-wrap:wrap;list-style:none;padding:0;margin:5px 0;gap:4px 8px}
.region-hierarchy li+li:before{content:'›';color:var(--muted);margin-right:8px}.region-hierarchy .meta{margin:5px 0}
.region-hierarchy .text-btn{font-size:14px;line-height:1.6;text-align:left}
@media(max-width:500px){.region-tree ul{margin-left:8px;padding-left:6px}.atlas-chapter>summary strong{font-size:22px}}
/* Use the same single-icon resource row as Burgundy. */
.us-resources{justify-content:center;width:100%;margin:0;gap:20px}
.us-resources button{display:inline-flex;align-items:center;min-height:44px;padding:3px 0;border:0;background:none;font:650 16px/1.4 var(--display);text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:4px;text-decoration-color:color-mix(in srgb,currentColor 40%,transparent)}
.us-resources .resource-map{color:#88601e}.us-resources .resource-about{color:#73324a}
#places .us-resources button,#places .us-resources a{font-size:12px}
.us-resources :focus-visible{outline:2px solid var(--accent);outline-offset:4px}
.napa-region-card{background:var(--paper);border:1px solid var(--line);min-width:0;padding-bottom:10px}.napa-region-card.discovered{border-color:var(--accent)}
.napa-region-card .napa-district{border:0;width:100%;min-height:92px}.napa-region-card .napa-district:hover{background:var(--paper-2)}.napa-terrain{font:14px/1.5 var(--mono);color:var(--muted);padding:0 16px;margin:0}.napa-region-card .us-resources{gap:18px}.napa-region-card .us-resources button,.napa-region-card .us-resources a{font-size:18px}
.terroir-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 22px;margin:20px 0}.terroir-facts>div{border-top:1px solid var(--line);padding:14px 0}.terroir-facts dt{font:14px/1.5 var(--mono);color:var(--accent);margin-bottom:6px}.terroir-facts dd{font-size:16px;line-height:1.6;margin:0;overflow-wrap:anywhere}.terroir-source{font-size:14px;line-height:1.5;color:var(--accent);display:inline-flex;align-items:center;min-height:44px}.region-wines{margin:24px 0}.region-wines h3{font:600 24px/1.3 var(--display)}
.napa-map-panel{max-width:600px;margin:24px auto;border:1px solid var(--line);background:var(--paper-2);padding:16px}.napa-map-heading p{font-size:14px;line-height:1.5;margin:8px 0}.napa-context-map{display:block;width:100%;height:auto;max-height:620px;background:#eee7d6}.napa-outline{fill:#e0d4bb;stroke:#9e8970;stroke-width:1.5;fill-rule:evenodd}.napa-map-region{fill:#c9b590;stroke:#faf7ed;stroke-width:1.3;fill-rule:evenodd;cursor:pointer}.napa-map-region.shared{fill:#ddd5c3;stroke-dasharray:4 3;stroke:#806f55}.napa-map-region.collected{fill:#966524}.napa-map-region.selected,.napa-map-region:hover,.napa-map-region:focus{fill:#611d32;stroke:#fff;stroke-width:2;outline:none}.map-north{fill:#611d32;font:600 18px var(--mono)}
.map-legend{display:flex;justify-content:center;flex-wrap:wrap;gap:10px 18px;font-size:14px;line-height:1.5}.map-legend span:before{content:'';display:inline-block;width:12px;height:12px;margin-right:7px;background:#966524}.map-legend .legend-selected:before{background:#611d32}.map-legend .legend-shared:before{background:#ddd5c3;border:1px dashed #806f55}.map-caption{font-size:12px;line-height:1.5}
@media(max-width:480px){.terroir-facts{grid-template-columns:1fr}.napa-map-panel{padding:12px}.napa-map-heading .eyebrow{letter-spacing:.1em}}
.napa-map-viewport{position:relative;overflow:hidden}.napa-context-map{touch-action:pan-y}.napa-map-panel[data-zoom]:not([data-zoom="1"]) .napa-context-map{touch-action:none;cursor:grab}.napa-map-panel[data-zoom]:not([data-zoom="1"]) .napa-map-region{cursor:grab}
.map-number{pointer-events:none}.map-number circle{fill:#fbf6e9;stroke:#8b7554;stroke-width:.6}.map-number text{fill:#611d32;font:600 12px var(--mono)}.map-region-key summary{cursor:pointer;font:600 20px/1.5 var(--display);color:var(--accent);padding:8px 0}.map-region-key ol{list-style:none;padding:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:2px 12px}.map-region-key button{font-size:14px;line-height:1.5;min-height:44px}.map-region-key button span{font:14px var(--mono)}
