/* Las Milpitas map: illustrated clickable town map, mini map, legend */
.lm-map-svg { display: block; width: 100%; height: auto; }
.lm-map-svg .o { stroke: #593510; stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.lm-map-svg .o2 { stroke: #593510; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.lmm-sign { font: 800 22px "Baloo 2", "Trebuchet MS", sans-serif; fill: #E23D28; letter-spacing: .5px; paint-order: stroke; stroke: #593510; stroke-width: 0; }
.lmm-arch { font: 800 25px "Baloo 2", "Trebuchet MS", sans-serif; fill: #F5C518; paint-order: stroke; stroke: #593510; stroke-width: 5px; stroke-linejoin: round; }
.lmm-abc { font: 800 17px "Baloo 2", sans-serif; fill: #fff; }
.lmm-n { font: 800 20px "Baloo 2", sans-serif; fill: #593510; }
.lmm-char { pointer-events: none; }

/* Zones */
.lm-zone { cursor: pointer; outline: none; }
.lm-zone:hover .lm-zone-pop, .lm-zone:focus-visible .lm-zone-pop { filter: brightness(1.08) drop-shadow(0 4px 0 rgba(89,53,16,.35)); }
.lm-pill { fill: #FFFDF2; stroke: #593510; stroke-width: 3; }
.lm-pill-es { font: 800 21px "Baloo 2", "Trebuchet MS", sans-serif; fill: #593510; }
.lm-pill-en { font: 700 14px "Nunito", "Segoe UI", sans-serif; fill: #7A4A1C; }
.lm-pill-es.sm { font-size: 16px; } .lm-pill-en.sm { font-size: 11.5px; }
.lm-zone:hover .lm-pill, .lm-zone:focus-visible .lm-pill { fill: #FEE66F; }
.lm-zone:focus-visible .lm-pill { stroke: #E23D28; stroke-width: 5; }
.lm-soon { fill: #E23D28; stroke: #593510; stroke-width: 2.5; }
.lm-soon-t { font: 800 14px "Baloo 2", sans-serif; fill: #fff; } .lm-soon-t.sm { font-size: 12px; }
.lm-zone.is-soon .lm-zone-pop { opacity: .96; }
.lm-here-ring { fill: rgba(254,230,111,.55); stroke: #E23D28; stroke-width: 5; stroke-dasharray: 10 8; animation: lm-pulse 1.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes lm-pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.06); } }
.lm-flag { fill: #E23D28; stroke: #593510; stroke-width: 3; }
.lm-flag-t { font: 800 16px "Baloo 2", sans-serif; fill: #fff; } .lm-flag-e { font: 700 12px "Nunito", sans-serif; fill: #FFF1C9; }
.lm-pin { fill: #E23D28; stroke: #593510; stroke-width: 3; animation: lm-bob 1.2s ease-in-out infinite; }
@keyframes lm-bob { 0%,100% { transform: translateY(0) scale(1.1); } 50% { transform: translateY(-8px) scale(1.1); } }
@media (prefers-reduced-motion: reduce) { .lm-here-ring, .lm-pin { animation: none; } }

/* Big map */
.lm-map { margin: 0 0 8px; }
.lm-map-head { text-align: center; margin: 0 0 12px; }
.lm-map-head h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); }
.lm-map-head h1 span { display: block; font: 700 1rem var(--font-body); color: var(--lm-ink-soft); margin-top: 2px; }
.lm-map-head p { margin: 6px 0 0; font-weight: 700; }
.lm-map-swipe { display: none; }
.lm-map-frame { border: 6px solid #A0522D; border-radius: 30px; background: #A9D463; box-shadow: 0 8px 0 #7A3F1D, var(--lm-shadow); overflow: hidden; position: relative; }
.lm-map-scroll { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; }
.lm-map-scroll:focus-visible { outline: 4px solid var(--lm-chile); outline-offset: -4px; }
.lm-map-scroll .lm-map-svg { min-width: 100%; }
.lm-map-note { text-align: center; margin: 12px 0 0; }
.lm-map-all { font: 800 1.05rem var(--font-display); color: var(--lm-chile-deep) !important; text-decoration: none !important; }
.lm-map-all i { font: 700 .85em var(--font-body); font-style: normal; opacity: .85; }
.ytk-welcome--map { display: block; background: none; box-shadow: none; padding: 0; margin: 4px 0 26px; border-radius: 0; }
.ytk-welcome--map[hidden] { display: none; }
@media (max-width: 760px) {
  .lm-map-swipe { display: inline; }
  .lm-map-scroll .lm-map-svg { width: 900px; max-width: none; }
  .lm-map-frame { border-width: 4px; border-radius: 22px; }
}

/* Mini map (footer) */
.lm-minimap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 22px; align-items: center; max-width: 1100px; margin: 0 auto 26px; padding: 18px 22px; background: #FFF8E7; border: 4px solid #A0522D; border-radius: 28px; box-shadow: 0 6px 0 #7A3F1D; color: var(--lm-ink); text-align: left; }
.lm-minimap h2 { font-size: 1.7rem; margin: 0 0 4px; color: var(--lm-ink); } .lm-minimap h2 i { font: 700 .6em var(--font-body); font-style: normal; opacity: .8; }
.lm-minimap p { margin: 0 0 12px; font-weight: 700; color: var(--lm-ink); } .lm-minimap p i { font-style: normal; font-weight: 600; opacity: .85; }
.lm-minimap-art { border: 4px solid #A0522D; border-radius: 18px; overflow: hidden; background: #A9D463; }
.lm-minimap .lm-btn { color: #fff !important; }
@media (max-width: 700px) { .lm-minimap { grid-template-columns: 1fr; padding: 14px; } }

/* Legend + page */
.lm-legend { margin: 8px 0 30px; text-align: center; }
.lm-legend-grid { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; text-align: left; }
.lm-legend-card { background: var(--lm-white); border: 3px solid #E7D3A4; border-radius: 24px; overflow: hidden; box-shadow: 0 5px 0 rgba(89,53,16,.12); display: flex; flex-direction: column; scroll-margin-top: calc(var(--lm-header-h) + 20px); }
.lm-legend-card.is-target { border-color: var(--lm-chile); }
.lm-legend-img { display: block; width: 100%; height: 140px; object-fit: cover; background: #BFE6F5; }
.lm-legend-img--char, .lm-legend-img--icon { display: flex; align-items: flex-end; justify-content: center; background: linear-gradient(#BFE6F5, #D8EDE5 60%, #A9D463 60%); }
.lm-legend-img--char img { height: 128px; width: auto; }
.lm-legend-img--icon svg { height: 128px; width: 128px; }
.lm-legend-body { padding: 12px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.lm-legend-body h3 { margin: 0; font-size: 1.3rem; } .lm-legend-body h3 span { display: block; font: 700 .85rem var(--font-body); color: var(--lm-ink-soft); }
.lm-legend-body p { margin: 0; font-size: .95rem; line-height: 1.35; } .lm-legend-body em { font-style: normal; opacity: .8; }
.lm-legend-badge { align-self: flex-start; background: var(--lm-chile); color: #fff; font: 800 .85rem var(--font-display); padding: 3px 12px; border-radius: 99px; }
.lm-legend-badge i { font: 700 .8em var(--font-body); font-style: normal; margin-left: 6px; opacity: .9; }
.lm-legend-badge.is-live { background: var(--lm-nopal-deep); }
.lm-legend-go { margin-top: auto; align-self: flex-start; font: 800 1rem var(--font-display); color: var(--lm-chile-deep) !important; text-decoration: none !important; }
.lm-legend-go i { font: 700 .85em var(--font-body); font-style: normal; opacity: .85; }
.lm-legend-go--off { color: var(--lm-ink-soft) !important; font-size: .9rem; }
.lm-page-mapa .lm-map { margin-top: 4px; }

/* Header "Mapa" button */
.ytk-mapbtn { background: var(--lm-nopal); color: #fff !important; border-color: var(--lm-nopal-deep); box-shadow: 0 4px 0 var(--lm-nopal-deep); }
.ytk-mapbtn:hover, .ytk-mapbtn:focus { background-color: var(--lm-nopal); color: #fff !important; box-shadow: 0 6px 0 var(--lm-nopal-deep); }
.ytk-mapbtn svg { color: #fff; }
.lm-footer .lm-minimap { width: min(1100px, 100%); margin-left: auto; margin-right: auto; }
.lm-footer-inner:has(.lm-minimap) { width: min(1100px, calc(100% - 32px)); }
.lm-footer .lm-footer-inner > :not(.lm-minimap) { max-width: 800px; margin-left: auto; margin-right: auto; }

/* ======================= v2: alive map ======================= */
:root { --lm-header-h: 0px !important; }
.lm-chrome { position: static !important; box-shadow: none; }
body.lm-site, body.theme-lasmilpitas, body.admin-bar { padding-top: 0 !important; }
.ytk-search { top: 0 !important; }
.ytk-upnext { position: static !important; max-height: none !important; overflow: visible !important; }
body.ytk-compact .ytk-bar, body.ytk-compact .lm-chrome .lm-papel { max-height: 80px; opacity: 1; }
.ytk-tabs, #ytk-tabs, .ytk-subrow { position: static !important; }

/* Zones: pointer, grow + glow, bounce */
.lm-zone { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.lm-zone .lm-zone-pop { transform-box: fill-box; transform-origin: 50% 85%; transition: transform .18s cubic-bezier(.3,1.6,.5,1), filter .18s; }
.lm-zone:hover .lm-zone-pop, .lm-zone:focus-visible .lm-zone-pop, .lm-zone:active .lm-zone-pop {
  transform: scale(1.09); filter: drop-shadow(0 0 7px #FFF3A0) drop-shadow(0 0 14px rgba(255,214,70,.9));
  animation: lm-pop .5s ease-out;
}
@keyframes lm-pop { 0% { transform: scale(1); } 40% { transform: scale(1.14) translateY(-4px); } 100% { transform: scale(1.09); } }
.lm-zone:focus-visible .lm-zone-pop { outline: none; }
.lm-soon-ico { pointer-events: none; opacity: .92; }
.lm-map-svg--mini .lm-soon-ico { display: none; }
.lm-map-svg { user-select: none; -webkit-user-select: none; }

/* Animations */
@keyframes lmm-dash { to { stroke-dashoffset: -116; } }
@keyframes lmm-dash2 { to { stroke-dashoffset: 140; } }
@keyframes lmm-fall { to { stroke-dashoffset: -44; } }
@keyframes lmm-drift { 0% { transform: translateX(-40px); } 100% { transform: translateX(110px); } }
@keyframes lmm-bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes lmm-bounce { 0%,100% { transform: translateY(0) rotate(0); } 25% { transform: translateY(-5px) rotate(-3deg); } 75% { transform: translateY(-5px) rotate(3deg); } }
@keyframes lmm-wig { 0%,100% { transform: rotate(-5deg); } 50% { transform: rotate(5deg); } }
@keyframes lmm-hop { 0%,70%,100% { transform: translateY(0); } 80% { transform: translateY(-5px); } 90% { transform: translateY(0); } }
@keyframes lmm-sway { 0%,100% { transform: skewX(-3deg); } 50% { transform: skewX(3deg); } }
@keyframes lmm-tw { 0%,100% { opacity: 1; } 50% { opacity: .25; } }
@keyframes lmm-tile { 0%,100% { opacity: 1; } 50% { opacity: .45; } }
@keyframes lmm-note { 0% { transform: translate(0,0) rotate(0); opacity: 0; } 15% { opacity: 1; } 100% { transform: translate(14px,-46px) rotate(18deg); opacity: 0; } }
@keyframes lmm-smoke { 0% { transform: translate(0,0) scale(.6); opacity: .8; } 100% { transform: translate(-14px,-22px) scale(1.6); opacity: 0; } }
@keyframes lmm-star { 0%,100% { opacity: .15; transform: scale(.8); } 50% { opacity: .6; transform: scale(1.3); } }
.lmm-flow { animation: lmm-dash 5s linear infinite; }
.lmm-flow2 { animation: lmm-dash2 9s linear infinite; }
.lmm-fall { animation: lmm-fall .9s linear infinite; }
.lmm-foam { animation: lmm-dash 4s linear infinite; }
.lmm-drift { animation: lmm-drift 60s ease-in-out infinite alternate; }
.lmm-bob, .lmm-bob2 { transform-box: fill-box; animation: lmm-bob .5s ease-in-out infinite; }
.lmm-bob2 { animation-duration: .35s; }
.lmm-bounce { transform-box: fill-box; transform-origin: 50% 100%; animation: lmm-bounce .5s ease-in-out infinite; }
.lmm-wig { transform-box: fill-box; transform-origin: 50% 100%; animation: lmm-wig 1.1s ease-in-out infinite; }
.lmm-hop { transform-box: fill-box; animation: lmm-hop 3.2s ease-in-out infinite; }
.lmm-sway { transform-box: fill-box; transform-origin: 50% 100%; animation: lmm-sway 3.6s ease-in-out infinite; }
.lmm-tw { animation: lmm-tw 1.4s ease-in-out infinite; }
.lmm-tile { animation: lmm-tile .5s steps(2, jump-none) infinite; }
.lmm-note { transform-box: fill-box; animation: lmm-note 3.3s ease-out infinite; opacity: 0; }
.lmm-smoke { transform-box: fill-box; animation: lmm-smoke 2s ease-out infinite; }
.lmm-glowstar { transform-box: fill-box; transform-origin: center; animation: lmm-star 2.4s ease-in-out infinite; }
.lm-map-frame.is-paused *, .lm-map-frame.is-paused { animation-play-state: paused !important; }
.lm-map-svg--mini *, .lm-map-svg--mini { animation: none !important; }
@media (prefers-reduced-motion: reduce) { .lm-map-svg *, .lm-map-svg { animation: none !important; } .lm-zone .lm-zone-pop { transition: none; } }

/* Painterly finish on the frame: soft vignette + paper grain (cheap, static) */
.lm-map-frame::before { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; box-shadow: inset 0 0 90px rgba(89,53,16,.28); border-radius: 24px; }
.lm-map-frame::after { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; background: url("images/paper.webp"); background-size: 220px; mix-blend-mode: multiply; opacity: .5; }
.lm-map-sound { position: absolute; z-index: 5; right: 12px; top: 12px; width: 44px; height: 44px; border-radius: 50%; border: 3px solid #593510; background: #FFFDF2; font-size: 20px; line-height: 1; cursor: pointer; box-shadow: 0 3px 0 rgba(89,53,16,.4); padding: 0; }
.lm-map-sound .lm-snd-on { display: none; } .lm-map-sound[aria-pressed="true"] .lm-snd-on { display: inline; } .lm-map-sound[aria-pressed="true"] .lm-snd-off { display: none; }
.lm-map-tip { position: fixed; z-index: 3000; pointer-events: none; background: #FFFDF2; border: 3px solid #593510; border-radius: 16px; padding: 6px 14px; box-shadow: 0 4px 0 rgba(89,53,16,.35); font: 800 1.05rem var(--font-display); color: #593510; line-height: 1.15; text-align: center; transform: translate(-50%, -130%); opacity: 0; transition: opacity .12s; white-space: nowrap; }
.lm-map-tip.is-on { opacity: 1; }
.lm-map-tip i { display: block; font: 700 .8rem var(--font-body); font-style: normal; color: #7A4A1C; }
.lm-map-tip b { display: block; font: 800 .72rem var(--font-body); color: #E23D28; text-transform: uppercase; letter-spacing: .04em; }

/* Near full-height map */
.lm-map-scroll { display: flex; }
@media (min-width: 761px) {
  .lm-map-scroll { height: calc(100vh - 24px); height: calc(100svh - 24px); min-height: 520px; max-height: 1100px; justify-content: center; overflow: hidden; }
  .lm-map-svg--full { height: 100%; width: auto; max-width: 100%; flex: none; margin: auto; }
}
@media (max-width: 760px) {
  .lm-map-scroll { height: calc(100svh - 40px); min-height: 520px; }
  .lm-map-scroll .lm-map-svg--full { height: 100%; width: auto; min-width: 0; max-width: none; flex: none; }
}
.lm-map-head { margin-bottom: 10px; }

/* ======================= v3: YouTube-style side guide ======================= */
:root {
  --lm-guide-side: left;          /* flip to "right" in one change */
  --lm-guide-w: 248px;
  --lm-guide-mini: 76px;
}

/* Hide the old horizontal tab bar and subcategory chip row (sidebar covers them). */
.ytk-tabs:not(.ytk-guide-cats),
#ytk-tabs.ytk-tabs,
.ytk-subrow { display: none !important; }

/* Layout: content sits beside the fixed guide */
@media (min-width: 761px) {
  body.lm-site, body.theme-lasmilpitas {
    padding-left: var(--lm-guide-w) !important;
  }
  body.lm-site[style] { /* keep existing padding-top overrides */ }
  html[style] { }
}

/* The guide itself */
.ytk-guide {
  position: fixed;
  top: 0;
  bottom: 0;
  z-index: 1100;
  width: var(--lm-guide-w);
  background: #FFF9EC;
  border-right: 3px solid rgba(89,53,16,.12);
  box-shadow: 4px 0 18px rgba(89,53,16,.08);
  display: flex;
  flex-direction: column;
}
.ytk-guide-scroll {
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  padding: 14px 10px 28px;
  scrollbar-width: thin;
  scrollbar-color: rgba(89,53,16,.35) transparent;
}
/* Flip to the right by setting --lm-guide-side: right on :root */
html { }
body.lm-site { }
@supports (inset-inline-start: 0) {
  .ytk-guide { inset-inline-start: 0; inset-inline-end: auto; }
}
html[style*="lm-guide"] { }
/* Explicit left/right via the variable (physical, more reliable than logical in older Safari). */
.ytk-guide { left: 0; right: auto; }
@media (min-width: 761px) {
  body.lm-site, body.theme-lasmilpitas { padding-left: var(--lm-guide-w) !important; padding-right: 0 !important; }
}

/* To flip the guide: set --lm-guide-side: right on :root and use the block below
   (kept next to the variable so one change is enough). */
@supports (--lm-guide-side: right) {
  /* no-op: actual flip lives in .lm-guide-right, toggled if the var is right */
}
:root.lm-guide-right, html.lm-guide-right {
  --lm-guide-side: right;
}
html.lm-guide-right .ytk-guide,
body.lm-guide-right .ytk-guide { left: auto; right: 0; border-right: 0; border-left: 3px solid rgba(89,53,16,.12); box-shadow: -4px 0 18px rgba(89,53,16,.08); }
@media (min-width: 761px) {
  html.lm-guide-right body.lm-site,
  html.lm-guide-right body.theme-lasmilpitas {
    padding-left: 0 !important;
    padding-right: var(--lm-guide-w) !important;
  }
}

.ytk-guide-cats { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ytk-gitem { margin: 0; }
.ytk-guide .ytk-tab {
  width: 100%;
  min-height: 52px;
  padding: 6px 10px 6px 6px;
  border-radius: 16px;
  box-sizing: border-box;
  gap: 10px;
}
.ytk-guide .ytk-tab-icon { width: 40px; height: 40px; }
.ytk-guide .ytk-tab-icon svg { width: 26px; height: 26px; }
.ytk-guide .ytk-tab-label b { font-size: 1.05rem; }
.ytk-guide .ytk-tab-label i { font-size: .7rem; }
.ytk-guide .ytk-tab-badge { top: -6px; right: -4px; width: 20px; height: 20px; font-size: 12px; }
.ytk-gsub { list-style: none; margin: 4px 0 8px 18px; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.ytk-gsub[hidden] { display: none; }
.ytk-gsub-a {
  display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 4px 8px;
  border-radius: 12px; text-decoration: none !important; color: var(--lm-ink) !important;
  font: 700 .92rem/1.1 var(--font-display);
}
.ytk-gsub-a:hover, .ytk-gsub-a:focus-visible { background: rgba(89,53,16,.08); }
.ytk-gsub-a.is-current { background: var(--lm-white); box-shadow: inset 0 0 0 2px var(--lm-ink); }
.ytk-gsub-a.is-soon { opacity: .75; }
.ytk-gsub-label { display: flex; flex-direction: column; }
.ytk-gsub-label i { font: 600 .68rem var(--font-body); font-style: normal; opacity: .75; }
.ytk-gsub-icon { display: grid; place-items: center; width: 24px; height: 24px; flex: none; color: var(--lm-ink-soft); }

.ytk-guide-more { margin-top: 16px; padding-top: 14px; border-top: 2px dashed rgba(89,53,16,.18); display: flex; flex-direction: column; gap: 2px; }
.ytk-guide-more-h { margin: 0 8px 6px; font: 800 .8rem var(--font-display); color: var(--lm-ink-soft); letter-spacing: .04em; text-transform: uppercase; }
.ytk-guide-more-h i { font: 700 .85em var(--font-body); font-style: normal; text-transform: none; margin-left: 4px; opacity: .8; }
.ytk-glink {
  display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 4px 10px;
  border-radius: 12px; text-decoration: none !important; color: var(--lm-ink) !important;
  font: 800 1rem/1.05 var(--font-display);
}
.ytk-glink:hover, .ytk-glink:focus-visible { background: rgba(89,53,16,.08); }
.ytk-glink span { display: flex; flex-direction: column; }
.ytk-glink i { font: 600 .68rem var(--font-body); font-style: normal; opacity: .75; }
.ytk-glink--shop { color: var(--lm-chile-deep) !important; }
.ytk-glink--yt svg { color: #E23D28; }
.ytk-guide-scrim { display: none; }
.ytk-guide-toggle { display: none; }
.ytk-burger { display: flex; flex-direction: column; gap: 4px; width: 20px; }
.ytk-burger i { display: block; height: 3px; background: currentColor; border-radius: 2px; }

/* Desktop map uses the leftover width */
@media (min-width: 761px) {
  .lm-map-scroll { height: calc(100vh - 8px); height: calc(100svh - 8px); }
  .ytk-welcome--map, .lm-map { margin-top: 0; }
  .lm-map-head { display: none; }
  .ytk-main { padding-top: 8px; }
}

/* Tablet (~768): narrow icon-only mini rail */
@media (min-width: 761px) and (max-width: 1099px) {
  :root { --lm-guide-w: var(--lm-guide-mini); }
  .ytk-guide .ytk-tab { flex-direction: column; justify-content: center; gap: 2px; padding: 8px 4px; min-height: 64px; border-radius: 16px; text-align: center; }
  .ytk-guide .ytk-tab-label { align-items: center; }
  .ytk-guide .ytk-tab-label b { font-size: .62rem; line-height: 1.05; }
  .ytk-guide .ytk-tab-label i,
  .ytk-gsub,
  .ytk-guide-more { display: none !important; }
  .ytk-guide-scroll { padding: 10px 6px 20px; }
}

/* Phone: hamburger + slide-out drawer. No sidebar, map stays nearly full-screen. */
@media (max-width: 760px) {
  body.lm-site, body.theme-lasmilpitas { padding-left: 0 !important; padding-right: 0 !important; }
  .ytk-guide-toggle { display: inline-flex; background: var(--lm-sun); }
  .ytk-guide {
    top: 0; bottom: 0; width: min(86vw, 320px);
    transform: translateX(-105%);
    transition: transform .22s ease;
    box-shadow: none;
  }
  html.lm-guide-right .ytk-guide { transform: translateX(105%); }
  body.ytk-guide-open .ytk-guide { transform: translateX(0); box-shadow: 8px 0 28px rgba(89,53,16,.28); }
  .ytk-guide-scrim {
    display: block; position: fixed; inset: 0; z-index: 1090;
    background: rgba(40, 22, 6, .45);
  }
  .ytk-guide-scrim[hidden] { display: none; }
  .ytk-iconbtn-text { display: none; } /* already often hidden on phone; keep icons tidy */
  .ytk-guide-toggle .ytk-iconbtn-text { display: none; }
}

/* Search overlay should cover the guide when open */
.ytk-search { z-index: 1200; }
@media (max-width: 760px) {
  .ytk-mapbtn .ytk-iconbtn-text, .ytk-shop .ytk-iconbtn-text { display: none; }
  .ytk-mapbtn, .ytk-shop, .ytk-guide-toggle { padding: 0; width: var(--ytk-tap); }
  .lm-map-head { display: none; }
  .ytk-welcome--map { margin: 0; }
  .ytk-main.ytk-home { padding-top: 6px; }
}
/* Keep paper-picado + logo bar non-sticky (already static). Guide is the only fixed chrome. */
@media (min-width: 761px) and (max-width: 1099px) {
  .ytk-guide .ytk-tab-label { display: none; }
  .ytk-guide .ytk-tab { min-height: 56px; padding: 8px 4px; }
}

/* Zone tooltip with subcategory video counts */
.lm-map-tip {
  max-width: min(320px, calc(100vw - 20px));
  white-space: normal;
  text-align: left;
  padding: 8px 14px 10px;
  line-height: 1.2;
}
.lm-map-tip .lm-tip-es { display: block; font: 800 1.1rem/1.15 var(--font-display); }
.lm-map-tip .lm-tip-en { display: block; font: 700 .8rem var(--font-body); font-style: normal; color: #7A4A1C; margin: 0 0 4px; }
.lm-map-tip .lm-tip-total { margin: 0 0 6px; font: 800 .95rem var(--font-display); color: var(--lm-nopal-deep); }
.lm-map-tip .lm-tip-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.lm-map-tip .lm-tip-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 6px; font: 700 .88rem var(--font-body); color: var(--lm-ink); border-top: 1px solid rgba(89,53,16,.1); padding-top: 3px; }
.lm-map-tip .lm-tip-list li b { font: 800 .95rem var(--font-display); }
.lm-map-tip .lm-tip-list li i { font: 600 .75rem var(--font-body); font-style: normal; color: #7A4A1C; }
.lm-map-tip .lm-tip-list li em { margin-left: auto; font: 800 .85rem var(--font-display); font-style: normal; color: var(--lm-nopal-deep); }
.lm-map-tip .lm-tip-soon { display: block; margin-top: 6px; font: 800 .78rem var(--font-display); color: #E23D28; text-transform: uppercase; letter-spacing: .03em; }
@media (max-width: 760px) {
  .lm-map-tip { max-width: calc(100vw - 16px); padding: 8px 12px; font-size: .95rem; }
  .lm-map-tip .lm-tip-es { font-size: 1rem; }
  .lm-map-tip .lm-tip-list li { font-size: .82rem; }
}

/* ======================= v4: no header bar, logo in the guide ======================= */
:root { --lm-papel-h: 18px; --lm-slim-h: 0px; }
.lm-chrome {
  position: fixed !important;
  top: 0; left: 0; right: 0;
  z-index: 1200;
  background: transparent;
  box-shadow: none !important;
  pointer-events: none;
}
.lm-chrome .lm-papel {
  pointer-events: none;
  height: var(--lm-papel-h) !important;
  background-size: auto var(--lm-papel-h);
  background-color: var(--lm-cream);
}
.ytk-bar { display: none !important; }
.ytk-slim { display: none; }

/* Guide starts under the papel strip; content does too */
.ytk-guide { top: var(--lm-papel-h) !important; }
@media (min-width: 761px) {
  :root { --lm-slim-h: 0px; }
  body.lm-site, body.theme-lasmilpitas {
    padding-top: var(--lm-papel-h) !important;
    padding-left: var(--lm-guide-w) !important;
    padding-right: 0 !important;
  }
  html.lm-guide-right body.lm-site,
  html.lm-guide-right body.theme-lasmilpitas {
    padding-left: 0 !important;
    padding-right: var(--lm-guide-w) !important;
  }
  .lm-map-scroll { height: calc(100vh - var(--lm-papel-h)); height: calc(100svh - var(--lm-papel-h)); min-height: 480px; }
  .ytk-main { padding-top: 0 !important; }
  .ytk-welcome--map, .lm-map { margin: 0; }
}

/* Logo + search at the top of the guide */
.ytk-guide-logo {
  display: flex; align-items: center; justify-content: center;
  padding: 6px 8px 10px; text-decoration: none !important;
}
.ytk-guide-logo img { height: 64px; width: auto; max-width: 100%; }
.ytk-guide-search {
  display: flex; align-items: center; gap: 8px; width: 100%;
  min-height: 42px; margin: 0 0 12px; padding: 6px 10px;
  border: 3px solid var(--lm-ink); border-radius: 999px;
  background: var(--lm-sun); color: var(--lm-ink);
  font: 800 1rem/1.05 var(--font-display); cursor: pointer;
  box-shadow: 0 3px 0 var(--lm-ink);
}
.ytk-guide-search:hover, .ytk-guide-search:focus-visible { background: #FEE66F; }
.ytk-guide-search span { display: flex; flex-direction: column; text-align: left; }
.ytk-guide-search i { font: 600 .68rem var(--font-body); font-style: normal; opacity: .75; }
.ytk-guide-search svg { flex: none; }

/* Tablet mini rail: logo + search as icons */
@media (min-width: 761px) and (max-width: 1099px) {
  .ytk-guide-logo img { height: 40px; }
  .ytk-guide-logo { padding: 4px 2px 8px; }
  .ytk-guide-search { justify-content: center; padding: 8px 0; min-height: 44px; margin-bottom: 8px; }
  .ytk-guide-search span { display: none; }
}

/* Phone: slim logo + hamburger under the papel; no full header bar */
@media (max-width: 760px) {
  :root { --lm-slim-h: 48px; }
  body.lm-site, body.theme-lasmilpitas {
    padding-top: calc(var(--lm-papel-h) + var(--lm-slim-h)) !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  .ytk-slim {
    display: flex; align-items: center; justify-content: space-between;
    pointer-events: auto;
    height: var(--lm-slim-h);
    padding: 0 10px;
    background: var(--lm-cream);
  }
  .ytk-slim-logo img { height: 36px; width: auto; max-width: 110px; }
  .ytk-guide-toggle { display: inline-flex !important; pointer-events: auto; background: var(--lm-sun); padding: 0; width: 44px; height: 44px; }
  .ytk-guide { top: 0 !important; } /* drawer covers the screen including slim, with logo inside */
  .lm-map-scroll { height: calc(100svh - var(--lm-papel-h) - var(--lm-slim-h)); min-height: 420px; }
  .ytk-main.ytk-home, .ytk-main { padding-top: 0 !important; }
}

/* Search overlay sits above everything */
.ytk-search { top: 0 !important; z-index: 1300 !important; }
@media (min-width: 761px) and (max-width: 1099px) {
  .ytk-guide-more { display: flex !important; flex-direction: column; gap: 2px; padding-top: 8px; margin-top: 8px; }
  .ytk-guide-more-h, .ytk-glink span { display: none !important; }
  .ytk-glink { justify-content: center; padding: 8px 0; min-height: 40px; }
}
/* Tooltips must not shrink to the longest word */
.lm-map-tip { min-width: min(220px, calc(100vw - 16px)); width: max-content; }

/* Phone drawer: compact YouTube-style rows, not the old stacked tab cards */
@media (max-width: 760px) {
  .ytk-guide .ytk-tab {
    flex-direction: row !important;
    justify-content: flex-start !important;
    align-items: center;
    text-align: left !important;
    min-height: 52px !important;
    min-width: 0 !important;
    width: 100%;
    padding: 6px 10px 6px 6px !important;
    border-radius: 16px;
    gap: 10px;
  }
  .ytk-guide .ytk-tab-label { align-items: flex-start !important; text-align: left !important; }
  .ytk-guide .ytk-tab-icon { width: 40px; height: 40px; }
}

.lmm-stop { font: 800 8px "Baloo 2", sans-serif; fill: #593510; letter-spacing: .5px; }
.lmm-tort { font: 800 15px "Baloo 2", "Trebuchet MS", sans-serif; fill: #A0522D; }
.lmm-sign2 { font: 800 13px "Baloo 2", "Trebuchet MS", sans-serif; fill: #A0522D; }

/* ======================= v5: the whole town (pan + zoom map) ======================= */
.lmm-sign3 { font: 800 16px "Baloo 2", "Trebuchet MS", sans-serif; fill: #7A3F1D; }
.lmm-stn1 { font: 800 10.5px "Baloo 2", "Trebuchet MS", sans-serif; fill: #fff; letter-spacing: .6px; text-transform: uppercase; }
.lmm-stn2 { font: 800 15px "Baloo 2", "Trebuchet MS", sans-serif; fill: #FEE66F; }
.lmm-barrio { font: 800 17px "Baloo 2", "Trebuchet MS", sans-serif; fill: #fff; letter-spacing: .8px; paint-order: stroke; stroke: #7A3F1D; stroke-width: 4px; stroke-linejoin: round; }
.lm-map-scroll.lm-map-view { display: block; position: relative; overflow: hidden; touch-action: none; cursor: grab; -webkit-user-select: none; user-select: none;
  height: calc(100vh - var(--lm-papel-h) - 8px); height: calc(100svh - var(--lm-papel-h) - 8px); min-height: 480px; max-height: none; justify-content: initial; }
.lm-map-view.is-drag { cursor: grabbing; }
.lm-map-view .lm-map-svg--full { position: absolute; left: 0; top: 0; width: 100% !important; height: 100% !important; min-width: 0 !important; max-width: none !important; margin: 0; }
.lm-map-view .lm-zone { cursor: pointer; }
.lm-map-zoom { position: absolute; z-index: 6; right: 16px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; }
.lm-map-zoom button { width: 44px; height: 44px; border-radius: 50%; border: 3px solid #593510; background: #FFFDF2; color: #593510; font: 800 24px/1 "Baloo 2", sans-serif; box-shadow: 0 3px 0 rgba(89,53,16,.35); cursor: pointer; display: grid; place-items: center; padding: 0; }
.lm-map-zoom button:hover, .lm-map-zoom button:focus-visible { background: #FEE66F; outline: none; }
.lm-map-zoom button:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(89,53,16,.35); }
.lm-barrio-title { margin: 34px 0 0; text-align: left; font-size: 1.7rem; color: var(--lm-chile-deep); border-bottom: 4px dotted #E7D3A4; padding-bottom: 6px; }
.lm-barrio-title span { font: 700 .5em var(--font-body); margin-left: 10px; color: var(--lm-ink-soft); }
.lm-legend-body h4 { margin: 0; font-size: 1.25rem; } .lm-legend-body h4 span { display: block; font: 700 .85rem var(--font-body); color: var(--lm-ink-soft); }
.lm-legend-img--icon svg { width: 100%; height: 138px; }
.lm-legend-img { height: 150px; }
.lm-map-svg--mini .lm-here-ring { display: none; }
@media (max-width: 760px) {
  .lm-map-scroll.lm-map-view { height: calc(100vh - var(--lm-papel-h) - var(--lm-slim-h, 52px) - 84px); height: calc(100svh - var(--lm-papel-h) - var(--lm-slim-h, 52px) - 84px); min-height: 400px; }
  .lm-map-zoom { right: 10px; bottom: 12px; } .lm-map-zoom button { width: 40px; height: 40px; }
}
.lm-legend-img { height: 190px; } .lm-legend-img--icon svg { height: 182px; }
