:root {
  --bg: #eef2f6;
  --surface: #ffffff;
  --border: #d8e0ea;
  --text: #0c1222;
  --muted: #5b6b7c;
  --accent: #0f766e;
  --accent-hover: #0d9488;
  --up: #059669;
  --down: #dc2626;
  --shadow: 0 1px 3px rgba(12, 18, 34, 0.08);
  --radius: 10px;
  --font: "IBM Plex Sans JP", "Hiragino Sans", "Noto Sans JP", sans-serif;
  --font-display: "Outfit", "IBM Plex Sans JP", sans-serif;
  --ink: #0c1222;
  --ink-soft: #1a2740;
  --paper: #f7f9fc;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.header-inner {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 16px 20px;
}

.brand {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
  text-decoration: none;
}

.brand:hover { color: var(--accent); }

.brand-sub { color: var(--muted); font-size: 0.875rem; }

.header-inner { flex-wrap: wrap; }

.header-nav {
  display: flex;
  gap: 16px;
  margin-left: auto;
  font-size: 0.9375rem;
}

.header-nav a {
  color: var(--muted);
  text-decoration: none;
}

.header-nav a:hover { color: var(--accent); }

.main-content { padding: 24px 20px 48px; }

.site-footer {
  padding: 24px 0 32px;
  color: var(--muted);
  font-size: 0.8125rem;
  border-top: 1px solid var(--border);
}

.site-footer .footer-inner p {
  margin: 0 0 8px;
  line-height: 1.6;
}

.site-footer .footer-disclaimer {
  max-width: 52rem;
}

