/* Q-Road v5 — 習慣ループ UI */

.hm-hero-streak-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  transform: translate(72%, -78%);
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(251, 146, 60, 0.15);
  border: 1px solid rgba(251, 146, 60, 0.35);
  font-size: 0.72rem;
  font-weight: 800;
  color: #fb923c;
  line-height: 1;
}

.hm-hero-streak-badge strong {
  font-size: 0.9rem;
}

.hm-ring {
  position: relative;
  overflow: visible;
}

.hm-ring--complete .hm-ring-fill--gold {
  stroke: #fbbf24;
  filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.55));
  animation: hm-ring-gold-pulse 1.2s ease-out 1;
}

@keyframes hm-ring-gold-pulse {
  0% { stroke-opacity: 0.4; }
  50% { stroke-opacity: 1; }
  100% { stroke-opacity: 1; }
}

.hm-hero-card--complete {
  border-color: rgba(251, 191, 36, 0.35);
}

.hm-daily-quota {
  margin: 8px 0 4px;
}

.hm-daily-quota-label {
  margin: 0 0 4px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.hm-daily-quota-detail {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
}

.hm-daily-quota-track {
  display: block;
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
}

.hm-cta--muted {
  opacity: 0.88;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.55) 0%, rgba(139, 92, 246, 0.45) 100%) !important;
  box-shadow: none !important;
}

.hm-mission-kpis--streak-only {
  margin-top: 6px;
}

.hm-hero-streak {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 800;
}

.hm-detour-badge {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--home-card-border);
}

.hm-detour-badge--due {
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.45);
  background: rgba(56, 189, 248, 0.12);
}

.home-rhythm-mini-host {
  margin-top: 12px;
}

.hm-rhythm-mini-title {
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-muted);
}

.hm-rhythm-mini-grid {
  display: grid;
  grid-template-columns: repeat(14, 1fr);
  gap: 4px;
}

.hm-rhythm-mini-cell {
  aspect-ratio: 1;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.hm-rhythm-mini-cell.l1 { background: rgba(56, 189, 248, 0.35); }
.hm-rhythm-mini-cell.l2 { background: rgba(56, 189, 248, 0.55); }
.hm-rhythm-mini-cell.l3 { background: rgba(56, 189, 248, 0.85); }
.hm-rhythm-mini-cell.l4 { background: rgba(56, 189, 248, 0.95); }

.hm-rhythm-mini-cell.is-today {
  outline: 1px solid rgba(56, 189, 248, 0.65);
  outline-offset: 1px;
}

.hm-rhythm-mini-cell.is-shield {
  box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.8);
}

body[data-workspace-tab="tab-home"] .status-mission-link {
  display: none !important;
}

body.site-workspace-a .wire-a-main-nav.workspace-main-nav {
  overflow: hidden;
  scrollbar-width: none;
}

body.site-workspace-a .wire-a-main-nav.workspace-main-nav::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

@media (max-width: 767px) {
  .wire-a-home-dashboard .home-dash-progress-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .hm-hero-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .hm-mission-cta-col .hm-cta,
  .hm-detour-card,
  .workspace-nav-btn {
    min-height: 44px;
  }
}
