/* Indus River Basin · visor de mapas (tema 1.3, ampliado en la 1.7). Siempre oscuro: es una mesa de luz. */
.irbv {
  --v-bg: #030e16; --v-panel: #071926; --v-line: #1d3f52; --v-ink: #e6f2f6; --v-muted: #97b6c4; --v-accent: #3cc9c3; --v-glacier: #9fd8f2;
  --v-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --v-display: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --v-body: "Work Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  position: fixed; inset: 0; z-index: 2147483000; display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; grid-template-columns: minmax(0, 1fr);
  background: rgb(3 14 22 / .985); color: var(--v-ink); font-family: var(--v-body); opacity: 0; transition: opacity .2s ease;
  -webkit-user-select: none; user-select: none; overscroll-behavior: contain;
}
.irbv[hidden] { display: none; }
.irbv.is-open { opacity: 1; }
.irbv:focus { outline: none; }
.irbv *, .irbv *:before, .irbv *:after { box-sizing: border-box; }
.irbv > * { min-width: 0; }
.irbv-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Barra superior */
.irbv-top { display: flex; align-items: center; gap: 18px; padding: 10px 14px 10px 20px; border-bottom: 1px solid var(--v-line); background: var(--v-panel); min-height: 58px; }
.irbv-count { font: 500 11px/1 var(--v-mono); letter-spacing: .12em; color: var(--v-muted); white-space: nowrap; }
.irbv-heading { min-width: 0; flex: 1; display: flex; align-items: baseline; gap: 12px; }
.irbv-year { font: 500 13px/1 var(--v-mono); color: var(--v-accent); letter-spacing: .06em; }
.irbv-title { margin: 0; font: 500 21px/1.15 var(--v-display); color: var(--v-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: 0; }
.irbv-tools { display: flex; align-items: center; gap: 10px; }
.irbv-group { display: flex; align-items: center; gap: 2px; }
.irbv-group + .irbv-group { padding-left: 10px; border-left: 1px solid var(--v-line); }
.irbv-btn { appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-width: 38px; height: 38px; padding: 0 8px; border: 1px solid transparent; border-radius: 0; background: transparent; color: var(--v-ink); cursor: pointer; text-decoration: none; font: 500 10px/1 var(--v-mono); letter-spacing: .12em; text-transform: uppercase; }
.irbv-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: square; }
.irbv-btn:hover:not(:disabled) { color: var(--v-accent); border-color: var(--v-line); }
.irbv-btn:disabled { opacity: .35; cursor: default; }
.irbv-btn:focus-visible, .irbv-thumb:focus-visible, .irbv-split:focus-visible, .irbv-link:focus-visible { outline: 2px solid var(--v-accent); outline-offset: 2px; }
.irbv-btn[hidden] { display: none; }
.irbv-btn[aria-pressed="true"] { color: var(--v-accent); border-color: var(--v-accent); background: rgb(60 201 195 / .08); }

.irbv-txt { font: 500 12px/1 var(--v-mono); letter-spacing: .02em; text-transform: none; }
.irbv-zoom { min-width: 54px; text-align: center; font: 500 11px/1 var(--v-mono); color: var(--v-muted); letter-spacing: .04em; }
.irbv-close { margin-left: 4px; }

/* Escenario */
.irbv-stage { position: relative; overflow: hidden; touch-action: none; cursor: zoom-in; background:
  radial-gradient(circle at 50% 45%, rgb(60 201 195 / .05), transparent 60%),
  repeating-linear-gradient(0deg, transparent 0 79px, rgb(159 216 242 / .035) 79px 80px),
  repeating-linear-gradient(90deg, transparent 0 79px, rgb(159 216 242 / .035) 79px 80px); }