.site-footer a {
  color: var(--accent, #2563eb);
}

.header-nav .nav-user {
  color: var(--muted, #64748b);
  font-size: 0.875rem;
}

.header-nav .nav-cta {
  font-weight: 600;
}

.history-note {
  margin: 0 0 12px;
  color: var(--muted, #64748b);
  font-size: 0.875rem;
}

.member-gate {
  margin-top: 16px;
  padding: 16px 18px;
  border: 1px dashed var(--border, #cbd5e1);
  border-radius: var(--radius, 8px);
  background: rgba(15, 23, 42, 0.03);
}

.member-gate p {
  margin: 0 0 12px;
  line-height: 1.6;
}

.member-gate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 !important;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
}

.stat-label { font-size: 0.8125rem; color: var(--muted); margin: 0 0 4px; }
.stat-value { font-size: 1.375rem; font-weight: 700; margin: 0; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.card h2 { margin: 0 0 16px; font-size: 1.125rem; }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 16px;
}

.filters label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.8125rem;
  color: var(--muted);
}

.filters input[type="text"],
.filters select {
  min-width: 200px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.9375rem;
}

.filters .checkbox-label {
  flex-direction: row;
  align-items: center;
  gap: 6px;
  padding-bottom: 8px;
  color: var(--text);
}

.btn {
  display: inline-block;
  padding: 8px 16px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.9375rem;
  cursor: pointer;
  text-decoration: none;
}

.btn:hover { background: var(--accent-hover); color: #fff; text-decoration: none; }

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover { background: var(--bg); color: var(--text); }

.table-wrap { overflow-x: auto; }

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

table.data-table th,
table.data-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

table.data-table th {
  background: #f8fafc;
  font-weight: 600;
  white-space: nowrap;
}

table.data-table th a {
  color: inherit;
  text-decoration: none;
}

table.data-table th a:hover { color: var(--accent); }

table.data-table tr:hover td { background: #f8fafc; }

.title-cell {
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.delta-up { color: var(--up); font-weight: 600; }
.delta-down { color: var(--down); font-weight: 600; }
.delta-neutral { color: var(--muted); }

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 16px;
  font-size: 0.875rem;
  color: var(--muted);
}

.pagination .btn { padding: 6px 12px; font-size: 0.8125rem; }

.pagination .current { font-weight: 600; color: var(--text); }

.product-header { margin-bottom: 20px; }
.product-header h1 { margin: 0 0 8px; font-size: 1.375rem; }

.price-hero {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: baseline;
  margin: 16px 0;
}

.price-hero .current-price {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
}

.chart-wrap { position: relative; height: 380px; margin-top: 8px; }

.breadcrumb { font-size: 0.875rem; margin-bottom: 16px; color: var(--muted); }

.empty-msg { color: var(--muted); margin: 0; }

.layout-with-sidebar {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 900px) {
  .layout-with-sidebar { grid-template-columns: 1fr; }
}

.sidebar { position: sticky; top: 16px; }
.sidebar h2 { font-size: 1rem; margin: 0 0 12px; }

.category-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 70vh;
  overflow-y: auto;
}

.category-nav a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.8125rem;
  line-height: 1.3;
}

.category-nav a:hover { background: #f1f5f9; }
.category-nav a.active {
  background: #eff6ff;
  color: var(--accent);
  font-weight: 600;
}

.category-nav .badge {
  flex-shrink: 0;
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 500;
}

.sidebar-more {
  margin: 12px 0 0;
  font-size: 0.8125rem;
}

.category-banner {
  margin: 0 0 12px;
  padding: 10px 12px;
  background: #eff6ff;
  border-radius: 6px;
  font-size: 0.9375rem;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.category-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.category-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.12);
  text-decoration: none;
}

.category-card-name { font-weight: 600; font-size: 0.9375rem; }
.category-card-count { font-size: 0.8125rem; color: var(--muted); }
.category-card-id { font-size: 0.75rem; color: var(--muted); }

.list-meta {
  font-size: 0.875rem;
  color: var(--muted);
  margin: 0 0 12px;
}

.list-meta strong { color: var(--text); }

.list-meta-hint {
  display: block;
  margin-top: 4px;
  font-size: 0.8125rem;
}

table.data-table th a {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

table.data-table th a:hover {
  color: var(--accent);
  text-decoration: none;
}

.rakuten-intro {
  font-size: 0.9375rem;
  color: var(--muted);
  margin: 0 0 12px;
  line-height: 1.6;
}

.alert {
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 0.875rem;
  margin: 0 0 12px;
}

.alert-ok {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.alert-warn {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

.rakuten-card {
  color: inherit;
  cursor: default;
}

.rakuten-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 0;
}

.card h3 {
  margin: 0 0 12px;
  font-size: 1rem;
}

/* --- ユーティリティ --- */
.hide-mobile { display: block; }
.hide-desktop { display: none; }

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8125rem;
}

.btn-block-mobile {
  display: inline-block;
}

.cell-muted {
  color: var(--muted);
  font-size: 0.8125rem;
}

/* --- 折りたたみサイドバー --- */
.sidebar-details { margin: 0; }

.sidebar-toggle {
  display: none;
  list-style: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 10px 12px;
  margin: -4px -4px 12px;
  border-radius: 6px;
  background: #f1f5f9;
  user-select: none;
}

.sidebar-toggle::-webkit-details-marker { display: none; }

.sidebar-toggle::after {
  content: " ▼";
  font-size: 0.75rem;
  color: var(--muted);
}

.sidebar-details[open] .sidebar-toggle::after {
  content: " ▲";
}

.sidebar-title {
  font-size: 1rem;
  margin: 0 0 12px;
}

/* --- スマホ用商品カード --- */
.product-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.product-card {
  display: block;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  text-decoration: none;
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
}

.product-card:active {
  background: #f8fafc;
}

.product-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.product-card-price {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
}

.product-card-title {
  margin: 0 0 8px;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card-meta {
  margin: 0;
  font-size: 0.75rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}

/* --- 商品詳細メタ --- */
.product-meta {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 0.875rem;
  color: var(--muted);
}

.product-meta li {
  margin: 0;
}

.meta-label {
  font-weight: 600;
  color: var(--text);
  margin-right: 4px;
}

.product-meta span + span::before,
.product-meta li + li::before {
  content: none;
}

.category-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

/* ========== スマホ・タブレット ========== */
@media (max-width: 900px) {
  .hide-mobile { display: none !important; }
  .hide-desktop { display: flex !important; }

  .container {
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }

  .header-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px max(12px, env(safe-area-inset-left));
  }

  .brand { font-size: 1.125rem; }

  .brand-sub { display: none; }

  .header-nav {
    margin-left: 0;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
  }

  .header-nav a {
    flex: 1;
    text-align: center;
    padding: 12px 8px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid var(--border);
  }

  .header-nav a:last-child { border-right: none; }

  .main-content {
    padding: 16px 0 32px;
    padding-bottom: max(32px, env(safe-area-inset-bottom));
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 16px;
  }

  .stat-card { padding: 12px 14px; }

  .stat-value { font-size: 1.125rem; }

  .card {
    padding: 16px;
    border-radius: 8px;
  }

  .layout-with-sidebar {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .sidebar {
    position: static;
  }

  .sidebar-toggle {
    display: block;
  }

  .sidebar-title {
    display: none;
  }

  .sidebar-details:not([open]) .category-nav,
  .sidebar-details:not([open]) .sidebar-more {
    display: none;
  }

  .category-nav {
    max-height: 50vh;
  }

  .category-nav a {
    padding: 12px 10px;
    min-height: 44px;
    font-size: 0.875rem;
  }

  .filters {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .filters label {
    width: 100%;
  }

  .filters input[type="text"],
  .filters select {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    font-size: 16px; /* iOS ズーム防止 */
  }

  .filters .checkbox-label {
    min-height: 44px;
    padding-bottom: 0;
  }

  .filters .btn,
  .filters .btn-secondary {
    width: 100%;
    text-align: center;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .pagination {
    justify-content: center;
  }

  .pagination .btn {
    flex: 1;
    max-width: 140px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .category-grid {
    grid-template-columns: 1fr;
  }

  .category-card {
    padding: 16px;
    min-height: 44px;
  }

  .chart-wrap {
    height: 260px;
  }

  .product-header h1 {
    font-size: 1.125rem;
    line-height: 1.4;
  }

  .product-meta {
    flex-direction: column;
    gap: 10px;
  }

  .btn-block-mobile {
    display: block;
    width: 100%;
    text-align: center;
    min-height: 44px;
    line-height: 32px;
  }

  .price-hero {
    flex-direction: column;
    gap: 8px;
  }

  .price-hero .current-price {
    font-size: 1.75rem;
  }

  /* 商品詳細の履歴テーブル → カード風 */
  .table-wrap .data-table thead {
    display: none;
  }

  .table-wrap .data-table tbody tr {
    display: block;
    margin-bottom: 10px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fafbfc;
  }

  .table-wrap .data-table tbody tr:hover td {
    background: transparent;
  }

  .table-wrap .data-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 6px 0;
    border: none;
    text-align: right;
  }

  .table-wrap .data-table td::before {
    content: attr(data-label);
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--muted);
    text-align: left;
    flex-shrink: 0;
  }

  .table-wrap .data-table td:first-child {
    padding-top: 0;
  }

  .table-wrap .data-table td:last-child {
    padding-bottom: 0;
  }
}

@media (max-width: 380px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .stat-value {
    font-size: 1rem;
  }
}

/* —— Hub home (案A) —— */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.page-home .site-header {
  background: transparent;
  border-bottom: none;
  box-shadow: none;
  position: relative;
  z-index: 2;
}

.page-home .site-header .brand,
.page-home .header-nav a,
.page-home .header-nav .nav-user {
  color: rgba(247, 249, 252, 0.88);
}

.page-home .header-nav a:hover,
.page-home .site-header .brand:hover {
  color: #fff;
}

.page-home .header-nav .nav-cta {
  color: #5eead4;
}

.page-home .hub-main {
  padding-top: 8px;
}

.hub-hero {
  position: relative;
  min-height: min(92vh, 720px);
  display: flex;
  align-items: center;
  color: var(--paper);
  overflow: hidden;
  margin-top: -72px;
  padding-top: 88px;
}

.hub-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 20%, rgba(13, 148, 136, 0.35), transparent 55%),
    radial-gradient(ellipse 50% 40% at 10% 80%, rgba(37, 99, 235, 0.18), transparent 50%),
    linear-gradient(155deg, var(--ink) 0%, var(--ink-soft) 48%, #122033 100%);
  z-index: 0;
}

.hub-hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 85%);
  pointer-events: none;
}

.hub-hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
  width: 100%;
  padding-bottom: 48px;
}

.hub-brand {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  margin: 0 0 16px;
  line-height: 1.15;
  animation: hub-rise 0.7s ease both;
}

.hub-headline {
  font-family: var(--font);
  font-size: clamp(1.125rem, 2.4vw, 1.5rem);
  font-weight: 500;
  line-height: 1.55;
  margin: 0 0 12px;
  color: rgba(247, 249, 252, 0.92);
  animation: hub-rise 0.7s ease 0.08s both;
}

.hub-lead {
  margin: 0 0 28px;
  color: rgba(247, 249, 252, 0.68);
  font-size: 0.975rem;
  max-width: 34rem;
  animation: hub-rise 0.7s ease 0.14s both;
}

.hub-search {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 32rem;
  margin-bottom: 16px;
  animation: hub-rise 0.7s ease 0.2s both;
}

.hub-search input[type="search"] {
  flex: 1 1 12rem;
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font: inherit;
  font-size: 1rem;
}

.hub-search input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.hub-search input:focus {
  outline: 2px solid rgba(45, 212, 191, 0.55);
  outline-offset: 1px;
}

.hub-search-btn {
  padding: 14px 20px;
  background: #14b8a6;
  border: none;
  white-space: nowrap;
}

.hub-search-btn:hover {
  background: #2dd4bf;
  color: var(--ink);
}

.hub-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  margin: 0;
  animation: hub-rise 0.7s ease 0.26s both;
}

