/* Compact portal only; the original palette, icons, login and chat stay intact. */
#hubView {
  padding: max(16px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right))
    max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
}
#hubView .hub { width: min(100%, 800px); gap: 16px; }
#hubView .hub__header { padding-top: 0; }
#hubView .hub__brand { margin-bottom: 0; }
#hubView .hub__title {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
#hubView .hub__tiles {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 1fr; gap: 12px; margin-block: auto;
}
#hubView .hub-tile {
  grid-column: auto; grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr; justify-items: center;
  min-height: 132px; padding: 16px 10px; gap: 10px;
  border-radius: 20px; text-align: center;
}
#hubView .hub-tile__icon { width: 40px; height: 40px; border-radius: 13px; }
#hubView .hub-tile__icon svg { width: 23px; height: 23px; }
#hubView .hub-tile__text { align-self: center; gap: 5px; }
#hubView .hub-tile__title { font-size: clamp(15px, 4.1vw, 20px); line-height: 1.2; }
#hubView .hub-tile__meta { font-size: 12px; line-height: 1.35; }
#hubView .hub-tile__chevron { display: none; }
#hubView .hub__footer { margin-top: 0; padding-top: 0; }
@media (min-width: 720px) {
  #hubView { padding: 24px; }
  #hubView .hub__tiles { gap: 16px; }
  #hubView .hub-tile {
    grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: auto;
    justify-items: stretch; min-height: 112px; padding: 18px; gap: 12px; text-align: left;
  }
  #hubView .hub-tile__title { font-size: 20px; }
  #hubView .hub-tile__meta { font-size: 13px; }
  #hubView .hub-tile__chevron { display: grid; width: 30px; height: 30px; }
}
@media (max-height: 480px) and (min-width: 600px) {
  #hubView { padding-block: 10px; }
  #hubView .hub { gap: 10px; }
  #hubView .hub-tile { min-height: 88px; padding-block: 10px; }
}

/* The footer keeps its identity and sign-out controls; history is secondary. */
#hubView footer.hub__footer { flex-wrap: wrap; }
#hubView #portalVersion {
  flex: none; min-height: 32px; padding: 3px 6px; border: 0;
  background: transparent; color: var(--text-muted, #aaa); cursor: pointer;
  font: inherit; font-size: 12px; font-variant-numeric: tabular-nums;
}
#hubView #portalVersion:hover { text-decoration: underline; }
#hubView #portalHistory {
  box-sizing: border-box; width: min(30rem, calc(100% - 2rem)); max-height: 80vh;
  margin: auto; overflow: auto; padding: 1.25rem; border: 1px solid #444a46;
  border-radius: 16px; background: var(--bg, #101411); color: var(--text, #f1f3f1);
  text-align: start; font-size: 1rem; line-height: 1.45;
}
#hubView #portalHistory::backdrop { background: rgb(0 0 0 / 65%); }
#hubView #portalHistory h2 { margin: 0; font-size: 1.25rem; }
#hubView #portalHistory section { margin: 1rem 0; }
#hubView #portalHistory h3 { margin: 0; font-size: 1rem; }
#hubView #portalHistory p { margin: 0; font-size: .82rem; color: var(--text-muted, #aaa); }
#hubView #portalHistory ul { margin: .25rem 0 0; padding-inline-start: 1.3rem; }
#hubView #portalHistory button {
  min-height: 40px; padding-inline: 1rem; border: 1px solid currentColor;
  border-radius: 8px; background: transparent; color: inherit; cursor: pointer;
}
#hubView :is(#portalVersion, #portalHistory button):focus-visible {
  outline: 2px solid var(--accent-strong, #9ad9b7); outline-offset: 2px;
}
#hubView #portalHistory header {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem;
}
