.meta-page{background:#020a14;min-height:calc(100vh - 36px);padding:9px 0 6px;color:#eaf3f9}
.meta-shell{display:grid;gap:9px}
.meta-heading{display:flex;align-items:center;min-height:25px}
.meta-heading h1{margin:0;font-size:23px;line-height:1}
.meta-heading p{margin-top:5px;color:#8da1b3;font-size:11px}

.meta-panel{background:linear-gradient(180deg,#0a1b2b,#06121e);border:1px solid rgba(74,151,204,.34);border-radius:10px;color:#eaf3f9}
.meta-panel h2{font-size:15px;color:#fff}
.meta-dashboard{display:grid;grid-template-columns:294px minmax(430px,1.3fr) minmax(365px,.95fr);gap:10px;align-items:start}

/* Panorama */
.meta-context{height:auto;min-height:0;padding:10px 11px;overflow:hidden}
.meta-context-head{padding-bottom:7px;border-bottom:1px solid rgba(91,151,190,.16)}
.meta-context-head h2{margin:0}
.meta-context-head p{margin:4px 0 0;color:#91a5b6;font-size:8.5px;line-height:1.35}
.meta-context dl{display:grid;grid-template-columns:1fr 1fr;margin:8px 0 0;height:auto;align-content:start}
.meta-context-metric{display:grid;grid-template-columns:30px minmax(0,1fr);align-items:center;column-gap:6px;min-height:65px;padding:7px 5px}
.meta-context-metric:nth-child(odd){border-right:1px solid rgba(91,151,190,.14)}
.meta-context-metric:nth-child(-n+2){border-bottom:1px solid rgba(91,151,190,.14)}
.meta-context-icon{display:grid;place-items:center;width:28px;height:28px;color:#8fb7ff}
.meta-context-icon svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.meta-context-copy{display:flex;flex-direction:column;min-width:0}
.meta-context dd{order:1;margin:0;color:#fff;font-size:18px;line-height:1;font-weight:800;white-space:nowrap}
.meta-context dt{order:2;margin-top:3px;color:#91a5b6;font-size:8.5px;line-height:1.2}

/* Distribution */
.meta-distribution{height:458px;padding:12px 13px;overflow:hidden}
.meta-distribution>header{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;padding-bottom:7px}
.meta-distribution>header p{margin-top:3px;color:#8599aa;font-size:8.5px}
.meta-toggle-all{min-height:28px;padding:4px 10px;border:1px solid rgba(168,92,255,.6);border-radius:7px;color:#d4a7ff;font-size:9px;font-weight:700;background:rgba(168,92,255,.06);white-space:nowrap}
.meta-toggle-all:hover,.meta-toggle-all:focus-visible{background:rgba(168,92,255,.14);outline:none}
.meta-table-head{display:grid;grid-template-columns:37px minmax(155px,1fr) minmax(190px,250px);gap:8px;padding:5px 0 7px;border-bottom:1px solid rgba(91,151,190,.16);color:#8fa5b6;font-size:8px}
.meta-table-head span:last-child{text-align:right}
.meta-distribution-list{display:grid}
.meta-share-row{display:grid;grid-template-columns:37px minmax(155px,1fr) minmax(190px,250px);align-items:center;gap:8px;min-height:27px;color:#eaf3f9;border-bottom:1px solid rgba(82,143,184,.11);text-decoration:none}
.meta-share-row:hover{background:rgba(51,118,164,.055)}
.meta-rank{color:#71899d;font-size:8.5px;font-variant-numeric:tabular-nums}
.meta-identity{min-width:0;display:flex;align-items:center}
.meta-identity .meta-id-name{margin-left:7px;font-size:10px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.meta-page .mu-archetype-badge{width:22px;height:22px}
.meta-page .mu-archetype-symbol img{width:13px;height:13px}
.meta-share-cell{display:grid;grid-template-columns:minmax(90px,1fr) 54px;align-items:center;gap:8px}
.meta-share-cell strong{text-align:right;font-size:10px;font-variant-numeric:tabular-nums}
.meta-share-bar{height:7px;border-radius:999px;background:rgba(91,120,141,.17);overflow:hidden}
.meta-share-bar i{display:block;width:clamp(10px,var(--share),100%);height:100%;background:linear-gradient(90deg,#9c4dff,#bd78ff);border-radius:inherit}
.meta-rest{display:flex;justify-content:space-between;gap:12px;margin-top:7px;padding-top:7px;border-top:1px solid rgba(91,151,190,.13);color:#9baebe;font-size:9px}
.meta-rest strong{color:#d7e6f0;font-size:10px}

/* Movers */
.meta-movements{height:458px;display:grid;grid-template-rows:1fr 1fr;gap:10px;min-width:0}
.meta-movement{padding:11px 12px;overflow:hidden}
.meta-movement>header{padding-bottom:6px;border-bottom:1px solid rgba(91,151,190,.14)}
.meta-movement h2 span{font-weight:800}
.meta-up h2 span{color:#2ee1b1}
.meta-down h2 span{color:#ff6074}
.meta-movement header p{margin-top:3px;color:#8599aa;font-size:8px}
.meta-movement-list{display:grid}
.meta-movement-row{display:grid;grid-template-columns:29px minmax(105px,1fr) 94px 72px;align-items:center;gap:6px;min-height:31px;border-bottom:1px solid rgba(82,143,184,.10);color:#eaf3f9;text-decoration:none}
.meta-movement-row:hover{background:rgba(51,118,164,.045)}
.meta-move-rank{font-size:8.5px;color:#71899d}
.meta-up .meta-move-rank,.meta-up .meta-movement-row strong{color:#2ee1b1}
.meta-down .meta-move-rank,.meta-down .meta-movement-row strong{color:#ff6074}
.meta-move-detail{font-size:8.5px;color:#90a4b5;text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.meta-movement-row strong{text-align:right;font-size:10px;white-space:nowrap;font-variant-numeric:tabular-nums}
.meta-empty{padding:16px 0;color:#8ca0b0;font-size:9px}

/* Full distribution modal */
.meta-modal[hidden]{display:none}
.meta-modal{position:fixed;inset:0;z-index:1200;display:grid;place-items:center;padding:18px}
.meta-modal-backdrop{position:absolute;inset:0;background:rgba(0,5,11,.78);backdrop-filter:blur(2px)}
.meta-modal-card{position:relative;width:min(760px,96vw);max-height:min(650px,88vh);display:flex;flex-direction:column;background:linear-gradient(180deg,#0a1b2b,#06121e);border:1px solid rgba(74,151,204,.42);border-radius:12px;box-shadow:0 22px 60px rgba(0,0,0,.45);overflow:hidden}
.meta-modal-card>header{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:13px 15px;border-bottom:1px solid rgba(91,151,190,.16)}
.meta-modal-card>header h2{font-size:14px}
.meta-modal-card>header p{margin-top:3px;color:#8da1b3;font-size:9px}
.meta-modal-close{width:32px;height:32px;border:1px solid rgba(115,156,183,.3);border-radius:7px;background:#091725;color:#d8e5ef;font-size:22px;line-height:1}
.meta-modal-list{overflow-y:auto;padding:5px 12px 12px;overscroll-behavior:contain}
.meta-modal-row{display:grid;grid-template-columns:38px minmax(0,1fr) 62px;align-items:center;gap:8px;min-height:29px;border-bottom:1px solid rgba(82,143,184,.10);color:#eaf3f9;text-decoration:none}
.meta-modal-row>span:first-child{color:#71899d;font-size:9px}
.meta-modal-row strong{text-align:right;font-size:10px}
body.meta-modal-open{overflow:hidden}

@media(max-width:1180px){
  .meta-dashboard{grid-template-columns:260px minmax(390px,1.2fr) minmax(330px,.9fr)}
  .meta-context-metric{grid-template-columns:33px minmax(0,1fr)}
  .meta-context-icon{width:31px;height:31px}.meta-context-icon svg{width:27px;height:27px}
  .meta-movement-row{grid-template-columns:26px minmax(92px,1fr) 82px 66px;gap:5px}
  .meta-move-detail{font-size:8px}
}

@media(max-width:980px){
  .meta-dashboard{grid-template-columns:1fr 1.35fr;align-items:start}
  .meta-context{height:auto}.meta-distribution{height:auto}
  .meta-movements{grid-column:1/-1;height:auto;grid-template-columns:1fr 1fr;grid-template-rows:none}
}

@media(max-width:768px){
  .meta-page{padding-top:8px}
  .meta-dashboard{grid-template-columns:1fr}
  .meta-context,.meta-distribution,.meta-movements{grid-column:auto;height:auto}
  .meta-movements{grid-template-columns:1fr;grid-template-rows:none}
  .meta-context dl{height:auto;margin-top:10px}
  .meta-context-metric{min-height:72px;padding:8px 6px}
  .meta-share-row,.meta-table-head{grid-template-columns:31px minmax(0,1fr) 118px}
  .meta-share-row{min-height:31px}
  .meta-share-bar{height:6px}
  .meta-movement-row{grid-template-columns:28px minmax(0,1fr) 90px 70px}
}

@media(max-width:430px){
  .meta-context{padding:10px}
  .meta-context-head p{font-size:8px}
  .meta-context-metric{grid-template-columns:30px minmax(0,1fr);column-gap:6px;min-height:62px;padding:8px 5px}
  .meta-context-icon{width:27px;height:27px}.meta-context-icon svg{width:24px;height:24px}
  .meta-context dt{font-size:8px}.meta-context dd{font-size:16px}
  .meta-distribution{padding:10px}
  .meta-table-head{display:none}
  .meta-share-row{grid-template-columns:27px minmax(0,1fr) 54px;gap:5px}
  .meta-share-bar{display:none}
  .meta-share-cell{display:block}.meta-share-cell strong{display:block}
  .meta-identity .meta-id-name{font-size:9px}.meta-share-cell strong{font-size:9px}
  .meta-movement{padding:10px}
  .meta-movement-row{grid-template-columns:25px minmax(0,1fr) 64px;min-height:33px}
  .meta-move-detail{display:none}
  .meta-movement-row strong{font-size:9px}
  .meta-modal{padding:10px}.meta-modal-card{width:100%;max-height:90vh}
}

@media(min-width:1000px) and (max-height:720px){
  .meta-page{padding-top:7px;padding-bottom:4px}
  .meta-shell{gap:7px}
  .meta-heading{min-height:24px}
  .meta-heading h1{font-size:22px}
  /* Mantiene la geometría aprobada y usa el espacio inferior disponible
     sin estirar el contenido interno ni dejar el footer asomando. */
  .meta-dashboard{height:485px}
  .meta-context{height:auto}.meta-distribution,.meta-movements{height:485px}
  .meta-context dl{height:auto;margin-top:8px}
  .meta-context-metric{min-height:62px;padding:6px 5px}
  .meta-share-row{min-height:27px}
  .meta-movement-row{min-height:29px}
}

/* META V7 — ACLARACIONES MAS LEGIBLES */
.meta-movement header p{
  margin-top:4px !important;
  color:#9aafbf !important;
  font-size:9.5px !important;
  line-height:1.25 !important;
}

/* META V8 — MAS FILAS SIN PERDER DENSIDAD */
@media(min-width:1001px){
  .meta-share-row{
    min-height:25px !important;
  }

  .meta-movement-row{
    min-height:28px !important;
  }
}

/* META V9 — ACLARACION MOVIMIENTOS MAS GRANDE */
.meta-movement header p{
  font-size:10.5px !important;
  line-height:1.3 !important;
}

/* META V10 — 15 DISTRIBUCION + 7 MOVERS */
@media(min-width:1001px){
  .meta-share-row{
    min-height:24px !important;
  }

  .meta-rest{
    margin-top:4px !important;
    padding-top:4px !important;
  }

  .meta-movement-row{
    min-height:25px !important;
  }
}

/* META V11 — 16 DISTRIBUCION + 8 MOVERS SIN RECORTE */
@media(min-width:1001px){
  .meta-distribution{
    height:478px !important;
  }

  .meta-movements{
    height:478px !important;
  }

  .meta-distribution{
    padding-top:10px !important;
    padding-bottom:9px !important;
  }

  .meta-distribution>header{
    padding-bottom:5px !important;
  }

  .meta-table-head{
    padding-top:4px !important;
    padding-bottom:5px !important;
  }

  .meta-share-row{
    min-height:23px !important;
  }

  .meta-rest{
    margin-top:3px !important;
    padding-top:3px !important;
  }

  .meta-movement{
    padding-top:9px !important;
    padding-bottom:8px !important;
  }

  .meta-movement>header{
    padding-bottom:4px !important;
  }

  .meta-movement-row{
    min-height:24px !important;
  }
}

@media(min-width:1000px) and (max-height:720px){
  .meta-dashboard{
    height:500px !important;
  }

  .meta-distribution,
  .meta-movements{
    height:500px !important;
  }
}


/* META V12 — contexto del formato vive en META */
.meta-format-context{
  margin-top:8px;
  padding:8px 8px 7px;
  border:1px solid rgba(91,151,190,.16);
  border-radius:8px;
  background:rgba(5,18,29,.55);
}
.meta-format-topline{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  padding-bottom:7px;
  border-bottom:1px solid rgba(91,151,190,.13);
}
.meta-format-topline>span{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:2px;
}
.meta-format-topline>span:last-child{text-align:right}
.meta-format-topline small{
  color:#8ea3b5;
  font-size:8px;
  font-weight:800;
}
.meta-format-topline strong{
  color:#e7f1f8;
  font-size:11px;
}
.meta-format-topline>span:first-child strong{color:#d75bf3}
.meta-format-topline>span:last-child strong{color:#65dc39}

.meta-format-sets{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:4px;
  margin-top:7px;
}
.meta-format-set{
  min-width:0;
  display:grid;
  justify-items:center;
  align-content:start;
  gap:3px;
  text-align:center;
}
.meta-format-set>span{
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  overflow:hidden;
  border:1px solid #667985;
  border-radius:50%;
  background:#091721;
}
.meta-format-set img{
  width:31px;
  height:31px;
  display:block;
  object-fit:contain;
}
.meta-format-set b{
  max-width:100%;
  color:#dfe7ed;
  font-size:7.5px;
  font-weight:600;
  line-height:1.05;
  white-space:normal;
}
.meta-format-context>p{
  margin:6px 0 0;
  color:#788c9d;
  font-size:8px;
  text-align:right;
}

/* META V13 — panorama compacto en teléfonos.
   Mantener FORMATO DOMINACIÓN y PRÓXIMA ROTACIÓN.
   Las cinco ediciones legales se muestran en una única fila. */
@media (max-width: 768px) {
  .meta-format-context {
    margin-top: 7px;
    padding: 9px 8px 7px;
  }

  .meta-format-topline {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    column-gap: 8px;
    padding-bottom: 7px;
  }

  /* Formato y su nombre, lado a lado. No quitar el rótulo. */
  .meta-format-topline > span:first-child {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: baseline;
    justify-content: flex-start;
    gap: 6px;
    white-space: nowrap;
  }

  .meta-format-topline > span:last-child {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    text-align: right;
    white-space: nowrap;
  }

  .meta-format-topline small {
    font-size: 9px;
    line-height: 1.2;
  }

  .meta-format-topline strong {
    font-size: 11.5px;
    line-height: 1.2;
  }

  .meta-format-sets {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 5px;
    margin-top: 9px;
  }

  .meta-format-set {
    min-width: 0;
    gap: 5px;
    text-align: center;
  }

  .meta-format-set > span {
    width: 38px;
    height: 38px;
  }

  .meta-format-set img {
    width: 35px;
    height: 35px;
  }

  .meta-format-set b {
    display: block;
    width: 100%;
    min-width: 0;
    font-size: clamp(8.5px, 2.3vw, 10px);
    font-weight: 650;
    line-height: 1.15;
    overflow-wrap: break-word;
    white-space: normal;
  }
}

@media (max-width: 380px) {
  .meta-format-topline {
    grid-template-columns: minmax(0, 1fr) minmax(0, .9fr);
    gap: 5px;
  }

  .meta-format-topline > span:first-child { gap: 4px; }
  .meta-format-topline small { font-size: 8px; }
  .meta-format-topline strong { font-size: 10px; }
  .meta-format-sets { gap: 3px; }
  .meta-format-set > span { width: 34px; height: 34px; }
  .meta-format-set img { width: 31px; height: 31px; }
}


/* META V14 — movimientos de presencia con muestra semanal real.
   Aclarar los cambios sin alterar los datos originales. */
.meta-movement h2{
  font-size:13px;
  line-height:1.2;
}
.meta-movement header .meta-week-samples{
  color:#b3c6d4 !important;
  font-size:8.5px !important;
  font-weight:500;
  line-height:1.25 !important;
  margin-top:3px !important;
}
.meta-movement header .meta-week-samples b{
  color:#e2eef6;
  font-weight:750;
}
.meta-movement-row{
  grid-template-columns:23px minmax(0,1fr) 87px 101px;
  gap:4px;
}
.meta-move-change{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  justify-content:center;
  gap:1px;
  min-width:0;
  line-height:1.05;
}
.meta-move-change>span{
  font-size:10px;
  font-weight:800;
}
.meta-move-change>small{
  color:#91aabd;
  font-size:7px;
  font-weight:500;
  white-space:nowrap;
}
/* META V15 — siete variaciones por panel, visibles junto al META. */
@media(min-width:1001px){
  .meta-movements{
    height:478px !important;
    grid-template-rows:repeat(2,minmax(0,1fr)) !important;
    gap:8px;
  }
  .meta-movement{
    padding:7px 11px 6px !important;
    overflow:hidden;
  }
  .meta-movement>header{
    padding-bottom:3px !important;
  }
  .meta-movement header p:not(.meta-week-samples){
    margin-top:2px !important;
    font-size:9px !important;
    line-height:1.1 !important;
  }
  .meta-movement header .meta-week-samples{
    margin-top:2px !important;
    line-height:1.1 !important;
  }
  .meta-movement-row{
    min-height:24px !important;
  }
}
@media(min-width:1001px) and (max-height:720px){
  /* Misma altura que Distribución del META en pantallas bajas. */
  .meta-movements{height:500px !important;}
}
@media(max-width:430px){
  .meta-movement-row{
    grid-template-columns:24px minmax(0,1fr) 106px;
    gap:4px;
  }
  .meta-move-change>small{
    font-size:7px;
  }
}


/* META V16 — comparación semanal en una sola línea, columnas limpias.
   Los puntos porcentuales siguen siendo los cálculos originales de Meta Share. */
.meta-movements-context{
  display:flex;align-items:center;justify-content:space-between;gap:5px 8px;
  min-width:0;padding:0 3px;color:#9cb4c6;font-size:8px;line-height:1.2;
}
.meta-movements-context>span{
  font-weight:750;white-space:nowrap;letter-spacing:.02em;color:#90aabf;
}
.meta-movements-context>strong{
  min-width:0;color:#d6e5f0;font-size:8.5px;font-weight:650;
  text-align:right;font-variant-numeric:tabular-nums;
}
.meta-movement>header{
  display:flex;align-items:center;min-height:20px;
  padding-bottom:3px!important;
}
.meta-movement-table-head{
  display:grid;grid-template-columns:23px minmax(0,1fr) 87px 101px;
  gap:4px;align-items:center;min-height:16px;
  padding:2px 0 3px;border-bottom:1px solid rgba(91,151,190,.14);
  color:#8ba3b5;font-size:7.5px;font-weight:800;line-height:1;
  white-space:nowrap;
}
.meta-movement-table-head>span:nth-child(3),
.meta-movement-table-head>span:nth-child(4){text-align:right}
.meta-move-change{
  display:block;min-width:0;text-align:right!important;
  font-size:11px!important;font-weight:850!important;line-height:1.1!important;
  white-space:nowrap;font-variant-numeric:tabular-nums;
}
@media (min-width:1001px){
  .meta-movements{
    grid-template-rows:18px repeat(2,minmax(0,1fr))!important;
    gap:6px!important;
  }
  .meta-movement{padding:7px 11px 6px!important}
  .meta-movement-row{min-height:23px!important}
}
@media (max-width:1000px){
  .meta-movements-context{grid-column:1/-1;flex-wrap:wrap}
  .meta-movements{grid-template-rows:auto!important}
}
@media (max-width:430px){
  .meta-movement-table-head{
    grid-template-columns:24px minmax(0,1fr) 106px;
    gap:4px;font-size:7px;
  }
  .meta-movement-table-head>span:nth-child(3){display:none}
  .meta-movement-table-head>span:nth-child(4){grid-column:3}
  .meta-move-change{font-size:10px!important}
}