.irbv.is-zoomed .irbv-stage { cursor: grab; }
.irbv.is-dragging .irbv-stage { cursor: grabbing; }
.irbv.is-compare .irbv-stage { cursor: ew-resize; }
.irbv.is-compare.is-zoomed .irbv-stage { cursor: grab; }
.irbv-layer { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; transition: opacity .2s; }
.irbv-layer.is-anim { transition: transform .26s cubic-bezier(.2, .7, .2, 1), opacity .2s; }
.irbv.is-loading .irbv-layer { opacity: 0; }
.irbv-img, .irbv-before img { display: block; width: 100%; height: 100%; max-width: none; object-fit: contain; image-rendering: auto; pointer-events: none; box-shadow: 0 30px 80px rgb(0 0 0 / .45); background: #f4efe2; }
.irbv-before { position: absolute; inset: 0; background: var(--v-bg); }
.irbv-before[hidden] { display: none; }

/* Cortinilla de comparación */
.irbv-split { position: absolute; top: 0; bottom: 0; width: 44px; margin-left: -22px; cursor: ew-resize; z-index: 3; touch-action: none; }
.irbv-split[hidden] { display: none; }
.irbv-split-line { position: absolute; left: 21px; top: 0; bottom: 0; width: 2px; background: var(--v-accent); box-shadow: 0 0 0 1px rgb(3 14 22 / .5); }
.irbv-split-knob { position: absolute; left: 4px; top: 50%; width: 36px; height: 36px; margin-top: -18px; display: grid; place-items: center; background: var(--v-accent); color: #03211f; }
.irbv-split-knob svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }
.irbv-lab { position: absolute; top: 14px; z-index: 3; padding: 6px 10px; background: rgb(3 14 22 / .82); border: 1px solid var(--v-line); font: 500 12px/1 var(--v-mono); letter-spacing: .08em; color: var(--v-ink); pointer-events: none; }
.irbv-lab[hidden] { display: none; }
.irbv-lab-before { left: 14px; } .irbv-lab-after { right: 14px; color: var(--v-accent); }
.irbv-lab-before:before { content: "◧ "; color: var(--v-glacier); }

.irbv-prev, .irbv-next { position: absolute; top: 50%; margin-top: -26px; width: 52px; height: 52px; z-index: 4; background: rgb(7 25 38 / .78); border-color: var(--v-line); }
.irbv-prev { left: 14px; } .irbv-next { right: 14px; }
.irbv-loading { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 4; display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: rgb(7 25 38 / .9); border: 1px solid var(--v-line); font: 400 11px/1 var(--v-mono); color: var(--v-muted); letter-spacing: .04em; }
.irbv-loading[hidden] { display: none; }
.irbv-loading span { width: 12px; height: 12px; border: 2px solid var(--v-line); border-top-color: var(--v-accent); border-radius: 50%; animation: irbv-spin .8s linear infinite; }
@keyframes irbv-spin { to { transform: rotate(360deg); } }
.irbv-nav { position: absolute; right: 14px; bottom: 14px; z-index: 4; border: 1px solid var(--v-line); background: var(--v-bg); box-shadow: 0 10px 30px rgb(0 0 0 / .5); cursor: crosshair; touch-action: none; }
.irbv-nav[hidden] { display: none; }
.irbv-nav img { display: block; width: 100%; height: 100%; object-fit: fill; opacity: .75; pointer-events: none; }
.irbv-nav-rect { position: absolute; border: 2px solid var(--v-accent); background: rgb(60 201 195 / .14); pointer-events: none; }
.irbv-hint { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); margin: 0; padding: 7px 12px; background: rgb(7 25 38 / .88); border: 1px solid var(--v-line); font: 400 11px/1.3 var(--v-mono); color: var(--v-muted); letter-spacing: .03em; pointer-events: none; opacity: 0; transition: opacity .4s; white-space: nowrap; z-index: 4; }
.irbv.show-hint .irbv-hint { opacity: 1; }
.irbv.is-compare .irbv-hint { top: 56px; }

