:root {
  color-scheme: light;
  --bg: #f6fbf4;
  --panel: #ffffff;
  --panel-strong: #f0fdf4;
  --text: #132016;
  --muted: #5f725f;
  --faint: #8aa089;
  --line: #dcebd9;
  --line-strong: #bbdfbd;
  --green: #16a34a;
  --green-dark: #0f7a36;
  --lime: #84cc16;
  --amber: #f59e0b;
  --red: #dc2626;
  --blue: #2563eb;
  --shadow: 0 18px 50px rgba(20, 83, 45, 0.1);
  --radius: 24px;
  --radius-sm: 16px;
  --sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans Bengali", "Noto Sans", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

[id] {
  scroll-margin-top: 96px;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(132, 204, 22, 0.2), transparent 28rem),
    radial-gradient(circle at 90% 15%, rgba(22, 163, 74, 0.12), transparent 26rem),
    linear-gradient(180deg, #fbfff8 0%, var(--bg) 42%, #eef8ee 100%);
  color: var(--text);
  font-family: var(--sans);
  padding-bottom: 82px;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(22, 163, 74, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22, 163, 74, 0.045) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.45), transparent 70%);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 14px;
  z-index: 100;
  transform: translateY(-150%);
  border-radius: 999px;
  background: var(--text);
  color: white;
  padding: 10px 14px;
  font-weight: 800;
}

.skip-link:focus {
  transform: translateY(0);
}

.app-header,
main {
  width: min(1120px, calc(100% - 28px));
  margin: 0 auto;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  background: linear-gradient(180deg, rgba(246, 251, 244, 0.96), rgba(246, 251, 244, 0.76));
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: fit-content;
}

.brand-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(22, 163, 74, 0.18);
  border-radius: 16px;
  background: linear-gradient(135deg, #dcfce7, #ffffff);
  box-shadow: 0 10px 26px rgba(22, 163, 74, 0.12);
  font-size: 22px;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  line-height: 1.1;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
}

.top-nav {
  display: none;
  align-items: center;
  gap: 8px;
}

.top-nav a,
.bottom-nav a {
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  padding: 9px 12px;
}

.top-nav a:hover,
.bottom-nav a:hover {
  background: rgba(22, 163, 74, 0.08);
  color: var(--green-dark);
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.hero {
  display: grid;
  gap: 18px;
  margin-top: 12px;
  overflow: hidden;
  padding: 24px;
}

.hero-copy {
  display: grid;
  gap: 14px;
}

.eyebrow {
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(3.2rem, 12vw, 6.2rem);
  line-height: 0.9;
  letter-spacing: -0.08em;
}

h2 {
  margin-bottom: 10px;
  font-size: clamp(2rem, 8vw, 4.4rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.25rem;
}

p {
  color: var(--muted);
  line-height: 1.72;
}

.hero-subtitle {
  max-width: 620px;
  margin-bottom: 4px;
  font-size: clamp(1.05rem, 4vw, 1.35rem);
}

.hero-actions,
.timer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button,
.text-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0 16px;
  font-weight: 850;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.button:active,
.text-button:active {
  transform: translateY(1px) scale(0.99);
}

.primary {
  border-color: var(--green);
  background: var(--green);
  color: white;
}

.secondary {
  background: #ffffff;
  color: var(--green-dark);
}

.ghost,
.text-button {
  background: rgba(22, 163, 74, 0.07);
  color: var(--green-dark);
}

.text-button {
  min-height: 38px;
  border-color: rgba(22, 163, 74, 0.14);
}

.text-button.danger {
  border-color: rgba(220, 38, 38, 0.18);
  background: rgba(220, 38, 38, 0.06);
  color: var(--red);
}

.hero-card {
  display: grid;
  gap: 14px;
  border: 1px solid rgba(22, 163, 74, 0.14);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(220, 252, 231, 0.8), rgba(255, 255, 255, 0.82)),
    #ffffff;
  padding: 18px;
}

.hero-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
}

.hero-card-top strong {
  color: var(--green-dark);
}

.goal-ring {
  display: grid;
  width: 156px;
  height: 156px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--green) var(--done-deg, 0deg), #e5f4e2 0deg);
  box-shadow: inset 0 0 0 14px rgba(255, 255, 255, 0.92);
}

.goal-ring span {
  display: grid;
  width: 108px;
  height: 108px;
  place-items: center;
  border-radius: 50%;
  background: #ffffff;
  color: var(--green-dark);
  font-size: 1.8rem;
  font-weight: 950;
}

.mini-grid,
.stats-row,
.summary-grid {
  display: grid;
  gap: 10px;
}

.mini-grid span,
.stats-row article,
.summary-card {
  border: 1px solid rgba(22, 163, 74, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  padding: 12px;
}

.stats-row {
  margin: 14px 0 38px;
}

.stats-row article {
  display: grid;
  gap: 4px;
  box-shadow: 0 10px 24px rgba(20, 83, 45, 0.06);
}

.stats-row strong {
  color: var(--green-dark);
  font-size: 1.45rem;
}

.stats-row span,
.summary-card span {
  color: var(--muted);
  font-size: 14px;
}

.section-block {
  padding: 42px 0;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 18px;
}

.completion-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
  padding: 16px;
}

.completion-panel strong,
.completion-panel span {
  display: block;
}

.completion-panel span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

.progress-track {
  overflow: hidden;
  height: 12px;
  border-radius: 999px;
  background: #e4f1e1;
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--lime));
  transition: width 220ms ease;
}

