/* Search stays in the fixed event column; results use its existing scroll area. */
.atlas-app .exploration-tools{height:46px;min-height:46px;flex:none;display:flex;gap:5px;align-items:center;padding:6px 8px;border-bottom:1px solid #e5eaf1;background:#fff}
.atlas-app .exploration-search{display:block;min-width:0;flex:1}
.atlas-app #event-search{display:block;width:100%;min-width:0;height:32px;border:1px solid #cad5e7;border-radius:7px;background:#fafcff;color:var(--ink);padding:4px 8px;font-size:13px}
.atlas-app #event-search::placeholder{color:#68788d;opacity:1}
.atlas-app #event-search-reset{height:30px;flex:none;padding:2px 6px;background:transparent;border:1px solid transparent;border-radius:6px;color:var(--teal);font-size:12px}
.atlas-app #event-search-reset:disabled{opacity:.4;cursor:default}
.atlas-app #event-search-reset:not(:disabled):hover{background:var(--soft);border-color:var(--track)}
.atlas-app .events-section[data-searching=true] .events-heading h2{font-size:14px}
.atlas-app .story-actions{height:36px;min-height:36px;flex:none;display:flex;gap:8px;align-items:center;justify-content:flex-start;margin-top:6px;overflow:hidden}
.atlas-app .story-actions a,.atlas-app .story-actions button{display:inline-flex;align-items:center;justify-content:center;min-height:30px;max-width:100%;border:1px solid #d2dbea;border-radius:7px;background:#f4f7fc;color:var(--teal);padding:3px 9px;font-size:12px;white-space:nowrap;text-decoration:none;line-height:1.5}
.atlas-app .story-actions a:hover,.atlas-app .story-actions button:hover{background:var(--soft);border-color:var(--teal)}
.atlas-app #event-grid .search-empty{display:flex;flex-direction:column;gap:8px;margin:7px 3px;text-align:left}
.atlas-app #event-grid .search-empty p{margin:0}
.atlas-app #event-grid .search-empty button{align-self:flex-start}
.event-share-dialog{width:min(540px,calc(100% - 32px));padding:24px}
.event-share-dialog .dialog-heading h2{font:600 22px/1.5 var(--sans);margin:0}
.event-share-dialog label{display:block;font-size:14px;color:var(--muted)}
.event-share-dialog input{display:block;width:100%;margin-top:8px;padding:10px;border:1px solid #c5d1e2;border-radius:7px;background:white;color:var(--ink);font-size:14px}
@media(max-width:900px){.atlas-app .exploration-tools{padding:6px 12px}.atlas-app .story-actions{gap:7px}}
.atlas-app .events-heading>div{min-width:0;flex:1}
.atlas-app .events-heading h2{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.atlas-app #event-list-count{flex:none;white-space:nowrap}
@media(max-width:900px) and (max-height:680px){
 .atlas-app .story-actions{height:32px;min-height:32px;margin-top:4px}
 .atlas-app .story-actions a,.atlas-app .story-actions button{min-height:28px;font-size:12px;padding:2px 8px}
 .atlas-app .story-panel h2{font-size:20px;line-height:1.35;margin-bottom:10px}
 .atlas-app .story-date{font-size:17px;line-height:1.4;margin:6px 0 9px}
}
/* Grid tracks must fit the viewport even when navigation gains an entry. */
body.atlas-app{grid-template-columns:minmax(0,1fr)}
.atlas-app .site-header,.atlas-app main,.atlas-app #world-view,.atlas-app #china-view{min-width:0}
@media(max-width:340px){
 .atlas-app .site-header{padding-left:8px;padding-right:8px;gap:8px}
 .atlas-app .site-header .brand{gap:5px}
 .atlas-app .site-header nav,html[lang=en] .atlas-app .site-header nav{gap:4px}
 .atlas-app .site-header nav>a{padding-left:4px;padding-right:4px}
 .atlas-app .site-header nav>a.nav-active[aria-current=page]{display:none}
 .atlas-app .site-header #about-button{min-width:20px}
 .atlas-app .language-control select{width:60px;max-width:60px}
}
