/* ---------- Barra superior (isla de cristal) ---------- */
.topbar {
  position: sticky; top: 12px; z-index: 60; height: 66px; width: calc(100% - 32px); max-width: 1240px; margin: 12px auto 0;
  display: flex; align-items: center; gap: 20px; padding: 0 12px 0 18px; border-radius: 22px;
  background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(22px) saturate(1.4); -webkit-backdrop-filter: blur(22px) saturate(1.4);
  box-shadow: 0 18px 40px -26px rgba(0, 0, 0, .7);
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--strong); min-width: 0; }
.brandmark { width: 38px; height: 38px; flex: none; display: block; }
.brand-words { display: grid; line-height: 1.1; }
.brandname { font-size: 20px; font-weight: 750; letter-spacing: -.05em; color: var(--strong); }
.brandtag { font-size: 11.5px; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.header-links { display: flex; align-items: center; gap: 4px; margin-left: auto; margin-right: auto; }
.header-links a { padding: 8px 12px; border-radius: 12px; font-size: 13.5px; font-weight: 600; color: var(--text); text-decoration: none; white-space: nowrap; transition: all .28s var(--ease); }
.header-links a:hover,
.header-links a[aria-current] { color: var(--strong); background: var(--hair); }
.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.header-links + .header-actions { margin-left: 0; }
.mobile-nav-button { display: none; }
/* Entre 1001 y 1279 px los siete enlaces y los tres botones no entran con la marca completa: se ajusta la separación, sin partir ningún texto. */
@media (max-width: 1279px) {
  .brandtag { display: none; }
  .header-links { gap: 0; }
  .header-links a { padding: 8px 9px; font-size: 13px; }
}
@media (max-width: 1099px) {
  .header-links a { padding: 8px 7px; font-size: 12.5px; }
  .topbar { gap: 12px; }
}
@media (max-width: 1000px) {
  .header-links { display: none; }
  .header-actions { margin-left: auto; }
  .mobile-nav-button { display: inline-grid; place-items: center; }
  .brandtag { display: none; }
}
@media (max-width: 560px) {
  .topbar #topCreate { display: none; }
}
@media (max-width: 720px) {
  .topbar { top: 8px; width: calc(100% - 20px); height: 60px; margin-top: 8px; gap: 10px; padding: 0 8px 0 14px; border-radius: 20px; }
}
/* En celulares la marca queda solo con el logo: el botón principal y los dos interruptores necesitan el lugar. */
@media (max-width: 520px) {
  .subpage .topbar .brand-words { display: none; }
  .topbar .header-actions { gap: 6px; }
}
@media print {
  .topbar { display: none !important; }
}
