/* ================================================================
 PINACOTECA360 · FASE 2 · Colecciones y fichas públicas · 22-10-2026
 Capa visual posterior a Fase 1. No modifica lógica, audio ni acceso.
 Requiere body.p360-ui-v2. NO aplicar en administración.
 ================================================================ */
body.p360-ui-v2 {
  --p360-f2-surface: #fffcf7;
  --p360-f2-matte: #ece2d5;
  --p360-f2-border: #dfcdbd;
  --p360-f2-muted: #71645f;
  --p360-f2-shadow: 0 5px 18px rgba(66,26,34,.075);
  --p360-f2-shadow-hover: 0 16px 34px rgba(66,26,34,.145);
}

/* 1 · Catálogo de obras organizado por etapas, sin cambiar la
      disposición original de grupos ni el ancho útil de PC. */
body.p360-ui-v2 .p360-etapa {
  background: linear-gradient(180deg, #f9f4ec 0%, #f3eadd 100%);
  border: 1px solid var(--p360-f2-border);
  border-radius: 20px;
  padding: clamp(14px,1.8vw,24px);
  box-shadow: 0 5px 20px rgba(57,23,30,.055);
  min-width: 0;
}
body.p360-ui-v2 .p360-etapa-cabecera {
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding: 0 2px 13px;
  border-bottom: 1px solid #cdb6a5;
}
body.p360-ui-v2 .p360-etapa-titulo {
  font-size: clamp(19px,2vw,24px);
  font-weight: 750;
  color: var(--p360-ui-vino-profundo);
  letter-spacing: -.028em;
}
body.p360-ui-v2 .p360-etapa-periodo {
  padding: 5px 10px;
  border-radius: 999px;
  background: #efe0d1;
  color: var(--p360-ui-vino);
  font-size: 12px;
  font-weight: 650;
}
body.p360-ui-v2 .p360-etapa-grid {
  min-width: 0;
  column-gap: 14px;
  row-gap: 52px; /* Respeta cabeceras superiores de los grupos */
  padding-top: 25px;
}
body.p360-ui-v2 .p360-etapa .p360-card {
  min-width: 0;
  overflow: hidden;
  background: var(--p360-f2-surface);
  border: 1px solid var(--p360-f2-border);
  border-radius: 15px;
  box-shadow: var(--p360-f2-shadow);
  transition: transform .2s ease,box-shadow .2s ease,border-color .2s ease;
}
body.p360-ui-v2 .p360-etapa .p360-card:hover {
  transform: translateY(-4px);
  border-color: #bc9a8d;
  box-shadow: var(--p360-f2-shadow-hover);
}
body.p360-ui-v2 .p360-etapa .p360-img-enlace,
body.p360-ui-v2 .p360-etapa .p360-sin-img {
  background: #e9dfd2;
}
body.p360-ui-v2 .p360-etapa .p360-img {
  aspect-ratio: 4 / 5;
  object-fit: contain;
  object-position: center;
  background: #e9dfd2;
  padding: 5px;
  transition: filter .2s ease;
}
body.p360-ui-v2 .p360-etapa .p360-card:hover .p360-img {filter: brightness(1.035)}
body.p360-ui-v2 .p360-etapa .p360-sin-img {aspect-ratio: 4/5}
body.p360-ui-v2 .p360-etapa .p360-card-texto {
  padding: 13px 12px 15px;
  text-align: left;
}
body.p360-ui-v2 .p360-etapa .p360-nombre {
  display: block;
  color: var(--p360-ui-vino-profundo);
  font-size: clamp(13px,1.2vw,15px);
  line-height: 1.32;
  font-weight: 750;
  overflow-wrap: anywhere;
}
body.p360-ui-v2 .p360-etapa .p360-nombre:hover {text-decoration: none;color:#963f4c}
body.p360-ui-v2 .p360-etapa .p360-fecha-obra {font-size: 12px;font-weight: 700;color:#53453f;margin-top:8px}
body.p360-ui-v2 .p360-etapa .p360-ubicacion {font-size: 11.5px;line-height: 1.4;color:var(--p360-f2-muted);margin-top:4px;overflow-wrap:anywhere}
body.p360-ui-v2 .p360-etapa .p360-atribucion-obra {font-size:11px!important;line-height:1.35}
body.p360-ui-v2 .p360-etapa .p360-versiones {padding:5px 9px;background:#f2e6d9;border:0;font-size:11px}
body.p360-ui-v2 .p360-serie-etiqueta,
body.p360-ui-v2 .p360m-serie-etiqueta {
  border-radius: 999px;
  padding: 6px 11px;
  background: rgba(86,24,34,.95);
  box-shadow: 0 4px 12px rgba(45,12,19,.25);
  text-decoration: none;
}
body.p360-ui-v2 .p360-grupo-flujo {
  background: rgba(255,251,246,.64);
  border-color: #bc9c89;
  border-radius: 0 0 15px 15px;
}
body.p360-ui-v2 .p360-grupo-enlace {
  background: #e8d4c4;
  border-color: #bc9c89;
  border-radius: 11px 11px 0 0;
  font-weight: 750;
}

/* 2 · Móvil: imagen de obra protagonista y tarjeta limpia.
      Se mantienen grupos y etapas como contenedores funcionales. */
body.p360-ui-v2 .p360m-etapa {
  background: linear-gradient(180deg,#f9f4ec,#f2e9dc);
  border: 1px solid var(--p360-f2-border);
  border-radius: 18px;
  padding: 13px;
  box-shadow: 0 5px 18px rgba(58,27,30,.055);
  min-width:0;
}
body.p360-ui-v2 .p360m-etapa-cabecera {
  align-items: center;
  padding: 0 3px 11px;
  border-bottom: 1px solid #cdb6a5;
  margin-bottom: 15px;
}
body.p360-ui-v2 .p360m-etapa-titulo {font-size:18px;letter-spacing:-.025em;font-weight:750}
body.p360-ui-v2 .p360m-etapa-periodo {background:#efdfd0;padding:5px 8px;border-radius:999px;font-size:11px;color:#642431;font-weight:650}
body.p360-ui-v2 .p360m-etapa-grid {gap:19px;min-width:0}
body.p360-ui-v2 .p360m-card-obra {
  border:1px solid var(--p360-f2-border);
  border-radius: 16px;
  background: var(--p360-f2-surface);
  box-shadow: var(--p360-f2-shadow);
  overflow:hidden;
  min-width:0;
}
body.p360-ui-v2 .p360m-media-obra {
  aspect-ratio: 16 / 9;
  background: #e9dfd2;
  border-bottom:1px solid #e3d3c5;
}
body.p360-ui-v2 .p360m-media-obra img {
  width:100%;height:100%;object-fit:contain;object-position:center;
  padding:6px;
}
body.p360-ui-v2 .p360m-pie-obra {padding:15px 15px 17px;text-align:left}
body.p360-ui-v2 .p360m-obra-nombre {font-size:17px;line-height:1.3;font-weight:750;color:var(--p360-ui-vino-profundo)}
body.p360-ui-v2 .p360m-obra-enlace {color:inherit;text-decoration:none}
body.p360-ui-v2 .p360m-obra-anio {font-size:13px;font-weight:700;margin-top:8px}
body.p360-ui-v2 .p360m-ubicacion {font-size:12px;line-height:1.45;margin-top:5px;color:var(--p360-f2-muted)}
body.p360-ui-v2 .p360m-obra-atribucion {font-size:12px!important}
body.p360-ui-v2 .p360m-versiones {display:inline-block;margin-top:10px;background:#f0e2d4;color:var(--p360-ui-vino);border-radius:999px;padding:5px 10px;font-size:11px;font-weight:750}
body.p360-ui-v2 .p360m-grupo-flujo {background:rgba(255,252,247,.7);border-color:#bc9c89;border-radius:13px;padding:30px 8px 9px}
body.p360-ui-v2 .p360m-grupo-enlace {background:#e8d4c4;border-color:#bc9c89;border-radius:10px 10px 0 0;font-size:12px}

/* 3 · Ficha de obra PC: imagen sobre un soporte neutro y paneles
      modernos sin alterar visor, enlaces ni controles JavaScript. */
body.p360-ui-v2 .od-page .od-back,
body.p360-ui-v2 .s-page .od-back {display:inline-flex;align-items:center;min-height:36px;padding:7px 12px;border:1px solid var(--p360-f2-border);border-radius:999px;background:#fff9f2;color:var(--p360-ui-vino);text-decoration:none;transition:background .18s ease}
body.p360-ui-v2 .od-page .od-back:hover,
body.p360-ui-v2 .s-page .od-back:hover {background:#eadbc9}
body.p360-ui-v2 .od-hero {
  background:var(--p360-f2-surface);
  border:1px solid var(--p360-f2-border);
  border-radius:22px;
  box-shadow:var(--p360-f2-shadow);
  gap:clamp(18px,2.5vw,36px);
  padding:clamp(15px,2.2vw,29px);
}
body.p360-ui-v2 .od-image {
  min-width:0;
  background:linear-gradient(160deg,#282124,#161315);
  border-radius:16px;
  box-shadow:0 10px 24px rgba(28,15,17,.15);
}
body.p360-ui-v2 .od-image img {object-fit:contain}
body.p360-ui-v2 .od-title {font-size:clamp(32px,3vw,48px);line-height:1.13;letter-spacing:-.03em;color:var(--p360-ui-vino-profundo)}
body.p360-ui-v2 .od-author {font-size:clamp(19px,2vw,23px);line-height:1.35}
body.p360-ui-v2 .od-kicker {letter-spacing:.115em;font-weight:800}
body.p360-ui-v2 .od-current {border:1px solid var(--p360-f2-border);border-left:4px solid var(--p360-ui-vino);border-radius:12px;background:#faf2e8}
body.p360-ui-v2 .od-nav {background:rgba(255,252,247,.98);border:1px solid var(--p360-f2-border);border-radius:13px;box-shadow:var(--p360-f2-shadow);overflow:hidden}
body.p360-ui-v2 .od-nav a {border-radius:9px;margin:4px 0;transition:background .18s ease,color .18s ease}
body.p360-ui-v2 .od-sec {background:var(--p360-f2-surface);border:1px solid var(--p360-f2-border);border-radius:18px;box-shadow:var(--p360-f2-shadow)}
body.p360-ui-v2 .od-sec h2 {font-size:clamp(23px,2.3vw,29px);letter-spacing:-.025em}
body.p360-ui-v2 .od-panel,
body.p360-ui-v2 .od-person,
body.p360-ui-v2 .od-item,
body.p360-ui-v2 .od-version-card {background:#fff;border:1px solid #e5d5c8;border-radius:13px;box-shadow:0 2px 8px rgba(66,26,34,.035)}
body.p360-ui-v2 .od-tag {border-radius:999px;background:#f6ecdf}
body.p360-ui-v2 .od-tag.main {background:var(--p360-ui-vino)}
body.p360-ui-v2 .od-gallery .od-g {border-radius:11px}
body.p360-ui-v2 .od-version-card {transition:transform .18s ease,box-shadow .18s ease}
body.p360-ui-v2 .od-version-card:hover {transform:translateY(-2px);box-shadow:var(--p360-f2-shadow-hover)}

/* 4 · Ficha móvil: imagen protagonista a ancho completo y lectura en tarjetas. */
body.p360-ui-v2 .odm-main {color:var(--p360-ui-texto)}
body.p360-ui-v2 .odm-topline {margin-bottom:12px}
body.p360-ui-v2 .odm-hero {background:var(--p360-f2-surface);border:1px solid var(--p360-f2-border);border-radius:18px;box-shadow:var(--p360-f2-shadow);overflow:hidden;padding:10px}
body.p360-ui-v2 .odm-hero .odm-image {background:linear-gradient(160deg,#292326,#171416);border-radius:13px;min-width:0;overflow:hidden}
body.p360-ui-v2 .odm-hero .odm-image img#odmMainImage {object-fit:contain;max-width:100%;max-height:min(58dvh,520px)}
body.p360-ui-v2 .odm-hero-copy {padding:19px 8px 12px}
body.p360-ui-v2 .odm-hero-copy h1 {font-size:clamp(27px,6.5vw,35px);line-height:1.12;letter-spacing:-.025em;font-weight:600}
body.p360-ui-v2 .odm-author {font-size:clamp(18px,4.8vw,22px)}
body.p360-ui-v2 .odm-location {border-radius:10px;background:#f7eddf;border-left:4px solid var(--p360-ui-vino)}
body.p360-ui-v2 .odm-section {margin-top:16px;padding:19px 15px;background:var(--p360-f2-surface);border:1px solid var(--p360-f2-border);border-radius:17px;box-shadow:var(--p360-f2-shadow)}
body.p360-ui-v2 .odm-section h2 {font-size:clamp(22px,5.2vw,27px);letter-spacing:-.02em}
body.p360-ui-v2 .odm-card,
body.p360-ui-v2 .odm-person,
body.p360-ui-v2 .odm-list-item,
body.p360-ui-v2 .odm-version-card {background:#fffcf7;border:1px solid #e5d5c8;border-radius:12px}
body.p360-ui-v2 .odm-tag {background:#f5e9dc}
body.p360-ui-v2 .odm-tag.main {background:var(--p360-ui-vino)}
body.p360-ui-v2 .odm-gallery-item {border-radius:11px}

/* 5 · Lecturas y estudios: aspecto de biblioteca / reproductor,
      SIN intervenir en síntesis, velocidad, pausas o eventos. */
body.p360-ui-v2 .p360-contenido-obra {background:var(--p360-f2-surface)}
body.p360-ui-v2 .p360-lectura {
  border:1px solid #e4d3c5;
  border-radius:14px;
  background:#fffdf9;
  box-shadow:0 3px 14px rgba(50,25,25,.055);
  margin:0 0 12px;
  overflow:hidden;
  padding:0;
}
body.p360-ui-v2 .p360-lectura-cabecera {min-height:78px;padding:15px 17px;gap:12px}
body.p360-ui-v2 .p360-lectura-cabecera h3 {color:#48252b;line-height:1.33;letter-spacing:-.015em}
body.p360-ui-v2 .p360-estudio-identidad {min-width:0}
body.p360-ui-v2 .p360-estudio-icono {width:48px;height:48px;flex-basis:48px}
body.p360-ui-v2 .p360-lectura-botones button {border:1px solid #d6bdb1;border-radius:12px;background:#f7ede4;color:#6b1f2a;transition:background .18s ease,transform .18s ease,border-color .18s ease}
body.p360-ui-v2 .p360-lectura-botones button:hover:not(:disabled) {background:#ead3c5;transform:translateY(-1px)}
body.p360-ui-v2 .p360-lectura-botones button.speaking,
body.p360-ui-v2 .p360-lectura-botones button[aria-expanded="true"] {background:var(--p360-ui-vino);border-color:var(--p360-ui-vino);color:white}
body.p360-ui-v2 .p360-lectura-texto {padding:14px 19px 22px;border-top:1px solid #ebddd0;margin:0}
body.p360-ui-v2 .p360-lectura-texto[hidden] {display:none!important}
body.p360-ui-v2 .p360-lectura-locked {background:#f3eee9;border-color:#e3dbd5}
body.p360-ui-v2 .p360-lectura-locked .p360-lectura-cabecera h3 {color:#76665f}
body.p360-ui-v2 .p360-audio-menu {border:1px solid var(--p360-f2-border);border-radius:14px;box-shadow:0 16px 40px rgba(26,10,16,.2)}

/* 6 · Grupos y series, respetando interacciones del visor documental. */
body.p360-ui-v2 .s-page .s-head {background:var(--p360-f2-surface);border:1px solid var(--p360-f2-border);border-radius:19px;padding:clamp(18px,2.4vw,30px);box-shadow:var(--p360-f2-shadow)}
body.p360-ui-v2 .s-page .s-title {font-size:clamp(29px,3vw,42px);line-height:1.15;letter-spacing:-.025em;color:var(--p360-ui-vino-profundo)}
body.p360-ui-v2 .s-page .s-period {color:var(--p360-f2-muted);font-size:14px}
body.p360-ui-v2 .s-page .s-subtitle {font-weight:750;letter-spacing:-.02em;color:var(--p360-ui-vino)}
body.p360-ui-v2 .s-page .s-card {background:var(--p360-f2-surface);border:1px solid var(--p360-f2-border);border-radius:16px;box-shadow:var(--p360-f2-shadow);overflow:hidden;transition:transform .18s ease,box-shadow .18s ease}
body.p360-ui-v2 .s-page .s-card:hover {transform:translateY(-3px);box-shadow:var(--p360-f2-shadow-hover)}
body.p360-ui-v2 .s-page .s-media {aspect-ratio:4/5;background:#e9dfd2;cursor:zoom-in}
body.p360-ui-v2 .s-page .s-media img {object-fit:contain!important;padding:6px}
body.p360-ui-v2 .s-page .s-info {padding:15px 16px 17px}
body.p360-ui-v2 .s-page .s-name {color:var(--p360-ui-vino-profundo);font-size:16px;line-height:1.35}
body.p360-ui-v2 .s-page .s-meta {color:var(--p360-f2-muted);font-size:12px;line-height:1.4}
body.p360-ui-v2 .s-page .s-sheet {display:inline-flex;padding:7px 12px;border-radius:999px;background:#f2e4d6;text-decoration:none;font-size:12px}
body.p360-ui-v2 .s-page .s-sheet:hover {background:#e6cebe}
body.p360-ui-v2 .s-page .s-grupo-speak,
body.p360-ui-v2 .s-page .s-serie-speak {background:#f8ede4;border:1px solid #d2b7a8;border-radius:50%;color:var(--p360-ui-vino)}
body.p360-ui-v2 .s-page .g-main-image img {border-radius:13px;box-shadow:0 12px 26px rgba(43,19,24,.12)}

/* Solo controles visuales, no se modifican los diálogos a pantalla completa. */
body.p360-ui-v2 :is(.od-page,.odm-main,.s-page,.p360-etapa,.p360m-etapa) :is(a,button,[role="button"]):focus-visible {outline:3px solid #ad6876;outline-offset:3px}
@media (max-width:760px) {
  body.p360-ui-v2 .p360-etapa {padding:13px;border-radius:15px}
  body.p360-ui-v2 .p360-etapa-grid {row-gap:44px;column-gap:10px}
  body.p360-ui-v2 .od-hero {border-radius:15px}
  body.p360-ui-v2 .od-sec {border-radius:14px;padding:19px 16px}
  body.p360-ui-v2 .od-three {grid-template-columns:1fr}
  body.p360-ui-v2 .s-page .s-head {padding:18px 16px;border-radius:15px}
  body.p360-ui-v2 .s-page .s-card {border-radius:13px}
  body.p360-ui-v2 .s-page .s-info {padding:12px 13px 15px}
}
@media (max-width:370px) {
  body.p360-ui-v2 .p360m-etapa {padding:10px}
  body.p360-ui-v2 .p360m-pie-obra {padding:12px}
  body.p360-ui-v2 .p360-lectura-cabecera {padding:12px 10px}
  body.p360-ui-v2 .p360-estudio-icono {width:39px;height:39px;flex-basis:39px}
}
@media (prefers-reduced-motion:reduce) {
  body.p360-ui-v2 .p360-etapa .p360-card,
  body.p360-ui-v2 .s-page .s-card,
  body.p360-ui-v2 .od-version-card,
  body.p360-ui-v2 .p360-lectura-botones button {transition:none!important;transform:none!important}
}
