/* Scoped to the town overview. Panel chrome and world controls keep their owners. */
.kt-town-map { --map-ink: #675473; --map-quiet: #796e80; min-width: 0; }
.kt-map-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
#panel .kt-map-heading h2 { margin-right: 0; margin-bottom: 5px; font-size: 24px; }
.kt-map-location { flex: 0 1 230px; max-width: 42%; color: #785b89; font-size: 11px; line-height: 1.6; text-align: right; }
#panel .kt-town-map .kt-map-instructions { font-size: 12px; line-height: 1.6; margin: 8px 0 14px; }
.kt-map-scroll { overflow-x: auto; overflow-y: hidden; max-width: 100%; border: 2px solid #b8c5b2; border-radius: 18px; background: #c4e0e7; box-shadow: inset 0 0 0 3px #fbfae799, 0 3px 0 #e5ded1; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #b3b7ae #e9efdc; touch-action: pan-x pan-y; }
.kt-map-canvas { position: relative; width: 100%; min-width: max(760px, 47.5rem); height: 22.5rem; min-height: 360px; isolation: isolate; }
.kt-map-terrain { display: block; position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.kt-map-compass { position: absolute; top: calc(51% - 10px); display: grid; place-items: center; width: 22px; height: 22px; background: #fff7dcd9; color: #958a68; border: 1px solid #c3bea0; border-radius: 50%; font-size: 9px; font-weight: 700; }
.kt-map-west { left: 9px; }.kt-map-east { right: 9px; }
.kt-map-marker { position: absolute; top: 7%; width: 7rem; min-width: 112px; min-height: 7.0625rem; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 4px 3px 6px; background: transparent; border: 2px solid transparent; border-radius: 19px; transform: translateX(-50%); color: var(--map-ink); -webkit-tap-highlight-color: transparent; }
.kt-map-marker[data-map-row="1"] { top: 54%; }
.kt-map-landmark { display: block; width: 90px; height: 74px; overflow: visible; filter: drop-shadow(0 2px 0 #ffffff80); transition: transform .15s ease; }
.kt-map-name { display: block; max-width: 6.5rem; padding: 3px 6px; background: #fffaf0ed; border: 1px solid #cdc3ae; border-radius: 8px; color: #655274; text-align: center; font-size: .6875rem; font-weight: 700; line-height: 1.4; box-shadow: 0 2px 0 #a5b89533; }
.kt-map-marker.is-preview { background: #fffcf450; border-color: #9f7bb2; box-shadow: 0 0 0 3px #fff7dd99; }
.kt-map-marker.is-preview .kt-map-name { background: #86639e; border-color: #78558e; color: #fffdf8; }
.kt-map-marker:hover .kt-map-landmark, .kt-map-marker:focus-visible .kt-map-landmark { transform: translateY(-3px); }
.kt-map-marker:hover .kt-map-name, .kt-map-marker:focus-visible .kt-map-name { box-shadow: 0 3px 0 #a5b89555; }
#panel .kt-map-marker:active:not(:disabled) { transform: translateX(-50%); }
.kt-map-here { display: none; position: absolute; top: -16px; left: 50%; transform: translateX(-50%); white-space: nowrap; border: 1px solid #a76d86; border-radius: 12px; padding: 3px 8px; background: #fff2f2; color: #90556f; font-size: 9px; font-weight: 700; line-height: 1.3; }
.kt-map-here::after { content: ''; position: absolute; width: 6px; height: 6px; background: #fff2f2; border-right: 1px solid #a76d86; border-bottom: 1px solid #a76d86; left: calc(50% - 3px); bottom: -4px; transform: rotate(45deg); }
.kt-map-marker.is-current .kt-map-here { display: block; }
.kt-map-visited { display: none; position: absolute; top: 60px; right: 6px; width: 19px; height: 19px; align-items: center; justify-content: center; color: #51765c; background: #eff7db; border: 1px solid #a6c197; border-radius: 50%; }
.kt-map-marker.is-visited .kt-map-visited { display: flex; }
.kt-map-key { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 17px; padding: 10px 4px 5px; font-size: 10px; color: #746c76; }
.kt-map-key > span { display: inline-flex; align-items: center; gap: 5px; }
.kt-map-key .town-icon { color: #63836b; }
.kt-map-key-here { width: 9px; height: 9px; background: #ce91ac; border: 1px solid #ac768e; border-radius: 50%; }
.kt-map-key .kt-map-swipe { display: none; margin-left: auto; color: #87788c; }
.kt-map-preview { display: flex; align-items: baseline; flex-wrap: wrap; gap: 3px 7px; min-height: 37px; padding: 7px 4px 11px; color: #81708a; font-size: 11px; line-height: 1.5; }
.kt-map-preview > .town-icon { align-self: center; color: #9e82b0; }
.kt-map-preview b { color: #765d84; font-weight: 700; }
.kt-map-picker { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 2px 12px; color: #796680; font-size: 11px; }
.kt-map-picker select { min-width: 0; max-width: 100%; min-height: 42px; padding: 8px 11px; border: 1px solid #d4c4df; border-radius: 9px; background: #fffaf4; color: #745c83; font-size: 12px; }
.kt-map-detail { border: 1px solid #d7c5df; border-radius: 14px; background: #fbf5fc; overflow: hidden; }
.kt-map-detail-top { display: flex; align-items: center; gap: 13px; padding: 16px; }
.kt-map-selection-icon { flex: none; display: grid; place-items: center; width: 48px; height: 48px; background: #ece2f4; border: 1px solid #d5c2e2; border-radius: 15px; color: #9a7fad; }
.kt-map-selection-copy { flex: 1 1 230px; min-width: 0; }
.kt-map-state { display: block; color: #846c8d; font-size: 10px; line-height: 1.5; margin-bottom: 3px; }
#panel .kt-town-map .kt-map-selection-copy h3 { margin: 0; font-size: 18px; line-height: 1.35; overflow-wrap: anywhere; }
#panel .kt-town-map .kt-map-selection-copy p { margin: 5px 0 0; font-size: 11px; line-height: 1.6; }
#panel .kt-town-map .kt-map-go { flex: 0 1 225px; display: flex; align-items: center; justify-content: center; gap: 8px; width: auto; min-width: 175px; min-height: 48px; margin: 0; padding: 11px 13px; font-size: 12px; line-height: 1.5; }
.kt-map-go span { overflow-wrap: anywhere; }
.kt-map-places { padding: 13px 16px 15px; border-top: 1px solid #e6d9eb; background: #fffaf5; }
.kt-map-place-group { display: flex; flex-wrap: wrap; gap: 7px; }
.kt-map-place { display: inline-flex; align-items: center; gap: 7px; min-height: 42px; max-width: 100%; padding: 8px 10px; background: #fff8e9; border: 1px solid #dfd4bc; border-radius: 9px; color: #7b6676; font-size: 11px; line-height: 1.4; text-align: left; }
.kt-map-place .town-icon { color: #ad8e9e; }
.kt-map-place[aria-pressed="true"] { background: #efe3f4; border-color: #b297c3; color: #755583; }
.kt-map-place:hover { border-color: #b59bbf; }
#panel .kt-town-map .kt-map-status { margin: 10px 2px 0; min-height: 19px; color: #866d84; font-size: 11px; line-height: 1.6; }
@media (max-width: 860px) {
  .kt-map-key .kt-map-swipe { display: inline-flex; }
  .kt-map-heading { gap: 10px; }
  .kt-map-detail-top { flex-wrap: wrap; gap: 10px; }
  .kt-map-selection-copy { flex-basis: calc(100% - 63px); }
  #panel .kt-town-map .kt-map-go { flex-basis: 100%; width: 100%; }
}
@media (max-width: 560px) {
  .kt-map-heading { display: block; }
  #panel .kt-map-heading h2 { font-size: 22px; }
  .kt-map-location { display: block; max-width: none; margin-top: 7px; font-size: 11px; text-align: left; }
  .kt-map-canvas { height: 21.75rem; min-height: 348px; }
  .kt-map-marker { top: 8%; }
  .kt-map-marker[data-map-row="1"] { top: 54%; }
  .kt-map-key { gap: 7px 11px; }
  .kt-map-key .kt-map-swipe { flex-basis: 100%; margin-left: 0; }
  .kt-map-preview { min-height: 49px; font-size: 11px; }
  .kt-map-preview > span { flex-basis: 100%; }
  .kt-map-detail-top { padding: 13px; }
  .kt-map-selection-icon { width: 41px; height: 41px; }
  .kt-map-selection-copy { flex-basis: calc(100% - 52px); }
  #panel .kt-town-map .kt-map-selection-copy h3 { font-size: 17px; }
  .kt-map-places { padding: 11px 12px; }
  .kt-map-place-group { gap: 6px; }
  .kt-map-place { flex: 1 1 100%; min-height: 44px; }
}
@media (max-height: 540px) and (min-width: 600px) {
  #panel .kt-map-heading h2 { font-size: 21px; }
  #panel .kt-town-map .kt-map-instructions { margin-bottom: 10px; }
  .kt-map-canvas { height: 20.25rem; min-height: 324px; }
  .kt-map-landmark { width: 79px; height: 64px; }
  .kt-map-marker { min-height: 6.3125rem; }
  .kt-map-marker[data-map-row="1"] { top: 53%; }
  .kt-map-visited { top: 53px; }
}
@media (prefers-reduced-motion: reduce) {
  .kt-map-landmark { transition: none; }
}
