/* ════════════════════════════════════════════════════════════
   DIETA.PL — Ankieta dietetyczna
   Design: Fresh Care (mint #3DB89A)
   Fonts: Satoshi (display) + General Sans (body)
════════════════════════════════════════════════════════════ */

/* ── Tokens ────────────────────────────────────────────────── */
:root {
  --mint:          #3DB89A;
  --mint-dark:     #2a9070;
  --mint-light:    #e6f7f3;
  --mint-pale:     #f2fbf8;
  --text-dark:     #1a2b28;
  --text-muted:    #4a6b64;
  --text-faint:    #8aada6;
  --bg:            #f7fdfb;
  --white:         #ffffff;
  --border:        rgba(61,184,154,0.18);
  --border-strong: rgba(61,184,154,0.35);
  --shadow-sm:     0 2px 8px rgba(26,75,65,0.07);
  --shadow-md:     0 6px 24px rgba(26,75,65,0.10);
  --shadow-lg:     0 16px 48px rgba(26,75,65,0.14);
  --r-sm: 0.5rem;
  --r-md: 0.75rem;
  --r-lg: 1.125rem;
  --r-xl: 1.5rem;
  --font-display: 'Satoshi', 'Inter', sans-serif;
  --font-body:    'General Sans', 'Inter', sans-serif;
  --ease-spring:  cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out:     cubic-bezier(0.16, 1, 0.3, 1);
  --max-w:        480px;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
button, a, input, [role="button"], .option-card, .shop-card, .roller-btn, .btn-next, .btn-primary, .btn-secondary, .nav-btn {
  touch-action: manipulation; /* blokuje double-tap zoom na elementach interaktywnych */
}
html {
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}
body {
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-dark);
  background: var(--bg);
  display: flex;
  flex-direction: column;
}
img, svg { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }
h1,h2,h3 { text-wrap: balance; line-height: 1.15; }

/* ── Header ────────────────────────────────────────────────── */
.survey-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247,253,251,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0.875rem 1.25rem;
}
.header-inner {
  max-width: 560px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
}
.logo-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}
.logo-mark { width: 28px; height: 28px; flex-shrink: 0; }
.logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--text-dark);
}
.logo-dot { color: var(--mint); }

.progress-area { display: flex; flex-direction: column; gap: 0.3rem; }
.progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.section-label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--mint-dark);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
}
.progress-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}
.progress-track {
  height: 5px;
  background: var(--mint-light);
  border-radius: 99px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--mint), var(--mint-dark));
  border-radius: 99px;
  transition: width 0.5s var(--ease-out);
  width: 0%;
}

/* btn-back in header — hidden now (replaced by bottom nav) */
.btn-back { display: none; }

/* ── Bottom navigation bar (survey only) ── */
.survey-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(247,253,251,0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  padding: 0.625rem 1.25rem max(0.625rem, env(safe-area-inset-bottom));
  display: none;
}
.survey-nav.visible { display: block; }
.survey-nav-inner {
  max-width: var(--max-w);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 0.625rem;
}
.nav-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.125rem;
  border-radius: var(--r-lg);
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  transition: all 0.18s var(--ease-out);
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-btn-home {
  background: var(--mint-light);
  color: var(--mint-dark);
  border: 1.5px solid var(--border-strong);
}
.nav-btn-home:hover {
  background: var(--mint);
  color: #fff;
  border-color: var(--mint);
}
.nav-btn-back {
  background: var(--white);
  color: var(--text-dark);
  border: 1.5px solid var(--border-strong);
  flex: 1;
  justify-content: center;
}
.nav-btn-back:hover {
  background: var(--mint-light);
  color: var(--mint-dark);
  border-color: var(--mint);
}
.nav-btn-back:disabled,
.nav-btn-back.disabled {
  opacity: 0.35;
  pointer-events: none;
}

/* ── Screens ────────────────────────────────────────────────── */
main { flex: 1; display: flex; flex-direction: column; }

.screen {
  display: none;
  flex: 1;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1.25rem;
  padding-bottom: max(2.5rem, env(safe-area-inset-bottom) + 1.5rem);
  /* svh = small viewport height (excludes Safari bottom bar) */
  min-height: calc(100svh - 65px);
}
.screen.active { display: flex; }

