/* IKFolio · ajustes de presentación móvil. Sin cambios de comportamiento. */
@media (max-width: 760px) {
  body.ik-home .top {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 12px 16px !important;
    background: #101817 !important;
  }
  .top .ikTopBrand { min-width: 0; gap: 12px; }
  .top .ikTopBrand img { height: 34px; flex: 0 0 auto; }
  .top .ikTopBrand .ikMini { max-width: 230px; font-size: 11px; line-height: 1.4; }
  .top #userbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 8px;
    min-width: 0;
    max-width: 100%;
    color: #fff;
  }
  .top #userbar:empty { display: none; }
  .top #userbar .ikUserEmail {
    grid-column: 1 / -1;
    display: block;
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    font-size: 14px;
    line-height: 1.45;
  }
  .top #userbar .btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 0;
    min-height: 44px;
    margin: 0;
    padding: 10px 8px;
    border: 1px solid rgba(255,255,255,.24) !important;
    border-radius: 10px;
    background: rgba(255,255,255,.10) !important;
    color: #fff !important;
    font-size: 14px;
    line-height: 1.3;
    text-align: center;
    white-space: normal;
  }
  .top #userbar .btn:only-of-type { grid-column: 1 / -1; }
  #projectsView .project > button.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    margin: 10px 0 0 !important;
    padding: 12px;
    font-size: 15px;
    line-height: 1.4;
    text-align: center;
    white-space: normal;
  }
  .pubCard { padding: 12px; border-radius: 14px; }
  .pubMain {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 8px;
  }
  .pubMain > div:first-child { padding-top: 2px; }
  .pubMain > div:first-child input { margin: 0; }
  .pubMain > div:nth-child(2) { display: contents; }
  .pubHeader { display: block; grid-column: 2; min-width: 0; }
  .pubTitle { font-size: 16px; line-height: 1.4; font-weight: 750; }
  .pubMeta { font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
  .pubHeader > .pill { margin: 6px 0 0; font-size: 11px; }
  .pubInfoGrid {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
    margin-top: 4px;
  }
  .pubInfoGrid > div, .pubPanel { min-width: 0; }
  .pubLabel { font-size: 10px; line-height: 1.4; overflow-wrap: anywhere; }
  .pubValue { font-size: 12px; line-height: 1.4; overflow-wrap: anywhere; }
  .pubDetails {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 8px;
    margin-top: 4px;
  }
  .pubPanel { padding: 10px; border-radius: 10px; }
  .authorMetaRow { gap: 6px; margin-top: 8px; }
  .authorPositionInput {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0;
    min-height: 44px;
    padding: 8px !important;
    font-size: 16px !important;
  }
  .authorCount { padding: 4px 6px; font-size: 11px; line-height: 1.4; }
  .authorFlags { gap: 6px; margin-top: 8px; }
  .authorFlag { gap: 6px; padding: 8px 6px; min-height: 44px; font-size: 12px; line-height: 1.4; }
  .authorFlag input { flex: 0 0 18px; width: 18px; height: 18px; }
  .authorFlag span { min-width: 0; overflow-wrap: anywhere; }
  .metricTop { gap: 6px; flex-wrap: wrap; }
  .metricEditBtn { min-height: 44px; max-width: 100%; padding: 7px 8px; font-size: 12px; white-space: normal; }
  .metricGrid { grid-template-columns: minmax(0, 1fr); gap: 6px; margin-top: 8px; }
  .metricBox { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 6px; padding: 8px; }
  .metricBoxLabel { font-size: 11px; line-height: 1.4; margin-bottom: 0; overflow-wrap: anywhere; }
  .metricValueRow { min-height: 32px; min-width: 0; }
  .metricBig { font-size: 21px; line-height: 1.15; }
  .metricBig.metricUnavailable { font-size: 12px; }
  .quartileBadge { min-width: 36px; min-height: 32px; padding: 6px; border-radius: 8px; font-size: 19px; }
  .quartileBadge.metricUnavailable { min-width: 0; padding: 5px; font-size: 11px; }
  .metricEditor { grid-template-columns: minmax(0,1fr); gap: 8px; margin-top: 8px; }
  .metricEditor input, .metricEditor select { min-height: 44px; min-width: 0; font-size: 16px; padding: 8px; }
  .pubSource, .pubPanel .small { font-size: 11px; line-height: 1.45; overflow-wrap: anywhere; }
  .metricRuleNotice { margin-top: 8px; padding: 8px; font-size: 11px; }
}
/* En pantallas muy estrechas o con zoom se prioriza la legibilidad. */
@media (max-width: 359px) {
  .pubDetails { grid-template-columns: minmax(0,1fr); }
}
