.map-preferences { position:absolute; inset:22px auto auto 24px; z-index:20; max-width:calc(100% - 48px); color:#f5f0fc; font-size:13px; }
.map-preference-row { display:flex; align-items:start; gap:8px; }
.map-period-control { position:relative; }
.map-period-trigger { display:flex; align-items:center; gap:10px; min-height:44px; min-width:174px; max-width:min(248px,calc(100vw - 92px)); padding:10px 14px; border:1px solid rgba(185,134,244,.4); border-radius:12px; background:rgba(7,12,25,.93); color:inherit; font:inherit; cursor:pointer; text-align:start; outline:none; }
.map-period-trigger strong { flex:1; font-weight:600; white-space:nowrap; }
.map-period-trigger > span { color:#c2b8ce; }
.map-period-trigger svg { flex:0 0 14px; width:14px; height:14px; margin-inline-start:6px; fill:none; stroke:currentColor; stroke-width:1.6; transition:transform .15s; }
.map-period-trigger[aria-expanded=true] svg { transform:rotate(180deg); }
.map-range-menu { position:absolute; inset:calc(100% + 8px) auto auto 0; min-width:100%; width:max-content; max-width:calc(100vw - 32px); padding:6px; border:1px solid rgba(185,134,244,.4); border-radius:14px; background:#0c1121; box-shadow:0 12px 32px #0006; }
.map-range-menu[hidden] { display:none; }
.map-range-menu button { display:flex; align-items:center; gap:9px; width:100%; min-height:40px; padding:9px 12px; border:0; border-radius:8px; color:#e8e0f3; background:none; font:inherit; text-align:start; cursor:pointer; outline:none; white-space:nowrap; }
.map-range-menu button > span:first-child { width:14px; flex:0 0 14px; opacity:0; color:#dab7ff; }
.map-range-menu button[aria-selected=true] { background:#a05ee52e; color:#f5eaff; }
.map-range-menu button[aria-selected=true] > span:first-child { opacity:1; }
.map-range-menu button:hover { background:#ffffff0d; }
.map-period-trigger:focus-visible,.map-range-menu button:focus-visible { box-shadow:0 0 0 2px #b580e8; }
.map-style-options { position:static; }
.map-style-options summary { display:grid; place-items:center; list-style:none; min-width:44px; height:44px; font-size:24px; border-radius:12px; background:rgba(7,12,25,.93); border:1px solid rgba(185,134,244,.4); cursor:pointer; outline:none; }
.map-style-options summary:focus-visible { box-shadow:0 0 0 2px #b580e8; }
.map-style-options summary::-webkit-details-marker { display:none; }
.map-style-options > div { position:absolute; inset:52px auto auto 0; width:min(254px,calc(100vw - 32px)); box-sizing:border-box; padding:16px; border:1px solid rgba(185,134,244,.4); border-radius:14px; background:#0c1121; box-shadow:0 10px 40px #0008; }
.map-style-options fieldset { display:flex; border:0; margin:12px 0; padding:0; gap:8px; }
.map-style-options button { flex:1; display:flex; flex-direction:column; align-items:center; gap:6px; padding:10px 3px; min-height:58px; background:#ffffff08; color:#e7def1; border:1px solid #ffffff26; border-radius:10px; font:inherit; cursor:pointer; }
.map-style-options button > span:first-child { color:#c88dff; font-size:21px; }
.map-style-options button[aria-pressed=true] { border-color:#b570ef; background:#a05ee52e; }
.map-style-options small { color:#b7adca; }
.map-history-status { display:flex; flex-wrap:wrap; gap:8px; padding:8px 12px; margin-top:8px; max-width:290px; border-radius:10px; background:#080e1de8; font-size:12px; }
.map-history-status[hidden],.map-history-status button[hidden] { display:none; }
.map-history-status button { color:#d8b3ff; border:0; padding:0; background:none; font:inherit; text-decoration:underline; cursor:pointer; }
.global-emotion-legend,[data-map-intro] { display:none!important; }
.global-emotion-light :is(.hotspot,.hotspot-core,.hotspot-halo,.hotspot-symbol) { animation-delay:var(--global-phase,0s)!important; }
.country.global-emotion-country { fill:var(--emotion-color); fill-opacity:.08; stroke:var(--emotion-color); stroke-opacity:.6; }
#countryLayer.has-global-emotion { filter:url(#countryGlow); }
#countryLayer.has-global-emotion .country { filter:none; }
.country.active-country { fill-opacity:1; stroke-opacity:1; }
.hotspot-symbol { fill:var(--emotion-color); stroke:#ffffff70; stroke-width:.8; filter:drop-shadow(0 0 8px var(--emotion-color)); transform-box:fill-box; transform-origin:center; animation:symbolBreath 2.7s ease-in-out infinite; }
.map-city-light { cursor:pointer; outline:none; }
.map-city-light:focus-visible { filter:drop-shadow(0 0 5px white); }
.map-cluster-detail { position:absolute; z-index:21; inset:auto 24px 110px auto; width:min(300px,calc(100% - 48px)); padding:16px; border:1px solid #b777e65c; border-radius:14px; background:#080e1df5; color:#f3edfa; }
.map-cluster-detail button { float:right; min-width:36px; min-height:36px; background:transparent; border:0; color:#ddd; font-size:24px; cursor:pointer; }
.map-cluster-detail strong { display:block; padding-inline-end:36px; }
.map-cluster-detail p { color:#bcb2cb; font-size:12px; }
.map-cluster-detail div { display:flex; flex-wrap:wrap; gap:8px 14px; font-size:13px; }
.map-cluster-detail em { font-style:normal; color:var(--emotion-color); }
@keyframes symbolBreath { 0%,100% { transform:scale(.9); opacity:.66; } 50% { transform:scale(1.1); opacity:.98; } }
body.composer-open .hotspot-symbol { animation-play-state:paused; }
@media (prefers-reduced-motion:reduce) { .hotspot-symbol { animation:none; } .map-period-trigger svg { transition:none; } }
@media(max-width:600px) {
  .map-preferences { inset:12px auto auto 16px; max-width:calc(100% - 32px); font-size:12px; }
  .map-period-trigger { min-width:160px; max-width:calc(100vw - 92px); }
  .map-range-menu button { min-height:40px; }
  .map-cluster-detail { inset:auto 16px 144px auto; }
  body[data-page="map"] .map-controls { right:max(16px,env(safe-area-inset-right))!important; }
}
