@import url("map-travel.css");
/* World map: calm modern chrome, a large play area and a compact fixed sidebar. */
.main:has(.screen--map) { padding: 0; background: #f7f1e5; }
.screen--map { max-width: none; min-height: 100%; display: flex; flex-direction: column; }
.world-map-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 13px 22px; border-bottom: 1px solid #cdbd9e; }
.world-map-toolbar h1 { margin: 0; font: 600 25px/1.2 var(--serif); white-space: nowrap; }
.map-search { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 180px; max-width: 500px; margin: 0; border: 1px solid #c6b99e; border-radius: 5px; background: #fffcf6; padding: 0 10px; }
.map-search > span { font: 25px/1 var(--sans); color: #6e6251; }
.map-search input { width: 100%; min-width: 0; height: 36px; border: 0; padding: 7px 0; outline-offset: 3px; background: none; color: var(--ink); font-size: 14px; }
.map-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.map-filters button { background: #fffaf0; color: #64533e; border: 1px solid #c9b99a; border-radius: 5px; min-height: 34px; padding: 5px 13px; font-size: 13px; }
.map-filters button[aria-pressed="true"] { background: var(--garnet); border-color: var(--garnet); color: #fff8e7; }
.screen--map .map-layout { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0,1fr) 330px; gap: 0; align-items: stretch; }
.screen--map .map-view { height: max(540px,calc(100dvh - 214px)); min-height: 0; border: 0; border-right: 1px solid #bca77f; border-radius: 0; background: #869251; }
.map-view::after { box-shadow: inset 0 0 35px #252b1b20; border-radius: 0; }
.map-view:focus-visible { outline: 3px solid var(--gold); outline-offset: -3px; }
.map-rulers { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.map-rulers text { font: 11px var(--sans); fill: #fbf1d9; font-variant-numeric: tabular-nums; }
.map-ruler-bands rect { fill: #302b20f2; }
.map-axis-label path { stroke: #b8a682; stroke-width: 1; }
.map-axis-letter text { fill: #dfc28a; font-weight: 650; font-size: 10px; }
.map-ruler-border-mark { stroke: #e4a478; stroke-width: 3; }
.map-continents { pointer-events: none; }
.map-continent-halo { fill: none; stroke: #f9eacdcc; stroke-width: 5; }
.map-continent-border { fill: none; stroke: #9d4030; stroke-width: 2.5; stroke-dasharray: 9 5; }
.map-continent-badge rect { fill: #fff3dfe8; stroke: #8d3e2d; stroke-width: 1; }
.map-continent-badge text { fill: #79382b; font-weight: 700; font-size: 12px; }
.map-sidebar { padding: 12px; gap: 12px; display: flex; flex-direction: column; background: #f6efe1; min-width: 0; }
.map-sidebar .panel { background: #fffaf1; border: 1px solid #cdbd9e; border-radius: 6px; box-shadow: none; overflow: hidden; }
.map-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 11px 12px 8px; }
.map-panel-heading h2 { font: 600 20px/1.2 var(--serif); margin: 0; white-space: nowrap; }
.map-grid-toggle { display: flex; align-items: center; gap: 4px; color: #73654e; font-size: 12px; }
.map-grid-toggle input { accent-color: var(--garnet); }
.map-overview-map { position: relative; margin: 0 10px; }
.map-overview .map-minimap { margin: 0; width: 100%; border: 1px solid #9c9666; border-radius: 3px; padding: 0; background: #869251; aspect-ratio: 2 / 1; cursor: crosshair; }
.map-minimap svg { width: 100%; height: 100%; display: block; }
.map-centre { padding: 0; position: absolute; right: 5px; bottom: 5px; background: #2b3024bf; border-radius: 3px; color: #fff4d6; padding: 2px 5px; font-size: 10px; pointer-events: none; }
.map-coordinate-form { padding: 9px 11px 11px; display: flex; align-items: center; gap: 10px; }
.map-coordinate-form label { display: flex; flex-direction: row; align-items: center; gap: 5px; font-size: 12px; color: #4e422e; }
.map-coordinate-form input { width: 75px; font-size: 13px; min-height: 30px; padding: 4px 6px; border: 1px solid #cabb9d; border-radius: 4px; background: #fffcf6; color: var(--ink); }
.map-coordinate-form button { margin-left: auto; min-height: 30px; padding: 4px 13px; background: var(--garnet); color: #fff7e8; border: 0; border-radius: 4px; }
.map-selection-heading { padding: 13px 12px 0; display: flex; align-items: flex-start; gap: 8px; }
.map-selection-heading h2 { margin: 0; font: 600 21px/1.15 var(--serif); overflow-wrap: anywhere; }
.map-selection-heading p { margin: 4px 0 0; font-size: 12px; color: #7d6a4f; }
.map-selection-heading > svg { flex-shrink: 0; }
.map-selection-coords { margin-left: auto; white-space: nowrap; color: #77674e; font-size: 10px; padding-top: 3px; }
.map-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 14px; margin: 12px; padding-top: 12px; border-top: 1px solid #ded3bd; }
.map-stats > div { min-width: 0; }
.map-stats dt { font-size: 11px; color: #7b6a51; }
.map-stats dd { margin: 1px 0 0; font-size: 13px; font-weight: 550; overflow-wrap: anywhere; }
.map-actions { display: flex; gap: 6px; margin: 12px; }
.map-actions .btn { display: flex; flex: 1; align-items: center; justify-content: center; gap: 4px; min-height: 36px; padding: 6px; font-size: 12px; }
.map-actions .btn--red { background: var(--garnet); border-color: var(--garnet); }
.map-panel-heading select { max-width: 110px; padding: 4px; border: 1px solid #cfbea0; border-radius: 4px; background: #fffaf1; color: #66543c; font-size: 11px; }
.map-nearby .holding-list { max-height: 245px; padding: 0 6px 6px; }
.holding-row { display: flex; gap: 5px; padding: 10px 6px; font-size: 12px; min-height: 42px; }
.holding-row__name { flex: 1; min-width: 0; text-align: left; overflow-wrap: anywhere; }
.holding-row__name small { display: block; color: #8a7c66; font-size: 10px; }
.holding-row__points { color: #7a6951; font-size: 10px; white-space: nowrap; }
.holding-row__dist { font-size: 11px; min-width: 48px; text-align: right; white-space: nowrap; }
.map-sidebar .map-legend { display: flex; flex-wrap: wrap; gap: 7px 12px; padding: 0 3px; font-size: 11px; letter-spacing: 0; }
.map-legend > span { display: flex; align-items: center; gap: 3px; }
.map-tier-note { margin: -3px 3px 0; color: #85765d; font-size: 11px; line-height: 1.5; }
.map-label__name { font: 600 11px var(--sans); fill: #332b1c; }
.map-label { pointer-events: none; }
.holding__art { filter: drop-shadow(0 2px 2px #21341644); }
.holding.is-protected .holding__art { filter: grayscale(.95) opacity(.48); }
.holding.is-selected .sel-ring, .holding:focus-visible .sel-ring { display: block; }
.sel-ring { stroke: #f5d37b; fill: #e2c3650c; stroke-width: 1.8; stroke-dasharray: none; animation: none; }
.map-controls { right: 42px; bottom: 74px; gap: 5px; }
.map-controls button { width: 34px; height: 34px; border-radius: 4px; background: #fff9e9; font-size: 23px; }
.map-footer { position: absolute; bottom: 40px; left: 42px; right: 88px; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 6px; pointer-events: none; }
.map-continent-indicator { padding: 4px 7px; border: 1px solid #d5b47b; border-radius: 3px; background: #302b20e8; color: #f7db9e; font-size: 11px; font-weight: 650; }
.map-hint { position: static; padding: 4px 7px; font-size: 10px; border-radius: 3px; background: #2d3326b8; }
.map-scale { display: flex; flex-direction: column-reverse; align-items: center; gap: 3px; padding: 5px 8px; color: #fff8e3; background: #2d3326a6; border-radius: 3px; }
.map-scale > span { display: block; height: 6px; border-left: 1px solid #fff8e3; border-right: 1px solid #fff8e3; border-bottom: 1px solid #fff8e3; }
.map-scale small { font-size: 10px; }
.map-no-results { position: absolute; left: 50%; top: 40%; transform: translateX(-50%); padding: 15px 20px; background: #fff8e9ed; border-radius: 6px; color: #5b4b34; font-size: 14px; text-align: center; }
.map-empty { padding: 12px; margin: 0; font-size: 13px; color: #7b6a51; }
.map-view:fullscreen { height: 100dvh; width: 100vw; border: 0; }
@media(min-width:1500px) { .screen--map .map-layout { grid-template-columns: minmax(0,1fr) 360px; } .map-nearby .holding-list { max-height: 330px; } }
@media(max-width:1080px) { .screen--map .map-layout { grid-template-columns: minmax(0,1fr) 300px; } .world-map-toolbar { gap: 10px; padding: 12px; } .world-map-toolbar h1 { font-size: 22px; } .map-filters button { padding: 5px 9px; } .map-selection-coords { display: none; } .map-panel-heading h2 { font-size: 18px; } .map-coordinate-form input { width: 65px; } .map-sidebar { padding: 9px; gap: 9px; } }
@media(max-width:760px) { .screen--map .map-layout { display: flex; flex-direction: column; } .screen--map .map-view { height: 58dvh; min-height: 390px; border-right: 0; } .map-sidebar { display: grid !important; grid-template-columns: 1fr 1fr !important; align-items: start; } .world-map-toolbar h1 { font-size: 21px; } .map-filters { margin-left: 0; width: 100%; } .map-search { min-width: 160px; } .map-nearby { grid-column: 1 / -1; } .map-nearby .holding-list { max-height: 235px; } .map-tier-note { margin: 0; } .map-scale { display: none; } }
@media(max-width:480px) { .map-sidebar { display: flex !important; } .map-overview .map-minimap { aspect-ratio: 2.5 / 1; } .map-sidebar .panel { width: 100%; } .world-map-toolbar { gap: 10px; } .map-search { flex-basis: 100%; order: 2; max-width: none; } .map-filters { order: 3; gap: 5px; } .map-filters button { flex: 1; padding: 5px 6px; font-size: 12px; } .screen--map .map-view { min-height: 360px; height: 55dvh; } .map-sidebar { padding: 12px; } }
@media(prefers-reduced-motion:reduce) { .map-label, .holding__art { transition: none; } .march__line { animation: none; } }
/* Override the legacy two-card tablet sidebar layout. */
.screen--map .map-layout > .map-sidebar { display: flex; flex-direction: column; grid-template-columns: none; }
@media (max-width:760px) { .screen--map .map-layout > .map-sidebar { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); } }
@media (max-width:480px) { .screen--map .map-layout > .map-sidebar { display: flex; } }
@media(min-width:761px) {
  .main:has(.screen--map) { overflow: hidden; }
  .screen--map { height: 100%; min-height: 0; }
  .world-map-toolbar { flex-shrink: 0; }
  .screen--map .map-view { height: 100%; min-height: 0; }
  .screen--map .map-sidebar { min-height: 0; overflow-y: auto; }
  .map-sidebar .panel { flex-shrink: 0; }
}
/* The selection marks the occupied gameplay square, not an arbitrary art radius. */
.holding.is-selected .holding__hit { fill: #f0ce6b18; }
.holding .sel-ring { vector-effect: non-scaling-stroke; stroke-width: 2px; }
.holding__art { pointer-events: none; }

/* Village addresses remain visible at every viewport size. */
.map-selection-heading { flex-wrap: wrap; }
.map-selection-coords { display: block; flex-basis: 100%; padding: 5px 0 0 29px; margin-left: 0; font-size: 11px; }