/* Survey screen: content starts at top, not centered, room for bottom nav */
[data-screen="survey"].screen {
  justify-content: flex-start;
  padding-top: 2.5rem;
  padding-bottom: 6rem;
}


/* ═══════════════════════════════════════════
   WELCOME SCREEN
═══════════════════════════════════════════ */
.welcome-wrap {
  max-width: var(--max-w);
  width: 100%;
  margin: auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  padding-top: 0.25rem;
  padding-bottom: 80px;
}

.welcome-icon {
  width: 72px;
  height: 72px;
  animation: float 3s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.welcome-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  background: var(--mint-light);
  color: var(--mint-dark);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.375rem 0.875rem;
  border-radius: 99px;
  letter-spacing: 0.02em;
}

.welcome-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 7vw, 2.75rem);
  font-weight: 900;
  color: var(--text-dark);
  line-height: 1.1;
}
.welcome-accent { color: var(--mint); }

.welcome-desc {
  font-size: 1.0625rem;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 38ch;
}

.welcome-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.625rem;
  width: 100%;
}
.welcome-feat {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.resume-notice {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  color: var(--mint-dark);
  background: var(--mint-light);
  padding: 0.625rem 1rem;
  border-radius: var(--r-md);
  font-weight: 500;
}
.resume-notice.hidden { display: none; }

.welcome-ctas {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
}
.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 1rem 1.5rem;
  background: var(--mint);
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 700;
  border-radius: var(--r-xl);
  box-shadow: 0 4px 20px rgba(61,184,154,0.35);
  transition: all 0.2s var(--ease-out);
  text-align: center;
}
.btn-primary:hover {
  background: var(--mint-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(61,184,154,0.40);
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  width: 100%;
  padding: 0.875rem 1.5rem;
  border: 2px solid var(--mint);
  color: var(--mint-dark);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--r-xl);
  transition: all 0.2s;
}
.btn-secondary:hover { background: var(--mint-light); }
.btn-secondary.hidden { display: none; }

.welcome-privacy {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  color: var(--text-faint);
}


/* ═══════════════════════════════════════════
   SURVEY SCREEN
═══════════════════════════════════════════ */
.survey-wrap {
  max-width: var(--max-w);
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.question-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Slide animations */
@keyframes slideIn {
  from { opacity: 0; transform: translateX(32px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(-32px); }
}
.slide-in  { animation: slideIn  0.35s var(--ease-out) forwards; }
.slide-out { animation: slideOut 0.22s var(--ease-out) forwards; }

/* Question header */
.question-header { margin-bottom: 0.25rem; }
.question-text {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 4vw, 1.6rem);
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.2;
}
.q-subtitle {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-top: 0.375rem;
  line-height: 1.5;
}

/* ── Option Cards (single + multiselect) ────────────── */
.option-grid {
  display: grid;
  gap: 0.625rem;
}
.option-grid.cols-2 { grid-template-columns: 1fr 1fr; }
.option-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }

.option-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 1rem 0.75rem;
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--r-lg);
  text-align: center;
  transition: all 0.18s var(--ease-out);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  min-height: 80px;
}
.option-card:hover {
  border-color: var(--mint);
  background: var(--mint-pale);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.option-card.selected {
  border-color: var(--mint);
  background: var(--mint-light);
  box-shadow: 0 0 0 3px rgba(61,184,154,0.18);
  transform: translateY(-1px);
}
.option-card:active { transform: translateY(0) scale(0.97); }

.opt-emoji {
  font-size: 1.75rem;
  line-height: 1;
}
.opt-label {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.2;
}
.opt-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.3;
}

/* Sklepy */
.shop-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}

/* ── Roller (picker) ────────────────────────────────── */
.roller-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin: 1rem 0;
}
.roller-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--mint-light);
  color: var(--mint-dark);
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
}
.roller-btn:hover { background: var(--mint); color: #fff; }
.roller-btn:active { transform: scale(0.92); }

.roller-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 100px;
}
.roller-val {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 900;
  color: var(--mint);
  line-height: 1;
  transition: transform 0.15s var(--ease-spring);
}
.roller-unit {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ── Custom range track + thumb (cross-browser) ── */
input[type=range] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  cursor: pointer;
  background: transparent;
}
input[type=range]:focus { outline: none; }

