/* Shared illustrated world, independent of the player's Keno appearance.
 * Only map/village surfaces are targeted. Text, hit targets and status are DOM,
 * not part of a painting. Loaded after the older appearance frame styles. */

/* ---------- Full-width district landscapes ---------- */
.candy-map .map-viewport { background: #c3dda2; }
.candy-map .map-world { box-shadow: none; }
.candy-map .map-district { background: none; }
.candy-map .map-terrain, .candy-map .map-terrain-join {
  position: absolute; inset: 0; background-color: var(--d-floor, #b6d84b);
  background-position: center top; background-repeat: repeat-y;
  background-size: var(--terrain-width) var(--terrain-period);
  pointer-events: none;
}
.candy-map .map-terrain-region { bottom: auto; }
.candy-map .map-terrain-join { bottom: auto; z-index: 0; background-color: transparent; }
.candy-map .map-district { z-index: 1; }
.candy-map .map-ground { background: none; }
.candy-map .map-layer-bg {
  inset: 0; will-change: auto; background: none;
}
.candy-map .map-layer-fg { will-change: auto; background: none; }
.candy-map .map-world-cap {
  z-index: 2; height: 115px; background: #fff2cf; mask: none;
  border-bottom: 5px solid #c99862; border-radius: 0 0 48% 48%;
  box-shadow: 0 7px 0 #785f4244;
}
.candy-map .map-world-entrance { background: none; }
.candy-map .map-world-start span {
  color: #60310e; background: #fff2cd; border: 2px solid #d6a344; box-shadow: 0 4px 0 #80501e;
}
.candy-map .map-path-shadow { stroke: #69411f; stroke-opacity: .35; stroke-width: 49; transform: translateY(6px); }
.candy-map .map-path-svg { overflow: hidden; }
.candy-map .map-path-track { stroke: #efc982; stroke-width: 44; }
.candy-map .map-path-dash { stroke: #fff0c6; stroke-opacity: .9; stroke-width: 30; stroke-dasharray: 6 4; stroke-linecap: butt; }
.candy-map .map-path-paint { stroke: #dfa336; stroke-width: 29; }
.candy-map .map-path-gloss { stroke: #ffeaae; stroke-width: 5; stroke-opacity: .7; transform: translateX(-3px); }
.candy-map .map-building-art { filter: none; }
.candy-map .map-building .cv-art { width: 100%; height: 100%; }
.candy-map .map-plaque {
  bottom: 6%; max-width: 100%; min-width: 0; border: 2px solid #fff3ce;
  border-radius: 7px; padding: 3px 8px; background: #fff2d4; box-shadow: 0 3px 0 #956337;
}
.candy-map .map-plaque-name { color: #583719; white-space: normal; overflow: visible; font-size: .72rem; }
.candy-map .map-district-sign {
  background: linear-gradient(#ffefbe, #f3cc7e); border: 3px solid #fff4d3;
  box-shadow: 0 5px 0 #8e5526, 0 8px 14px #56321033; border-radius: 10px;
}
.candy-map .map-district-sign-kicker, .candy-map .map-district-sign-name { color: #673816; }
.candy-map .map-node-bead {
  border: 3px solid #fff4d4; background: linear-gradient(#f5eddb, #c8bda8);
  box-shadow: 0 6px 0 #8b7761, 0 9px 10px #462e2a55;
}
.candy-map .map-node-num { color: #4e493f; font-size: 1.12rem; text-shadow: none; }
.candy-map .map-node.is-locked .map-node-bead { filter: none; }
.candy-map .map-node.is-available .map-node-bead {
  background: linear-gradient(#a4e957, #53b534); border-color: #fff6ce;
  box-shadow: 0 6px 0 #28682a, 0 0 0 4px #fdd45a, 0 10px 12px #35432366;
  animation: none;
}
.candy-map .map-node.is-available .map-node-num { color: #153916; }
.candy-map .map-node.is-available .map-node-tag { color: #284416; background: #fff7dc; border-color: #d0a247; }
.candy-map .map-node.is-purchased .map-node-bead {
  background: linear-gradient(#ffe78e, #e9ad31); border-color: #fff4d1;
  box-shadow: 0 6px 0 #92602b, 0 9px 10px #462e2a44;
}
.candy-map .map-node.is-purchased .map-node-num { color: #5b3716; text-shadow: none; }
.candy-map .map-node-liquid { background: transparent; }
.candy-map .map-node-wave, .candy-map .map-node-sparkle { display: none; animation: none; }
.candy-map .map-node.is-purchased .map-node-star { opacity: 1; }
.candy-map .map-node.is-available .map-node-halo { animation-duration: 3s; }
.candy-map .map-fog { z-index: 4; pointer-events: none; background: none; }
.candy-map .map-fog.is-opaque { pointer-events: none; }
.candy-map .map-fog-half {
  /* The two halves crop the SAME 760px world texture, with genuine radial
     falloffs, no uniform veil, and no per-district radial-gradient restart.
     Mask only the decoration: labels and stop/focus layers stay unmasked. */
  background-image:
    radial-gradient(ellipse 46% 24% at 5% 24%, #f5fbfff2 12%, #dceaf0b3 45%, #eaf4fa00 100%),
    radial-gradient(ellipse 42% 30% at 94% 42%, #f5fbfff2 8%, #dceaf0bf 48%, #eaf4fa00 100%),
    radial-gradient(ellipse 40% 22% at 17% 78%, #f5fbffe6 14%, #dceaf099 50%, #eaf4fa00 100%),
    radial-gradient(ellipse 38% 22% at 76% 98%, #f5fbffe0 8%, #dceaf099 48%, #eaf4fa00 100%),
    radial-gradient(ellipse 38% 22% at 76% -2%, #f5fbffe0 8%, #dceaf099 48%, #eaf4fa00 100%),
    radial-gradient(ellipse 68% 42% at 44% 48%, #e9f3fa80 10%, #e9f3fa45 52%, #e9f3fa00 100%),
    radial-gradient(ellipse 64% 40% at 52% 0%, #e9f3fa66 10%, #e9f3fa00 100%),
    radial-gradient(ellipse 64% 40% at 52% 100%, #e9f3fa66 10%, #e9f3fa00 100%);
  background-size: var(--fog-width) 760px;
  background-position: 0 var(--fog-y);
  background-repeat: repeat-y;
  mask-image: linear-gradient(to bottom,
    rgb(0 0 0 / var(--fog-top)) 0,
    rgb(0 0 0 / var(--fog-density)) 200px,
    rgb(0 0 0 / var(--fog-density)) calc(100% - 200px),
    rgb(0 0 0 / var(--fog-bottom)) 100%);
}
.candy-map .map-fog-half.is-right { background-position-x: var(--fog-right-x); transform: none; }
.candy-map .map-fog.is-clear { visibility: hidden; }
.candy-map .map-fog-label { top: 50%; max-width: min(40%, 320px); font-size: .82rem; background: #fff7e4; color: #473b30; box-shadow: 0 3px 0 #a69171; }
.candy-map .map-nodes { z-index: 6; }
.candy-map .map-district.is-offscreen *, .candy-map .map-district.is-offscreen *::after { animation-play-state: paused !important; }
.candy-map .map-mascot-svg { filter: drop-shadow(0 3px 0 #70412644); }

/* ---------- Truly different stage cutouts & harmless failure silhouettes ---------- */
.cv-art { aspect-ratio: 1; position: relative; display: block; width: 100%; }
.cv-art > .cv-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
  filter: none !important; opacity: 1; user-select: none; pointer-events: none;
}
.cv-art .cv-fallback { display: none; position: absolute; inset: 0; }
.cv-art.is-art-failed .cv-fallback { display: block; }
.cv-fallback-base {
  position: absolute; left: 12%; right: 12%; bottom: 11%; height: 24%;
  border-radius: 40%; background: #cfac76; border: 3px solid #755135; box-shadow: 0 6px 0 #94703c;
}
.cv-fallback-walls { position: absolute; left: 24%; right: 24%; bottom: 25%; height: 42%; background: var(--cv-cream); border: 4px solid var(--cv-deep); border-radius: 12px 12px 5px 5px; }
.cv-stage-0 .cv-fallback-walls, .cv-stage-0 .cv-fallback-roof, .cv-stage-1 .cv-fallback-roof, .cv-stage-2 .cv-fallback-roof { display: none; }
.cv-stage-1 .cv-fallback-walls { height: 22%; background: repeating-linear-gradient(90deg, #bb844a 0 8%, transparent 8% 42%); }
.cv-fallback-roof { position: absolute; left: 16%; right: 16%; bottom: 65%; height: 23%; border-radius: 50% 50% 10% 10%; background: var(--cv-accent); border: 3px solid var(--cv-deep); }

/* ---------- Scene-first village: two rear and two front ground-contact plots ---------- */
html body[data-theme] #districtMap.is-village .village-host {
  background: radial-gradient(ellipse at top, #fff7d6aa, transparent 70%), #b8dadd;
}
html body[data-theme] #districtMap .candy-village {
  max-width: 1080px; min-height: 100%; flex: 1 0 auto; gap: 10px; padding: 12px 24px 16px;
  color: #46321e; --v-focus: #153e68;
}
html body[data-theme] #districtMap .village-title { padding: 5px 30px 7px; border-radius: 8px; max-width: 100%; }
html body[data-theme] #districtMap .village-kicker { font-size: .68rem; letter-spacing: .06em; }
html body[data-theme] #districtMap .village-name { font-size: clamp(1.05rem, 2.7vw, 1.4rem); }
html body[data-theme] #districtMap .village-meter { max-width: 560px; gap: 6px; }
html body[data-theme] #districtMap .village-meter-label { font-size: .8rem; }
html body[data-theme] #districtMap .village-stagewrap {
  --v-frame-top: 0px; --v-frame-bottom: 22px;
  container-type: inline-size; display: block; flex: none;
  min-height: calc(324px + var(--v-frame-bottom)); padding: 0 0 var(--v-frame-bottom);
}
html body[data-theme] #districtMap .candy-village .village-scene,
html body[data-theme] #districtMap .candy-village.is-complete .village-scene {
  width: 100%; max-width: 940px; margin: 0 auto; aspect-ratio: auto; min-height: 324px;
  border-radius: 28px; background: radial-gradient(ellipse at 50% 30%, #e6e7a4, #82b45a);
  box-shadow: 0 0 0 5px #fff5d5, 0 10px 0 6px #95603a, 0 18px 22px #54331633;
}
html body[data-theme] #districtMap .village-paint-img {
  inset: 0 !important; width: 100% !important; height: 100% !important;
  object-fit: cover; object-position: 50% 48%; filter: none;
}
html body[data-theme] #districtMap .village-vignette { background: radial-gradient(ellipse, transparent 56%, #653d2422); }
html body[data-theme] #districtMap .village-light { opacity: .25; }
html body[data-theme] #districtMap .village-plots {
  position: relative; inset: auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 5%; row-gap: 16px; padding: 28px 8% 32px; align-items: end;
}
html body[data-theme] #districtMap .village-plot {
  position: relative; left: auto !important; top: auto !important; z-index: 2 !important;
  transform: none !important; width: 100%; min-width: 44px; min-height: 44px;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; border-radius: 14px;
}
html body[data-theme] #districtMap .village-plot:focus-visible { z-index: 200 !important; }
html body[data-theme] #districtMap .village-plot-stage {
  width: min(100%, clamp(150px, 23vh, 216px)); aspect-ratio: 1;
}
html body[data-theme] #districtMap .village-plot-art { inset: 0; }
html body[data-theme] #districtMap .village-plot .cv-img { transform: none; }
/* Never flip the light direction. Alternate stops shift the clearing's crop. */
html body[data-theme] #districtMap .village-scene.is-mirrored .village-paint-img { transform: none; object-position: 58% 56%; }
html body[data-theme] #districtMap .village-plaque {
  position: relative; top: auto; left: auto; transform: none; margin-top: -6%;
  width: 100%; max-width: 218px; min-height: 64px; padding: 5px 7px;
  gap: 3px; border: 2px solid #fff8dd; border-radius: 10px;
  background: linear-gradient(#fffbed, #f8e4b9); box-shadow: 0 4px 0 #a6753e, 0 6px 8px #52341533;
}
html body[data-theme] #districtMap .village-plot.is-affordable .village-plaque { border-color: #fff8dd; box-shadow: 0 4px 0 #98692e, 0 6px 8px #52341533; }
html body[data-theme] #districtMap .village-plaque-name {
  white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere;
  font-size: .9rem; line-height: 1.1; color: #583616;
}
html body[data-theme] #districtMap .village-plaque-row,
html body[data-theme] #districtMap .village-plot.is-max .village-plaque-row {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 4px;
}
html body[data-theme] #districtMap .village-plaque-level {
  display: inline; color: #6c4221; font-size: .67rem; letter-spacing: .02em; text-transform: none;
}
html body[data-theme] #districtMap .village-pip { width: 14px; height: 14px; background: #9c8252; }
html body[data-theme] #districtMap .village-pip.is-on { background: linear-gradient(#ffe37a, #e7a600); }
html body[data-theme] #districtMap .village-plaque-cost {
  font-size: .91rem; padding: 3px 9px 3px 5px; gap: 4px; line-height: 1.1;
  background: #a91e65; color: #fff; box-shadow: 0 2px 0 #6e1045;
}
html body[data-theme] #districtMap .village-plot.is-short .village-plaque-cost { background: #f6dfeb; color: #741146; box-shadow: 0 2px 0 #bb81a0; }
html body[data-theme] #districtMap .village-plaque-cost .village-brick { width: 18px; height: 18px; }
html body[data-theme] #districtMap .village-cost-unit { font-size: .74em; font-weight: 500; }
html body[data-theme] #districtMap .village-hammer,
html body[data-theme] #districtMap .village-plot.is-right .village-hammer,
html body[data-theme] #districtMap .village-plot:is([data-index="2"], [data-index="3"]) .village-hammer {
  width: 44px; min-width: 44px; max-width: 44px; height: 44px; right: 0; left: auto; top: 18%;
  padding: 5px; border-radius: 12px; background: linear-gradient(#a7e759, #55b638);
  box-shadow: 0 4px 0 #276329, 0 0 0 2px #fff7d0; transform: rotate(6deg); animation: none; filter: none;
}
html body[data-theme] #districtMap .village-hammer-svg { filter: drop-shadow(0 1px 0 #fff9); }
html body[data-theme] #districtMap .village-plot.is-suggested .village-hammer { animation: worldHammer 3.8s ease-in-out infinite; }
html body[data-theme] #districtMap .village-plot.is-unavailable .village-hammer { filter: grayscale(.8); opacity: .85; transform: none; animation: none; }
html body[data-theme] #districtMap .village-hammer-lock { right: -2%; bottom: -2%; }
html body[data-theme] #districtMap .village-plot-mat { animation: none; }
html body[data-theme] #districtMap .village-mote:nth-child(n+4) { display: none; }
html body[data-theme] #districtMap .village-done { position: relative; top: auto; padding: 0 25px 16px; }
html body[data-theme] #districtMap .village-done-ribbon { font-size: .88rem; color: #fff; }
html body[data-theme] #districtMap .village-lockveil { background: #ffffff33; backdrop-filter: none; }
html body[data-theme] #districtMap .village-lockveil-tag { align-self: start; margin-top: 10px; }
html body[data-theme] #districtMap .candy-village.is-gate .village-scene::before { display: none; }
html body[data-theme] #districtMap .village-status { font-size: .85rem; color: #34382a; text-shadow: none; padding: 0 6px; }
html body[data-theme] #districtMap .village-note { max-width: 100%; font-size: .85rem; color: #6e253d; border-color: #dabd92; }
@keyframes worldHammer { 0%, 80%, 100% { transform: rotate(6deg); } 88% { transform: rotate(-10deg); } 93% { transform: rotate(10deg); } }

@media (max-width: 600px) {
  html body[data-theme] #districtMap .map-toolbar { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; }
  html body[data-theme] #districtMap .map-toolbar > .map-toolbar-title { grid-column: 1 / -1; grid-row: 2; }
  html body[data-theme] #districtMap .map-toolbar > #mapBack { grid-column: 1; grid-row: 1; justify-self: start; }
  html body[data-theme] #districtMap .map-toolbar > .map-toolbar-actions { grid-column: 2; grid-row: 1; }
  html body[data-theme] #districtMap .candy-village { padding: 8px 12px 14px; gap: 10px; }
  html body[data-theme] #districtMap .village-title { padding: 5px 20px 7px; }
  html body[data-theme] #districtMap .village-title::before { left: 5px; width: 10px; }
  html body[data-theme] #districtMap .village-title::after { right: 5px; width: 10px; }
  html body[data-theme] #districtMap .village-plots { padding: 22px 5% 25px; column-gap: 7%; row-gap: 20px; }
  html body[data-theme] #districtMap .village-plaque { margin-top: -8%; padding: 5px 4px; }
  html body[data-theme] #districtMap .village-plaque-name { font-size: .8rem; }
  html body[data-theme] #districtMap .village-plaque-row { gap: 2px; }
  html body[data-theme] #districtMap .village-plaque-level { font-size: .64rem; }
  html body[data-theme] #districtMap .village-hammer { right: 0; top: 14%; }
  html body[data-theme] #districtMap .village-meter { flex-wrap: wrap; border-radius: 12px; }
  html body[data-theme] #districtMap .village-meter-bar { min-width: 50px; }
  .candy-map .map-fog-label { max-width: 48%; font-size: .75rem; padding: 6px; }
  .candy-map .map-plaque-name { font-size: .64rem; }
}
/* Enlarged text remains in natural grid flow, with a minimum 44px hit area.
   Long plaques add row height instead of colliding with the next roof. */
@media (max-width: 360px) {
  html body[data-theme] #districtMap .village-head { padding: 2px 0; }
  html body[data-theme] #districtMap .village-title { padding: 6px 8px; }
  html body[data-theme] #districtMap .village-title::before,
  html body[data-theme] #districtMap .village-title::after { display: none; }
  html body[data-theme] #districtMap .village-plots { padding-left: 5%; padding-right: 5%; }
}
@media (prefers-reduced-motion: reduce) {
  html body[data-theme] #districtMap .village-plot.is-suggested .village-hammer { animation: none; }
}
body.fx-reduced-motion #districtMap .village-plot.is-suggested .village-hammer { animation: none !important; }
@media (forced-colors: active) {
  html body[data-theme] #districtMap .village-host,
  html body[data-theme] #districtMap .village-scene { background: Canvas; box-shadow: none; border: 2px solid CanvasText; }
  html body[data-theme] #districtMap :is(.village-title, .village-meter, .village-plaque, .village-plaque-cost, .village-done-ribbon) {
    background: Canvas; color: CanvasText; border: 2px solid CanvasText; box-shadow: none;
  }
  html body[data-theme] #districtMap :is(.village-plaque-name, .village-plaque-level, .village-name, .village-kicker, .village-status, .village-note) { color: CanvasText; text-shadow: none; }
  html body[data-theme] #districtMap .village-pip { background: GrayText; }
  html body[data-theme] #districtMap .village-pip.is-on { background: Highlight; }
  .candy-map .map-path-track { stroke: CanvasText; }
  .candy-map .map-node-bead { background: Canvas; border: 3px solid ButtonText; }
  .candy-map .map-node.is-available .map-node-bead { border: 5px double Highlight; }
  .candy-map .map-node .map-node-num { color: ButtonText; text-shadow: none; }
  .candy-map .map-terrain, .candy-map .map-fog { opacity: .2; }
  html body[data-theme] #districtMap .village-plot:focus-visible { outline-color: Highlight !important; }
}
/* ============ Keno Quest construction cues & village frame ============
   Timber stakes with brass caps, hemp rope, wooden crates, gold-and-teal ribbons.
   Replaces the retired striped-stick / gumdrop / pink-ribbon cues from village.css. */
html body[data-theme] #districtMap .cv-ground::before { border-color: #b8864a; background: color-mix(in srgb, #f3dcaa 50%, transparent); }
html body[data-theme] #districtMap .cv-stake { border-radius: 2px; background: linear-gradient(90deg, #e2a35e, #a8692e 60%, #6e3d14); box-shadow: 0 1px 0 #4e2108; }
html body[data-theme] #districtMap .cv-stake::before { border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff3a6 0 18%, #ffc934 45%, #b9760c); }
html body[data-theme] #districtMap .cv-rope { background: repeating-linear-gradient(90deg, #d8b27a 0 5px, #a8814a 5px 8px); }
html body[data-theme] #districtMap .cv-pole { border-radius: 2px; background: linear-gradient(90deg, #e2a35e, #8a4f1e); box-shadow: 0 1px 2px #4e210855; }
html body[data-theme] #districtMap .cv-signpost { background: linear-gradient(#a8692e, #6e3d14) 50% 100% / 14% 60% no-repeat; }
html body[data-theme] #districtMap .cv-signpost::before { background: #fff4d8; border-color: #b8864a; box-shadow: 0 2px 0 #6e3d14; }
html body[data-theme] #districtMap .cv-plank { background: linear-gradient(180deg, #e8b070, #c47a3a 60%, #8a4f1e); box-shadow: 0 2px 0 #5a2c0c; }
html body[data-theme] #districtMap .cv-crate { border-radius: 3px; background: repeating-linear-gradient(90deg, #c88a4a 0 6px, #b0743a 6px 7px); border: 2px solid #6e3d14; box-shadow: 0 2px 0 #4e2108; }
html body[data-theme] #districtMap .cv-body .cv-img,
html body[data-theme] #districtMap .cv-stage-3 .cv-body .cv-img { filter: drop-shadow(0 6px 4px #3a2a1a40); }
html body[data-theme] #districtMap .cv-stage-2 .cv-body .cv-img { filter: saturate(.9) drop-shadow(0 5px 3px #3a2a1a38); }
html body[data-theme] #districtMap .cv-flag { background: linear-gradient(90deg, #fff3a6, #8a5000); }
html body[data-theme] #districtMap .cv-flag::after { background: #0f8f8a; }
html body[data-theme] #districtMap .cv-flag::before { background: #0f8f8a44; }
html body[data-theme] #districtMap.is-village .village-host { background: linear-gradient(180deg, #8fe6ff, #c9f2ff 40%, #e9f5d8); }
html body[data-theme] #districtMap .candy-village .village-scene { box-shadow: 0 0 0 5px #fff4d8, 0 0 0 8px #ffc934, 0 11px 0 8px #8a3f14, 0 20px 26px #3a2a1a40; }
html body[data-theme] #districtMap .candy-village.is-complete .village-scene { box-shadow: 0 0 0 5px #fff4d8, 0 0 0 8px #ffe27a, 0 0 0 11px #0f8f8a, 0 14px 0 11px #075452, 0 22px 28px #3a2a1a44; }
html body[data-theme] #districtMap .candy-village .village-vignette { background: radial-gradient(130% 110% at 50% 45%, transparent 70%, #3a2a1a26); }
html body[data-theme] #districtMap .candy-village :is(.village-kicker, .village-name, .village-meter-label) { color: #3a1a06; text-shadow: 0 1px 0 #fff8; }
html body[data-theme] #districtMap .candy-village :is(.village-back, .village-next) { border-color: #ffc934; background: #fff4d8; color: #4e2108; box-shadow: 0 0 0 2px #4e2108, 0 4px 0 #4e2108; }
html body[data-theme] #districtMap .candy-village .village-next { background: linear-gradient(180deg, #5fe3d2, #0f8f8a); color: #fff; text-shadow: 0 1px 0 #075452; }
html body[data-theme] #districtMap .candy-village .village-meter-bar { background: #fff4d8; box-shadow: inset 0 2px 3px #8a3f1433; }
html body[data-theme] #districtMap .candy-village .village-meter-fill { background: repeating-linear-gradient(-45deg, #ffc934 0 8px, #ffe27a 8px 16px); }
html body[data-theme] #districtMap .candy-village .village-plaque-cost { background: linear-gradient(180deg, #ffa874, #d9673a); color: #fff; box-shadow: 0 2px 0 #7e2c12; }
html body[data-theme] #districtMap .candy-village .village-plot.is-short .village-plaque-cost { background: #ece6df; color: #5d5246; box-shadow: 0 2px 0 #b7aa98; }
html body[data-theme] #districtMap .candy-village .village-plot.is-affordable .village-plaque { border-color: #ffc934; box-shadow: 0 0 0 2px #0f8f8a, 0 4px 0 #075452; }
html body[data-theme] #districtMap .candy-village .village-done-ribbon { background: linear-gradient(180deg, #ffd34a, #d98b0c); color: #4e2108; border-color: #fff4d8; box-shadow: 0 4px 0 #8a3f14; }
html body[data-theme] #districtMap .candy-village .village-status { color: #3a1a06; }
.candy-map .map-viewport { background: #a9dc7a; }
@media (forced-colors: active) {
  html body[data-theme] #districtMap :is(.cv-stake, .cv-rope, .cv-pole, .cv-crate, .cv-plank) { forced-color-adjust: auto; }
}

/* ============ Quest route remake: rounded cobble trail, gold-rimmed medallions,
   carved timber signs. Route/node/gate/sign/entrance only. ============ */
@media (forced-colors: none) {
.candy-map .map-path-shadow { stroke: #3a1d0e; stroke-opacity: .32; stroke-width: 56; transform: translateY(7px); }
.candy-map .map-path-track { stroke: #b88c5c; stroke-width: 48; }
.candy-map .map-path-dash { stroke: var(--quest-route-stone, #f4dfb4); stroke-opacity: 1; stroke-width: 40; stroke-dasharray: none; stroke-linecap: round; }
.candy-map .map-path-paint { stroke: var(--quest-route-earned, #ffc934); stroke-width: 40; stroke-opacity: 1; }
.candy-map .map-path-gloss { stroke: #fff6c8; stroke-width: 2; stroke-opacity: .3; transform: translate(-2px, -3px); }

.candy-map .map-node-bead {
  border: 3px solid #fff4d8;
  background: radial-gradient(80% 44% at 50% 10%, #ffffffb0 0 40%, transparent 42%), radial-gradient(circle at 50% 60%, #ece3d2, #bfb19a 70%, #998a74);
  box-shadow: 0 0 0 3px #4a3a2c, inset 0 -5px 0 #6e5d4a55, 0 6px 0 3px #4a3a2c, 0 11px 10px #2a140844;
}
.candy-map .map-node-num { color: #4a3a2c; font-weight: 800; text-shadow: 0 1px 0 #fff8; }
.candy-map .map-node.is-available .map-node-bead {
  background: radial-gradient(80% 44% at 50% 10%, #ffffffc0 0 40%, transparent 42%), linear-gradient(180deg, #99ed6a, #398c30 30%, #237b28 55%, #155d22);
  border-color: #eaffcf;
  box-shadow: 0 0 0 3px #145c12, 0 0 0 7px #f7c23c, 0 0 0 9px #3a1d0e, 0 7px 0 9px #3a1d0e, 0 14px 14px 6px #2a140844;
}
.candy-map .map-node.is-available .map-node-num { color: #fff; text-shadow: 0 2px 0 #145c12; }
.candy-map .map-node.is-purchased .map-node-bead {
  background: radial-gradient(80% 44% at 50% 10%, #fffbe0d0 0 40%, transparent 42%), radial-gradient(circle at 40% 35%, #fff2b0, #f7c23c 55%, #b97a10);
  border-color: #fff8d8;
  box-shadow: 0 0 0 3px #5a3300, inset 0 -4px 0 #8a500055, 0 6px 0 3px #5a3300, 0 11px 10px #2a140844;
}
.candy-map .map-node.is-purchased .map-node-num { color: #5a3300; text-shadow: 0 1px 0 #fffbe0; }
.candy-map .map-node-shine { top: 6px; left: 16%; width: 68%; height: 8px; border-radius: 50%; background: #ffffff8c; transform: none; }
.candy-map .map-node.is-gate .map-node-gate-mark { color: #3a1d0e; background: linear-gradient(#fff2b0, #f7c23c); border-color: #3a1d0e; }
.candy-map .map-node.is-available .map-node-tag {
  color: #3a0631; background: linear-gradient(180deg, #fff4e6, #f6d49c); border: 2px solid #fff8ef;
  box-shadow: 0 0 0 2px #8a1667, 0 3px 0 2px #3a0631;
}
.candy-map .map-node-tag::before, .candy-map .map-node-tag::after { background: #d6338f; }

.candy-map .map-district-sign {
  padding: 8px 18px 9px; border-radius: 12px; overflow-wrap: anywhere;
  background: radial-gradient(110% 16% at 50% 0%, #ffffff60 0 40%, transparent 42%), repeating-linear-gradient(180deg, transparent 0 13px, #50270c22 13px 14px), linear-gradient(180deg, #a3652e, #73421d 20%, #603313 78%, #48220b);
  border: 3px solid #f7c23c;
  box-shadow: 0 0 0 3px #3a1d0e, inset 0 -4px 0 #4e210855, 0 6px 0 3px #3a1d0e, 0 14px 16px #2a140844;
}
.candy-map .map-district-sign::before, .candy-map .map-district-sign::after {
  content: ""; position: absolute; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fffbe0 0 18%, #f7c23c 45%, #b97a10 80%); box-shadow: 0 1px 0 #3a1d0e;
}
.candy-map .map-district-sign::before { left: 5px; }
.candy-map .map-district-sign::after { right: 5px; }
.candy-map .map-district-sign-kicker { color: #fff2b0; text-shadow: 0 1px 0 #3a1d0e; }
.candy-map .map-district-sign-name { color: #fff8ef; text-shadow: 0 2px 0 #3a1d0e; }

.candy-map .map-gate {
  transform: translateY(var(--gate-clearance, 0px)) scale(.72);
  transform-origin: center bottom;
}
.candy-map .map-gate.is-open .map-gate-doors { background: radial-gradient(ellipse at 50% 65%, #fff6c8f2, #ffd34a66 45%, #ffd34a00 72%); }
.candy-map .map-world-start span {
  color: #fff8ef; background: radial-gradient(100% 50% at 50% 0%, #ffffff55 0 40%, transparent 42%), linear-gradient(180deg, #e35bb0, #d6338f 55%, #8a1667);
  border: 3px solid #f7c23c; border-radius: 12px; text-shadow: 0 1px 0 #3a0631;
  box-shadow: 0 0 0 2px #3a0631, 0 5px 0 2px #3a0631, 0 10px 12px #2a140844;
}
}
@media (forced-colors: active) {
  .candy-map .map-path-dash, .candy-map .map-path-shadow { stroke: none; }
  .candy-map .map-path-paint { stroke: Highlight; }
  .candy-map .map-district-sign, .candy-map .map-world-start span { background: Canvas; color: CanvasText; border: 2px solid CanvasText; box-shadow: none; }
  .candy-map .map-district-sign::before, .candy-map .map-district-sign::after { display: none; }
}
