.agme { --agme-line:#d4d7da; --agme-bg:#fafafa; --agme-ink:#25282b; position:relative; margin:1em 0; font: 14px/1.4 system-ui,sans-serif; color:var(--agme-ink); }
.agme [hidden] {display:none!important}
.agme * {box-sizing:border-box}
.agme .agme-shell {position:relative; border:1px solid var(--agme-line); background:var(--agme-bg); border-radius:8px; overflow:hidden; display:flex; flex-direction:column; height:var(--agme-height,76vh); min-height:340px;}
.agme .agme-toolbar {display:flex; flex-wrap:wrap; align-items:center; gap:7px 12px; padding:9px; background:var(--agme-bg); border-bottom:1px solid var(--agme-line); flex:none;}
.agme .agme-title {font-size:14px; margin-right:auto;}
.agme .agme-group, .agme .agme-search {display:flex; align-items:center; gap:4px; flex-wrap:nowrap; margin:0; padding:0;}
.agme button,.agme .agme-download {font:inherit; color:var(--agme-ink); background:white; border:1px solid var(--agme-line); border-radius:5px; padding:6px 9px; min-height:34px; cursor:pointer; text-decoration:none; box-shadow:none; line-height:1.2; white-space:nowrap; text-transform:none;}
.agme button:disabled {opacity:.45; cursor:default}
.agme button[aria-pressed=true] {background:#374a58; border-color:#374a58; color:white;}
.agme button:focus-visible,.agme input:focus-visible,.agme a:focus-visible,.agme-viewport:focus-visible {outline:2px solid #176b9c; outline-offset:1px;}
.agme .agme-search {flex:1 1 280px; max-width:540px;}
.agme .agme-search input {flex:1; min-width:70px; width:100%; font:inherit; background:white; color:#222; border:1px solid var(--agme-line); border-radius:5px; padding:6px 8px; min-height:34px; margin:0;}
.agme .agme-count,.agme .agme-zoom {font:inherit; font-variant-numeric:tabular-nums; white-space:nowrap; min-width:36px; text-align:center;}
.agme .agme-viewport {position:relative; overflow:auto; overscroll-behavior:contain; background:#e0e3e4; flex:1; min-height:0; touch-action:none; cursor:grab; direction:ltr;}
.agme .agme-viewport.agme-dragging {cursor:grabbing; user-select:none;}
.agme .agme-stage {position:relative; overflow:hidden; background:white; margin:auto; isolation:isolate;}
.agme .agme-stage canvas {position:absolute; display:block; max-width:none!important; max-height:none!important; margin:0; pointer-events:none;}
.agme .agme-highlights {position:absolute; inset:0; pointer-events:none;}
.agme .agme-hit {position:absolute; border:2px solid #d87b00; background:rgba(255,210,0,.32); min-width:6px; min-height:6px; border-radius:3px;}
.agme .agme-footer {display:flex; flex-wrap:wrap; justify-content:space-between; gap:4px 12px; padding:5px 9px; border-top:1px solid var(--agme-line); font-size:12px; flex:none;}
.agme .agme-status {color:#555;}
.agme .agme-layer-panel {position:absolute; right:8px; top:70px; z-index:5; width:min(340px,95%); max-height:65%; overflow:auto; border:1px solid var(--agme-line); background:white; padding:12px; border-radius:6px; box-shadow:0 3px 15px #0002;}
.agme .agme-layer-list label {display:flex; gap:8px; align-items:flex-start; font:inherit; margin:5px 0; color:var(--agme-ink); overflow-wrap:anywhere;}
.agme .agme-layer-list input {margin:3px 0 0; flex:none;}
.agme .agme-shell:fullscreen,.agme .agme-shell.agme-full {height:100dvh; width:100%; border-radius:0; border:0;}
.agme .agme-shell.agme-full {position:fixed; inset:0; z-index:2147483000;}
@media(max-width:600px){.agme .agme-title{flex:1 1 100%}.agme .agme-tools{flex-wrap:wrap}.agme .agme-search{max-width:none}.agme .agme-help{font-size:11px}.agme .agme-layer-panel{top:115px}.agme .agme-toolbar{gap:5px;padding:6px}.agme .agme-shell{min-height:310px}}

/* Two compact, independent toolbars. No viewer heading. */
.agme .agme-shell {border-radius:0; background:#fff}
.agme .agme-toolbar,.agme .agme-footer {gap:5px 10px;padding:4px 8px; background:#fff; align-items:center; flex-wrap:wrap;}
.agme .agme-spacer {flex:1 1 0; min-width:0}
.agme .agme-toolbar button,.agme .agme-footer button,.agme .agme-download {border:0;background:transparent;border-radius:3px;min-height:30px;padding:5px 8px;display:inline-flex;align-items:center;justify-content:center;}
.agme .agme-toolbar button:hover:not(:disabled),.agme .agme-footer button:hover:not(:disabled),.agme .agme-download:hover {background:#eceff0;}
.agme .agme-toolbar button[aria-pressed=true] {background:#e3e8eb;color:#202b32;font-weight:600;}
.agme .agme-group {gap:0;}
.agme .agme-background,.agme .agme-language {border:1px solid #dce0e3;border-radius:4px;padding:1px;}
.agme .agme-search {flex:0 1 305px;gap:3px;min-width:150px;max-width:100%;}
.agme .agme-searchfield {display:flex;align-items:center;flex:1;min-width:0;border:1px solid #dce0e3;border-radius:4px;}
.agme .agme-searchfield input {border:0;min-height:30px;padding:3px 4px;min-width:50px;box-shadow:none;}
.agme .agme-searchnav {display:flex;align-items:center;white-space:nowrap;}
.agme svg {width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;}
.agme .agme-era {font:inherit;background:white;color:var(--agme-ink);border:1px solid #dce0e3;border-radius:4px;min-height:32px;padding:3px 4px;max-width:170px;margin:0;}
.agme .agme-era:disabled {opacity:.45;}
.agme .agme-footer {justify-content:flex-start;}
.agme .agme-status {font-size:11px;max-width:50%;}
.agme .agme-help {color:#777;font-size:11px;white-space:nowrap;}
.agme .agme-layer-panel {top:44px;border-radius:3px;}
.agme .agme-hit {border-color:#d75d00;background:rgba(255,185,0,.28);}
@media(max-width:750px){.agme .agme-search{flex:1 1 100%;max-width:none}.agme .agme-toolbar .agme-spacer{display:none}.agme .agme-toolbar{gap:4px}.agme .agme-background button,.agme .agme-language button{padding:5px 6px}.agme .agme-layer-panel{top:83px}.agme .agme-help{display:none}.agme .agme-era{max-width:125px}.agme .agme-footer .agme-status{order:5;max-width:100%}}

/* v0.3: preserve current map during a render; small, non-blocking progress indicator. */
.agme .agme-shell {height:min(var(--agme-height,76vh),var(--agme-available,100dvh));min-height:240px;}
.agme .agme-shell:fullscreen,.agme .agme-shell.agme-full {height:100dvh;min-height:0;}
.agme .agme-loading {position:absolute;z-index:4;left:50%;top:50%;transform:translate(-50%,-50%);display:flex;align-items:center;gap:10px;max-width:90%;padding:10px 15px;color:#25282b;background:#fffffff2;border:1px solid #dce0e3;border-radius:5px;box-shadow:0 2px 12px #0002;pointer-events:none;font-size:13px;white-space:nowrap;}
.agme .agme-hourglass {width:24px;height:24px;animation:agme-hourglass-turn 1.8s ease-in-out infinite;flex:none;}
@keyframes agme-hourglass-turn {0%,35%{transform:rotate(0deg)}55%,85%{transform:rotate(180deg)}100%{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.agme .agme-hourglass{animation:none}}
.agme .agme-stage {margin-inline:auto;}
.agme .agme-layer-list label {min-height:26px;align-items:center;}
.agme .agme-layer-list input {margin:0;}

/* v0.3.1 — compact layer popover anchored to the toolbar, not a floating window. */
.agme .agme-toolbar {position:relative;z-index:5;}
.agme .agme-toolbar [data-act=layers][aria-expanded=true] {background:#e3e8eb;color:#202b32;}
.agme .agme-layer-panel {top:calc(100% + 6px);right:8px;width:min(278px,calc(100% - 16px));max-height:max(110px,min(65vh,calc(var(--agme-available,100vh) - 110px),calc(var(--agme-height,76vh) - 110px)));padding:8px;background:#fff;border:1px solid #e0e4e6;border-radius:12px;box-shadow:0 5px 18px #17252e24;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;}
.agme .agme-shell:fullscreen .agme-layer-panel,.agme .agme-shell.agme-full .agme-layer-panel {max-height:65vh;}
.agme .agme-layer-heading {padding:6px 9px 8px;margin:0 0 3px;color:#53616a;font-size:11px;line-height:1.25;font-weight:650;letter-spacing:.06em;text-transform:uppercase;border-bottom:1px solid #edf0f1;}
.agme .agme-layer-list label {display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:12px;min-height:36px;padding:5px 9px;margin:0;font:500 13px/1.3 system-ui,sans-serif;color:#29343b;border-radius:6px;cursor:pointer;}
.agme .agme-layer-list label:hover,.agme .agme-layer-list label:focus-within {background:#f1f4f5;}
.agme .agme-layer-name {flex:1;min-width:0;overflow-wrap:anywhere;}
.agme .agme-layer-list input[type=checkbox] {appearance:none;-webkit-appearance:none;position:relative;display:inline-block;flex:none;width:32px;height:19px;min-width:32px;min-height:19px;border:1px solid #929da4;border-radius:999px;background:#aeb8be;margin:0;padding:0;box-shadow:none;cursor:pointer;vertical-align:middle;transition:background-color .12s,border-color .12s;}
.agme .agme-layer-list input[type=checkbox]::before {content:"";position:absolute;top:2px;left:2px;display:block;width:13px;height:13px;border-radius:50%;background:#fff;box-shadow:0 1px 2px #0002;transform:translateX(0);transition:transform .12s;}
.agme .agme-layer-list input[type=checkbox]:checked {background:#374a58;border-color:#374a58;}
.agme .agme-layer-list input[type=checkbox]:checked::before {transform:translateX(13px);}
.agme .agme-layer-list input[type=checkbox]:indeterminate {background:#667985;border-color:#667985;}
.agme .agme-layer-list input[type=checkbox]:indeterminate::before {transform:translateX(6.5px);}
@media (prefers-reduced-motion:reduce){.agme .agme-layer-list input[type=checkbox],.agme .agme-layer-list input[type=checkbox]::before{transition:none}}
@media (forced-colors:active){.agme .agme-layer-list input[type=checkbox]{appearance:auto;-webkit-appearance:auto; width:19px;min-width:19px;forced-color-adjust:auto;}.agme .agme-layer-list input[type=checkbox]::before{display:none;}}

/* Native WordPress-style PDF fallback. Direct links remain available on phones. */
.agme .agme-native {margin:0;width:100%;}
.agme .agme-native-object {display:block;width:100%;height:min(var(--agme-height,76vh),80vh);min-height:240px;border:0;background:transparent;}
.agme .agme-native-links {display:flex;gap:16px;flex-wrap:wrap;justify-content:flex-end;padding:6px 2px;font-size:13px;}
@media(max-width:600px){.agme .agme-native-object{height:60vh;}}
/* Optional place cards, independent of the map surface. */
.agme .agme-place-panel{position:absolute;top:48px;right:8px;z-index:6;width:min(315px,calc(100% - 16px));max-height:calc(100% - 100px);overflow:auto;overscroll-behavior:contain;background:white;color:#29343b;border:1px solid #dce0e3;border-radius:12px;box-shadow:0 5px 18px #17252e24;padding:12px;font:13px/1.4 system-ui,sans-serif;}
.agme .agme-place-header{display:flex;justify-content:space-between;gap:10px;align-items:center;font-size:18px;line-height:1.2;}
.agme .agme-place-header button{border:0;min-width:32px;font-size:20px;padding:2px;}
.agme .agme-place-greek{font-size:16px;color:#53616a;margin:2px 0 5px;}
.agme .agme-place-meta{font-size:11px;color:#53616a;margin:6px 0;overflow-wrap:anywhere;}
.agme .agme-timemark{width:100%;height:auto;max-height:290px;display:block;margin:8px auto;overflow:visible;}
.agme .agme-place-location{border-top:1px solid #e0e4e6;padding-top:9px;margin-top:8px;}
.agme .agme-place-resources{display:grid;gap:5px;border-top:1px solid #e0e4e6;padding-top:9px;margin-top:9px;}
.agme .agme-place-resources a{color:#38586a;text-decoration:underline;overflow-wrap:anywhere;}
.agme .agme-place-result{display:block;width:100%;text-align:left;white-space:normal;margin:5px 0;}
@media(max-width:750px){.agme .agme-place-panel{top:83px;max-height:calc(100% - 135px);width:min(290px,calc(100% - 16px));}}

.agme .agme-viewport.agme-label-hover:not(.agme-dragging) {cursor:pointer;}

/* v1.2.2: calibrated cartographic rose with labels on their own arcs. */
.agme .agme-human-toggle{gap:5px;font-weight:600;}
.agme .agme-human-layer{position:absolute;inset:0;z-index:3;pointer-events:none;}
.agme .agme-human-tool{position:absolute;left:0;top:0;pointer-events:none;z-index:3;}
.agme .agme-human-ring{position:absolute;border-radius:50%;transform:translate(-50%,-50%);background:none;pointer-events:none;border:1.5px dotted currentColor;z-index:0;}
.agme .agme-human-ring.land,.agme .agme-human-arc-text.land{color:#3d6468;}
.agme .agme-human-ring.sea,.agme .agme-human-arc-text.sea{color:#0766c9;}
.agme .agme-human-ring.visibility,.agme .agme-human-arc-text.visibility{color:#487d98;}
.agme svg.agme-human-arc-labels{position:absolute;transform:translate(-50%,-50%);z-index:2;display:block;max-width:none!important;max-height:none!important;overflow:visible;pointer-events:none;fill:none;stroke:none;}
.agme .agme-human-arc-text{font-family:Arial,Helvetica,sans-serif;font-weight:700;letter-spacing:0;fill:currentColor;stroke:none;pointer-events:none;}
.agme button.agme-human-handle{position:absolute;left:0;top:0;transform:translate(-50%,-50%);width:28px;height:28px;min-height:0;padding:0;border:0;background:transparent;box-shadow:none;display:flex;align-items:center;justify-content:center;pointer-events:auto;cursor:grab;touch-action:none;border-radius:50%;}
.agme button.agme-human-handle:hover,.agme button.agme-human-handle:focus-visible{background:#ffffff88;outline:1px solid #487d98;}
.agme button.agme-human-handle.agme-dragging{cursor:grabbing;}
.agme .agme-human-anchor{width:9px;height:9px;border-radius:50%;background:#2360a0;border:1.5px solid #fff;box-shadow:0 0 0 1px #2360a0;pointer-events:none;}
@media(max-width:750px){.agme .agme-human-toggle span{display:none}}

/* v1.2.6: automatic feathered rose veil, below all measurements. */
.agme .agme-human-backdrop{position:absolute;transform:translate(-50%,-50%);border-radius:50%;pointer-events:none;z-index:0;background:radial-gradient(circle closest-side,rgba(255,255,255,.45) 0%,rgba(255,255,255,.45) 90%,rgba(255,255,255,0) 100%);}
.agme .agme-human-ring{z-index:1;border-width:2px;}
.agme .agme-human-arc-text{stroke:#fffffff0;stroke-linejoin:round;paint-order:stroke fill;}
