/* County/City map with responsive slide panel */
.ckp-map{max-width:1280px;margin:20px auto;font-family:inherit}
.ckp-toolbar{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin-bottom:18px}
.ckp-toolbar select{margin-left:auto;padding:8px}
.ckp-back{border:1px solid #bbb;background:#fff;padding:8px 12px;border-radius:6px;cursor:pointer}
.ckp-back[hidden],.ckp-stage[hidden]{display:none!important}
.ckp-layout{display:grid;grid-template-columns:minmax(0,35fr) minmax(0,65fr);gap:28px;align-items:start}
.ckp-maps{width:100%;max-width:440px;margin:0 auto;min-width:0;position:relative;aspect-ratio:180 / 249;overflow:hidden}
.ckp-stage{position:absolute;inset:0;width:100%;height:100%}
.ckp-stage img{width:100%;height:100%;display:block;object-fit:fill}
.ckp-hit{position:absolute;inset:0;width:100%;height:100%}
.ckp-hit path{fill:transparent;stroke:transparent;stroke-width:1;cursor:pointer;pointer-events:all}
.ckp-hit path:hover,.ckp-hit path:focus,.ckp-hit path.active{fill:rgba(225,0,110,.25);stroke:#db006a;stroke-width:1.4;outline:none}
.ckp-media-panel{min-width:0;border:1px solid #e4e4e4;border-radius:12px;padding:18px;background:#fff;box-sizing:border-box}
.ckp-status{margin:0 0 16px;color:#555;overflow-wrap:anywhere}
.ckp-results{display:grid;grid-template-columns:minmax(0,1fr);gap:18px}
.ckp-results figure{margin:0;min-width:0}
.ckp-results img{display:block;width:100%;height:auto;border-radius:7px}
.ckp-results figcaption{font-size:12px;overflow-wrap:anywhere;margin-top:6px}
@media(max-width:800px){.ckp-layout{grid-template-columns:minmax(0,1fr)}.ckp-maps{max-width:540px}.ckp-media-panel{width:100%}}

/* Stable viewport: both source SVGs occupy the same fixed map frame.
   County is 180x249; City is 250x250 and is centered without distortion.
   The hit overlay uses the exact same bounds as its corresponding image. */
.ckp-city img{position:absolute;top:50%;left:0;width:100%;height:auto;aspect-ratio:1 / 1;transform:translateY(-50%)}
.ckp-city .ckp-hit{top:50%;left:0;right:auto;bottom:auto;width:100%;height:auto;aspect-ratio:1 / 1;transform:translateY(-50%)}
/* Animated County ↔ City map drilldown (v0.6.0) */
.ckp-maps.ckp-transitioning{overflow:hidden}
.ckp-maps.ckp-transitioning .ckp-stage{transition:transform 600ms cubic-bezier(.22,1,.36,1),opacity 600ms ease;will-change:transform,opacity}
.ckp-maps.ckp-transitioning .ckp-hit{pointer-events:none}
.ckp-maps.ckp-to-city .ckp-county{z-index:1;opacity:1;transform:scale(1)}
.ckp-maps.ckp-to-city .ckp-county.ckp-exit{opacity:0;transform:scale(2.1)}
.ckp-maps.ckp-to-city .ckp-city{z-index:2;opacity:1;transform:scale(1)}
.ckp-maps.ckp-to-city .ckp-city.ckp-enter{opacity:0;transform:scale(.78)}
.ckp-maps.ckp-to-city .ckp-city.ckp-arrived{opacity:1;transform:scale(1)}
.ckp-maps.ckp-to-county .ckp-city{z-index:2;opacity:1;transform:scale(1)}
.ckp-maps.ckp-to-county .ckp-city.ckp-exit{opacity:0;transform:scale(.78)}
.ckp-maps.ckp-to-county .ckp-county{z-index:1;opacity:1;transform:scale(1)}
.ckp-maps.ckp-to-county .ckp-county.ckp-enter{opacity:0;transform:scale(1.35)}
.ckp-maps.ckp-to-county .ckp-county.ckp-arrived{opacity:1;transform:scale(1)}
@media(prefers-reduced-motion:reduce){.ckp-maps.ckp-transitioning .ckp-stage{transition:none}}

/* CKP colours: source SVGs are filled, overlay remains transparent for interaction. */
.ckp-back:hover{border-color:#E6007E;color:#E6007E}
.ckp-hit path:focus-visible{stroke:#E6007E;stroke-width:2}

/* No empty metadata space above images. */
.ckp-status:empty{display:none}

/* Raw PNG metadata panel: the slide image and map layout are unchanged. */
.ckp-raw-metadata{border:1px solid #ddd;background:#f8f9fa;border-radius:6px;padding:10px;margin-bottom:10px;min-width:0}
.ckp-raw-metadata strong{display:block;font-size:12px;margin-bottom:6px}
.ckp-raw-metadata pre{font:11px/1.5 ui-monospace,SFMono-Regular,Consolas,monospace;white-space:pre-wrap;overflow-wrap:anywhere;max-height:320px;overflow:auto;margin:0}
