@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,600;1,9..144,300;1,9..144,400&family=DM+Sans:wght@300;400;500;600&display=swap');

/* ═══════════════════════════════════════════════════════════
   FLŌRA — Global Stylesheet v5
   ═══════════════════════════════════════════════════════════ */

:root {
  --cream:      #F5EFE6;
  --blush:      #E8C4B0;
  --rose:       #C97D68;
  --terracotta: #B05A42;
  --sage:       #8A9E7F;
  --sage-light: #C5D4BC;
  --moss:       #5C7A52;
  --deep:       #2A1F1A;
  --warm-white: #FBF7F2;
  --muted:      #9A8880;
  --gold:       #C4A265;
  --bg:         #F0E8DD;
}

* { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent; }

html, body {
  height: 100%;
  overflow: hidden;
}

/* Pagine che devono scorrere (login, onboarding) */
body.page-scrollable,
body.page-scrollable html {
  height: auto !important;
  min-height: 100% !important;
  overflow-y: auto !important;
}
body.page-scrollable .phone-shell {
  height: auto !important;
  min-height: 100dvh !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}
/* Fix onboarding: sfondo scuro visibile */
body.onboarding-active .phone-shell {
  background: transparent !important;
  box-shadow: none !important;
}
body.onboarding-active {
  background: linear-gradient(160deg, #2A1F1A 0%, #4A2E22 45%, #7A4030 100%) !important;
  min-height: 100dvh;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--deep);
}

/* ── PHONE SHELL ── */
.phone-shell {
  max-width: 390px;
  height: 100dvh;
  margin: 0 auto;
  background: var(--warm-white);
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 60px rgba(42,31,26,.15);
  overflow: hidden;
}
/* Login/registrazione: permetti scroll verticale */
.phone-shell:has(.auth-page) {
  overflow-y: auto;
  height: auto;
  min-height: 100dvh;
}

/* ── STATUS BAR ── */
.status-bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 20px 4px;
  font-size: 13px; font-weight: 500; color: var(--deep);
  flex-shrink: 0;
}

/* ── SCROLL TO NAV BUTTON ── */
.scroll-to-nav {
  background: none; border: none; cursor: pointer;
  padding: 2px 0 2px 8px;
  color: var(--deep);
  display: flex; align-items: center;
  transition: color .2s, transform .2s;
  -webkit-tap-highlight-color: transparent;
  opacity: .75;
}
.scroll-to-nav svg {
  width: 22px; height: 13px;
  stroke: currentColor;
}
.scroll-to-nav:active {
  color: var(--terracotta);
  opacity: 1;
  transform: translateY(2px);
}

/* ── PAGE HEADER ── */
.page-header { padding: 8px 22px 8px; }
.greeting    { font-size: 13px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); }
.page-title  { font-family: 'Fraunces', serif; font-size: 32px; font-weight: 400; margin-top: 2px; line-height: 1.15; }
.page-title em { color: var(--terracotta); font-style: italic; }

/* ── SCROLL AREA ── */
.scroll-area { flex: 1; overflow-y: auto; padding-bottom: 8px; scroll-behavior: smooth; }
.scroll-area::-webkit-scrollbar { display: none; }
.ph { height: 12px; }

/* ── BOTTOM NAV ── */
.bottom-nav {
  display: flex; justify-content: space-around; align-items: center;
  padding: 8px 0 20px;
  background: var(--warm-white);
  border-top: 1px solid rgba(42,31,26,.06);
  flex-shrink: 0;
  position: sticky; bottom: 0; z-index: 10;
}
.nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  cursor: pointer; padding: 4px 8px; border-radius: 12px;
  text-decoration: none; color: var(--muted);
  transition: background .2s;
  flex: 1;
}
.nav-item svg   { width: 20px; height: 20px; stroke: var(--muted); transition: stroke .2s; }
.nav-item span  { font-size: 11px; letter-spacing: .3px; transition: color .2s; }
.nav-item.active svg  { stroke: var(--terracotta); }
.nav-item.active span { color: var(--terracotta); }
.nav-item:active { background: rgba(201,125,104,.1); }

/* ── SECTION TITLE ── */
.section-title {
  font-size: 13px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--muted); padding: 14px 22px 6px;
}

