.top-nav,
.bottom-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
  transition: color 180ms ease, background 180ms ease, transform 180ms ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.nav-link svg {
  width: 18px;
  height: 18px;
}

.nav-link:hover,
.nav-link.active {
  color: #353535;
  background: rgba(255, 181, 192, 0.28);
}

.nav-link:hover {
  transform: translateY(-1px);
}

.bottom-nav {
  position: fixed;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  left: 12px;
  z-index: 30;
  justify-content: space-around;
  min-height: 66px;
  padding: 8px;
  border: 1px solid rgba(244, 223, 229, 0.95);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.bottom-nav .nav-link {
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
  min-height: 50px;
  padding: 4px 6px;
  font-size: 0.72rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.button svg {
  width: 18px;
  height: 18px;
}

.button.primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary-strong), var(--primary));
  box-shadow: 0 14px 30px rgba(255, 143, 163, 0.28);
}

.button.ghost {
  color: var(--primary-strong);
  background: #fff0f3;
}

.button:hover {
  transform: translateY(-2px);
}

.button:disabled {
  cursor: default;
  opacity: 0.65;
  transform: none;
}

.home-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(240px, 0.65fr);
  gap: 24px;
  min-height: 390px;
  padding: clamp(28px, 6vw, 62px);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.home-hero::after {
  position: absolute;
  right: 28px;
  bottom: 24px;
  width: 180px;
  height: 180px;
  content: "";
  background: url("../assets/logo.svg") center / contain no-repeat;
  opacity: 0.08;
}

.hero-copy {
  max-width: 560px;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.22rem);
}

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

.hero-orbit {
  display: grid;
  place-items: center;
}

.progress-bloom,
.progress-ring {
  display: grid;
  place-items: center;
  width: 214px;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #ffffff 0 57%, transparent 58%),
    conic-gradient(var(--primary-strong) calc(var(--progress, 0) * 1%), #ffe4e9 0);
  box-shadow: inset 0 0 0 1px rgba(244, 223, 229, 0.95), var(--shadow);
}

.progress-bloom span,
.progress-ring span {
  font-family: Poppins, Inter, sans-serif;
  font-size: 2.35rem;
  font-weight: 800;
}

.progress-bloom small,
.progress-ring small {
  margin-top: -54px;
  color: var(--muted);
  font-weight: 700;
}

.dashboard-grid,
.content-grid,
.progress-layout {
  display: grid;
  gap: 18px;
}

.dashboard-grid {
  grid-template-columns: repeat(3, 1fr);
  margin: 20px 0;
}

.content-grid,
.progress-layout {
  grid-template-columns: minmax(0, 1.35fr) minmax(290px, 0.65fr);
}

.metric-card,
.quote-card,
.today-card,
.calendar-card,
.progress-summary,
.achievements-section {
  padding: 22px;
}

.metric-card {
  display: grid;
  gap: 8px;
  min-height: 150px;
}

.metric-card svg,
.quote-card svg {
  color: var(--primary-strong);
}

.metric-value {
  font-family: Poppins, Inter, sans-serif;
  font-size: 2.1rem;
  font-weight: 800;
}

.metric-label {
  color: var(--muted);
  font-weight: 700;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--primary-strong);
  background: #fff0f3;
  font-weight: 800;
}

.mini-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.mini-list span {
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--muted);
  background: #fff8fa;
  font-size: 0.85rem;
  font-weight: 700;
}

.quote-card {
  display: grid;
  align-content: center;
  gap: 14px;
  min-height: 230px;
}

.quote-card p {
  margin-bottom: 0;
  font-family: Poppins, Inter, sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.18;
}

.tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.tab-button {
  flex: 0 0 auto;
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  font-weight: 800;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.tab-button.active {
  color: #ffffff;
  border-color: var(--primary-strong);
  background: var(--primary-strong);
}

.workout-panel {
  display: grid;
  gap: 14px;
}

.day-overview,
.exercise-card {
  padding: 20px;
}

.day-overview {
  margin-bottom: 4px;
}

.exercise-card {
  overflow: hidden;
}

.accordion-trigger {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  width: 100%;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.accordion-trigger p {
  margin-bottom: 0;
  color: var(--muted);
}

.accordion-trigger svg {
  align-self: center;
  color: var(--primary-strong);
  transition: transform 180ms ease;
}

.exercise-card.open .accordion-trigger svg {
  transform: rotate(180deg);
}

.accordion-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 260ms ease;
}

.exercise-card.open .accordion-body {
  grid-template-rows: 1fr;
}

.accordion-inner {
  overflow: hidden;
}

.exercise-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.detail {
  padding: 12px;
  border-radius: var(--radius-small);
  background: #fff8fa;
}

.detail strong {
  display: block;
  margin-bottom: 2px;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.video-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #242424;
}

.video-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-placeholder {
  display: grid;
  place-items: center;
  min-height: 280px;
  color: #ffffff;
  text-align: center;
  background:
    linear-gradient(135deg, rgba(68, 68, 68, 0.86), rgba(68, 68, 68, 0.72)),
    #242424;
}

.video-placeholder > div {
  display: grid;
  justify-items: center;
  gap: 10px;
  max-width: 420px;
  padding: 24px;
}

.video-placeholder strong,
.video-placeholder small {
  display: block;
}

.video-placeholder small {
  color: rgba(255, 255, 255, 0.72);
  font-weight: 700;
}

.video-play {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  color: #ffffff;
  background: var(--primary-strong);
  box-shadow: 0 10px 22px rgba(255, 143, 163, 0.24);
}

.video-play svg {
  width: 19px;
  height: 19px;
}

.complete-button {
  width: 100%;
  margin-top: 18px;
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 7px;
}

.calendar-weekdays {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  text-align: center;
}

.calendar-day {
  display: grid;
  place-items: center;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  font-weight: 800;
}

.calendar-day.empty {
  border-color: transparent;
  background: transparent;
}

.calendar-day.completed {
  color: #ffffff;
  border-color: var(--primary-strong);
  background: var(--primary-strong);
}

.calendar-day.today {
  box-shadow: inset 0 0 0 2px var(--success);
}

.progress-summary {
  display: grid;
  justify-items: center;
  gap: 22px;
}

.stats-list {
  display: grid;
  gap: 10px;
  width: 100%;
}

.stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-weight: 700;
}

.stat-row strong {
  color: var(--text);
  font-family: Poppins, Inter, sans-serif;
  font-size: 1.2rem;
}

.achievements-section {
  margin-top: 18px;
}

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

.achievement-card {
  min-height: 146px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fffdfd;
}

.achievement-card.locked {
  color: var(--muted);
  background: #faf5f6;
  opacity: 0.68;
}

.achievement-card svg {
  width: 24px;
  height: 24px;
  margin-bottom: 12px;
  color: var(--primary-strong);
}

.achievement-card.locked svg {
  color: #aaa0a4;
}

.achievement-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.confetti-layer {
  position: fixed;
  inset: 0;
  z-index: 45;
  pointer-events: none;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  top: -20px;
  width: 10px;
  height: 16px;
  border-radius: 4px;
  animation: confetti-fall 1100ms ease-in forwards;
}
