/* ═══════════════════════════════════════════════
   JUSTQRO · Catálogo digital por plano (mobile first)
═══════════════════════════════════════════════ */

.pl { background: var(--white); color: var(--blue); --ink: var(--blue); --bg: var(--white); --soft: rgba(31, 78, 245, 0.85); --line: rgba(31, 78, 245, 0.22); }
.pl main { padding-bottom: 40px; }

/* Barra superior */
.pl-bar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; padding: 12px 16px; padding-top: max(12px, env(safe-area-inset-top)); background: var(--blue); color: var(--white); }
.pl-bar__logo img { height: 26px; width: auto; }
.pl-bar__crumb { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-bar__lang { margin-left: auto; display: flex; gap: 10px; }
.pl-bar__lang a { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-decoration: none; opacity: 0.6; padding: 6px 2px; }
.pl-bar__lang a[aria-current="true"] { opacity: 1; border-bottom: 1.5px solid currentColor; }

/* Portada del plano */
.pl-hero { background: var(--blue); color: var(--white); padding: 28px 16px 28px; --line: rgba(255,255,255,0.3); }
.pl-hero .label { margin-bottom: 14px; opacity: 0.9; }
.pl-h1 { display: block; font-size: clamp(40px, 11vw, 84px); font-weight: 700; line-height: 0.92; letter-spacing: -0.02em; text-transform: uppercase; }
.pl-h1 .lt { font-weight: 300; }
.pl-lead { margin-top: 14px; font-size: 16px; max-width: 560px; opacity: 0.92; }

.pl-search { position: relative; margin-top: 22px; max-width: 560px; }
.pl-search label { display: block; font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: 8px; }
.pl-search input { width: 100%; font: 700 24px/1 var(--font); letter-spacing: 0.04em; padding: 16px 16px; border: 0; border-radius: 0; background: var(--white); color: var(--blue); -webkit-appearance: none; appearance: none; }
.pl-search input::placeholder { color: rgba(31, 78, 245, 0.45); font-weight: 400; font-size: 18px; letter-spacing: 0; }
.pl-search input:focus { outline: 3px solid rgba(255,255,255,0.6); outline-offset: 2px; }
.pl-results { list-style: none; margin: 0; padding: 0; background: var(--white); color: var(--blue); border-top: 1px solid var(--line); max-height: 60vh; overflow: auto; }
.pl-results a { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 12px; align-items: center; padding: 12px 16px; text-decoration: none; border-bottom: 1px solid rgba(31,78,245,0.15); }
.pl-results a:focus, .pl-results a:hover { background: rgba(31,78,245,0.07); outline: none; }
.pl-results b { font-size: 24px; letter-spacing: -0.01em; }
.pl-results span { font-weight: 700; line-height: 1.2; }
.pl-results small { display: block; font-weight: 400; font-size: 13px; opacity: 0.85; }
.pl-nores { margin-top: 10px; font-size: 14px; }

/* Plano */
.pl-map { padding: 20px 16px 8px; }
.pl-map__scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.pl-map__hint { display: none; margin-top: 8px; font-size: 12px; color: var(--soft); }
.pl-zone { margin: 0; }
.pl-zone figcaption { font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: 8px; }
.pl-svg { display: block; width: 100%; height: auto; font-family: var(--font); }
.pl-floor { fill: rgba(31, 78, 245, 0.05); stroke: var(--blue); stroke-width: 4; stroke-linejoin: round; }
.pl-wall { stroke: var(--blue); stroke-width: 3; stroke-linecap: round; }
.pl-room { fill: rgba(31, 78, 245, 0.55); font-size: 13px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; text-anchor: middle; }
.pl-mark rect, .pl-mark circle { fill: none; stroke: rgba(31, 78, 245, 0.4); stroke-width: 2; stroke-dasharray: 6 6; }
.pl-mark text { fill: rgba(31, 78, 245, 0.75); font-size: 14px; text-anchor: middle; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.pl-mark--round > circle:first-child { fill: rgba(31, 78, 245, 0.06); stroke-dasharray: none; stroke-width: 2.5; }
.pl-mark__ring { stroke-dasharray: 4 5; }
.pl-mark text.pl-mark__sub { font-size: 10px; font-weight: 600; letter-spacing: 0.06em; text-transform: none; }
.pl-mark--bloque rect { fill: rgba(31, 78, 245, 0.12); stroke: none; }
.pl-mark--suave rect { stroke-dasharray: 3 4; }
.pl-ped { fill: none; stroke: rgba(31, 78, 245, 0.5); stroke-width: 2; }
.pl-free { fill: none; stroke: rgba(31, 78, 245, 0.2); stroke-width: 1.5; stroke-dasharray: 4 4; }
.pl-st rect { fill: var(--white); stroke: var(--blue); stroke-width: 2; transition: fill .15s; }
.pl-st text { text-anchor: middle; fill: var(--blue); pointer-events: none; }
.pl-st__c { font-size: 24px; font-weight: 700; letter-spacing: -0.01em; }
.pl-st__g { font-size: 9.5px; font-weight: 600; }
a.pl-st:hover rect, a.pl-st:focus rect, a.pl-st.is-active rect { fill: var(--blue); }
a.pl-st:hover text, a.pl-st:focus text, a.pl-st.is-active text { fill: var(--white); }
a.pl-st:focus { outline: none; }
.pl-st.is-empty rect { fill: transparent; stroke: rgba(31,78,245,0.3); stroke-dasharray: 5 5; }
.pl-st.is-empty text { fill: rgba(31,78,245,0.35); }
.pl-st.is-soon rect { stroke-dasharray: 8 5; }
.pl-st.is-here rect { fill: var(--blue); }
.pl-st.is-here text { fill: var(--white); }
.pl-st.is-flash rect { animation: flash 1.2s ease 2; }
@keyframes flash { 50% { fill: var(--blue); } }

/* Listado */
.pl-list { padding: 28px 16px 0; }
.pl-list__note { font-size: 14px; color: var(--soft); margin: 6px 0 14px; }
.pl-list ul { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--line); }
.pl-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); text-decoration: none; }
.pl-row__c { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
.pl-row__g { font-weight: 700; line-height: 1.25; }
.pl-row__g small { display: block; font-weight: 400; font-size: 13px; color: var(--soft); margin-top: 2px; }
.pl-row__n { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; }

/* Hoja inferior */
.pl-sheet { position: fixed; inset: 0; z-index: 50; }
.pl-sheet[hidden] { display: none; }
.pl-sheet__scrim { position: absolute; inset: 0; background: rgba(10, 20, 60, 0.45); }
.pl-sheet__card { position: absolute; left: 0; right: 0; bottom: 0; background: var(--white); color: var(--blue); padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); border-top: 4px solid var(--blue); transform: translateY(0); animation: up .22s ease; }
@keyframes up { from { transform: translateY(100%); } }
.pl-sheet__x { position: absolute; right: 10px; top: 8px; border: 0; background: none; color: var(--blue); font-size: 34px; line-height: 1; padding: 6px 10px; cursor: pointer; }
.pl-sheet__top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.pl-sheet__c { font-size: 72px; font-weight: 700; line-height: 0.85; letter-spacing: -0.03em; }
.pl-sheet__img { width: 84px; height: 84px; object-fit: cover; margin-right: 34px; }
.pl-sheet__img[src=""], .pl-sheet__img:not([src]) { display: none; }
.pl-sheet__g { margin-top: 14px; font-size: 22px; font-weight: 700; line-height: 1.15; }
.pl-sheet__a { margin-top: 6px; font-size: 16px; color: var(--soft); }
.pl-sheet__f { margin-top: 4px; font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.pl-sheet .btn { width: 100%; justify-content: space-between; margin-top: 18px; }

/* Stand */
.st-hero { background: var(--blue); color: var(--white); padding: 22px 16px 30px; --line: rgba(255,255,255,0.3); }
.st-code { font-size: clamp(110px, 38vw, 260px); font-weight: 700; line-height: 0.8; letter-spacing: -0.05em; margin-left: -0.04em; }
.st-g { margin-top: 18px; font-size: clamp(28px, 7vw, 54px); font-weight: 700; line-height: 1.02; text-transform: uppercase; letter-spacing: -0.01em; }
.st-meta { margin-top: 10px; font-size: 13px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.st-links { margin-top: 14px; font-size: 15px; }
.st-links a { text-underline-offset: 3px; }
.st-addr { margin-top: 10px; font-size: 15px; line-height: 1.4; }
.st-addr a { text-underline-offset: 3px; }
.st-txt { margin-top: 16px; max-width: 620px; font-size: 16px; line-height: 1.5; color: rgba(255,255,255,0.9); }
.pl-door__gap { stroke: #fff; stroke-width: 9; }
.pl-door__arrow { stroke: var(--blue); stroke-width: 4; fill: none; }
.pl-door marker path, #pl-arrow path { fill: var(--blue); }
.pl-door text { fill: var(--blue); font-size: 22px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; text-anchor: middle; }
.st-sec { padding: 30px 16px 0; }
.st-sec > .label { margin-bottom: 14px; }
.st-soon { font-size: 22px; font-weight: 300; padding: 20px 0; }
.st-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
.st-w { display: block; text-decoration: none; }
.st-w img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; background: rgba(31,78,245,0.06); }
.st-w__t { display: block; margin-top: 8px; font-size: 14px; font-weight: 700; line-height: 1.25; }
.st-w__a { display: block; font-size: 13px; color: var(--soft); }
.st-arts { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--line); }
.st-art { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; padding: 16px 0; border-top: 1px solid var(--line); }
.st-art:not(:has(img)) { grid-template-columns: minmax(0, 1fr); }
.st-art__img { width: 72px; height: 72px; object-fit: cover; }
.st-art h3 { font-size: 20px; font-weight: 700; }
.st-art a { font-size: 14px; text-underline-offset: 3px; }
.st-art p { margin-top: 8px; font-size: 15px; color: var(--soft); line-height: 1.55; }
.st-mini .pl-svg { max-width: 640px; }
.st-nav { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; margin: 34px 16px 0; padding-top: 18px; border-top: 1px solid var(--line); }
.st-nav a { text-decoration: none; }
.st-nav a:last-child { text-align: right; }
.st-nav a:nth-child(2) { text-align: center; }
.st-nav small { display: block; font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--soft); }
.st-nav b { font-size: 22px; }
.st-nav a:nth-child(2) b { font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; }

