:root {
  --hub-bg0: #07090c;
  --hub-bg1: #12161d;
  --hub-card: #1a1f28;
  --hub-card-hover: #232a36;
  --hub-text: #f2f4f7;
  --hub-muted: rgba(242, 244, 247, 0.55);
  --hub-line: rgba(255, 255, 255, 0.08);
  --hub-accent: #7dd3c0;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(1200px 600px at 50% -10%, #1a2433 0%, transparent 55%),
    linear-gradient(180deg, var(--hub-bg1), var(--hub-bg0));
  color: var(--hub-text);
  font-family: "Avenir Next", "Segoe UI", "PingFang HK", "Noto Sans TC", sans-serif;
}

body {
  min-height: 100lvh;
}

.hub {
  max-width: 720px;
  margin: 0 auto;
  padding: calc(28px + var(--sat)) 20px calc(40px + var(--sab));
}

.hub-header {
  margin-bottom: 28px;
}

.hub-brand {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--hub-accent);
  font-weight: 600;
}

.hub-title {
  margin: 8px 0 0;
  font-size: clamp(34px, 8vw, 48px);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 420px) {
  .hub-grid {
    gap: 12px;
  }
}

.hub-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  padding: 18px 10px 14px;
  border-radius: 18px;
  background: var(--hub-card);
  border: 1px solid var(--hub-line);
  transition:
    transform 160ms ease,
    background 160ms ease,
    border-color 160ms ease;
}

.hub-tile:hover,
.hub-tile:focus-visible {
  background: var(--hub-card-hover);
  border-color: rgba(125, 211, 192, 0.35);
  transform: translateY(-2px);
  outline: none;
}

.hub-tile:active {
  transform: translateY(0);
}

.hub-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #2a3342, #151a22);
  border: 1px solid var(--hub-line);
  overflow: hidden;
}

.hub-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hub-icon-fallback {
  font-size: 28px;
  font-weight: 700;
  color: var(--hub-accent);
  letter-spacing: -0.04em;
}

.hub-name {
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  line-height: 1.25;
  color: var(--hub-text);
}

.hub-empty {
  grid-column: 1 / -1;
  color: var(--hub-muted);
  font-size: 14px;
  padding: 24px 8px;
}
