/* App layout + globe pins + banners + a11y + info card + layer menu + celestial. Brand: near-black, silver, teal. */
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
.muted{color:var(--muted);font-size:.85rem}
.row{display:flex;gap:8px;flex-wrap:wrap}
body.page-map main.app{max-width:none;padding:0;display:grid;grid-template-columns:1fr 380px;height:calc(100vh - 150px);min-height:560px}
#globe-wrap{position:relative;min-height:420px;background:#000}#globe{position:absolute;inset:0}
.side{overflow:auto;padding:12px;display:flex;flex-direction:column;gap:12px;border-left:1px solid var(--line)}
@media(max-width:900px){body.page-map main.app{grid-template-columns:1fr;height:auto}#globe-wrap{height:70vh}.side{border-left:0}}
.emerg{background:#241a05;border-bottom:2px solid #ffc233;padding:8px 14px;font-size:.9rem}
.emerg-item{background:#3a2a08;color:#ffe6a3;border:1px solid #ffc233;margin:2px;padding:4px 10px;font-size:.82rem}
.emerg-911{margin-top:4px}.emerg-911 .btn{padding:3px 12px}
.welcome{background:#0f1a19;border-bottom:1px solid var(--teal-d);padding:6px 14px;display:flex;gap:10px;justify-content:space-between;font-size:.9rem}
.welcome[hidden],.emerg[hidden]{display:none}.welcome-x{background:none;color:var(--silver);min-width:44px;min-height:44px}

/* Accessibility dock + Dr. Magic quote (DECISIONS #193). The quote sits under an Accessibility dropdown; the dock stays at the bottom-left and never covers the emergency button. */
.a11y-dock{position:fixed;left:10px;bottom:10px;z-index:2500;display:flex;flex-direction:column;align-items:flex-start;gap:4px;max-width:min(420px,calc(100vw - 20px))}
.a11y-dock .a11y-bar{position:static}
.a11y-panel{background:transparent;max-width:100%}
.a11y-panel > .a11y-toggle{cursor:pointer;font-weight:700;padding:6px 12px;min-height:36px;list-style:none;background:#0d0e11ee;border:1px solid var(--line);border-radius:12px;color:var(--silver);display:inline-block}
.a11y-panel > .a11y-toggle::-webkit-details-marker{display:none}
.a11y-tools{background:#0d0e11ee;border:1px solid var(--line);border-radius:12px;padding:6px 8px;margin-bottom:4px;max-height:40vh;overflow:auto}
.a11y-quote{margin:6px 0 2px;padding:0 4px 4px;color:var(--silver);font-style:italic;line-height:1.4;font-size:.8rem}
.a11y-quote p{margin:0}
.a11y-quote footer{margin-top:4px;font-style:normal;color:var(--muted);font-weight:600}
/* Dinosaur layer pet-help line (Q435, final wording): full width under the row, never a squeezed side column. */
.lp-row:has(.lp-dino-pets){flex-wrap:wrap;align-items:center}
.lp-dino-pets{flex:1 1 100%;width:100%;min-width:0;box-sizing:border-box;margin:8px 0 6px;padding:8px 10px;border-left:3px solid var(--teal-d);background:#0f1a19;border-radius:0 10px 10px 0;font-size:.9rem;color:#bfeee7;line-height:1.35}
.lp-dino-pets p{margin:0 0 .45em}
.lp-dino-play{min-height:36px;margin-top:4px}
@media(max-width:420px){
  .a11y-dock{left:6px;bottom:6px;max-width:calc(100vw - 12px)}
  .a11y-bar{flex-wrap:wrap}
}
.a11y-bar{position:fixed;left:10px;bottom:10px;z-index:2500;display:flex;gap:6px;align-items:center;background:#0d0e11ee;border:1px solid var(--line);border-radius:12px;padding:4px 8px;font-size:.8rem}
.a11y-bar button{padding:4px 10px;min-height:36px}.a11y-narr{margin:0 0 0 6px;display:inline-flex;gap:4px;align-items:center}.a11y-narr input{width:auto}
.narr-caption{position:fixed;bottom:60px;left:50%;transform:translateX(-50%);background:#000c;border:1px solid var(--line);padding:8px 14px;border-radius:10px;z-index:2400;max-width:80vw}.narr-caption:empty{display:none}
/* golden pins: count + tier label always shown (urgency never colour-only) */
.gl-html{transform:translate(-50%,-50%)}
.gp{--sz:30px;display:flex;flex-direction:column;align-items:center;cursor:pointer;text-align:center;color:#fff;font-size:.68rem;text-shadow:0 0 3px #000}
.gp-core{width:var(--sz);height:var(--sz);border-radius:50%;display:grid;place-items:center;background:radial-gradient(circle,#ffe08a,#ffc233 60%,#b27c00);box-shadow:0 0 calc(6px + 22px*var(--i)) calc(2px + 6px*var(--i)) rgba(255,194,51,.75);border:2px solid #fff3c4}
.gp.met .gp-core{background:#1f9d55;border-color:#c8f5d8;box-shadow:0 0 10px #1f9d55}
.gp-count{font-size:.75rem}.gp-tier{font-style:normal;background:#000a;padding:0 5px;border-radius:6px}
.cp{display:grid;place-items:center;width:26px;height:26px;border-radius:50%;background:#14998a;color:#fff;text-decoration:none;border:2px solid #fff}
/* layer menu */
#layers .lp-head{display:flex;justify-content:space-between;align-items:center}#layers h2,#layers h3{margin:.1em 0}
.lp-tools{display:flex;gap:6px;flex-wrap:wrap;margin:8px 0}.lp-tools button{padding:6px 10px;font-size:.8rem}
.lp-pillar{border:1px solid var(--line);border-radius:10px;margin:6px 0;padding:0 8px}.lp-pillar>summary{cursor:pointer;min-height:44px;display:flex;align-items:center;gap:8px;font-weight:700}
.lp-pc{margin-left:auto;font-weight:400;font-size:.78rem;color:var(--teal)}
.lp-sub{margin:.6em 0 .2em;font-size:.72rem;text-transform:uppercase;letter-spacing:.07em;color:var(--muted)}
.lp-list{list-style:none;margin:0;padding:0}.lp-row{display:flex;align-items:center;gap:8px;min-height:44px}.lp-name{flex:1;font-size:.9rem}
.lp-switch{display:inline-flex;align-items:center;gap:6px;min-width:76px;min-height:44px;background:#232731;color:var(--silver);border:1px solid var(--line);border-radius:999px;padding:4px 10px}
.lp-knob{width:18px;height:18px;border-radius:50%;background:#6b7280;transition:transform .15s}
.lp-switch[aria-checked="true"]{background:#0f2b27;border-color:var(--teal)}.lp-switch[aria-checked="true"] .lp-knob{background:var(--teal);transform:translateX(0)}
.lp-state{font-size:.78rem;font-weight:700}.lp-switch:disabled{opacity:.5}.lp-switch:focus-visible,button:focus-visible,summary:focus-visible{outline:3px solid #fff;outline-offset:2px}
.lp-info summary{cursor:pointer;min-width:44px;min-height:44px;display:grid;place-items:center}.lp-info p{font-size:.78rem}
.lp-tray ul{list-style:none;padding:0}.lp-tray li{display:flex;gap:6px;align-items:center;flex-wrap:wrap;font-size:.82rem;margin:4px 0}.lp-op{display:inline-flex;gap:4px;margin:0;align-items:center}.lp-op input{width:90px;padding:0}
.lp-combos{display:flex;gap:6px;flex-wrap:wrap}.lp-search{margin:6px 0}
/* info card */
#infocard{position:absolute;left:12px;top:12px;width:min(360px,calc(100% - 24px));max-height:calc(100% - 24px);overflow:auto;background:var(--panel);border:1px solid var(--line);border-radius:14px;padding:12px;z-index:20}
#infocard header{display:flex;gap:10px;align-items:flex-start}.ic-icon{font-size:1.6rem}.ic-x{margin-left:auto;min-width:44px;min-height:44px}.ic-btns{display:flex;flex-wrap:wrap;gap:6px}
body[data-mode="historical"] .ic-btns button:not([data-a=narr]):not([data-a=share]),body[data-mode="historical"] [data-verify]{display:none}
body[data-mode="historical"] #globe-wrap::after{content:"HISTORICAL view (read-only)";position:absolute;right:12px;top:12px;background:#000b;border:1px solid var(--teal);padding:4px 10px;border-radius:8px;font-size:.8rem}
/* celestial portals: openly visible */
.celestial{position:absolute;right:14px;bottom:14px;display:flex;gap:14px;align-items:center;z-index:15}
.celestial .disc{display:block;width:40px;height:40px;border-radius:50%}.moon .disc{background:radial-gradient(circle at 35% 35%,#f4f4f0,#a5a8ad)}.mars .disc{background:radial-gradient(circle at 35% 35%,#e8855e,#8e3b20)}
.celestial a{display:grid;place-items:center;min-width:44px;min-height:44px;text-decoration:none}.star span{font-size:1.8rem;color:#fff6b0;animation:tw 2.4s infinite}
@keyframes tw{50%{opacity:.35;transform:scale(.8)}}@media(prefers-reduced-motion:reduce){.star span{animation:none}}
.modal{position:fixed;inset:0;background:#000a;display:grid;place-items:center;z-index:4000}.modal[hidden]{display:none}.modal .card{max-width:480px}
body.fx-fly::before{content:"🛸";position:fixed;top:30%;left:-80px;font-size:3rem;z-index:3500;animation:fly 5s linear forwards;pointer-events:none}
@keyframes fly{to{left:110vw;top:20%}}@media(prefers-reduced-motion:reduce){body.fx-fly::before{animation:none;left:50%}}
/* kindness feed drawer: docked bottom-left, limited height so the emergency banner (above the page) and golden pins (centre) stay clear */
.kfeed{position:absolute;left:12px;bottom:12px;width:min(340px,calc(100% - 24px));max-height:32%;display:flex;flex-direction:column;background:var(--panel);border:1px solid var(--line);border-radius:14px;z-index:18;overflow:hidden}
.kfeed[hidden]{display:none}.kfeed header{display:flex;justify-content:space-between;align-items:center;padding:6px 10px}.kfeed h2{font-size:1rem;margin:0}
#kfeed-list{list-style:none;margin:0;padding:0 8px 8px;overflow:auto}.ki{display:flex;gap:6px;margin:4px 0}.ki-go{flex:1;text-align:left;min-height:44px}.ki-go small{display:block;color:var(--muted)}.ki-rep{min-height:44px}
.lp-big{min-height:56px}.lp-big .lp-switch{min-height:56px;min-width:92px;font-size:1rem}.lp-icon{width:32px;height:32px}
.adults{position:absolute;right:12px;top:12px;width:min(420px,calc(100% - 24px));max-height:calc(100% - 24px);overflow:auto;background:var(--panel);border:1px solid var(--teal-d);border-radius:14px;padding:12px 16px;z-index:25}.adults[hidden]{display:none}.adults header{display:flex;justify-content:space-between;align-items:center}.adults h3{margin:.8em 0 .1em;font-size:.95rem;color:var(--teal)}.adults p{margin:.1em 0}
body.page-map main.app{height:max(560px,calc(100vh - 230px))}
@media(max-width:900px){body.page-map main.app{height:auto}}
body.page-map main.app{width:100%;max-width:none;margin:0}
/* v1 private celebration: centred over the globe area below the banners; short, non-blocking */
.celebrate{position:absolute;left:50%;top:42%;transform:translate(-50%,-50%);z-index:22;pointer-events:none;display:grid;place-items:center;text-align:center;animation:cbfade 1.6s ease-out forwards}
.cb-hero{width:64px;height:64px;border-radius:50%;object-fit:cover;border:3px solid #ffc233;animation:cbpop .5s ease-out}
.cb-text{margin-top:6px;background:#000c;padding:2px 10px;border-radius:8px;color:#fff}
.cb-burst{position:absolute;inset:0;display:block}.cb-burst i{position:absolute;left:50%;top:50%;width:8px;height:8px;border-radius:50%;background:#ffc233;animation:cbray 1.1s ease-out forwards;transform:rotate(calc(36deg*var(--n,0))) translateY(0)}
.cb-burst i:nth-child(1){--n:0}.cb-burst i:nth-child(2){--n:1}.cb-burst i:nth-child(3){--n:2}.cb-burst i:nth-child(4){--n:3}.cb-burst i:nth-child(5){--n:4}.cb-burst i:nth-child(6){--n:5}.cb-burst i:nth-child(7){--n:6}.cb-burst i:nth-child(8){--n:7}.cb-burst i:nth-child(9){--n:8}.cb-burst i:nth-child(10){--n:9}
@keyframes cbray{to{transform:rotate(calc(36deg*var(--n))) translateY(-70px);opacity:0}}@keyframes cbpop{from{transform:scale(.3)}to{transform:scale(1)}}@keyframes cbfade{0%,75%{opacity:1}100%{opacity:0}}
@media(prefers-reduced-motion:reduce){.celebrate,.cb-hero,.cb-burst i{animation:none}.cb-burst{display:none}}

/* Living globe: shimmer overlay only. pointer-events none; does not move pins. */
#globe-wrap::after{content:"";position:absolute;inset:0;pointer-events:none;z-index:5;border-radius:0;opacity:0;background:radial-gradient(ellipse at 50% 45%, rgba(107,211,200,.16), transparent 62%);transition:opacity .6s}
body.alive-globe #globe-wrap::after{animation:aliveShimmer 7s ease-in-out infinite}
@keyframes aliveShimmer{0%,100%{opacity:.25}50%{opacity:.7}}
@media(prefers-reduced-motion:reduce){body.alive-globe #globe-wrap::after{animation:none;opacity:0}}

/* Layout fix 1 (Dr. Magic yes, 11:54 PM Dec 5): the emergency button and 9-8-8 stay fixed.
   The core-loop hero (the block they sit over) reserves a right-hand column so nothing sits behind the pair. */
body:not(.cu){--eb-reserve: 7.5rem}
body:not(.cu) .lhero{padding-right: max(var(--eb-reserve), calc(var(--eb-reserve) + env(safe-area-inset-right, 0px)))}

@media(max-width:720px){
  /* The collapsed Accessibility button is fixed at the bottom-left; indent the banners so their text is not hidden behind it. */
  body:not(.cu) .early,
  body:not(.cu) #welcome{padding-left:9rem;padding-right:14px}
}

/* Gold map specks (FEATURE_GOLD_MAP_LAYER) and open-data resource pins (FEATURE_RESOURCE_PINS) */
.gm-speck{width:22px;height:22px;border-radius:50%;cursor:pointer;background:radial-gradient(circle at 35% 35%,#fff6c8 0,#f4c430 45%,#a87a00 100%);box-shadow:0 0 10px 3px rgba(244,196,48,.65);transform:translate(-50%,-50%)}
.gm-card .gm-link{display:inline-block;font-weight:700;font-size:1.05rem;padding:.55rem .9rem;border-radius:10px;background:#f4c430;color:#14100a;text-decoration:none;min-height:44px;line-height:1.7}
.gm-card .gm-soon{background:rgba(244,196,48,.12);border-left:4px solid #f4c430;padding:.4rem .6rem}
.rp-pin{width:26px;height:26px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:14px;cursor:pointer;background:#0d2a3a;border:2px solid #8fd3ff;transform:translate(-50%,-50%)}
@media (prefers-reduced-motion:no-preference){.gm-speck{animation:gm-tw 3.2s ease-in-out infinite}@keyframes gm-tw{50%{box-shadow:0 0 16px 6px rgba(244,196,48,.85)}}}
/* Keep globe pins (globe.gl HTML markers) underneath map cards: the globe gets its own stacking layer below #infocard (z-index 20). */
#globe{z-index:0}
