/* Shared sakura hero — Learning Map, Dashboard, study pages, home */

.hub-hero-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.hub-hero-meta .hub-meta-pill {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 999px;
  background: #FDEEEC;
  color: var(--red, #E6483D);
  border: 2px solid #F5C6BF;
}

.hub-hero-meta .hub-meta-muted {
  font-size: 0.75rem;
  color: var(--text3, #8A7A6B);
  font-weight: 700;
}

/* Home — full landing hero keeps its layout inside the shared shell */
.hub-hero-shell--home {
  position: relative;
  min-height: var(--flj-vh, 100dvh);
  overflow: visible;
  background: linear-gradient(165deg, #FFF9F0 0%, #FFF6EC 45%, #FFE9D6 100%);
  border-bottom: 2px solid var(--border, #F0E4D3);
}
html.flj-dark .hub-hero-shell--home {
  background: linear-gradient(165deg, #1a1d36 0%, #0d0f12 100%) !important;
  border-bottom: 1px solid var(--border) !important;
}

.hub-hero-shell--home .hub-hero-bg { z-index: 1; }

.hub-hero-shell--home .hero-inner,
.hub-hero-shell--home .hero-body,
.hub-hero-shell--home .hero-copy,
.hub-hero-shell--home .hero-right {
  position: relative;
  z-index: 2;
}

.hub-hero-shell--home .hub-stats {
  position: relative;
  z-index: 2;
  margin-top: 28px;
  padding: 0;
  max-width: none;
  grid-template-columns: repeat(4, auto);
  justify-content: flex-start;
  gap: 20px;
}

@media (max-width: 900px) {
  .hub-hero-shell--home .hub-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

.hub-hero-shell--home .hub-stat-num[data-count] {
  /* home counter animation target */
}

/* Learning Hub — modern kawaii pathway (theme-token driven) */

/* ── Hero shell ── */
.hub-hero-shell {
  position: relative;
  overflow: hidden;
  background: linear-gradient(165deg, #FFF9F0 0%, #FFF6EC 45%, #FFE9D6 100%);
  border-bottom: 2px solid var(--border, #F0E4D3);
}

.hub-hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.hub-hero-bg::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 120px;
  background: linear-gradient(180deg, transparent, rgba(255, 246, 236, 0.9));
}

.hub-hero-mountains {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 140px;
  opacity: 0.35;
  background:
    linear-gradient(165deg, transparent 42%, #E8C4A8 42%, #E8C4A8 58%, transparent 58%) 8% 100% / 220px 120px no-repeat,
    linear-gradient(155deg, transparent 38%, #D4A88C 38%, #D4A88C 62%, transparent 62%) 32% 100% / 280px 130px no-repeat,
    linear-gradient(160deg, transparent 40%, #C99578 40%, #C99578 60%, transparent 60%) 62% 100% / 320px 140px no-repeat,
    linear-gradient(150deg, transparent 36%, #E8C4A8 36%, #E8C4A8 64%, transparent 64%) 88% 100% / 240px 110px no-repeat;
}

.hub-sakura-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.hub-sakura-layer span {
  position: absolute;
  top: -24px;
  width: 14px;
  height: 14px;
  border-radius: 50% 0 50% 50%;
  background: #FFB8C8;
  opacity: 0.55;
  animation: hubSakuraFall linear infinite;
}

.hub-sakura-layer span:nth-child(1) { left: 8%;  animation-duration: 11s; }
.hub-sakura-layer span:nth-child(2) { left: 22%; animation-duration: 14s; animation-delay: 2s; background: #FFC7D6; width: 12px; height: 12px; }
.hub-sakura-layer span:nth-child(3) { left: 41%; animation-duration: 12s; animation-delay: 4.5s; }
.hub-sakura-layer span:nth-child(4) { left: 58%; animation-duration: 15s; animation-delay: 1s; background: #FFC7D6; }
.hub-sakura-layer span:nth-child(5) { left: 76%; animation-duration: 13s; animation-delay: 6s; width: 11px; height: 11px; }
.hub-sakura-layer span:nth-child(6) { left: 91%; animation-duration: 16s; animation-delay: 3s; background: #FFC7D6; }

@keyframes hubSakuraFall {
  0%   { transform: translateY(0) rotate(0deg); opacity: 0; }
  8%   { opacity: 0.6; }
  100% { transform: translateY(110vh) rotate(360deg); opacity: 0; }
}

.hub-hero {
  position: relative;
  z-index: 1;
  padding: 56px 48px 40px;
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: center;
}

.hub-hero-inner { text-align: left; }

.hub-hero-inner .page-eyebrow {
  justify-content: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: #FFE1A8;
  color: #A6541B;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.hub-hero-jp {
  display: block;
  font-family: 'Noto Sans JP', 'Baloo 2', sans-serif;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-weight: 700;
  color: var(--text2, #5C4A3D);
  margin-bottom: 10px;
}

.hub-hero-inner .page-title {
  text-align: left;
  margin-bottom: 14px;
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: var(--text, #33251F);
  line-height: 1.15;
}

.hub-hero-inner .page-sub {
  margin: 0 !important;
  text-align: left;
  color: var(--text2, #5C4A3D);
  max-width: 540px;
  line-height: 1.65;
}

.hub-hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.hub-flow-mini {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #FFFFFF;
  border: 2px solid var(--border, #F0E4D3);
  border-radius: 20px;
  padding: 22px 26px;
  min-width: 160px;
  box-shadow: 0 4px 0 var(--border, #F0E4D3);
}

.hub-flow-step {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text3, #8A7A6B);
  display: flex;
  align-items: center;
  gap: 10px;
}

.hub-flow-step span {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #FDEEEC;
  color: var(--red, #E6483D);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  border: 2px solid #F5C6BF;
}

.hub-flow-arrow {
  color: var(--text3, #8A7A6B);
  font-size: 0.65rem;
  padding-left: 8px;
}

/* ── Stats strip ── */
.hub-stats {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 48px 32px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.hub-stat {
  background: #FFFFFF;
  border: 2px solid var(--border, #F0E4D3);
  border-radius: 18px;
  padding: 18px 16px;
  text-align: center;
  box-shadow: 0 4px 0 var(--border, #F0E4D3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hub-stat:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 0 var(--border, #F0E4D3);
}

.hub-stat-num {
  display: block;
  font-family: 'Baloo 2', 'Nunito', sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--red, #E6483D);
  line-height: 1;
}

.hub-stat:nth-child(2) .hub-stat-num { color: #DB8A04; }
.hub-stat:nth-child(3) .hub-stat-num { color: #66B04B; }
.hub-stat:nth-child(4) .hub-stat-num { color: #8A56D6; }

.hub-stat-lbl {
  display: block;
  margin-top: 6px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text3, #8A7A6B);
}

html.flj-dark .hub-stat-lbl {
  color: var(--text2, #c8d0e0);
}

/* Centered variant (pricing, etc.) */
.hub-hero-shell--center .hub-hero {
  grid-template-columns: 1fr;
  text-align: center;
}

.hub-hero-shell--center .hub-hero-inner {
  text-align: center;
  margin: 0 auto;
}

.hub-hero-shell--center .hub-hero-inner .page-eyebrow {
  justify-content: center;
}

.hub-hero-shell--center .hub-hero-inner .page-sub {
  margin: 0 auto !important;
  text-align: center;
}

.hub-hero-shell--center .hub-hero-actions {
  justify-content: center;
}

.hub-hero-shell--center .hub-flow-mini {
  margin: 12px auto 0;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}

.hub-hero-shell--center .hub-flow-arrow {
  display: none;
}

.hub-hero-shell--center .hub-stat-num {
  font-size: clamp(1.25rem, 3vw, 1.6rem);
}

.hub-hero-shell + .pricing-ladder,
.hub-hero-shell .pricing-ladder {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 48px 28px;
}

.hub-body { padding-top: 0 !important; }

.hub-section-title {
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  font-weight: 800;
  color: var(--text, #33251F);
  margin-bottom: 8px;
  text-align: center;
}

.hub-section-sub {
  text-align: center;
  color: var(--text3, #8A7A6B);
  font-size: 0.88rem;
  margin-bottom: 40px;
}

/* Timeline */
.hub-pathway {
  margin-bottom: 64px;
  padding: 40px 32px;
  background: #FFFFFF;
  border: 2px solid var(--border, #F0E4D3);
  border-radius: 24px;
  box-shadow: 0 4px 0 var(--border, #F0E4D3);
}

.hub-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}

.hub-timeline-item {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 20px;
  padding: 20px 0;
  position: relative;
}

.hub-timeline-item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 23px;
  top: 52px;
  bottom: -8px;
  width: 2px;
  background: linear-gradient(180deg, var(--red, #E6483D), rgba(230, 72, 61, 0.12));
}

.hub-timeline-marker {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #FDEEEC;
  border: 2px solid #F5C6BF;
  color: var(--red, #E6483D);
  font-weight: 800;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.hub-timeline-marker--gold {
  background: #FFF4D6;
  border-color: #F5D88A;
  color: var(--gold, #DB8A04);
}

.hub-timeline-content h3 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text, #33251F);
  margin-bottom: 6px;
}

.hub-timeline-content p {
  font-size: 0.85rem;
  color: var(--text3, #8A7A6B);
  line-height: 1.6;
  margin: 0;
}

/* Zones */
.hub-zones { display: flex; flex-direction: column; gap: 48px; }

.hub-zone {
  border: 2px solid var(--border, #F0E4D3);
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(180deg, #FFFFFF 0%, #FFF9F0 100%);
  box-shadow: 0 4px 0 var(--border, #F0E4D3);
}

.hub-zone[data-phase="1"] { border-color: #F5C6BF; }
.hub-zone[data-phase="2"] { border-color: #B8E8DE; }
.hub-zone[data-phase="3"] { border-color: #D9C8F5; }
.hub-zone[data-phase="4"] { border-color: #F5D88A; }

.hub-zone-head {
  padding: 28px 32px 20px;
  border-bottom: 2px solid var(--border, #F0E4D3);
  background: rgba(255, 255, 255, 0.04);
}

.hub-zone-phase {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red, #E6483D);
  margin-bottom: 8px;
}

.hub-zone-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text, #33251F);
  margin-bottom: 6px;
}

.hub-zone-desc {
  font-size: 0.85rem;
  color: var(--text3, #8A7A6B);
  margin: 0;
}

.hub-zone-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  padding: 24px 32px 32px;
}

.hub-zone-grid--dense {
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}

.hub-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: #FFFFFF;
  border: 2px solid var(--border, #F0E4D3);
  border-radius: 20px;
  padding: 24px 20px;
  position: relative;
  transition: transform 0.35s cubic-bezier(0.34, 1.3, 0.64, 1), box-shadow 0.35s ease, border-color 0.25s ease;
  box-shadow: 0 4px 0 var(--border, #F0E4D3);
}

.hub-card:hover {
  transform: translateY(-5px);
  border-color: #F5C6BF;
  box-shadow: 0 8px 0 #F0E4D3;
}

.hub-card--featured {
  border-color: #F5C6BF;
  background: linear-gradient(145deg, #FFF6EC, #FFFFFF);
}

.hub-card--premium {
  border-color: #F5D88A;
  background: linear-gradient(145deg, #FFFBF0, #FFFFFF);
}

.hub-card--compact {
  padding: 18px 14px;
  text-align: center;
}

.hub-card--compact h3 { font-size: 0.82rem; margin-top: 8px; }

.hub-card-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red, #E6483D);
  background: #FDEEEC;
  border: 2px solid #F5C6BF;
  padding: 4px 8px;
  border-radius: 8px;
}

.hub-card-icon {
  font-size: 1.6rem;
  display: block;
  margin-bottom: 12px;
}

.hub-card h3 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text, #33251F);
  margin-bottom: 8px;
}

.hub-card p {
  font-size: 0.78rem;
  color: var(--text3, #8A7A6B);
  line-height: 1.55;
  margin: 0;
}

.hub-cta {
  text-align: center;
  padding: 56px 32px;
  margin-top: 24px;
  background: radial-gradient(ellipse at center, #FDEEEC 0%, #FFF6EC 55%, transparent 80%);
  border: 2px solid var(--border, #F0E4D3);
  border-radius: 24px;
  box-shadow: 0 4px 0 var(--border, #F0E4D3);
}

.hub-cta h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text, #33251F);
  margin-bottom: 10px;
}

.hub-cta p {
  color: var(--text3, #8A7A6B);
  font-size: 0.9rem;
  margin-bottom: 28px;
}

.hub-cta-btns {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Dashboard pathway blocks */
.dash-pathway { margin-bottom: 48px; }

.dash-pathway-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.dash-pathway-header .section-h2 {
  text-align: left !important;
  margin-bottom: 4px !important;
}

.dash-pathway-sub {
  font-size: 0.82rem;
  color: var(--text3, #8A7A6B);
  margin: 0;
}

.dash-zone { margin-bottom: 36px; }

.dash-zone-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border, #F0E4D3);
}

.dash-zone-num {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #FDEEEC;
  color: var(--red, #E6483D);
  font-weight: 800;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #F5C6BF;
}

.dash-zone-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text, #33251F);
}

.dash-zone-jp {
  font-size: 0.72rem;
  color: var(--text3, #8A7A6B);
  margin-left: auto;
}

@media (max-width: 900px) {
  .hub-hero {
    grid-template-columns: 1fr;
    padding: 40px 24px 28px;
  }
  .hub-stats {
    grid-template-columns: repeat(2, 1fr);
    padding: 0 24px 28px;
  }
  .hub-flow-mini {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }
  .hub-flow-arrow { display: none; }
  .hub-zone-grid { padding: 20px; }
  .hub-pathway { padding: 28px 20px; }
}

@media (max-width: 768px) {
  .hub-timeline-item {
    grid-template-columns: 40px 1fr;
    gap: 14px;
  }
  .hub-timeline-marker { width: 40px; height: 40px; font-size: 0.85rem; }
}

@media (prefers-reduced-motion: reduce) {
  .hub-sakura-layer span { animation: none; display: none; }
}