/* Swordland map, shared by the planner and the player page. */
/* Map */
.sl-map { position: relative; aspect-ratio: 800 / 665; border-radius: 14px; overflow: hidden; border: 1px solid #6b5524; box-shadow: var(--shadow), inset 0 0 60px rgba(0,0,0,.6); user-select: none; }
.sl-terrain { position: absolute; inset: 0; width: 100%; height: 100%; }
.sl-zone { position: absolute; transform: translate(-50%, -50%); font: 800 clamp(28px, 5vw, 56px) var(--font-display); opacity: .22; pointer-events: none; }
.sl-zone.zA { color: #4fd1c5; } .sl-zone.zB { color: #e3a144; } .sl-zone.zC { color: #b98ae6; }
.sl-cellar { position: absolute; transform: translate(-50%, 0); font-size: 9px; color: #9ed69a; opacity: .75; letter-spacing: .04em; text-transform: uppercase; pointer-events: none; }
.sl-spawn { position: absolute; width: 22px; height: 22px; transform: translate(-50%, -50%) rotate(45deg); border: 2px solid var(--c); background: color-mix(in srgb, var(--c) 30%, transparent); box-shadow: 0 0 14px var(--c); }
.sl-marker { position: absolute; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 6px; padding: 3px 8px 3px 3px; border-radius: 99px; background: rgba(15,18,24,.88); border: 1px solid #6b5524; box-shadow: 0 4px 14px rgba(0,0,0,.5); cursor: pointer; white-space: nowrap; z-index: 2; }
.sl-marker:hover { border-color: var(--gold); z-index: 3; }
.sl-marker.mine { border-color: var(--ok); box-shadow: 0 0 0 2px rgba(95,191,131,.5), 0 4px 14px rgba(0,0,0,.5); }
.sl-map.editing .sl-marker, .sl-map.editing .sl-spawn { cursor: move; outline: 1px dashed var(--gold-2); outline-offset: 3px; }
.sl-mk-icon { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(160deg, #3a2f1d, #1c170f); border: 1px solid #8a6f30; color: var(--gold-2); flex: none; }
.sl-mk-icon svg { width: 16px; height: 16px; }
.sl-marker.t-shrine .sl-mk-icon { width: 34px; height: 34px; background: linear-gradient(160deg, var(--gold-2), #9c7a2c); color: var(--gold-ink); }
.sl-marker.t-shrine .sl-mk-icon svg { width: 20px; height: 20px; }
.sl-marker.t-sanctum .sl-mk-icon { border-color: var(--gold); }
.sl-mk-body { display: grid; line-height: 1.15; }
.sl-mk-body b { font-size: 11px; font-weight: 600; color: var(--text); }
.sl-mk-body small { font-size: 10px; color: var(--muted); }
@media (max-width: 700px) { .sl-mk-body small { display: none; } .sl-mk-body b { font-size: 9px; } }


/* Player page */
.sl-joblist { margin: 0 0 12px; padding-left: 18px; display: grid; gap: 4px; }
.sl-joblist li.lead { color: var(--gold-2); font-weight: 600; }
.sl-player-map { max-width: 560px; }

.sl-marches { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.sl-march { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); }
.sl-march .n { width: 26px; height: 26px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; background: #34405a; color: #dfe6f3; }
.sl-march b { display: block; font-size: 14px; }
.sl-march small { display: block; color: var(--muted); font-size: 12px; }
.sl-march.lead { border-color: var(--gold); background: rgba(216,178,90,.08); }
.sl-march.lead .n { background: var(--gold); color: var(--gold-ink); }
.sl-march.vacant { border-style: dashed; opacity: .8; }
.sl-march.vacant .n { background: transparent; border: 1px dashed var(--muted); color: var(--muted); }
.sl-march.over { border-color: var(--bad); }
.sl-march .sl-mk-icon { width: 28px; height: 28px; }

.sl-march.sub { border-color: #9aa3b2; }
.sl-march.sub .n { background: #5a6475; }

/* Game map underneath: labels sit just below each building so the art stays visible */
.sl-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; pointer-events: none; }
.sl-marker { transform: translate(-50%, 35%); padding: 2px 8px 2px 2px; background: rgba(15,18,24,.82); backdrop-filter: blur(2px); }
.sl-marker .sl-mk-icon { width: 20px; height: 20px; }
.sl-marker .sl-mk-icon svg { width: 12px; height: 12px; }
.sl-marker.t-shrine .sl-mk-icon { width: 24px; height: 24px; }
.sl-marker.t-shrine .sl-mk-icon svg { width: 15px; height: 15px; }
.sl-zone { opacity: .55; text-shadow: 0 2px 8px rgba(0,0,0,.8); }

/* Game map tinted toward the site palette: deeper, warmer, slight gold */
.sl-bg { filter: sepia(.25) saturate(.8) brightness(.72) contrast(1.08) hue-rotate(-6deg); }

.sl-zone { opacity: .9; font-size: clamp(30px, 5vw, 60px); -webkit-text-stroke: 1px rgba(15,18,24,.6); }

/* Garrison lead under each building */
.sl-mk-body b { display: flex; align-items: center; gap: 5px; }
.sl-mk-n { font-size: 9px; font-weight: 600; color: var(--muted); }
.sl-mk-lead { margin-top: 2px; font-size: 11px; font-weight: 700; color: var(--gold-ink); background: linear-gradient(180deg, var(--gold-2), var(--gold)); border-radius: 4px; padding: 0 5px; justify-self: start; }
.sl-mk-lead.none { background: rgba(224,106,95,.25); color: #ffb3ab; font-weight: 600; }
@media (max-width: 700px) { .sl-mk-lead { font-size: 9px; } }
/* Undercellar badges, one per zone */
.sl-cellars { position: absolute; transform: translate(-50%, -50%); z-index: 2; padding: 3px 10px; border-radius: 99px; font-size: 11px; font-weight: 700;
  background: rgba(15,18,24,.85); border: 1px solid #7cc46e; color: #a9e6a0; cursor: pointer; }
.sl-cellars:hover { background: rgba(124,196,110,.25); }

/* Loot team shown on one undercellar pile per zone */
.sl-cellars { display: grid; gap: 1px; text-align: left; transform: translate(-50%, 25%); max-width: 130px; padding: 3px 9px; border-radius: 8px; border-color: var(--zc); }
.sl-cellars b { font-size: 10px; color: var(--zc); white-space: nowrap; }
.sl-cellars span { font-size: 11px; font-weight: 600; color: var(--text); white-space: normal; line-height: 1.25; }
@media (max-width: 700px) { .sl-cellars span { display: none; } }
/* Building picker on the map */
.sl-pick { position: absolute; z-index: 20; width: 230px; padding: 8px 10px 10px; border-radius: 12px; background: var(--panel, #fff8e8); color: var(--text); border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(0,0,0,.35); display: grid; gap: 6px; }
.sl-pick header { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.sl-pick header b { font-size: 14px; }
.sl-pick-x { border: 0; background: transparent; font-size: 18px; line-height: 1; cursor: pointer; color: var(--muted); padding: 0 2px; }
.sl-pick label { display: grid; grid-template-columns: 62px 1fr; align-items: center; gap: 6px; margin: 0; font-size: 12px; font-weight: 700; }
.sl-pick select { width: 100%; padding: 3px 6px; font-size: 12px; }
.sl-pick-card { justify-self: start; }
.sl-legions .sl-out { font-size: 11px; }
.sl-legions .sl-out.on { background: #6b7480; color: #fff; }
.sl-showass { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; margin: 0; font-size: 12px; font-weight: 700; color: var(--muted); }
.sl-showass input { width: auto; margin: 0; }