.hub-text-link {
  color: rgba(153, 246, 228, 0.95);
  font-size: 0.9rem;
  text-underline-offset: 3px;
}

.hub-text-link:hover {
  color: #fff;
}

.hub-hero-visual {
  display: flex;
  justify-content: center;
  animation: hub-fade 1s ease 0.15s both;
}

.hub-spark {
  width: min(100%, 360px);
  height: auto;
}

.hub-spark-grid {
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 1;
}

.hub-spark-line {
  stroke: #5eead4;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 420;
  stroke-dashoffset: 420;
  animation: hub-draw 1.4s ease 0.35s forwards;
}

.hub-spark-dot {
  fill: #99f6e4;
  opacity: 0;
  animation: hub-fade 0.4s ease 1.5s forwards;
}

@keyframes hub-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@keyframes hub-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes hub-draw {
  to { stroke-dashoffset: 0; }
}

.hub-section {
  padding: 40px 0 8px;
}

.hub-section-head {
  margin-bottom: 20px;
}

.hub-section-head h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 6px;
  letter-spacing: 0.02em;
}

.hub-section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

.hub-movers-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.hub-mover-label {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 12px;
}

.hub-mover-up { color: var(--up); }
.hub-mover-down { color: var(--down); }

.hub-mover-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border);
}