/* Track */
input[type=range]::-webkit-slider-runnable-track {
  background: var(--mint-light);
  border-radius: 99px;
  height: 8px;
}
input[type=range]::-moz-range-track {
  background: var(--mint-light);
  border-radius: 99px;
  height: 8px;
}

/* Thumb — large, easy to grab */
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--mint);
  border: 3px solid #fff;
  box-shadow: 0 2px 10px rgba(61,184,154,0.45);
  margin-top: -12px;
  transition: transform 0.15s var(--ease-spring), box-shadow 0.15s;
}
input[type=range]::-moz-range-thumb {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--mint);
  border: 3px solid #fff;
  box-shadow: 0 2px 10px rgba(61,184,154,0.45);
  cursor: pointer;
  transition: transform 0.15s var(--ease-spring), box-shadow 0.15s;
}
input[type=range]:active::-webkit-slider-thumb {
  transform: scale(1.2);
  box-shadow: 0 4px 18px rgba(61,184,154,0.55);
}
input[type=range]:active::-moz-range-thumb {
  transform: scale(1.2);
  box-shadow: 0 4px 18px rgba(61,184,154,0.55);
}

.roller-range {
  width: 100%;
  margin-top: 0.75rem;
  margin-bottom: 0.25rem;
}

/* ── Slider motywacja ───────────────────────────────── */
.slider-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 0.75rem 0;
}
.slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: var(--text-muted);
  padding-inline: 0.25rem;
}
.motivation-slider {
  width: 100%;
  padding-block: 0.5rem;
}
.slider-value {
  text-align: center;
}
#slider-display {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--mint-dark);
}

/* ── Body fat visual ────────────────────────────────── */
.bodyfat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.625rem;
}
.bodyfat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  padding: 0.75rem 0.375rem 0.625rem;
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--r-lg);
  cursor: pointer;
  transition: all 0.18s;
}
.bodyfat-card:hover, .bodyfat-card.selected {
  border-color: var(--mint);
  background: var(--mint-light);
}
/* SVG sylwetki — zastępuje bf-visual */
.bf-svg {
  width: 56px;
  height: 70px;
  display: block;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(61,184,154,0.18));
}
.bf-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-dark);
}

/* ── Buttons (next/skip in questions) ───────────────── */
.btn-next {
  width: 100%;
  padding: 0.9375rem;
  background: var(--mint);
  color: #fff;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--r-xl);
  transition: all 0.18s;
  box-shadow: 0 4px 16px rgba(61,184,154,0.30);
  margin-top: 0.5rem;
}
.btn-next:hover { background: var(--mint-dark); transform: translateY(-1px); }
.btn-next:active { transform: translateY(0); }
.btn-next.btn-skip {
  background: transparent;
  color: var(--text-muted);
  box-shadow: none;
  border: 1.5px solid var(--border-strong);
}
.btn-next.btn-skip:hover { background: var(--mint-light); color: var(--mint-dark); }

/* Sticky wrapper dla przycisku Dalej — zawsze u dołu obszaru pytania */
.sticky-next-wrap {
  position: sticky;
  bottom: 4.5rem; /* nad dolnym paskiem nawigacji (68px) */
  z-index: 10;
  padding: 0.75rem 0 0.25rem;
  background: linear-gradient(to bottom, transparent 0%, var(--bg-main) 35%);
  margin-top: 0.75rem;
}

/* Pole tekstowe dla "Inne" w suplementach */
.inne-input-wrap {
  grid-column: 1 / -1;
  padding: 0 0.25rem 0.25rem;
}
.inne-input {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1.5px solid var(--mint);
  border-radius: var(--r-md);
  font-size: 0.9375rem;
  font-family: var(--font-body);
  color: var(--text-dark);
  background: var(--white);
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.inne-input:focus {
  border-color: var(--mint-dark);
  box-shadow: 0 0 0 3px rgba(61,184,154,0.15);
}

/* ── Shop grid (sklepy jako multiselect) */
.shop-grid .option-card.shop-card {
  flex-direction: row;
  justify-content: flex-start;
  gap: 0.625rem;
  padding: 0.75rem 0.875rem;
}
.shop-grid .shop-dot {
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════
   GENERATING SCREEN
═══════════════════════════════════════════ */
.generating-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  min-height: 70vh;
  text-align: center;
  padding-inline: 1.5rem;
}

.gen-animation {
  position: relative;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gen-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid transparent;
}
.gen-ring-1 {
  border-top-color: var(--mint);
  animation: spin 1.2s linear infinite;
}
.gen-ring-2 {
  inset: 12px;
  border-right-color: var(--mint-dark);
  animation: spin 1.8s linear infinite reverse;
}
.gen-ring-3 {
  inset: 24px;
  border-bottom-color: rgba(61,184,154,0.4);
  animation: spin 2.4s linear infinite;
}
.gen-center {
  position: relative;
  z-index: 2;
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.gen-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-dark);
}
.gen-message {
  font-size: 1rem;
  color: var(--text-muted);
  transition: opacity 0.3s;
  min-height: 1.5em;
  max-width: 30ch;
  margin-inline: auto;
}
.gen-message.fade-out { opacity: 0; }

