/* World Connection Atlas: intentionally namespaced; never alters Leaflet map. */
#worldMapButton{width:45px;height:42px;display:inline-flex;align-items:center;justify-content:center;flex:0 0 45px;padding:0;border:1px solid #9d5d2f;border-radius:10px;color:#eec787;background:linear-gradient(180deg,#252521,#111714);box-shadow:0 3px 9px #0009;cursor:pointer;transition:background .18s,transform .18s,border-color .18s}
#worldMapButton svg{height:22px;width:22px;stroke:currentColor;fill:none;stroke-width:1.85;stroke-linecap:round;stroke-linejoin:round}
#worldMapButton:hover,#worldMapButton.is-active{border-color:#ecc36c;color:#fff3c8;background:linear-gradient(180deg,#704219,#28180f);transform:translateY(-1px)}
/* Pop-up window follows the same centred, dimmed-map pattern as Players/Tools. */
.tree-world-page{position:fixed;inset:0;z-index:12080;display:flex;align-items:center;justify-content:center;padding:clamp(10px,2.5vw,26px);overflow:hidden;overscroll-behavior:contain;background:rgba(1,5,7,.83);backdrop-filter:blur(7px);-webkit-backdrop-filter:blur(7px);color:#e8eddf;font:500 14px/1.5 Inter,system-ui,-apple-system,'Segoe UI',sans-serif}
.tree-world-page[hidden]{display:none!important}.tree-world-page *{box-sizing:border-box}
/* The panel, not the entire website, scrolls when vertical space is limited. */
.tree-world-shell{position:relative;width:min(1520px,100%);max-height:min(950px,94dvh);margin:0;padding:20px clamp(15px,2.4vw,30px) 24px;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#8a6240 #0d1819;border:1px solid rgba(230,181,96,.48);border-top:2px solid #c08a4f;border-radius:19px;background:radial-gradient(ellipse at 45% 0%,#27372d 0%,#111b1a 43%,#080e10 100%);box-shadow:0 34px 100px #000c,0 0 0 1px #090e11;isolation:isolate}
.tree-world-shell::-webkit-scrollbar{width:9px}.tree-world-shell::-webkit-scrollbar-thumb{background:#775634;border:2px solid #111b1c;border-radius:8px}
.tree-world-kicker{font-size:11px;font-weight:900;letter-spacing:.2em;text-transform:uppercase;color:#e8ac65;display:flex;align-items:center;gap:10px}.tree-world-kicker:before{content:'';width:25px;height:2px;background:#d88b36;display:inline-block}
.tree-world-heading{display:flex;justify-content:space-between;align-items:center;gap:20px;margin:8px 0 16px;flex-wrap:wrap}
.tree-world-heading h1{font-size:clamp(26px,2.5vw,39px);font-weight:900;letter-spacing:-.04em;line-height:1.1;margin:0;color:#f6efd8}.tree-world-heading h1 span{color:#df9c43}.tree-world-heading p{margin:8px 0 0;color:#9baea9;font-size:13px}
.tree-world-heading-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.tree-world-status{display:inline-flex;gap:7px;align-items:center;color:#9bc1ae;border:1px solid #2c4a41;border-radius:50px;padding:8px 12px;background:#101d1b;font-weight:750;font-size:11px;letter-spacing:.055em}
.tree-world-status:before{content:'';height:7px;width:7px;border-radius:50%;background:#62d7a4;box-shadow:0 0 12px #62d7a4}.tree-world-status.is-error:before{background:#f2ba72;box-shadow:none}
.tree-world-close,.tree-world-refresh{padding:9px 13px;min-height:40px;cursor:pointer;border-radius:9px;border:1px solid #685136;background:#1d2422;color:#e9d9b9;font-weight:800;white-space:nowrap}.tree-world-close{font-size:18px;padding:5px 14px}.tree-world-close:hover,.tree-world-refresh:hover{background:#47301b}
.tree-world-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:16px}
.tree-world-metric{border:1px solid #644c33;border-top:2px solid #be8741;background:linear-gradient(145deg,#25291f 0%,#161c1b 60%,#12191b 100%);border-radius:12px;padding:16px 19px;min-width:0;position:relative;overflow:hidden;box-shadow:0 10px 28px #0003}.tree-world-metric:after{content:'';position:absolute;right:-22px;top:-38px;width:90px;height:90px;border:1px solid #d5b87d14;border-radius:50%;box-shadow:0 0 0 16px #d5b87d08,0 0 0 33px #d5b87d06;pointer-events:none}
.tree-world-metric-title{text-transform:uppercase;font-size:10px;font-weight:850;letter-spacing:.13em;color:#a9a99c}.tree-world-metric-number{margin-top:7px;font-size:clamp(25px,2.6vw,35px);font-weight:900;letter-spacing:-.05em;color:#f3e2bd;line-height:1.1}.tree-world-metric-number span{font-size:14px;letter-spacing:0;color:#c0c7bf;margin-left:4px}.tree-world-metric-detail{color:#8a9c91;font-size:11px;margin-top:9px}
.tree-world-board{display:grid;grid-template-columns:minmax(0,1fr) 330px;gap:16px;align-items:stretch}
.tree-world-map-box,.tree-world-aside{border:1px solid #645038;border-radius:14px;background:linear-gradient(160deg,#121f20,#081112);box-shadow:0 14px 42px #0006;overflow:hidden}
.tree-world-map-head{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:13px 16px;border-bottom:1px solid #765a363d;background:linear-gradient(90deg,#24302b,#151e20)}
.tree-world-map-head strong{font-size:14px;color:#efdfbd}.tree-world-map-head small{font-size:10px;letter-spacing:.07em;text-transform:uppercase;color:#98a99d;display:block}.tree-world-mode{display:flex;align-items:center;gap:3px;padding:3px;border:1px solid #53472e;border-radius:9px;background:#0c1414}
.tree-world-mode button{border:0;border-radius:7px;background:transparent;color:#a9b9ad;padding:8px 11px;cursor:pointer;font-size:11px;font-weight:800;white-space:nowrap}.tree-world-mode button.is-active{color:#231a0d;background:linear-gradient(180deg,#f5d07c,#c99244)}
.tree-world-canvas-wrap{position:relative;margin:0;min-height:300px;background:radial-gradient(ellipse at 55% 47%,#153d4e 0,#092332 48%,#06151e 95%);overflow:hidden}
#treeWorldCanvas{width:100%;height:100%;display:block;touch-action:pan-y;cursor:crosshair}
.tree-world-tooltip{position:absolute;z-index:5;pointer-events:none;width:min(235px,85vw);padding:12px 13px;border-radius:9px;border:1px solid #bb8950;background:#122122f5;color:#f4e6cb;box-shadow:0 15px 25px #000b}.tree-world-tooltip[hidden]{display:none}
.tree-world-tooltip strong{font-size:15px}.tree-world-tooltip small{color:#9cb5b0;display:block;margin-top:4px}.tree-world-tooltip .tree-world-pill{display:inline-block;margin-top:7px;padding:3px 7px;border-radius:6px;background:#554229;color:#ffe3ab;font-weight:800;font-size:11px}
.tree-world-map-footer{display:flex;justify-content:space-between;align-items:center;gap:13px;flex-wrap:wrap;padding:11px 16px;border-top:1px solid #4944329c;background:#151e1c;color:#a0aaa1;font-size:11px}
.tree-world-legend{display:flex;gap:14px;flex-wrap:wrap;align-items:center}.tree-world-legend span{display:inline-flex;gap:7px;align-items:center}.tree-world-dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:#e8ab53;box-shadow:0 0 8px #e8ab53}.tree-world-dot.is-live{background:#76d9b3;box-shadow:0 0 8px #76d9b3}.tree-world-dot.is-history{background:#67aecb;box-shadow:none}
.tree-world-aside{display:flex;flex-direction:column;min-height:0}.tree-world-aside-header{padding:17px 18px;border-bottom:1px solid #62503360;background:linear-gradient(180deg,#232b27,#151d1c)}.tree-world-aside-header strong{font-size:15px;color:#e7d5ad}.tree-world-aside-header p{font-size:11px;margin:4px 0 0;color:#9cac9d}
.tree-world-list{overflow-y:auto;min-height:120px;max-height:505px;flex:1;padding:9px}.tree-world-row{display:grid;grid-template-columns:31px minmax(0,1fr) auto;align-items:center;gap:10px;min-height:60px;width:100%;padding:10px;border:1px solid transparent;background:none;text-align:left;color:#e8e2d3;border-radius:9px;cursor:pointer}.tree-world-row:hover,.tree-world-row.is-active{border-color:#83623d;background:linear-gradient(90deg,#393426,#1a2b2a)}
.tree-world-flag{display:flex;align-items:center;justify-content:center;height:33px;width:31px;border:1px solid #76634973;border-radius:7px;background:#111b1a;color:#f4c175;font-size:19px}.tree-world-row-country{font-size:12px;font-weight:850;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tree-world-row-sub{color:#809b90;font-size:10px;display:block;margin-top:3px}.tree-world-row-number{font-size:15px;color:#f0c77c;font-weight:900;white-space:nowrap;text-align:right}.tree-world-row-number span{color:#8fa399;font-size:10px;display:block;font-weight:600}
.tree-world-empty{padding:30px 13px;text-align:center;line-height:1.6;color:#9da99d;font-size:12px}
.tree-world-footnote{color:#87968b;font-size:11px;padding:17px 3px 0;line-height:1.7}.tree-world-footnote b{color:#c8b88f}.tree-world-footnote a{color:#e3b66f}
@media(max-width:1120px){.tree-world-board{grid-template-columns:minmax(0,1fr) 260px}.tree-world-metric{padding:13px}}
@media(max-width:820px){.tree-world-board{grid-template-columns:1fr}.tree-world-aside{max-height:330px}.tree-world-list{max-height:240px}.tree-world-canvas-wrap{min-height:0}.tree-world-shell{padding-top:14px}.tree-world-map-head{flex-wrap:wrap}.tree-world-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:470px){#worldMapButton{width:40px;flex-basis:40px}.tree-world-shell{padding:12px 10px 24px}.tree-world-heading{margin-bottom:13px}.tree-world-heading h1{font-size:25px}.tree-world-heading p{font-size:12px}.tree-world-metric{padding:12px}.tree-world-metric-number{font-size:26px}.tree-world-map-head{padding:9px 11px}.tree-world-mode{width:100%}.tree-world-mode button{flex:1}.tree-world-map-footer{padding:10px}.tree-world-legend{gap:8px}}

/* Modal-specific chrome and compact refresh indicator. */
.tree-world-auto-indicator{display:inline-flex;align-items:center;gap:8px;padding:8px 11px;border:1px solid #446551;border-radius:25px;color:#b7e5bb;background:rgba(19,51,39,.65);font-size:10px;letter-spacing:.09em;font-weight:850;white-space:nowrap}
.tree-world-auto-pulse{width:7px;height:7px;border-radius:50%;background:#74d6a2;box-shadow:0 0 0 4px rgba(116,214,162,.12);animation:treeWorldAutoPulse 2s ease-in-out infinite}
@keyframes treeWorldAutoPulse{50%{opacity:.42;box-shadow:0 0 0 7px rgba(116,214,162,.03)}}
.tree-world-shell:focus{outline:0}.tree-world-page:focus{outline:0}
.tree-world-close{height:40px;min-width:40px;font-size:23px;line-height:1}
.tree-world-page .tree-world-metric{padding:12px 16px}.tree-world-page .tree-world-metric-number{margin-top:4px}
.tree-world-page .tree-world-metric-detail{margin-top:6px}
.tree-world-page .tree-world-canvas-wrap{min-height:275px}
@media(max-width:820px){.tree-world-page{padding:8px}.tree-world-shell{max-height:calc(100dvh - 16px);padding:15px 12px 20px;border-radius:14px}.tree-world-heading{gap:12px}}
@media(max-width:580px){.tree-world-page{padding:0}.tree-world-shell{width:100%;height:100dvh;max-height:100dvh;padding:15px 11px calc(22px + env(safe-area-inset-bottom));border-radius:0;border-left:0;border-right:0}.tree-world-heading-actions{width:100%;gap:6px}.tree-world-heading-actions .tree-world-status{flex:1;min-width:0;justify-content:center}.tree-world-auto-indicator{padding:7px 9px;font-size:9px}.tree-world-heading-actions .tree-world-refresh{margin-left:auto}.tree-world-heading-actions .tree-world-close{min-width:37px;padding:5px 10px}.tree-world-board{gap:10px}}
@media(prefers-reduced-motion:reduce){.tree-world-auto-pulse{animation:none}}