.hub-mover-list li {
  border-bottom: 1px solid var(--border);
  animation: hub-rise 0.5s ease both;
  animation-delay: calc(0.04s * var(--i, 0));
}

.hub-mover-list a {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
  padding: 12px 4px;
  color: inherit;
  text-decoration: none;
}

.hub-mover-list a:hover {
  background: rgba(15, 118, 110, 0.04);
}

.hub-mover-title {
  flex: 1;
  min-width: 0;
  font-size: 0.9375rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hub-mover-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
  font-size: 0.875rem;
}

.hub-mover-price {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.hub-empty {
  color: var(--muted);
  font-size: 0.9rem;
}

.hub-section-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin: 20px 0 0;
  font-size: 0.9rem;
}

.hub-cat-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.hub-cat-list li {
  animation: hub-rise 0.45s ease both;
  animation-delay: calc(0.05s * var(--i, 0));
}

.hub-cat-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  color: inherit;
  text-decoration: none;
  border-bottom: 2px solid var(--border);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.hub-cat-list a:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  text-decoration: none;
}

.hub-cat-name {
  font-weight: 500;
  font-size: 0.9375rem;
}

.hub-cat-count {
  color: var(--muted);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 900px) {
  .hub-hero-inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .hub-hero-visual {
    order: -1;
  }

  .hub-spark {
    width: min(100%, 260px);
  }

  .hub-cat-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .hub-hero {
    min-height: auto;
    padding-top: 96px;
    padding-bottom: 32px;
  }

  .hub-movers-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .hub-br {
    display: none;
  }

  .page-home .header-nav {
    gap: 10px;
    font-size: 0.8125rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hub-brand,
  .hub-headline,
  .hub-lead,
  .hub-search,
  .hub-cta-row,
  .hub-hero-visual,
  .hub-spark-line,
  .hub-spark-dot,
  .hub-mover-list li,
  .hub-cat-list li {
    animation: none !important;
    opacity: 1;
    transform: none;
    stroke-dashoffset: 0;
  }
}

/* —— Auth (login) —— */
.auth-panel {
  max-width: 420px;
  margin: 24px auto 48px;
}

.auth-panel h1 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  margin: 0 0 8px;
}

.auth-lead {
  color: var(--muted);
  margin: 0 0 20px;
  line-height: 1.6;
}

.auth-error {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-left: 3px solid var(--down);
  background: rgba(220, 38, 38, 0.06);
  color: var(--down);
  font-size: 0.9375rem;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-form label {
  display: grid;
  gap: 6px;
  font-size: 0.875rem;
  color: var(--muted);
}

.auth-form input {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--surface);
}

.auth-form input:focus {
  outline: 2px solid rgba(15, 118, 110, 0.35);
  outline-offset: 1px;
}

.auth-form .btn {
  margin-top: 4px;
  padding: 12px 16px;
  width: 100%;
}

.auth-foot {
  margin: 20px 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}