/* Descripción y miniaturas */
.irbv-info { padding: 14px 20px 14px; border-top: 1px solid var(--v-line); background: var(--v-panel); display: grid; gap: 6px; max-height: 26vh; overflow: auto; -webkit-user-select: text; user-select: text; }
.irbv-info[hidden] { display: none; }
.irbv-caption { margin: 0; font-size: 14px; line-height: 1.6; color: var(--v-ink); max-width: 90ch; white-space: pre-line; }
.irbv-credit { margin: 0; font: 400 11px/1.6 var(--v-mono); color: var(--v-muted); letter-spacing: .02em; max-width: 110ch; white-space: pre-line; }
.irbv-credit:before { content: "Credit · "; color: var(--v-accent); }
.irbv-caption[hidden], .irbv-credit[hidden], .irbv-link[hidden] { display: none; }
.irbv-link { justify-self: start; font: 500 11px/1 var(--v-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--v-accent); text-decoration: none; padding: 6px 0; }
.irbv-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.irbv-thumbs { display: flex; gap: 8px; padding: 10px 14px 12px; overflow-x: auto; border-top: 1px solid var(--v-line); background: var(--v-bg); scrollbar-width: thin; scrollbar-color: var(--v-line) transparent; }
.irbv-thumbs[hidden] { display: none; }
.irbv-thumb { position: relative; flex: 0 0 auto; width: 92px; height: 62px; padding: 0; border: 1px solid var(--v-line); background: #0b2535; cursor: pointer; opacity: .62; transition: opacity .15s, border-color .15s; }
.irbv-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.irbv-thumb span { position: absolute; left: 0; bottom: 0; padding: 3px 5px; background: rgb(3 14 22 / .85); font: 500 10px/1 var(--v-mono); color: var(--v-ink); }
.irbv-thumb:hover { opacity: .9; }
.irbv-thumb[aria-current="true"] { opacity: 1; border-color: var(--v-accent); box-shadow: inset 0 0 0 1px var(--v-accent); }
.irbv-thumb[aria-current="true"] span { color: var(--v-accent); }

@media (max-width: 760px) {
  .irbv-top { flex-wrap: wrap; gap: 6px 10px; padding: 8px 8px 8px 14px; }
  .irbv-heading { order: 1; flex: 1 1 calc(100% - 60px); }
  .irbv-count { order: 0; }
  .irbv-title { font-size: 18px; }
  .irbv-tools { order: 2; width: 100%; justify-content: space-between; gap: 4px; }
  .irbv-group + .irbv-group { padding-left: 4px; }
  .irbv-actual, .irbv-btn-label, .irbv-fullscreen { display: none; }
  .irbv-btn { min-width: 36px; height: 36px; padding: 0 6px; }
  
.irbv-txt { font: 500 12px/1 var(--v-mono); letter-spacing: .02em; text-transform: none; }
.irbv-zoom { min-width: 44px; }
  .irbv-prev, .irbv-next { width: 42px; height: 42px; margin-top: -21px; }
  .irbv-prev { left: 6px; } .irbv-next { right: 6px; }
  .irbv-info { max-height: 30vh; padding: 12px 14px; }
  .irbv-hint { white-space: normal; width: max-content; max-width: 86%; text-align: center; }
  .irbv-thumb { width: 72px; height: 50px; }
}
@media (prefers-reduced-motion: reduce) { .irbv, .irbv-layer, .irbv-hint { transition: none; } }

/* ── En la página: botón de zoom sobre las imágenes ─────────────── */
.irbv-host { position: relative; }
img.irbv-zoomable { cursor: zoom-in; }
.irbv-open { position: absolute; top: 10px; right: 10px; z-index: 2; display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 11px 0 9px; border: 1px solid rgb(159 216 242 / .35); border-radius: 0; background: rgb(5 19 29 / .82); color: #e6f2f6; font: 500 10px/1 "IBM Plex Mono", ui-monospace, Menlo, monospace; letter-spacing: .14em; text-transform: uppercase; cursor: pointer; opacity: .92; transition: opacity .18s, border-color .18s, color .18s; backdrop-filter: blur(4px); }
.irbv-open svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.irbv-host:hover > .irbv-open, .irbv-open:focus-visible { opacity: 1; }
.irbv-open:hover, .irbv-open:focus-visible { color: #3cc9c3; border-color: #3cc9c3; outline: none; }
.wp-lightbox-container .lightbox-trigger { display: none !important; }
.irbv-card-wrap { position: relative; display: grid; }
.irbv-card-wrap > a { height: 100%; }
.irbv-card-wrap > .irbv-open { top: 12px; right: 12px; }

/* ── Tema 1.7: giro, comparación con cualquier mapa, ajustes, ayuda, enlace a la vista ── */
.irbv-rotor { position: absolute; left: 50%; top: 50%; transform-origin: 50% 50%; }
.irbv-nav-rot { position: absolute; left: 50%; top: 50%; transform-origin: 50% 50%; }
.irbv-nav-rot img { display: block; width: 100%; height: 100%; object-fit: fill; opacity: .75; pointer-events: none; }
.irbv-btn.is-modified { position: relative; }
.irbv-btn.is-modified:after { content: ""; position: absolute; top: 6px; right: 6px; width: 6px; height: 6px; background: var(--v-accent); }
.irbv-btn[aria-expanded="true"] { color: var(--v-accent); border-color: var(--v-accent); }

.irbv-cmpbar { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); z-index: 5; display: flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 8px 14px; max-width: calc(100% - 24px); padding: 7px 10px; background: rgb(7 25 38 / .94); border: 1px solid var(--v-line); box-shadow: 0 12px 30px rgb(0 0 0 / .45); font: 500 11px/1 var(--v-mono); letter-spacing: .06em; color: var(--v-muted); }
.irbv-cmpbar[hidden], .irbv-cmp-fade[hidden] { display: none; }
.irbv-seg { display: flex; border: 1px solid var(--v-line); }
.irbv-seg-btn { appearance: none; border: 0; background: transparent; color: var(--v-ink); padding: 7px 10px; font: 500 10px/1 var(--v-mono); letter-spacing: .12em; text-transform: uppercase; cursor: pointer; }
.irbv-seg-btn + .irbv-seg-btn { border-left: 1px solid var(--v-line); }
.irbv-seg-btn[aria-pressed="true"] { background: var(--v-accent); color: #03211f; }
.irbv-seg-btn:focus-visible, .irbv-cmpbar select:focus-visible, .irbv-cmpbar input:focus-visible, .irbv-adjust input:focus-visible, .irbv-adj-reset:focus-visible { outline: 2px solid var(--v-accent); outline-offset: 2px; }
.irbv-cmp-sel, .irbv-cmp-fade { display: flex; align-items: center; gap: 8px; text-transform: uppercase; }
.irbv-cmpbar select { max-width: 260px; height: 30px; padding: 0 26px 0 8px; border: 1px solid var(--v-line); border-radius: 0; background: var(--v-bg); color: var(--v-ink); font: 400 12px/1 var(--v-body); letter-spacing: 0; text-transform: none; }
.irbv-cmpbar input[type="range"], .irbv-adjust input[type="range"] { accent-color: var(--v-accent); width: 120px; }
.irbv.is-compare .irbv-hint { display: none; }
.irbv.is-compare .irbv-lab { top: 62px; }
.irbv.is-fade .irbv-stage { cursor: zoom-in; }
.irbv.is-fade.is-zoomed .irbv-stage { cursor: grab; }

.irbv-adjust, .irbv-help { position: absolute; top: 12px; right: 12px; z-index: 6; width: min(320px, calc(100% - 24px)); padding: 14px 16px; background: rgb(7 25 38 / .97); border: 1px solid var(--v-line); box-shadow: 0 16px 40px rgb(0 0 0 / .5); -webkit-user-select: none; user-select: none; }
.irbv-adjust[hidden], .irbv-help[hidden] { display: none; }
.irbv-adj-row { display: grid; grid-template-columns: 86px minmax(0, 1fr) 44px; align-items: center; gap: 10px; margin-bottom: 10px; font: 500 10px/1.2 var(--v-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--v-muted); }
.irbv-adj-row input { width: 100%; }
.irbv-adj-row output { text-align: right; color: var(--v-ink); font: 400 11px/1 var(--v-mono); }
.irbv-adj-check { display: flex; align-items: center; gap: 8px; margin: 4px 0 12px; font-size: 13px; color: var(--v-ink); cursor: pointer; }
.irbv-adj-check input { accent-color: var(--v-accent); width: 16px; height: 16px; }
.irbv-adj-reset { appearance: none; border: 1px solid var(--v-line); background: transparent; color: var(--v-ink); padding: 8px 12px; font: 500 10px/1 var(--v-mono); letter-spacing: .12em; text-transform: uppercase; cursor: pointer; }
.irbv-adj-reset:hover { border-color: var(--v-accent); color: var(--v-accent); }
.irbv-help { width: min(420px, calc(100% - 24px)); max-height: calc(100% - 24px); overflow: auto; }
.irbv-help dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 16px; margin: 0; }
.irbv-help dt { font: 500 11px/1.5 var(--v-mono); color: var(--v-accent); white-space: nowrap; }
.irbv-help dd { margin: 0; font-size: 13px; line-height: 1.5; color: var(--v-ink); }
.irbv-toast { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 7; padding: 10px 14px; background: var(--v-accent); color: #03211f; font: 500 11px/1 var(--v-mono); letter-spacing: .08em; box-shadow: 0 10px 30px rgb(0 0 0 / .4); }
.irbv-toast[hidden] { display: none; }
.irbv-zoom { cursor: default; }

@media (max-width: 760px) {
  .irbv-help-btn, .irbv-zoom { display: none; }
  .irbv-group { gap: 0; }
  .irbv-btn { min-width: 34px; padding: 0 4px; }
  .irbv-cmpbar { top: 8px; gap: 6px 8px; padding: 6px 8px; }
  .irbv-cmp-sel { font-size: 0; gap: 0; }
  .irbv-cmpbar select { max-width: 52vw; }
  .irbv-cmpbar input[type="range"] { width: 90px; }
  .irbv.is-compare .irbv-lab { top: auto; bottom: 14px; }
  .irbv-adjust, .irbv-help { top: 8px; right: 8px; }
}
@media (pointer: coarse) { .irbv-help-btn { display: none; } }
