:root{--bg: #1f262e;--land: #3b4652;--land-line: #26303a;--panel: #161c22;--panel-2: #26303a;--text: #eef1f4;--muted: #9aa6b2;--visited: #4caf50;--often: #1b7a3d;--many: #0e5a2a;--lots: #063a1a;--must: #a134b2;--wish: #db94e6;--home: #3d8ee6;--accent: #ffd54a;--select: #fff;--marker-line: #c9d2db;--disputed-line: #8792a0;--visited-text: #7bd47f;--wish-text: var(--wish);--shadow: rgba(0, 0, 0, .4);--ocean: #26303b;--grid: rgba(255, 255, 255, .06);--night: rgba(0, 0, 0, .14);--hover: brightness(1.18);color-scheme:dark;font-family:Inter,system-ui,-apple-system,Segoe UI,sans-serif;color:var(--text)}@media(prefers-color-scheme:light){:root:not([data-theme=dark]){--bg: #d5e1eb;--land: #f7f9fb;--land-line: #bcc7d1;--panel: #ffffff;--panel-2: #e9eef2;--text: #18212a;--muted: #5d6975;--accent: #c98a00;--select: #10161c;--marker-line: #4f5b67;--disputed-line: #66727e;--visited-text: #2e8b32;--wish-text: #a648b8;--shadow: rgba(30, 45, 60, .18);color-scheme:light;--ocean: #c6d7e5;--grid: rgba(20, 40, 60, .08);--night: rgba(25, 40, 90, .085);--hover: brightness(.93)}}:root[data-theme=light]{--bg: #d5e1eb;--land: #f7f9fb;--land-line: #bcc7d1;--panel: #ffffff;--panel-2: #e9eef2;--text: #18212a;--muted: #5d6975;--accent: #c98a00;--select: #10161c;--marker-line: #4f5b67;--disputed-line: #66727e;--visited-text: #2e8b32;--wish-text: #a648b8;--shadow: rgba(30, 45, 60, .18);color-scheme:light;--ocean: #c6d7e5;--grid: rgba(20, 40, 60, .08);--night: rgba(25, 40, 90, .085);--hover: brightness(.93)}*{box-sizing:border-box}html,body{margin:0;height:100%;background:var(--bg);overflow:hidden}button{font:inherit;color:inherit;cursor:pointer}#map{position:fixed;inset:0;width:100%;height:100%;touch-action:none;display:block}#map .sphere{fill:var(--ocean);stroke:var(--land-line);stroke-width:1px;vector-effect:non-scaling-stroke}#map .graticule{fill:none;stroke:var(--grid);stroke-width:.5px;vector-effect:non-scaling-stroke;pointer-events:none}.globe #map{cursor:grab}.shapes path,#map .marker{--fill: var(--land);fill:var(--fill);cursor:pointer;transition:fill .15s}#map .visited{--fill: var(--visited)}#map .often{--fill: var(--often)}#map .often.many{--fill: var(--many)}#map .often.lots{--fill: var(--lots)}#map .must{--fill: var(--must)}#map .wish{--fill: var(--wish)}#map .home{--fill: var(--home)}.shapes path{stroke:var(--land-line);stroke-width:.6px;vector-effect:non-scaling-stroke}@media(hover:hover)and (pointer:fine){.shapes path:hover{filter:var(--hover)}}.shapes path.selected{stroke:var(--select);stroke-width:2px}.shapes .part{stroke-width:.4px}.shapes path.disputed{stroke:var(--disputed-line);stroke-dasharray:2 2}#map .marker{stroke:var(--marker-line)}#map .marker.selected{stroke:var(--select)}.no-lines .shapes path:not(.selected){stroke:var(--fill);stroke-dasharray:none}.no-lines #map .marker:not(.selected){display:none}#bar{position:fixed;top:max(10px,env(safe-area-inset-top));left:12px;right:12px;display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:8px 12px;border-radius:14px;background:color-mix(in srgb,var(--panel) 90%,transparent);box-shadow:0 6px 20px var(--shadow)}#bar h1{margin:0;font-size:16px}#stats{display:flex;gap:6px;flex-wrap:wrap;flex:1;font-size:13px}.chip{padding:3px 10px;border-radius:99px;background:var(--panel-2);white-space:nowrap}.chip b{margin-right:4px}.chip.visited b{color:var(--visited-text)}.chip.must b{color:var(--must)}.chip.wish b{color:var(--wish-text)}#search{width:220px;max-width:100%;padding:8px 12px;border-radius:10px;border:1px solid var(--panel-2);background:var(--bg);color:var(--text);font:inherit;font-size:14px;outline:none}#search:focus{border-color:var(--accent)}.tool{width:36px;height:36px;border:0;border-radius:10px;background:var(--panel-2);display:grid;place-items:center;padding:0}.tool svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linejoin:round}.tool[aria-pressed=false]{opacity:.5}.tool:disabled{opacity:.3;cursor:default}#timeline-btn[aria-pressed=false],#night-btn[aria-pressed=false],#spin-btn[aria-pressed=false]{opacity:1}#night-btn[aria-pressed=true],#spin-btn[aria-pressed=true]{background:var(--text);color:var(--bg)}#spin-btn,.globe #projection-btn{display:none}.globe #spin-btn{display:grid}#map .night path,#map .night-band{fill:var(--night);stroke:none;pointer-events:none}#timeline-btn[aria-pressed=true]{background:var(--text);color:var(--bg)}#globe-btn[aria-pressed=false]{opacity:1}#globe-btn[aria-pressed=true]{background:var(--text);color:var(--bg)}#menu-btn{width:36px;height:36px;border:0;border-radius:10px;background:var(--panel-2);font-size:18px;line-height:1}#menu{position:absolute;top:calc(100% + 6px);right:0;display:flex;flex-direction:column;padding:6px;border-radius:12px;background:var(--panel);box-shadow:0 8px 24px var(--shadow)}#menu[hidden]{display:none}#menu button{border:0;background:none;padding:10px 14px;text-align:left;border-radius:8px;white-space:nowrap}#menu button:hover{background:var(--panel-2)}#panel{position:fixed;right:12px;bottom:max(12px,env(safe-area-inset-bottom));width:min(320px,calc(100% - 24px));padding:14px 16px;border-radius:14px;background:var(--panel);box-shadow:0 8px 24px var(--shadow)}#panel h2{margin:0;font-size:18px;display:flex;align-items:center;justify-content:space-between;gap:8px}#panel h2 button,#sheet h2 button{border:0;background:none;color:var(--muted);width:28px;height:28px;min-height:28px;padding:0;border-radius:6px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;transition:all .15s ease}#panel h2 button:hover,#sheet h2 button:hover{background:var(--panel-2);color:var(--text)}#panel h2 button svg,#sheet h2 button svg{display:block;width:14px;height:14px}#panel .sub{color:var(--muted);font-size:13px;margin:2px 0 12px}#panel .visits{display:flex;align-items:center;gap:10px;padding:8px 8px 8px 12px;margin-bottom:8px;border-radius:10px;background:var(--panel-2);font-size:14px}#panel .visits>i{width:16px;height:16px;border-radius:5px;flex:none;background:var(--land);box-shadow:inset 0 0 0 1px var(--land-line)}#panel .visits>span{flex:1;min-width:0}#panel .visits small{display:block;color:var(--muted);font-size:12px}#panel .visits button{width:36px;height:36px;border-radius:9px;border:1px solid var(--land-line);background:var(--panel);color:var(--text);font-size:20px;line-height:1}#panel .visits button:disabled{opacity:.35}#panel .country-trips{margin:-2px 0 10px 4px;color:var(--muted);font-size:13px}#panel .country-trips b{color:var(--text)}#panel .choices{display:grid;gap:8px}#panel .choice{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:10px;border:2px solid transparent;background:var(--panel-2);text-align:left;font-size:14px}#panel .choice i{width:16px;height:16px;border-radius:5px;flex:none;background:var(--land);box-shadow:inset 0 0 0 1px var(--land-line)}#panel .choice.on{border-color:var(--text)}#panel .trips{margin-top:14px}#panel h3{margin:0 0 6px;font-size:14px}#panel h3 span{color:var(--muted);font-weight:400}#panel ul{list-style:none;margin:0 0 8px;padding:0;font-size:14px}#panel li{display:flex;align-items:center;gap:8px;padding:2px 0}#panel li button,#timeline li button[data-trip]{margin-left:auto;border:0;background:none;color:var(--muted);font-size:17px;padding:0 4px}.age{color:var(--muted);font-size:12.5px}.date-form{display:flex;gap:6px;flex-wrap:wrap;align-items:center}.date-form input,.date-form select{min-width:0;padding:7px 8px;border-radius:8px;border:1px solid var(--panel-2);background:var(--bg);color:var(--text);font:inherit;font-size:14px}.date-form input[name=year]{width:74px}.date-form input[name=place]{flex:1 1 100%}.date-form button{padding:7px 12px;border:0;border-radius:8px;background:var(--panel-2);font-size:14px}#timeline{position:fixed;left:12px;bottom:max(12px,env(safe-area-inset-bottom));width:min(380px,calc(100% - 24px));max-height:60vh;display:flex;flex-direction:column;gap:10px;padding:14px 16px;border-radius:14px;background:var(--panel);box-shadow:0 8px 24px var(--shadow)}#timeline[hidden]{display:none}#timeline h2{margin:0;font-size:18px;display:flex;justify-content:space-between;gap:8px}#timeline h2 button{border:0;background:none;color:var(--muted);font-size:20px;padding:0 4px}#timeline .sub{margin:0;color:var(--muted);font-size:13px}#timeline .replay{display:flex;align-items:center;gap:10px}#timeline .play{width:36px;height:36px;flex:none;border:0;border-radius:50%;background:var(--text);color:var(--bg);font-size:13px}#timeline .speed{flex:none;padding:6px 8px;border:0;border-radius:8px;background:var(--panel-2);font-size:13px;font-weight:600;font-variant-numeric:tabular-nums}#timeline .follow{flex:none;width:30px;height:30px;padding:0;display:grid;place-items:center;border:0;border-radius:8px;background:var(--panel-2)}#timeline .follow svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}#timeline .follow[aria-pressed=true]{background:var(--text);color:var(--bg)}#timeline input[type=range]{flex:1;min-width:0;accent-color:var(--visited)}#timeline .when{width:136px;flex:none;white-space:nowrap;text-align:right;font-size:14px;font-weight:600;font-variant-numeric:tabular-nums}#timeline ol{list-style:none;margin:0;padding:0;overflow-y:auto;flex:1 1 auto;min-height:0;font-size:14px}#timeline li{display:flex;align-items:center;gap:8px;padding:3px 0;transition:opacity .3s}#timeline li.year{margin-top:6px;font-weight:600;font-size:13px;color:var(--muted)}#timeline li.later{opacity:.35}#timeline .go{border:0;background:none;padding:0;text-align:left}#timeline .go:hover{text-decoration:underline}#timeline .home-line{font-size:13px}#timeline .home-row i{width:10px;height:10px;border-radius:3px;flex:none}#timeline .born{font-size:13px;color:var(--muted);border-top:1px solid var(--panel-2);padding-top:10px}.timeline-mode #legend{display:none}.shapes path.fresh,.no-lines .shapes path.fresh,#map .marker.fresh{stroke:var(--accent);stroke-width:2px}.s-visited{background:var(--visited)!important}.s-often{background:var(--often)!important}.s-many{background:var(--many)!important}.s-lots{background:var(--lots)!important}.s-must{background:var(--must)!important}.s-wish{background:var(--wish)!important}.s-home{background:var(--home)!important}#tooltip{position:fixed;pointer-events:none;padding:5px 10px;border-radius:8px;background:var(--panel);font-size:13px;box-shadow:0 4px 12px var(--shadow)}#tooltip[hidden]{display:none}#legend{position:fixed;left:12px;bottom:max(12px,env(safe-area-inset-bottom));padding:8px 12px;border-radius:12px;background:color-mix(in srgb,var(--panel) 90%,transparent);font-size:12.5px}#legend summary{cursor:pointer;padding:4px 0;user-select:none}#legend button{display:flex;align-items:center;gap:8px;margin-top:4px;padding:3px 0;width:100%;border:0;background:none;text-align:left;font:inherit}#legend button[aria-pressed=false]{opacity:.4;text-decoration:line-through}#legend button:hover{opacity:.8}#legend i{width:12px;height:12px;border-radius:4px}#night-time{position:fixed;right:12px;width:min(620px,calc(100% - 24px));display:flex;align-items:center;gap:10px;padding:8px 12px;border-radius:12px;background:color-mix(in srgb,var(--panel) 90%,transparent);box-shadow:0 6px 20px var(--shadow);font-size:13px}#night-time[hidden]{display:none}#night-time .slider{flex:1;min-width:0}#night-time input{width:100%;margin:0;accent-color:var(--accent)}#night-time .ticks{display:flex;justify-content:space-between;font-size:11px;color:var(--muted)}#night-time .when{flex:none;width:150px;text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap;overflow:hidden}#night-time button{border:0;border-radius:8px;background:var(--panel-2);padding:5px 10px;font-size:13px}#night-time button:disabled{opacity:.4;cursor:default}body.in-space #bar,body.in-space #legend,body.in-space #timeline,body.in-space #night-time,body.in-space #panel{visibility:hidden}#space{position:fixed;inset:0;z-index:10;touch-action:none;color:#e8ecf2}#space[hidden]{display:none}#space canvas{position:absolute;inset:0;width:100%;height:100%;cursor:grab}#space canvas:active{cursor:grabbing}#space .back{position:absolute;top:max(14px,env(safe-area-inset-top));left:14px;padding:8px 14px;border:0;border-radius:10px;background:#ffffff24;color:inherit;font-size:14px;backdrop-filter:blur(4px)}#space .back:hover{background:#ffffff38}#space .info{position:absolute;left:50%;bottom:max(18px,env(safe-area-inset-bottom));transform:translate(-50%);display:grid;gap:2px;text-align:center;font-size:13px;pointer-events:none;width:max-content;max-width:calc(100% - 24px);opacity:0}#space .info b{font-size:17px}#space .info .hint{color:#8f9bb0;font-size:12px}#space .credit{position:absolute;right:10px;bottom:6px;font-size:10px;color:#5d6779;pointer-events:none}@media(max-width:640px){#space .credit{display:none}}#saved{position:fixed;left:50%;bottom:14px;transform:translate(-50%);padding:4px 12px;border-radius:99px;background:var(--panel);box-shadow:0 4px 12px var(--shadow);font-size:12px;color:var(--muted);white-space:nowrap;pointer-events:none;opacity:0;transition:opacity .4s}#saved:empty{display:none}@media(max-width:640px){#bar{gap:8px}#bar h1{display:none}#bar{justify-content:space-between}#search{order:2;flex:1 1 100%;width:auto;min-width:0}#stats{order:3;flex-basis:100%}#panel{left:12px;width:auto}#night-time{flex-wrap:wrap;row-gap:4px}#night-time .slider{order:2;flex-basis:100%}#night-time .when{flex:1;width:auto;min-width:0;text-align:left}body.panel-open #legend,body.panel-open #timeline{display:none}#timeline{right:12px;width:auto;max-height:46vh;gap:8px;padding:12px 14px}#timeline ol{min-height:60px}#timeline .replay{flex-wrap:wrap;row-gap:6px}#timeline .replay input[type=range]{order:5;flex-basis:100%}#timeline .when{margin-left:auto}.tool,#menu-btn{width:32px;height:32px}#bar{gap:6px}}#map-motion{position:fixed;inset:0;width:100%;height:100%;pointer-events:none}.date-form input[name=day]{width:62px}#panel li button[data-edit-trip],#timeline li button[data-edit-trip]{margin-left:auto;border:0;background:none;color:var(--muted);font-size:13px;padding:5px}#panel li button[data-trip],#timeline li button[data-trip]{margin-left:0}#panel li:has(.edit),#timeline li:has(.edit){display:block}.date-form.edit{width:100%;padding:6px 0}#panel li .date-form button{margin-left:0;padding:7px 12px;border-radius:8px;background:var(--panel-2);color:var(--text);font-size:14px}#stats button.chip{border:0;font:inherit}#stats button.chip:hover{filter:brightness(1.15)}#places-list{width:min(420px,calc(100% - 32px));max-height:75dvh;padding:16px;border:1px solid var(--panel-2);border-radius:14px;background:var(--panel);color:var(--text);box-shadow:0 8px 24px var(--shadow)}#places-list::backdrop{background:#0006}#places-list h2{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 12px;font-size:18px}#places-list [data-close]{border:0;background:none;width:28px;height:28px;min-height:28px;padding:0;border-radius:6px;display:inline-flex;align-items:center;justify-content:center;color:var(--muted);cursor:pointer;transition:all .15s ease}#places-list [data-close]:hover{background:var(--panel-2);color:var(--text)}#places-list [data-close] svg{display:block;width:14px;height:14px}#panel li button[data-trip],#sheet li button[data-trip]{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;min-height:22px;padding:0;border:0;border-radius:4px;background:transparent;color:var(--muted);cursor:pointer;vertical-align:middle}#panel li button[data-trip]:hover,#sheet li button[data-trip]:hover{background:var(--panel-2);color:var(--text)}#panel li button[data-trip] svg,#sheet li button[data-trip] svg{display:block;width:11px;height:11px}#places-list ul{list-style:none;margin:0;padding:0}#places-list li button{width:100%;padding:10px 12px;border:0;border-radius:8px;background:none;text-align:left}#places-list li button:hover,#places-list li button:focus-visible{background:var(--panel-2)}#places-list .empty{color:var(--muted)}.map-names text{text-anchor:middle;font-size:12px;font-weight:600;fill:var(--text);stroke:var(--bg);stroke-width:3px;paint-order:stroke;stroke-linejoin:round}.map-names text.current{fill:var(--accent);font-size:14px}#timeline .visit-names{display:flex;gap:7px;align-items:center;font-size:13px;color:var(--muted)}#timeline .visit-names input{accent-color:var(--visited)}body.in-space .map-names{visibility:hidden}.map-names{position:fixed;inset:0;width:100%;height:100%;pointer-events:none;overflow:hidden}.empires-link,.nations-link{display:inline-flex;align-items:center;gap:6px;color:var(--text);font-size:13px;text-decoration:none;padding:6px 12px;background:var(--panel-2);border-radius:999px;transition:all .15s ease}.empires-link:hover .empires-link-arrow,.nations-link:hover .nations-link-arrow{transform:translate(2.5px)}.empires-link-arrow,.nations-link-arrow{flex-shrink:0;transition:transform .15s ease}dialog.ask{width:min(380px,calc(100% - 32px));padding:18px;border:1px solid var(--panel-2);border-radius:14px;background:var(--panel);color:var(--text);box-shadow:0 8px 24px var(--shadow)}dialog.ask::backdrop{background:#0006}dialog.ask h2{margin:0 0 6px;font-size:17px;overflow-wrap:anywhere}dialog.ask p{margin:0 0 16px;color:var(--muted);font-size:14px}dialog.ask div{display:flex;justify-content:flex-end;gap:8px}dialog.ask button{padding:9px 16px;border-radius:10px;border:1px solid var(--panel-2);background:var(--panel-2);color:var(--text);font-weight:600}dialog.ask [data-yes]{background:var(--must);border-color:transparent;color:#fff}#timeline-btn.fab{position:fixed;right:12px;bottom:max(12px,env(safe-area-inset-bottom));width:48px;height:48px;border-radius:14px;background:var(--panel);color:var(--text);box-shadow:0 6px 20px var(--shadow);opacity:1}#timeline-btn.fab svg{width:22px;height:22px}#timeline-btn.fab[aria-pressed=true]{background:var(--text);color:var(--bg)}body.panel-open #timeline-btn.fab,body.in-space #timeline-btn.fab{display:none}@media(max-width:640px){.timeline-mode #timeline-btn.fab{display:none}}.read-only #menu-btn,.read-only #menu,.read-only .visits button,.read-only .date-form,.read-only [data-edit-trip],.read-only [data-trip],.read-only .home-line,.read-only .choices .choice:not(.on),.read-only .choices [data-status=""]{display:none!important}.read-only .choices .choice{pointer-events:none}