/* ── CARDS ── */
.card {
  background: white; border-radius: 20px;
  box-shadow: 0 2px 16px rgba(42,31,26,.06);
  margin: 10px 16px; padding: 18px;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
.card:active { transform: scale(.98); box-shadow: 0 1px 8px rgba(42,31,26,.08); }

.info-card {
  background: white; border-radius: 20px;
  margin: 0 16px 10px; padding: 18px;
  box-shadow: 0 2px 12px rgba(42,31,26,.06);
}
.info-card-title {
  font-size: 15px; font-weight: 500; margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px;
}
.info-card-title span { font-size: 20px; }

/* ── WORKOUT CARDS ── */
.workout-card {
  border-radius: 20px; margin: 0 16px 10px; overflow: hidden;
  box-shadow: 0 4px 20px rgba(42,31,26,.1); cursor: pointer;
  transition: transform .15s; position: relative;
}
.workout-card:active { transform: scale(.98); }
.workout-banner {
  height: 110px; display: flex; align-items: flex-end; padding: 14px;
  position: relative;
}
/* Versione compatta per la home */
.workout-card-sm {
  border-radius: 20px; margin: 0 16px 10px; overflow: hidden;
  box-shadow: 0 4px 20px rgba(42,31,26,.1); cursor: pointer;
  transition: transform .15s; position: relative;
}
.workout-card-sm:active { transform: scale(.98); }
.workout-banner-sm {
  height: 80px; display: flex; align-items: flex-end; padding: 12px 14px;
  position: relative;
}
.workout-banner-sm::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.55) 0%, transparent 60%);
}
.workout-banner::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.55) 0%, transparent 60%);
}
.wc-1 { background: linear-gradient(135deg, #8A9E7F, #5C7A52); }
.wc-2 { background: linear-gradient(135deg, #C97D68, #B05A42); }
.wc-3 { background: linear-gradient(135deg, #C4A265, #9A7040); }
.workout-info  { position: relative; z-index: 1; color: white; }
.workout-name  { font-family: 'Fraunces', serif; font-size: 22px; font-weight: 400; }
.workout-tags  { display: flex; gap: 6px; margin-top: 4px; flex-wrap: wrap; }
.tag {
  font-size: 12px; letter-spacing: 1px; text-transform: uppercase;
  padding: 2px 8px; border-radius: 10px;
  background: rgba(255,255,255,.2); color: white;
}

/* ── EXERCISE CARDS ── */
.exercise-list { padding: 8px 16px 4px; display: flex; flex-direction: column; gap: 12px; }
.ex-card {
  background: white; border-radius: 20px;
  box-shadow: 0 2px 14px rgba(42,31,26,.07);
  overflow: hidden; cursor: pointer;
}
.ex-card-top { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.ex-num { font-family: 'Fraunces', serif; font-size: 24px; font-weight: 300; color: var(--muted); flex-shrink: 0; width: 26px; text-align: center; }
.ex-card-info  { flex: 1; min-width: 0; }
.ex-card-name  { font-size: 15px; font-weight: 500; color: var(--deep); }
.ex-card-meta  { font-size: 13px; color: var(--muted); margin-top: 2px; }
.ex-card-tags  { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 5px; }
.ex-tag        { font-size: 12px; padding: 2px 8px; border-radius: 8px; letter-spacing: .3px; }
.ex-tag.sage   { background: var(--sage-light); color: var(--moss); }
.ex-tag.rose   { background: #F5D5CC; color: var(--terracotta); }
.ex-tag.gold   { background: #F0E4CC; color: #8A6020; }
.ex-play-btn {
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(176,90,66,.25);
  transition: opacity .15s;
}
.ex-play-btn:active { opacity: .85; }
.ex-play-btn svg { width: 14px; height: 14px; margin-left: 2px; }
.ex-card-body { max-height: 0; overflow: hidden; transition: max-height .6s cubic-bezier(.4,0,.2,1); }
.ex-card.open .ex-card-body { max-height: 2400px; border-top: 1px solid rgba(42,31,26,.06); }
.ex-img-placeholder:hover { background: rgba(201,125,104,.12) !important; }
.ex-desc       { padding: 10px 16px 6px; }
.ex-desc-title { font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.ex-steps-list { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.ex-steps-list li { font-size: 14px; line-height: 1.55; color: var(--deep); padding-left: 20px; position: relative; }
.ex-steps-list li::before { content: attr(data-n); position: absolute; left: 0; font-size: 12px; color: var(--terracotta); font-weight: 600; top: 1px; }
.ex-muscles    { padding: 6px 16px; }
.ex-muscle-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.mtag          { font-size: 12px; padding: 3px 9px; border-radius: 8px; background: var(--bg); color: var(--deep); }
.ex-warning {
  display: flex; gap: 8px; align-items: flex-start;
  background: rgba(240,232,221,.6); margin: 8px 14px 14px;
  padding: 10px 12px; border-radius: 12px;
  font-size: 13px; color: var(--muted); line-height: 1.5;
  border-left: 3px solid var(--blush);
}

/* ── MOTIVATIONAL CARD ── */
.motiv-card {
  margin: 8px 16px 4px;
  background: linear-gradient(135deg, #2A1F1A 0%, #5C3020 100%);
  border-radius: 18px; padding: 13px 16px; position: relative; overflow: hidden;
}
.motiv-card::before { content: ''; position: absolute; top:-30px; right:-30px; width:110px; height:110px; border-radius:50%; background: rgba(232,196,176,.12); }
.motiv-quote {
  font-family: 'Fraunces', serif;
  font-size: 16px; font-style: italic; font-weight: 300;
  color: var(--cream); line-height: 1.45; position: relative; z-index: 1;
}
.motiv-quote::before { content: '\201C'; font-size: 30px; color: var(--blush); line-height: 0; vertical-align: -10px; margin-right: 2px; }
.motiv-author { font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: rgba(232,196,176,.5); margin-top: 6px; position: relative; z-index: 1; }

/* ── METRIC CARDS ── */
.metrics-row { display: flex; gap: 10px; margin: 10px 16px; }
.metric-card { flex: 1; background: white; border-radius: 18px; padding: 14px 12px; box-shadow: 0 2px 12px rgba(42,31,26,.06); text-align: center; }
.metric-icon  { font-size: 24px; margin-bottom: 4px; }
.metric-val   { font-family: 'Fraunces', serif; font-size: 24px; font-weight: 600; color: var(--deep); }
.metric-label { font-size: 12px; color: var(--muted); margin-top: 1px; }

/* ── WELLNESS SCORE ── */
.wellness-score-card {
  background: linear-gradient(135deg, #2A1F1A 0%, #7A4030 100%);
  border-radius: 20px; margin: 6px 16px; padding: 14px 16px;
  color: white; position: relative; overflow: hidden;
}
.wellness-score-card::before { content:''; position:absolute; top:-30px; right:-30px; width:140px; height:140px; border-radius:50%; background:rgba(201,125,104,.2); }
.wellness-score-card::after  { content:''; position:absolute; bottom:-20px; left:20px; width:80px; height:80px; border-radius:50%; background:rgba(138,158,127,.15); }
.score-label { font-size: 12px; letter-spacing: 2px; text-transform: uppercase; opacity: .6; }
.score-value { font-family: 'Fraunces', serif; font-size: 46px; font-weight: 300; line-height: 1; margin: 2px 0; }
.score-sub   { font-size: 14px; opacity: .7; }
.score-bars  { display: flex; gap: 3px; margin-top: 8px; }
.score-bar   { flex: 1; height: 4px; border-radius: 2px; background: rgba(255,255,255,.15); overflow: hidden; }
.score-bar-fill { height: 100%; border-radius: 2px; background: var(--blush); }

/* ── TECHNIQUE GRID ── */
.technique-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.technique-item { background: var(--bg); border-radius: 14px; padding: 12px; text-align: center; }
.technique-emoji { font-size: 24px; }
.technique-name  { font-size: 13px; font-weight: 500; margin-top: 4px; }
.technique-desc  { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ── PROFILE ── */
.profile-header {
  background: linear-gradient(135deg, #2A1F1A, #7A4030);
  padding: 40px 22px 28px; border-radius: 0 0 28px 28px;
  color: white; text-align: center; flex-shrink: 0;
}
.avatar {
  width: 80px; height: 80px; border-radius: 50%; margin: 0 auto 12px;
  background: linear-gradient(135deg, var(--blush), var(--terracotta));
  display: flex; align-items: center; justify-content: center;
  font-family: 'Fraunces', serif; font-size: 34px; color: white;
  box-shadow: 0 4px 16px rgba(0,0,0,.3);
}
.profile-name { font-family: 'Fraunces', serif; font-size: 26px; font-weight: 300; }
.profile-sub  { font-size: 14px; opacity: .65; margin-top: 4px; }
.stats-row    { display: flex; gap: 0; margin: 16px 16px 4px; background: white; border-radius: 18px; overflow: hidden; box-shadow: 0 2px 12px rgba(42,31,26,.06); }
.stat-box     { flex: 1; padding: 14px 10px; text-align: center; border-right: 1px solid var(--bg); }
.stat-box:last-child { border-right: none; }
.stat-val     { font-family: 'Fraunces', serif; font-size: 28px; font-weight: 300; color: var(--terracotta); }
.stat-lbl     { font-size: 12px; color: var(--muted); margin-top: 2px; }
.pref-section { padding: 6px 0; }
.pref-item {
  display: flex; align-items: center; padding: 13px 22px; gap: 12px;
  cursor: pointer; transition: background .15s;
}
.pref-item:active { background: var(--bg); }
.pref-icon  { font-size: 20px; width: 24px; text-align: center; flex-shrink: 0; }
.pref-label { flex: 1; font-size: 15px; color: var(--deep); }
.pref-value { font-size: 14px; color: var(--muted); }
.pref-arrow { color: var(--muted); font-size: 20px; margin-left: 6px; }
.badge-row  { display: flex; gap: 10px; padding: 4px 16px; overflow-x: auto; }
.badge-row::-webkit-scrollbar { display: none; }
.badge      { display: flex; flex-direction: column; align-items: center; gap: 6px; flex-shrink: 0; }
.badge-icon { width: 50px; height: 50px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 24px; }
.badge-icon.earned { background: linear-gradient(135deg, var(--blush), var(--terracotta)); box-shadow: 0 4px 12px rgba(176,90,66,.3); }
.badge-icon.locked { background: var(--bg); filter: grayscale(1); }
.badge-name { font-size: 12px; color: var(--muted); text-align: center; max-width: 60px; }

/* ── WORKOUT DETAIL ── */
.workout-detail-hero {
  height: 200px; display: flex; align-items: flex-end; padding: 20px;
  position: relative; border-radius: 0 0 28px 28px; overflow: hidden;
  flex-shrink: 0;
}
.wdh-1 { background: linear-gradient(135deg, #2A1F1A, #7A4030); }
.wdh-2 { background: linear-gradient(135deg, #4A2E22, #8A9E7F); }
.wdh-3 { background: linear-gradient(135deg, #5C3A20, #C4A265); }
.workout-detail-hero::after { content:''; position:absolute; inset:0; background:linear-gradient(to top,rgba(0,0,0,.5) 0%,transparent 50%); }
.wdh-info   { position: relative; z-index: 1; color: white; }
.wdh-name   { font-family: 'Fraunces', serif; font-size: 34px; font-weight: 300; }
.wdh-meta   { display: flex; gap: 12px; margin-top: 6px; font-size: 14px; opacity: .8; flex-wrap: wrap; }
.back-btn {
  position: absolute; top: 50px; left: 16px; z-index: 2;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.15); border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; backdrop-filter: blur(8px); color: white; font-size: 20px;
  text-decoration: none;
}
.start-workout-btn {
  margin: 4px 16px 16px; padding: 16px;
  background: linear-gradient(135deg, var(--terracotta), var(--rose));
  border: none; border-radius: 18px; width: calc(100% - 32px);
  color: white; font-family: 'DM Sans', sans-serif;
  font-size: 16px; font-weight: 500; letter-spacing: 1px; text-transform: uppercase;
  cursor: pointer; box-shadow: 0 6px 20px rgba(176,90,66,.35);
  display: block; text-align: center; text-decoration: none;
}
.equip-card { margin: 8px 16px 0; background: white; border-radius: 18px; padding: 14px 16px; box-shadow: 0 2px 12px rgba(42,31,26,.06); }
.equip-title { font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.equip-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.equip-pill  { display: flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: 50px; background: var(--bg); font-size: 13px; color: var(--deep); border: 1px solid rgba(42,31,26,.08); }
.equip-pill.needed   { background: linear-gradient(135deg,var(--blush),var(--terracotta)); color: white; border: none; }
.equip-pill.optional { background: var(--sage-light); color: var(--moss); border: none; }

/* ── PROGRAM ── */
.program-hero {
  background: linear-gradient(135deg, var(--sage) 0%, var(--moss) 100%);
  margin: 10px 16px; border-radius: 24px; padding: 22px; color: white; position: relative; overflow: hidden;
}
.program-hero::before { content:''; position:absolute; top:-40px; right:-40px; width:160px; height:160px; border-radius:50%; background:rgba(255,255,255,.1); }
.program-week { font-size: 12px; letter-spacing: 2px; text-transform: uppercase; opacity: .7; }
.program-name { font-family: 'Fraunces', serif; font-size: 28px; margin: 4px 0; }
.progress-track { background: rgba(255,255,255,.2); border-radius: 4px; height: 6px; margin-top: 14px; overflow: hidden; }
.progress-fill  { height: 100%; background: var(--cream); border-radius: 4px; transition: width .8s ease; }
.progress-label { font-size: 13px; opacity: .8; margin-top: 6px; }
.day-card { background: white; border-radius: 18px; margin: 0 16px 10px; box-shadow: 0 2px 12px rgba(42,31,26,.06); overflow: hidden; cursor: pointer; }
.day-header { display: flex; align-items: center; padding: 14px 16px; gap: 14px; }
.day-num { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-family: 'Fraunces', serif; font-size: 22px; font-weight: 600; flex-shrink: 0; }
.day-num.done    { background: var(--sage-light); color: var(--moss); }
.day-num.today   { background: var(--terracotta); color: white; }
.day-num.upcoming{ background: var(--bg); color: var(--muted); }
.day-info  { flex: 1; }
.day-title { font-size: 16px; font-weight: 500; }
.day-desc  { font-size: 13px; color: var(--muted); margin-top: 2px; }
.day-arrow { color: var(--muted); font-size: 20px; }
.day-exercises { padding: 0 16px 14px; display: flex; gap: 6px; flex-wrap: wrap; }
.ex-pill { font-size: 12px; padding: 4px 10px; border-radius: 10px; background: var(--bg); color: var(--deep); }

/* ── ONBOARDING ── */
#onboarding-page {
  background: linear-gradient(160deg, #2A1F1A 0%, #4A2E22 45%, #7A4030 100%);
  min-height: 100vh; display: flex; flex-direction: column;
  position: relative; overflow: hidden;
}
.ob-bg { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 20% 80%, rgba(201,125,104,.2) 0%, transparent 55%),
              radial-gradient(ellipse at 85% 15%, rgba(138,158,127,.15) 0%, transparent 45%); }
.ob-progress { display: flex; gap: 6px; padding: 60px 24px 0; position: relative; z-index: 2; }
.ob-dot { flex: 1; height: 3px; border-radius: 2px; background: rgba(255,255,255,.2); transition: background .4s; }
.ob-dot.active { background: var(--blush); }
.ob-dot.done   { background: rgba(255,255,255,.5); }
.ob-steps { flex: 1; position: relative; z-index: 2; overflow: hidden; min-height: 0; }
.ob-step  { display: none; flex-direction: column; padding: 28px 24px 120px; overflow-y: auto; height: 100%; }
.ob-step.active { display: flex; animation: stepIn .4s cubic-bezier(.32,.72,0,1); }
@keyframes stepIn { from{opacity:0;transform:translateX(24px)} to{opacity:1;transform:translateX(0)} }
.ob-icon     { font-size: 46px; margin-bottom: 14px; }
.ob-title    { font-family: 'Fraunces', serif; font-size: 32px; font-weight: 300; color: var(--cream); line-height: 1.2; }
.ob-title em { color: var(--blush); font-style: italic; }
.ob-subtitle { font-size: 14px; color: rgba(245,239,230,.55); margin-top: 6px; letter-spacing: .3px; line-height: 1.6; }
.ob-field    { margin-top: 20px; }
.ob-label    { font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: rgba(245,239,230,.5); margin-bottom: 8px; }
.ob-input {
  width: 100%; padding: 14px 16px; border-radius: 14px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.15);
  color: var(--cream); font-family: 'DM Sans', sans-serif; font-size: 17px; outline: none;
  transition: border-color .2s, background .2s; backdrop-filter: blur(8px);
}
.ob-input::placeholder { color: rgba(245,239,230,.3); }
.ob-input:focus { border-color: var(--blush); background: rgba(255,255,255,.14); }
.ob-input-row { display: flex; gap: 10px; }
.ob-input-row .ob-field { flex: 1; }
.ob-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ob-chip {
  padding: 10px 16px; border-radius: 50px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.15);
  color: rgba(245,239,230,.7); font-size: 14px; cursor: pointer; transition: all .2s; user-select: none;
  min-height: 44px; display: inline-flex; align-items: center; justify-content: center;
  -webkit-tap-highlight-color: rgba(201,125,104,.2);
}
.ob-chip.selected { background: var(--terracotta); border-color: var(--terracotta); color: white; box-shadow: 0 4px 14px rgba(176,90,66,.4); }
.ob-chip-sm { padding: 8px 12px; font-size: 13px; }
.ob-slider-wrap { margin-top: 14px; }
.ob-slider { -webkit-appearance: none; width: 100%; height: 4px; border-radius: 2px; background: rgba(255,255,255,.2); outline: none; margin: 8px 0; }
.ob-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--blush); cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.ob-slider-label { display: flex; justify-content: space-between; font-size: 12px; color: rgba(245,239,230,.4); }
.ob-slider-val   { text-align: center; font-family: 'Fraunces', serif; font-size: 30px; color: var(--blush); margin-top: 2px; }
.ob-toggle-label { font-size: 15px; color: rgba(245,239,230,.8); }
.ob-toggle-sub   { font-size: 12px; color: rgba(245,239,230,.4); margin-top: 2px; }
.ob-switch { width: 44px; height: 26px; border-radius: 13px; background: rgba(255,255,255,.15); position: relative; cursor: pointer; transition: background .25s; flex-shrink: 0; }
.ob-switch.on { background: var(--sage); }
.ob-switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: white; transition: transform .25s; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.ob-switch.on::after { transform: translateX(18px); }
.ob-bottom { padding: 20px 24px 44px; position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; }
.ob-back-btn { width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.1); border: none; cursor: pointer; color: rgba(245,239,230,.6); font-size: 22px; display: flex; align-items: center; justify-content: center; transition: background .2s; }
.ob-next-btn { flex: 1; margin-left: 12px; padding: 15px; background: linear-gradient(135deg, var(--blush), var(--terracotta)); border: none; border-radius: 16px; cursor: pointer; color: white; font-family: 'DM Sans', sans-serif; font-size: 15px; font-weight: 500; letter-spacing: 1.5px; text-transform: uppercase; box-shadow: 0 6px 20px rgba(176,90,66,.35); transition: transform .15s; }
.ob-next-btn:active { transform: scale(.98); }
.ob-result { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); border-radius: 20px; padding: 18px; margin-top: 20px; backdrop-filter: blur(8px); }
.ob-result-title { font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: rgba(245,239,230,.4); margin-bottom: 10px; }
.ob-result-item  { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.ob-result-text  { font-size: 15px; color: rgba(245,239,230,.85); }
.ob-result-text strong { color: var(--blush); }
.profile-summary { background: rgba(255,255,255,.08); border-radius: 20px; padding: 20px; margin-top: 16px; border: 1px solid rgba(255,255,255,.1); }
.ps-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.07); }
.ps-row:last-child { border: none; }
.ps-key { font-size: 13px; color: rgba(245,239,230,.4); }
.ps-val { font-size: 15px; color: var(--blush); font-weight: 500; }

/* ── SCALE SLIDER (0-10 colored) ── */
.scale-slider-wrap { position: relative; padding: 6px 0; }
.scale-slider-track { height: 6px; border-radius: 3px; background: linear-gradient(to right,#8AC18A,#F5C842,#E8835A,#C0392B); }
input.scale-input {
  -webkit-appearance: none; position: absolute; top: 50%; left: 0;
  width: 100%; height: 6px; background: transparent;
  margin-top: -3px; outline: none; cursor: pointer;
}
input.scale-input::-webkit-slider-thumb {
  -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%;
  background: white; border: 2px solid var(--blush); cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
input.scale-input::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: white; border: 2px solid var(--blush); cursor: pointer; }

/* ── TIMER MODAL ── */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(42,31,26,.5); z-index: 100; align-items: flex-end; backdrop-filter: blur(4px); }
.modal-overlay.active { display: flex; }
/* Modal generico (profilo, ciclo, ecc.) — sfondo chiaro */
.modal-sheet  { background: var(--warm-white); border-radius: 24px 24px 0 0; width: 100%; padding: 16px 24px 44px; max-width: 390px; margin: 0 auto; }
.modal-handle { width: 40px; height: 4px; background: rgba(42,31,26,.12); border-radius: 2px; margin: 0 auto 20px; }
/* Modal timer — sfondo scuro */
#timerModal .modal-sheet {
  background: #2A1F1A;
  max-height: 78vh;
  overflow-y: auto;
  padding: 16px 20px 40px;
}
/* timerModal: overlay semi-trasparente non coprente in cima */
#timerModal.active {
  align-items: flex-end;
}
#timerModal .modal-handle { background: rgba(255,255,255,.18); }
.timer-display { text-align: center; padding: 8px 0 4px; }
.timer-exercise{ font-size: 17px; font-weight: 600; color: white; letter-spacing: .5px; }
.timer-count   { font-family: 'Cormorant Garamond', serif; font-size: 71px; font-weight: 300; color: white; line-height: 1; margin: 6px 0; }
.timer-unit    { font-size: 13px; color: rgba(255,255,255,.45); letter-spacing: 1px; }
.timer-controls{ display: flex; gap: 12px; margin-top: 20px; }
.t-btn { flex: 1; padding: 15px; border-radius: 16px; border: none; cursor: pointer; font-family: 'DM Sans', sans-serif; font-size: 15px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; transition: transform .15s; -webkit-tap-highlight-color: transparent; }
.t-btn:active { transform: scale(.97); }
.t-btn.primary   { background: var(--terracotta); color: white; box-shadow: 0 6px 20px rgba(176,90,66,.35); }
.t-btn.secondary { background: rgba(255,255,255,.1); color: rgba(255,255,255,.7); border: 1px solid rgba(255,255,255,.15); }
.pulse-ring { width: 100px; height: 100px; border-radius: 50%; margin: 0 auto; background: rgba(201,125,104,.25); border: 2px solid rgba(201,125,104,.5); display: flex; align-items: center; justify-content: center; animation: pulse 2.5s infinite; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(201,125,104,.35)} 70%{box-shadow:0 0 0 16px rgba(201,125,104,0)} 100%{box-shadow:0 0 0 0 rgba(201,125,104,0)} }
.pulse-inner { font-size: 40px; }

/* ── LOGIN / REGISTER ── */
.auth-page { min-height: 100vh; display: flex; flex-direction: column; background: linear-gradient(160deg, #2A1F1A 0%, #4A2E22 45%, #7A4030 100%); overflow-y: auto; -webkit-overflow-scrolling: touch; }
.auth-logo  { text-align: center; padding: 40px 24px 0; }
.auth-logo-title { font-family: 'Fraunces', serif; font-size: 55px; font-weight: 300; letter-spacing: 8px; color: var(--cream); }
.auth-logo-sub   { font-size: 13px; letter-spacing: 3px; text-transform: uppercase; color: rgba(245,239,230,.5); margin-top: 6px; }
.auth-form  { flex: 1; padding: 24px 24px 60px; }
.auth-tabs  { display: flex; gap: 0; background: rgba(255,255,255,.1); border-radius: 14px; margin-bottom: 28px; }
.auth-tab   { flex: 1; padding: 12px; text-align: center; font-size: 15px; font-weight: 500; color: rgba(245,239,230,.6); border-radius: 12px; cursor: pointer; transition: all .2s; }
.auth-tab.active { background: var(--terracotta); color: white; }
.auth-error { background: rgba(192,57,43,.2); border: 1px solid rgba(192,57,43,.4); border-radius: 12px; padding: 10px 14px; font-size: 14px; color: #ffb3a7; margin-bottom: 16px; }
.auth-btn { width: 100%; padding: 16px; background: linear-gradient(135deg, var(--blush), var(--terracotta)); border: none; border-radius: 16px; color: white; font-family: 'DM Sans', sans-serif; font-size: 16px; font-weight: 500; letter-spacing: 1.5px; text-transform: uppercase; cursor: pointer; box-shadow: 0 6px 20px rgba(176,90,66,.35); margin-top: 8px; }
.auth-link  { text-align: center; margin-top: 20px; font-size: 14px; color: rgba(245,239,230,.5); }
.auth-link a { color: var(--blush); text-decoration: none; }

/* ── MEDITATION DETAIL ── */
.med-hero { background: linear-gradient(135deg,#2A1F1A,#5C3020); padding: 50px 22px 28px; border-radius: 0 0 28px 28px; color: white; position: relative; flex-shrink: 0; }
.med-breath-circle {
  width: 120px; height: 120px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blush), var(--terracotta));
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 500; color: white; letter-spacing: 1px; text-transform: uppercase;
  box-shadow: 0 0 0 0 rgba(201,125,104,.4); transition: transform .5s ease, box-shadow .5s ease;
}

/* ── FLASH MESSAGES ── */
.flash { margin: 10px 16px 0; padding: 12px 16px; border-radius: 14px; font-size: 15px; line-height: 1.5; }
.flash.success { background: rgba(138,158,127,.2); border: 1px solid rgba(138,158,127,.4); color: var(--moss); }
.flash.error   { background: rgba(176,90,66,.1); border: 1px solid rgba(176,90,66,.3); color: var(--terracotta); }

/* ── UTILITIES ── */
@keyframes fadeIn { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:translateY(0)} }
.fade-in { animation: fadeIn .35s ease; }

/* ── BOTANICAL BACKGROUNDS for workout cards ── */
.workout-banner.wc-1::before {
  content:'';position:absolute;inset:0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 110'%3E%3Cellipse cx='160' cy='20' rx='40' ry='18' fill='rgba(255,255,255,.06)' transform='rotate(-25,160,20)'/%3E%3Cellipse cx='170' cy='40' rx='30' ry='14' fill='rgba(255,255,255,.05)' transform='rotate(-15,170,40)'/%3E%3Cellipse cx='150' cy='55' rx='35' ry='16' fill='rgba(255,255,255,.04)' transform='rotate(-35,150,55)'/%3E%3Cline x1='160' y1='80' x2='160' y2='20' stroke='rgba(255,255,255,.08)' stroke-width='1.5'/%3E%3Cline x1='160' y1='55' x2='140' y2='40' stroke='rgba(255,255,255,.06)' stroke-width='1'/%3E%3Cline x1='160' y1='45' x2='178' y2='30' stroke='rgba(255,255,255,.06)' stroke-width='1'/%3E%3Ccircle cx='25' cy='85' r='18' fill='rgba(255,255,255,.04)'/%3E%3Ccircle cx='10' cy='70' r='12' fill='rgba(255,255,255,.03)'/%3E%3C/svg%3E");
  background-size: cover; z-index:0;
}
.workout-banner.wc-2::before {
  content:'';position:absolute;inset:0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 110'%3E%3Ccircle cx='160' cy='25' r='28' fill='rgba(255,255,255,.06)'/%3E%3Ccircle cx='145' cy='48' r='18' fill='rgba(255,255,255,.05)'/%3E%3Ccircle cx='172' cy='50' r='14' fill='rgba(255,255,255,.04)'/%3E%3Cpath d='M155,90 Q155,60 160,25' stroke='rgba(255,255,255,.07)' stroke-width='1.5' fill='none'/%3E%3Cpath d='M155,70 Q140,55 145,48' stroke='rgba(255,255,255,.06)' stroke-width='1' fill='none'/%3E%3Cpath d='M155,55 Q168,42 172,50' stroke='rgba(255,255,255,.06)' stroke-width='1' fill='none'/%3E%3Cellipse cx='20' cy='80' rx='22' ry='10' fill='rgba(255,255,255,.04)' transform='rotate(-20,20,80)'/%3E%3C/svg%3E");
  background-size: cover; z-index:0;
}
.workout-banner.wc-3::before {
  content:'';position:absolute;inset:0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 110'%3E%3Cpath d='M140,90 C140,70 155,50 165,35 C170,28 175,22 170,15' stroke='rgba(255,255,255,.08)' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3Ccircle cx='170' cy='14' r='10' fill='rgba(255,255,255,.07)'/%3E%3Ccircle cx='163' cy='32' r='8' fill='rgba(255,255,255,.05)'/%3E%3Ccircle cx='158' cy='48' r='9' fill='rgba(255,255,255,.04)'/%3E%3Cpath d='M140,80 C130,68 125,55 130,45' stroke='rgba(255,255,255,.05)' stroke-width='1.5' fill='none'/%3E%3Ccircle cx='128' cy='43' r='7' fill='rgba(255,255,255,.04)'/%3E%3Cellipse cx='30' cy='82' rx='25' ry='12' fill='rgba(255,255,255,.03)' transform='rotate(-10,30,82)'/%3E%3C/svg%3E");
  background-size: cover; z-index:0;
}
.workout-info { position:relative; z-index:1; }

/* ── ADMIN LINK in profile ── */
.admin-link-btn {
  background: linear-gradient(135deg, rgba(176,90,66,.2), rgba(196,162,101,.2));
  border: 1px solid rgba(176,90,66,.3);
  border-radius: 16px; padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
  cursor: pointer; text-decoration: none; margin-bottom: 10px;
}