.gen-dots {
  display: flex;
  gap: 0.5rem;
}
.gen-dots span {
  width: 8px;
  height: 8px;
  background: var(--mint);
  border-radius: 50%;
  animation: bounce 1.2s ease-in-out infinite;
}
.gen-dots span:nth-child(2) { animation-delay: 0.2s; }
.gen-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes bounce {
  0%, 80%, 100% { transform: scale(0.7); opacity: 0.5; }
  40% { transform: scale(1); opacity: 1; }
}


/* ═══════════════════════════════════════════
   RESULTS SCREEN
═══════════════════════════════════════════ */
.results-wrap {
  max-width: var(--max-w);
  width: 100%;
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-bottom: 3rem;
}

.results-header { text-align: center; }
.results-badge {
  display: inline-block;
  background: var(--mint-light);
  color: var(--mint-dark);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.375rem 0.875rem;
  border-radius: 99px;
  margin-bottom: 0.625rem;
}
.results-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 5vw, 2rem);
  font-weight: 800;
  color: var(--text-dark);
}

/* Macros card */
.macros-card {
  background: var(--white);
  border-radius: var(--r-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  border: 1.5px solid var(--border);
}
.macro-hero {
  text-align: center;
  padding-bottom: 1.25rem;
}
.macro-hero-val {
  display: block;
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 900;
  color: var(--mint);
  line-height: 1;
}
.macro-hero-unit {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 500;
}
.macro-hero-label {
  font-size: 0.875rem;
  color: var(--text-faint);
  margin-top: 0.375rem;
}
.macro-divider {
  height: 1px;
  background: var(--border);
  margin-block: 1rem;
}
.macros-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  text-align: center;
}
.macro-item {
  padding: 0.875rem 0.5rem;
  border-radius: var(--r-md);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.macro-protein { background: rgba(61,184,154,0.08); }
.macro-carbs   { background: rgba(255,196,88,0.12); }
.macro-fat     { background: rgba(255,136,88,0.10); }
.macro-val {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-dark);
}
.macro-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}
.macro-sub {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}
.macro-sub strong { color: var(--text-dark); }

/* Week plan */
.plan-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-dark);
}

.day-card {
  background: var(--white);
  border-radius: var(--r-lg);
  border: 1.5px solid var(--border);
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.day-card.active { box-shadow: var(--shadow-md); }

.day-header {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.125rem;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
}
.day-header:hover { background: var(--mint-pale); }

.day-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--text-dark);
  flex: 1;
}
.day-kcal {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-weight: 500;
}
.day-chevron {
  color: var(--text-muted);
  transition: transform 0.3s var(--ease-out);
  flex-shrink: 0;
}
.day-card.active .day-chevron { transform: rotate(180deg); }

.day-meals {
  display: none;
  padding: 0 1.125rem 1rem;
  flex-direction: column;
  gap: 0.75rem;
}
.day-card.active .day-meals { display: flex; }