/* Ficha de obra */
.wk-fig { margin: 0; background: #0e1a4d; display: grid; place-items: center; min-height: 52vh; }
.wk-fig img { width: 100%; height: auto; max-height: 82vh; object-fit: contain; }
.wk-info { padding: 22px 16px 0; max-width: 760px; }
.wk-code { font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; }
.wk-t { margin-top: 8px; font-size: clamp(28px, 7vw, 48px); font-weight: 700; line-height: 1.05; }
.wk-a { margin-top: 6px; font-size: 20px; font-weight: 300; }
.wk-dl { margin: 22px 0 0; border-bottom: 1px solid var(--line); }
.wk-dl div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.wk-dl dt { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; padding-top: 2px; }
.wk-dl dd { margin: 0; font-size: 16px; }
.wk-ask { width: 100%; justify-content: space-between; margin-top: 24px; }
.wk-nav { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 26px; font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.wk-nav a { text-decoration: none; }
.wk-swipe { margin-top: 10px; font-size: 12px; color: var(--soft); text-align: center; }

/* Pie */
.pl-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 40px; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); background: var(--blue); color: var(--white); font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.pl-foot__off[hidden] { display: none; }

/* Escritorio */
@media (min-width: 900px) {
  .pl-bar { padding: 14px 40px; }
  .pl-bar__logo img { height: 32px; }
  .pl-hero, .pl-map, .pl-list, .st-hero, .st-sec, .pl-foot { padding-left: 40px; padding-right: 40px; }
  .pl-hero { padding-top: 48px; padding-bottom: 44px; }
  .pl-map .pl-svg { max-width: 1240px; margin: 0 auto; }
  .pl-map .pl-svg--v { max-width: 760px; }
  .pl-list ul { columns: 2; column-gap: 40px; border-bottom: 0; }
  .pl-list li { break-inside: avoid; }
  .pl-row { border-bottom: 0; }
  .pl-sheet__card { left: auto; right: 32px; bottom: 32px; width: 380px; border: 4px solid var(--blue); }
  .st-hero { padding-top: 40px; padding-bottom: 48px; }
  .st-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 20px; }
  .st-nav { margin-left: 40px; margin-right: 40px; }
  main.wk { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: start; }
  .wk-fig { min-height: calc(100vh - 60px); position: sticky; top: 60px; }
  .wk-info { padding: 48px 40px; }
  .wk-swipe { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .pl-sheet__card { animation: none; }
  .pl-st.is-flash rect { animation: none; }
}

/* En móvil el plano completo se ve a tamaño legible y se desliza en horizontal */
@media (max-width: 699px) {
  .pl-map { padding-left: 0; padding-right: 0; }
  .pl-map figcaption, .pl-map__hint { padding: 0 16px; }
  .pl-map__scroll .pl-svg--v { width: auto; max-width: 100%; margin: 0 auto; padding: 0 8px; }
  .pl-svg--v .pl-st__g { display: none; }
  .pl-svg--v .pl-st__c { font-size: 30px; }
  .pl-svg--v .pl-mark text { font-size: 18px; }
  .pl-svg--v .pl-mark__sub { display: none; }
}

/* Favoritos en el plano, el stand y la ficha */
.pl-sheet__row { display: flex; gap: 12px; align-items: center; margin-top: 14px; }
.pl-sheet__row .btn { flex: 1; justify-content: center; margin-top: 0; }
.st-wli { position: relative; }
.st-w__fav { position: absolute; z-index: 2; right: 8px; top: 8px; }
.st-art h3 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wk-th { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.wk-th .fav-btn { margin-top: 10px; }
.pl-st__fav { display: none; }

/* Enlace al catálogo */
.pl-cat { margin-top: 18px; }
.pl-cat .btn { color: var(--white); border-color: var(--white); }
.pl-cat .btn:hover { background: var(--white); color: var(--blue); }
.st-cat { margin-top: 12px; font: 700 13px/1 var(--font); letter-spacing: .12em; text-transform: uppercase; }
.st-cat a { color: inherit; text-decoration: underline; text-underline-offset: 4px; }

/* Stand: obras agrupadas por artista */
.st-ag { padding-top: 34px; }
.st-ag + .st-ag { margin-top: 6px; }
.st-ag__h { display: flex; align-items: center; gap: 14px; padding-top: 16px; border-top: 2px solid var(--blue); margin-bottom: 16px; }
.st-ag__h .label { display: block; margin-bottom: 4px; }
.st-ag__h h2 { font-size: 26px; font-weight: 700; line-height: 1.05; text-transform: uppercase; }
.st-ag__ig { display: inline-block; margin-top: 6px; font-size: 14px; text-underline-offset: 3px; }
.st-ag__bio { margin: -4px 0 18px; font-size: 15px; color: var(--soft); line-height: 1.55; max-width: 720px; }
@media (min-width: 900px) { .st-ag__h h2 { font-size: 34px; } }

/* Pie: legal y créditos */
.pl-foot__legal a, .pl-foot__tech a { color: inherit; text-underline-offset: 3px; }
