:root{font-family:system-ui,sans-serif;color-scheme:dark;--accent:#42c6f5}
*{box-sizing:border-box}
[hidden]{display:none!important}
body{margin:0}
.admin{background:#0c121b;color:#e8f0fa;min-height:100vh}
.top{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem clamp(1rem,5vw,4rem);border-bottom:1px solid #283649;background:#101a28}
.brand{color:inherit;text-decoration:none;font-size:1.2rem;font-weight:750;display:flex;align-items:center;gap:.6rem}
.brand small{color:#a4b9ce;font-size:.72rem;font-weight:500}
.signal{color:var(--accent);font-size:1.6rem}
.admin main{max-width:1120px;padding:1.2rem;margin:auto}
.heading{display:flex;align-items:center;justify-content:space-between;gap:1rem}
h1,h2,h3{margin:.4rem 0 1rem}
h2{font-size:1.15rem}h3{font-size:.95rem}
.panel{background:#131e2c;border:1px solid #2d3a4d;border-radius:14px;padding:1.2rem}
.narrow{max-width:420px;margin:3rem auto}
.workspace{display:grid;grid-template-columns:minmax(150px,1fr) 3fr;gap:1rem}
.site-list button{display:block;width:100%;text-align:left;margin-bottom:.45rem;overflow-wrap:anywhere}
.site-list button[aria-current=true]{border-color:var(--accent);color:#9ce5ff}
.fields,.previews{display:grid;grid-template-columns:1fr 1fr;gap:.9rem}
.previews{grid-template-columns:2fr 1fr;margin-top:1.5rem;align-items:start}
label{display:block;color:#b9cee2;font-size:.87rem}
input,select,textarea,button{font:inherit;color:inherit;border:1px solid #41556d;border-radius:8px;background:#0c1520;padding:.55rem .7rem}
input,select,textarea{display:block;width:100%;margin-top:.25rem}
input[type=color]{height:2.5rem;padding:.15rem}
.check{display:flex;align-items:center;gap:.45rem;margin:1rem 0}
.check input{display:inline;width:auto;margin:0}
button{cursor:pointer}
button:hover{border-color:var(--accent)}
.primary{color:#061420;font-weight:700;background:#65d4fa;border-color:#65d4fa}
.narrow form button{margin-top:1rem}
.embeds{margin-top:1rem}
.snippet{display:flex;align-items:end;gap:.6rem;margin-top:.6rem}
.snippet label{flex:1;min-width:0}
.snippet textarea{font-family:monospace}
.preview-bg{display:grid;place-items:center;border-radius:8px;background:#203247;overflow:hidden}
iframe{border:0;max-width:100%;display:block}
#status{color:#ace4f8;min-height:1.4em}
.widget{background:transparent;color:#f4f8ff;height:100dvh;overflow:hidden}
.widget[data-bg=white]{background:white;color:#101c2b;color-scheme:light}
.widget[data-bg=black]{background:#000}
#globe{position:relative;width:100%;height:100%}
#sphere{display:block;width:100%;height:100%;touch-action:pan-y}
.flag{position:absolute;translate:-50% 0;text-align:center;pointer-events:none;min-width:100px;max-width:85%;font-weight:650;font-size:clamp(.7rem,2.3vw,.9rem);text-shadow:0 1px 4px #000,0 1px 3px #000;background:#101b30df;color:white;padding:.3rem .6rem;border-radius:.55rem;border:1px solid var(--accent);overflow-wrap:anywhere}
.flag b{display:block;font-size:1.6rem;line-height:1.1}
.widget.vertical-widget[data-bg]{background:transparent}
#vertical{width:100%;max-width:240px;margin:0 auto;padding:.55rem .65rem;border:1px solid #77849366;border-radius:5px;color:#f3f5f8;font-size:.82rem;font-variant-numeric:tabular-nums}
.vertical-widget[data-bg=black] #vertical{background:linear-gradient(145deg,#242527,#08090a 72%)}
.vertical-widget[data-bg=white] #vertical{background:#fff;color:#17202b}
#vertical header{display:flex;align-items:center;gap:.4rem;font-size:.78rem;border-bottom:1px solid #8999ab45;padding-bottom:.3rem}
#vertical header strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#logo{max-width:2.3rem;max-height:1.5rem;object-fit:contain}
.totals{margin:.3rem 0 0}
.totals div{display:flex;align-items:center;justify-content:space-between;gap:.3rem;padding:.12rem 0}
.totals dt{font-weight:750}
.totals dd{margin:0;padding:.02rem .28rem;border-radius:4px;color:#082035;background:var(--accent);font-size:.76rem;font-weight:800}
.middle{display:flex;align-items:center;gap:.6rem;min-height:3.75rem;margin:.13rem 0 .22rem}
#mini-sphere{width:3.35rem;height:3.35rem;display:block}
.online{display:grid;gap:.05rem;font-weight:750}
.online strong{width:max-content;border-radius:.3rem;padding:.03rem .32rem;background:#ffe8e7;color:#940f24;font-size:.76rem}
#country-window{overflow:hidden;height:4.5rem;border-top:1px solid #8999ab45;padding-top:.15rem}
#country-track{font-size:.72rem;color:inherit}
#country-track ul{list-style:none;padding:0;margin:0}
#country-track li{display:grid;grid-template-columns:18px 1fr auto;align-items:center;gap:.3rem;height:1.08rem}
#country-track li span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#country-track .country-flag{width:16px;height:11px;object-fit:contain}
.scroll-countries{animation:country-up var(--country-duration,12s) linear infinite}
#country-window:hover .scroll-countries{animation-play-state:paused}
@keyframes country-up{to{transform:translateY(-50%)}}
@media(prefers-reduced-motion:reduce){#country-window{overflow:auto}.scroll-countries{animation:none}.scroll-countries ul[aria-hidden]{display:none}}
#widget-status{margin:1rem;text-align:center}
@media(max-width:650px){.workspace,.fields,.previews{grid-template-columns:1fr}.brand small{display:none}}

.flag .country-flag{display:block;width:34px;height:23px;object-fit:contain;margin:0 auto .25rem;filter:drop-shadow(0 2px 3px #0008)}
.admin label:has(input[name=map]){display:none}
.flag{background:none;border:0;border-radius:0;padding:.1rem .25rem;color:#fff;font-size:clamp(.7rem,2.3vw,.92rem);text-shadow:0 1px 2px #000,0 0 4px #000,0 0 7px #000}
#vertical{max-width:340px;padding:.8rem .85rem;font-size:1rem}
#vertical header{font-size:.98rem;padding-bottom:.42rem}
.totals{margin:.45rem 0 0}
.totals div{padding:.2rem 0}
.totals dd,.online strong{font-size:.94rem;padding:.07rem .42rem}
.middle{gap:.8rem;min-height:4.85rem;margin:.2rem 0 .34rem}
#mini-sphere{width:4.3rem;height:4.3rem}
#country-window{height:6.7rem;padding-top:.25rem}
#country-track{font-size:clamp(.78rem,4.5vw,.97rem)}
#country-track li{grid-template-columns:22px minmax(0,1fr) auto;gap:.42rem;height:1.6rem}
#country-track .country-flag{width:20px;height:14px}
#country-window{height:7.9rem}
#country-track li{height:1.9rem}
#country-track li span{white-space:normal;line-height:1.15;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}

#vertical{height:100%;display:flex;flex-direction:column;border-radius:14px;padding:1rem;gap:.55rem;overflow:auto}
#vertical header{flex:none;position:relative;display:flex;flex-direction:column;justify-content:center;gap:.5rem;min-height:72px;padding:.8rem .65rem;text-align:center;border:1px solid #8399b64d;border-top:3px solid var(--accent);border-radius:10px;background:linear-gradient(135deg,#ffffff12,#ffffff03);box-shadow:0 5px 15px #00000016}
#vertical header strong{width:100%;white-space:normal;overflow-wrap:anywhere;text-transform:uppercase;font-size:1rem;line-height:1.35;letter-spacing:.065em;font-weight:800}
#vertical #logo{max-width:60%;max-height:36px;object-fit:contain}
#vertical .totals{flex:none;margin:.15rem 0}
#vertical .totals div{padding:.3rem 0}
#vertical .middle{flex:1;justify-content:center;gap:1.1rem;min-height:70px;margin:.15rem 0}
#vertical #mini-sphere{width:76px;height:76px;flex:none}
#vertical #country-window{flex:none;height:7.9rem}
.vertical-widget[data-bg=white] #vertical header{background:linear-gradient(135deg,#edf5fc,#f8fbff);border-color:#cedce9;border-top-color:var(--accent);box-shadow:0 4px 12px #1936520d}
@media(max-height:370px){#vertical{gap:.3rem;padding:.65rem}#vertical header{min-height:58px;padding:.5rem}#vertical .middle{min-height:65px}#vertical #mini-sphere{width:60px;height:60px}}

#globe{display:flex;flex-direction:column;padding-bottom:8px}
.globe-scene{position:relative;flex:1;min-height:0;width:100%}
.globe-stats{flex:none;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0;width:calc(100% - 24px);max-width:420px;margin:2px auto 0;padding:.65rem .3rem;border:1px solid #ffffff30;border-radius:14px;background:linear-gradient(135deg,#15263b85,#0b152750);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);box-shadow:0 4px 18px #00000012;text-align:center;color:#f3f8ff}
.globe-stats div{min-width:0;padding:0 .35rem}
.globe-stats div+div{border-left:1px solid #ffffff24}
.globe-stats dt{font-size:.78rem;font-weight:500;opacity:.8}
.globe-stats dd{margin:.15rem 0 0;font-size:clamp(1rem,3.8vw,1.4rem);font-weight:750;line-height:1.15;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.widget[data-bg=white] .globe-stats{color:#182c42;border-color:#23446725;background:linear-gradient(135deg,#e7f1fbba,#f4f8fc85)}
.widget[data-bg=white] .globe-stats div+div{border-color:#23446720}

.globe-stats{width:calc(100% - 32px);max-width:240px;padding:.32rem .15rem;margin:0 auto;border-radius:9px;border-color:#ffffff1a;background:#12213938;box-shadow:none;backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px)}
.globe-stats div{padding:0 .25rem}
.globe-stats dt{font-size:.64rem;line-height:1.1}
.globe-stats dd{font-size:.92rem;line-height:1.05;margin-top:.12rem;font-weight:650}
.globe-stats div+div{border-color:#ffffff18}
.widget[data-bg=white] .globe-stats{background:#e8f1f938;border-color:#23446718}
#vertical{position:relative;isolation:isolate;overflow:hidden;background:linear-gradient(145deg,#1c2c3b18,#0913210d)}
#vertical::before{content:"";position:absolute;z-index:-1;pointer-events:none;inset:0;border-radius:inherit;background:url('/tierra-blue-marble.jpg') 43% 48%/auto 115% no-repeat;opacity:.095;filter:saturate(.55);mask-image:linear-gradient(180deg,#0005,#000 38%,#0009);-webkit-mask-image:linear-gradient(180deg,#0005,#000 38%,#0009)}
.vertical-widget[data-bg=black] #vertical{background:linear-gradient(145deg,#132030,#070b11 78%)}
.vertical-widget[data-bg=white] #vertical::before{opacity:.065;filter:saturate(.4)}
#vertical header{background:linear-gradient(120deg,#ffffff13,#ffffff04);backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px)}
@media(max-height:370px){#vertical{overflow:auto}}

#vertical{background:linear-gradient(145deg,#0c131de8,#04080ee8)}
.vertical-widget[data-bg=black] #vertical{background:linear-gradient(145deg,#0a1019,#020408 78%)}
#vertical header,.vertical-widget[data-bg=white] #vertical header{border:1.5px solid #000;border-top:1.5px solid #000;background:linear-gradient(135deg,#ffffff14,#ffffff05);box-shadow:0 4px 14px #0002,inset 0 1px 0 #ffffff10}
.vertical-widget[data-bg=white] #vertical header{background:linear-gradient(135deg,#edf5fcb0,#f8fbff80)}

#country-track li{height:2.3rem}
#vertical #country-window{height:9.5rem}
#country-track .city-status{font-size:.68rem;font-weight:650;white-space:nowrap;letter-spacing:0}
#country-track .is-online{color:#8ee3ae}
#country-track .is-offline{color:#b4bdc7;font-weight:450}
.vertical-widget[data-bg=white] #country-track .is-online{color:#246940}
.vertical-widget[data-bg=white] #country-track .is-offline{color:#68727d}

#country-track li{height:2.55rem;min-width:0;gap:.4rem}
#country-track .city-details{display:flex;align-items:flex-start;flex-direction:column;justify-content:center;gap:.2rem;min-width:0;max-width:100%;overflow:hidden}
#country-track .city-details>span{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.2}
#country-track .city-status{display:inline-block;max-width:100%;padding:.16rem .4rem;border:1px solid transparent;border-radius:0;line-height:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:.65rem;font-weight:650}
#country-track .is-online{background:#244d37b0;border-color:#69c98b65;color:#b8f5cb}
#country-track .is-offline{background:#8090a024;border-color:#a1afbd45;color:#d0d8e1}
.vertical-widget[data-bg=white] #country-track .is-online{background:#e5f4e9;border-color:#b9d9c3;color:#24603a}
.vertical-widget[data-bg=white] #country-track .is-offline{background:#edf0f3;border-color:#d2d9df;color:#586673}
#vertical #country-window{flex:1 1 auto;min-height:84px;height:auto;overflow:hidden}
#country-track li>strong{min-width:0;max-width:5.5ch;overflow:hidden;text-overflow:ellipsis}

#country-track .city-details{flex-direction:row;align-items:center;justify-content:flex-start;gap:.35rem;min-width:0}
#country-track .city-details>span{flex:1 1 auto;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#country-track .city-status{flex:0 0 auto;max-width:82px;font-size:.62rem;padding:.2rem .3rem;border-radius:0}
#country-track li{height:2rem}

#country-track .city-details{gap:.3rem}
#country-track .city-status{border:0;border-radius:0;padding:0;background:none;box-shadow:none;max-width:none;font-size:.69rem;font-weight:500;line-height:1.2;overflow:visible}
#country-track .city-status::before{content:"·";color:#a2adba;margin-right:.3rem}
#country-track .is-online,.vertical-widget[data-bg=white] #country-track .is-online{background:none;border:0}
#country-track .is-offline,.vertical-widget[data-bg=white] #country-track .is-offline{background:none;border:0}
#country-track .city-details>span{font-size:inherit}
#country-track .is-online{color:#a3e4b9}
#country-track .is-offline{color:#b4bdc7;font-weight:400}
.vertical-widget[data-bg=white] #country-track .is-online{color:#24603a}
.vertical-widget[data-bg=white] #country-track .is-offline{color:#68727d}
@media(max-width:280px){#vertical{padding:.7rem}#country-track li{grid-template-columns:18px minmax(0,1fr) auto;gap:.3rem}#country-track .country-flag{width:16px;height:11px}}