.meal-row {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 0.75rem;
  background: var(--bg);
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s;
  position: relative;
}
.meal-row:hover { background: var(--mint-pale); border-color: var(--mint); }
.meal-row--open { background: var(--mint-light); border-color: var(--mint); border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.meal-chevron {
  flex-shrink: 0;
  margin-top: 0.25rem;
  color: var(--text-muted);
  transition: transform 0.25s;
}
.meal-row--open .meal-chevron { transform: rotate(180deg); }

/* Rozwinięty szczegół posiłku */
.meal-detail {
  display: none;
  background: var(--mint-light);
  border: 1px solid var(--mint);
  border-top: none;
  border-radius: 0 0 var(--r-md) var(--r-md);
  overflow: hidden;
}
.meal-detail.open { display: block; }
.meal-detail-inner {
  padding: 0.875rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.meal-detail-section h4 {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--mint-dark);
  margin: 0 0 0.375rem;
}
.meal-detail-section ul,
.meal-detail-section ol {
  margin: 0;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.meal-detail-section li {
  font-size: 0.875rem;
  color: var(--text-dark);
  line-height: 1.5;
}
.meal-detail-section p {
  font-size: 0.875rem;
  color: var(--text-dark);
  line-height: 1.6;
  margin: 0;
}
.meal-detail-macros {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding-top: 0.5rem;
  border-top: 1px solid var(--mint);
}
.meal-detail-macros span {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--white);
  padding: 0.125rem 0.5rem;
  border-radius: 99px;
  border: 1px solid var(--border);
}

/* Dietetyczka banner */
.dietitian-banner {
  margin-bottom: 1.25rem;
}
.dietitian-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem 1rem;
  background: var(--mint-light);
  border: 1.5px solid var(--mint);
  border-radius: var(--r-xl);
}
.dietitian-avatar {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  overflow: hidden;
  border: 2.5px solid var(--mint);
  background: var(--mint-pale);
}
.dietitian-avatar svg,
.dietitian-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 15%;
}
.dietitian-info {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}
.dietitian-role {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}
.dietitian-name {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-dark);
}
.meal-icon {
  font-size: 1.75rem;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 0.125rem;
}
.meal-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
  min-width: 0;
}
.meal-type {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--mint-dark);
}
.meal-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.3;
}
.meal-macros {
  display: flex;
  gap: 0.625rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}
.meal-macros span {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--white);
  padding: 0.125rem 0.5rem;
  border-radius: 99px;
  border: 1px solid var(--border);
  font-weight: 500;
}

/* Results CTA */
.results-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.875rem;
  text-align: center;
}
.results-cta-note {
  font-size: 0.875rem;
  color: var(--text-muted);
  max-width: 34ch;
  line-height: 1.5;
}


/* ── BMI hint (waga docelowa) ─────────────────────── */
.roller-bmi-hint {
  font-size: 0.875rem;
  color: var(--mint-dark);
  text-align: center;
  margin-top: 0.5rem;
  line-height: 1.4;
  min-height: 1.4em;
  transition: color 0.2s ease;
}
.roller-bmi-hint strong {
  font-weight: 600;
}

/* ── Mobile tweaks ─────────────────────────────────── */
@media (max-width: 480px) {
  .option-grid.cols-3 { grid-template-columns: 1fr 1fr; }
  .bodyfat-grid { grid-template-columns: repeat(3, 1fr); }
  .macros-grid { gap: 0.5rem; }
  .macro-val { font-size: 1.0625rem; }
  .macro-item { padding: 0.625rem 0.375rem; }
  .roller-val { font-size: 2.75rem; }

  /* Sklepy — 3 kolumny na mobile */
  .option-grid.cols-2:has(.shop-dot) { grid-template-columns: 1fr 1fr 1fr; }
}

@media (max-width: 360px) {
  .welcome-features { grid-template-columns: 1fr; }
  .option-grid.cols-3 { grid-template-columns: 1fr 1fr; }
}

/* ── Email screen ───────────────────────────────────────────── */
.email-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 0.5rem;
}
.email-form {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.email-input-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.email-input {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid var(--border);
  border-radius: 12px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text-dark);
  background: var(--white);
  transition: border-color 0.2s;
  outline: none;
}
.email-input:focus {
  border-color: var(--mint);
}
.email-input.error {
  border-color: #e05555;
}
.email-error {
  font-size: 0.8rem;
  color: #e05555;
  min-height: 1.2em;
  padding-left: 0.25rem;
}
.btn-text {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  cursor: pointer;
  font-family: inherit;
  padding: 0.5rem;
  touch-action: manipulation;
}
.btn-text:hover { color: var(--text-dark); }

/* ── PDF button ─────────────────────────────────────────────── */
#btn-pdf {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

/* ── Loading overlay ────────────────────────────────────────── */
.btn-loading {
  opacity: 0.7;
  pointer-events: none;
  cursor: not-allowed;
}
