.paper-app {
  position: relative;
  min-height: 100vh;
  padding: 24px 0 28px;
  overflow-x: hidden;
}

:root {
  --hub-content-width: min(1520px, calc(100vw - 48px));
}

.hub-ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 248, 248, 0.94) 52%, rgba(244, 244, 244, 0.92) 100%);
}

.hub-flow-svg {
  position: absolute;
  inset: -10vh -12vw;
  width: 124vw;
  height: 122vh;
  opacity: 0.72;
  filter: blur(0.12px);
  transition: transform 220ms ease-out;
  will-change: transform;
}

.hub-flow-line {
  fill: none;
  stroke: rgba(20, 20, 20, 0.22);
  stroke-width: 1.2;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.hub-flow-line.soft {
  stroke: rgba(20, 20, 20, 0.14);
}

.hub-shell {
  position: relative;
  z-index: 1;
  width: var(--hub-content-width);
  margin: 10px auto 0;
  border: none;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}

.hub-topbar {
  position: relative;
  z-index: 1;
  width: var(--hub-content-width);
  margin: 0 auto 20px;
}

.hub-topbar-inner {
  display: inline-block;
  max-width: 100%;
  text-align: left;
  padding: 10px 4px;
}

.hub-kicker {
  display: inline-block;
  margin-bottom: 8px;
  padding: 3px 10px;
  border: 1px solid var(--paper-line-strong);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--paper-ink-muted);
}

.hub-title {
  font-size: clamp(34px, 4.2vw, 64px);
  white-space: nowrap;
}

.hub-content {
  padding: 8px 0 0;
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 20px;
}

.hub-card {
  padding: 16px;
  display: grid;
  gap: 12px;
  min-height: 220px;
  border-color: color-mix(in srgb, var(--paper-line) 80%, #ffffff 20%);
  box-shadow: 0 8px 24px rgba(15, 15, 15, 0.03);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.hub-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(15, 15, 15, 0.08);
  border-color: color-mix(in srgb, var(--paper-line-strong) 75%, #ffffff 25%);
}

.hub-card.is-active {
  border-left: 3px solid rgba(20, 20, 20, 0.55);
  padding-left: 13px;
}

.hub-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.hub-card-badge {
  border: 1px solid rgba(34, 34, 34, 0.16);
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(24, 24, 24, 0.68);
  background: rgba(255, 255, 255, 0.62);
  letter-spacing: 0.01em;
}

.hub-card-state {
  border-color: rgba(14, 14, 14, 0.22);
  background: rgba(245, 245, 245, 0.92);
  color: rgba(20, 20, 20, 0.78);
}

.hub-card-state.active {
  border-color: rgba(47, 125, 77, 0.34);
  background: rgba(237, 247, 240, 0.94);
  color: rgb(47, 93, 63);
}

.hub-card-state.soon {
  border-color: rgba(73, 128, 176, 0.32);
  background: rgba(239, 247, 253, 0.94);
  color: rgb(53, 93, 128);
}

.hub-card-state.checking,
.hub-card-state.unavailable {
  border-color: rgba(20, 20, 20, 0.16);
  background: rgba(252, 252, 252, 0.88);
  color: rgba(20, 20, 20, 0.62);
}

.hub-card-title {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
  transition: transform 160ms ease, letter-spacing 160ms ease;
}

.hub-card:hover .hub-card-title {
  transform: translateX(1px);
  letter-spacing: 0.006em;
}

.hub-card-key {
  margin: 0;
  font-size: 13px;
  color: var(--paper-ink-muted);
  letter-spacing: 0.02em;
}

.hub-card-desc {
  margin: 0;
  font-size: 14px;
  color: var(--paper-ink-muted);
  line-height: 1.45;
}

.hub-card-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.hub-open-btn {
  min-height: 40px;
  min-width: 238px;
  padding: 10px 16px;
}

.hub-empty {
  margin: 0;
  padding: 26px 18px;
  text-align: center;
  color: var(--paper-ink-muted);
}

@media (max-width: 820px) {
  .paper-app {
    display: block;
    min-height: auto;
    padding: 8px 0 16px;
  }

  .hub-topbar {
    width: calc(100vw - 16px);
    margin-bottom: 10px;
  }

  .hub-topbar-inner {
    padding: 6px 0;
  }

  .hub-title {
    white-space: normal;
  }

  .hub-shell {
    width: calc(100vw - 16px);
    margin-top: 0;
    margin-bottom: 16px;
  }

  .hub-content {
    padding-left: 0;
    padding-right: 0;
  }

  .hub-card {
    min-height: 190px;
  }

  .hub-open-btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hub-flow-svg {
    opacity: 0.58;
    transition: none;
  }

  .hub-card-title {
    transition: none;
  }
}