.routine-grid,
.meal-grid,
.exercise-grid,
.movement-grid,
.shopping-grid {
  display: grid;
  gap: 14px;
}

.routine-card,
.meal-card,
.exercise-card,
.movement-card,
.shopping-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 28px rgba(20, 83, 45, 0.07);
  padding: 16px;
}

.routine-card.done {
  border-color: rgba(22, 163, 74, 0.45);
  background: linear-gradient(180deg, rgba(220, 252, 231, 0.86), rgba(255, 255, 255, 0.9));
}

.routine-card.skipped {
  border-color: rgba(245, 158, 11, 0.38);
  background: linear-gradient(180deg, rgba(254, 243, 199, 0.78), rgba(255, 255, 255, 0.9));
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.time-badge,
.status-badge,
.day-badge {
  display: inline-flex;
  min-width: fit-content;
  align-items: center;
  border-radius: 999px;
  background: rgba(22, 163, 74, 0.08);
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 900;
  padding: 6px 9px;
}

.status-badge.skip {
  background: rgba(245, 158, 11, 0.12);
  color: #a16207;
}

.card-title {
  margin: 0;
  font-size: 1.15rem;
}

.item-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.item-list li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: #324334;
  line-height: 1.55;
}

.item-list li::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  margin-top: 9px;
  border-radius: 999px;
  background: var(--green);
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.small-button {
  border: 1px solid rgba(22, 163, 74, 0.16);
  border-radius: 999px;
  background: #ffffff;
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 900;
  min-height: 36px;
  padding: 0 12px;
}

.small-button.active-done {
  border-color: var(--green);
  background: var(--green);
  color: white;
}

.small-button.active-skip {
  border-color: var(--amber);
  background: var(--amber);
  color: white;
}

.today-workout {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  padding: 18px;
}

.today-workout strong {
  font-size: 1.35rem;
}

.workout-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.workout-tab {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: white;
  color: var(--muted);
  flex: 0 0 auto;
  font-weight: 900;
  min-height: 40px;
  padding: 0 14px;
}

.workout-tab.active {
  border-color: var(--green);
  background: var(--green);
  color: white;
}

.exercise-card {
  display: grid;
  gap: 12px;
}

.check-row,
.shop-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.check-row input,
.shop-row input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--green);
}

.exercise-name,
.shop-title {
  display: block;
  font-weight: 950;
}

.exercise-meta,
.shop-item {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 14px;
}

.exercise-inputs {
  display: grid;
  gap: 8px;
}

.exercise-inputs input,
.weight-form input {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: #ffffff;
  color: var(--text);
  min-height: 44px;
  padding: 0 12px;
  outline: none;
}

.exercise-inputs input:focus,
.weight-form input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.1);
}

.exercise-note {
  border-radius: 14px;
  background: rgba(22, 163, 74, 0.07);
  color: var(--green-dark);
  font-size: 14px;
  line-height: 1.55;
  padding: 10px 12px;
}

.timer-card {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
  padding: 18px;
}

#timerDisplay {
  display: block;
  margin: 6px 0;
  color: var(--green-dark);
  font-size: clamp(3rem, 16vw, 5rem);
  line-height: 0.95;
  letter-spacing: -0.07em;
}

.movement-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.08rem;
}

.shopping-actions {
  margin: -4px 0 16px;
}

.shopping-card {
  display: grid;
  gap: 12px;
}

.shopping-card h3 {
  color: var(--green-dark);
}

.progress-layout {
  display: grid;
  gap: 14px;
}

.weight-form {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.weight-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.summary-card {
  display: grid;
  gap: 6px;
}

.summary-card strong {
  color: var(--green-dark);
  font-size: 1.35rem;
}

.guidance,
.weight-list {
  margin-top: 14px;
  padding: 18px;
}

.guidance ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.65;
}

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

.list-head h3 {
  margin-bottom: 0;
}

.weights-list {
  display: grid;
  gap: 8px;
}

.weight-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid rgba(22, 163, 74, 0.12);
  border-radius: 14px;
  background: rgba(240, 253, 244, 0.54);
  padding: 10px 12px;
}

.weight-row strong {
  color: var(--green-dark);
}

.empty-state {
  border: 1px dashed var(--line-strong);
  border-radius: 16px;
  color: var(--muted);
  padding: 16px;
  text-align: center;
}

.bottom-nav {
  position: fixed;
  right: 10px;
  bottom: 10px;
  left: 10px;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  border: 1px solid rgba(22, 163, 74, 0.18);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 44px rgba(20, 83, 45, 0.18);
  padding: 8px;
  backdrop-filter: blur(16px);
}

.bottom-nav a {
  display: grid;
  min-height: 38px;
  place-items: center;
  padding: 4px;
  font-size: 12px;
}

@media (min-width: 720px) {
  body {
    padding-bottom: 34px;
  }

  .top-nav {
    display: flex;
  }

  .bottom-nav {
    display: none;
  }

  .hero {
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
    align-items: center;
    padding: 34px;
  }

  .stats-row,
  .summary-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .routine-grid,
  .meal-grid,
  .exercise-grid,
  .movement-grid,
  .shopping-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .completion-panel,
  .timer-card,
  .progress-layout {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.85fr);
    align-items: center;
  }
}

@media (min-width: 1020px) {
  .routine-grid,
  .meal-grid,
  .exercise-grid,
  .movement-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .shopping-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
