/* ==========================================================================
   BeCareFood · Liquid Glass (iOS 27 style)
   Drop-in theme layer. Load AFTER the current app stylesheet.
   All classes are prefixed `lg-` so nothing existing breaks until it is
   migrated screen by screen.
   Brand (Miro "Marca"): green #2E9E5B, coral #FF7A45, water blue #2D9CDB,
   yellow #F2C94C, cream #FAF7F0, charcoal #1F2A2E. Poppins titles, Inter text.
   ========================================================================== */

:root {
  /* Brand */
  --lg-green: #2E9E5B;
  --lg-green-text: #1F7A45;      /* green for text on light surfaces (AA) */
  --lg-coral: #FF7A45;
  --lg-coral-text: #B5432A;      /* coral for text on light surfaces (AA) */
  --lg-blue: #2D9CDB;
  --lg-blue-text: #1B6F9E;
  --lg-yellow: #F2C94C;
  --lg-cream: #FAF7F0;
  --lg-ink: #1F2A2E;
  --lg-muted: #3E4B47;
  --lg-leaf: #CFE6D3;

  /* Macro colors (brand rule: protein blue, carbs green, fat yellow, sugar coral) */
  --lg-protein: var(--lg-blue);
  --lg-carbs: var(--lg-green);
  --lg-fat: var(--lg-yellow);
  --lg-sugar: var(--lg-coral);

  /* Surfaces */
  --lg-bg: var(--lg-cream);
  --lg-glass-tint: rgba(255, 255, 255, .42);
  --lg-glass-tint-strong: rgba(255, 255, 255, .82);
  --lg-glass-border: rgba(255, 255, 255, .72);
  --lg-glass-hl-top: rgba(255, 255, 255, .95);
  --lg-glass-shadow: 0 14px 36px rgba(31, 42, 46, .10);
  --lg-fill-soft: rgba(31, 42, 46, .05);
  --lg-fill-track: rgba(31, 42, 46, .08);
  --lg-divider: rgba(31, 42, 46, .07);
  --lg-blur: 24px;
  --lg-saturate: 190%;

  /* Ambient color behind the glass */
  --lg-amb-1: rgba(46, 158, 91, .30);
  --lg-amb-2: rgba(255, 122, 69, .22);
  --lg-amb-3: rgba(45, 156, 219, .20);

  /* Shape */
  --lg-r-card: 30px;
  --lg-r-inner: 16px;
  --lg-r-tile: 22px;
  --lg-r-sheet: 38px;
  --lg-r-pill: 999px;

  /* Type */
  /* iOS 27: San Francisco del sistema en iPhone; Inter como respaldo. El nombre de la marca sigue en Poppins. */
  --lg-font-title: -apple-system, 'SF Pro Display', 'Inter', system-ui, sans-serif;
  --lg-font-body: -apple-system, 'SF Pro Text', 'Inter', system-ui, sans-serif;
  --lg-font-brand: 'Poppins', system-ui, -apple-system, sans-serif;

  /* Layout */
  --lg-gap: 12px;
  --lg-pad: 16px;
  --lg-tabbar-h: 64px;
  --lg-safe-bottom: env(safe-area-inset-bottom, 0px);
  --lg-safe-top: env(safe-area-inset-top, 0px);
}

/* ---------- App shell ---------- */
.lg-app, .lg-app *, .lg-app *::before, .lg-app *::after { box-sizing: border-box; }
.lg-app {
  position: relative;
  min-height: 100dvh;
  /* iOS 27: fondo verde muy claro; las manchas de color van en ::before */
  background: #EEF3EF;
  background-attachment: fixed;
  color: var(--lg-ink);
  font-family: var(--lg-font-body);
  -webkit-font-smoothing: antialiased;
  isolation: isolate;
  overflow-x: hidden;
}
/* Soft color behind the glass. One fixed layer, cheap to render. */
.lg-app::before {
  content: "";
  position: fixed;
  inset: -10vh -10vw;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(42vmax 42vmax at 0% 0%, rgba(127, 211, 160, .75), transparent 62%),
    radial-gradient(34vmax 34vmax at 100% 30%, rgba(246, 199, 107, .50), transparent 62%),
    radial-gradient(40vmax 40vmax at 5% 75%, rgba(158, 216, 200, .70), transparent 62%),
    radial-gradient(30vmax 30vmax at 100% 100%, rgba(242, 162, 138, .45), transparent 62%);
}
.lg-screen {
  display: flex;
  flex-direction: column;
  gap: var(--lg-gap);
  padding: calc(var(--lg-safe-top) + 12px) var(--lg-pad)
           calc(var(--lg-tabbar-h) + var(--lg-safe-bottom) + 40px);
  max-width: 560px;
  margin: 0 auto;
}

/* ---------- Glass material ---------- */
.lg-glass {
  background: linear-gradient(160deg, rgba(255, 255, 255, .60), var(--lg-glass-tint));
  -webkit-backdrop-filter: blur(var(--lg-blur)) saturate(var(--lg-saturate));
  backdrop-filter: blur(var(--lg-blur)) saturate(var(--lg-saturate));
  border: 1px solid var(--lg-glass-border);
  /* iOS 27 Liquid Glass: brillo especular en el borde superior + sombra suave */
  box-shadow:
    inset 0 1px 0 var(--lg-glass-hl-top),
    inset 1px 0 0 rgba(255, 255, 255, .5),
    inset 0 -1px 1px rgba(255, 255, 255, .3),
    var(--lg-glass-shadow);
}
.lg-glass--strong { background: var(--lg-glass-tint-strong); }
.lg-glass--dark {
  background: rgba(24, 30, 28, .40);
  border-color: rgba(255, 255, 255, .22);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 10px 30px rgba(0, 0, 0, .25);
}
.lg-glass--green {
  background: linear-gradient(160deg, rgba(62, 180, 109, .96), rgba(46, 158, 91, .90));
  border: 1px solid rgba(255, 255, 255, .45);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .5),
    inset 0 -1px 0 rgba(255, 255, 255, .2),
    0 10px 24px rgba(46, 158, 91, .32);
}

/* ---------- Light-catching rim (iOS 27 Liquid Glass) ----------
   Degradado de 1px en el borde que atrapa la luz. Solo decorativo. */
.lg-card::before,
.lg-header::before,
.lg-tabbar__nav::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: linear-gradient(135deg, rgba(255,255,255,.9), rgba(255,255,255,.1) 40%, rgba(120,180,255,.25) 72%, rgba(255,255,255,.6));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

/* No backdrop-filter support, or user asked for less transparency:
   fall back to solid surfaces (also covers iOS "Reduce Transparency"). */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .lg-glass { background: var(--lg-glass-tint-strong); }
}
@media (prefers-reduced-transparency: reduce) {
  .lg-glass, .lg-glass--strong {
    background: var(--lg-bg);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .lg-app::before { display: none; }
  .lg-card::before, .lg-header::before, .lg-tabbar__nav::before { display: none; }
}

/* ---------- Typography ---------- */
.lg-title { font-family: var(--lg-font-title); font-weight: 800; font-size: 32px; letter-spacing: -.6px; line-height: 38px; margin: 0; }
.lg-title--sheet { font-size: 26px; line-height: 32px; }
.lg-headline { font-size: 16px; line-height: 22px; font-weight: 600; }
.lg-body { font-size: 15px; line-height: 21px; font-weight: 500; }
.lg-h2    { font-family: var(--lg-font-title); font-weight: 600; font-size: 20px; line-height: 26px; margin: 0; }
.lg-num   { font-family: var(--lg-font-title); font-weight: 700; font-variant-numeric: tabular-nums; }
.lg-muted { color: var(--lg-muted); font-size: 13px; line-height: 18px; font-weight: 500; }
.lg-label { color: var(--lg-muted); font-size: 12px; line-height: 16px; font-weight: 600; }
.lg-eyebrow { color: var(--lg-muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .3px; }

/* ---------- v2 layout rules ----------
   One spacing scale: 4 8 12 16 24 32. Screen margin 16, card padding 16,
   gap between cards 12, gap inside a card 12 (8 between a title and its line). */

/* Large title block under the header (every tab screen) */
.lg-page-title { display: flex; align-items: flex-end; justify-content: space-between; padding: 8px 4px 4px; }
.lg-page-title .lg-muted { margin-top: 2px; }

/* Sheet header: title + round close button */
.lg-sheet-close {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; border: 0; cursor: pointer;
}

/* Leading icon: every icon beside text sits in this 36px tinted square */
.lg-lead { width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: rgba(46, 158, 91, .14); color: var(--lg-green-text); }
.lg-lead--coral { background: rgba(255, 122, 69, .16); color: var(--lg-coral-text); }
.lg-lead--blue  { background: rgba(45, 156, 219, .15); color: var(--lg-blue-text); }
.lg-lead svg { width: 20px; height: 20px; }

/* Number + unit always on one line: <span class="lg-val"><b>580</b><small>kcal</small></span> */
.lg-val { display: inline-flex; align-items: baseline; white-space: nowrap; }
.lg-val b { font: 700 20px/1 var(--lg-font-title); font-variant-numeric: tabular-nums; }
.lg-val small { font: 600 13px var(--lg-font-body); color: var(--lg-muted); margin-left: 3px; }

/* Section label above a group of cards */
.lg-section { font-size: 13px; line-height: 18px; font-weight: 600; color: var(--lg-muted); padding: 12px 4px 0; }

/* Quick action tiles (Galería, Describir, Restaurante, ¿Qué como?) */
.lg-tile { height: 72px; border-radius: var(--lg-r-tile); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-size: 12px; font-weight: 600; color: inherit; text-decoration: none; }

/* ---------- Layout helpers ---------- */
.lg-row { display: flex; align-items: center; gap: 10px; }
.lg-row--between { justify-content: space-between; }
.lg-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.lg-grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }

/* ---------- Card ---------- */
.lg-card { position: relative; border-radius: var(--lg-r-card); padding: 16px; }
.lg-list-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  min-height: 44px; padding: 0; border-bottom: 1px solid var(--lg-divider);
}
.lg-list-row:last-child { border-bottom: 0; }

/* ---------- Header (logo + name + ES/EN) ---------- */
.lg-header {
  position: sticky;
  top: calc(var(--lg-safe-top) + 8px);
  z-index: 20;
  height: 52px;
  border-radius: var(--lg-r-pill);
  padding: 0 6px 0 10px;
  display: flex; align-items: center; justify-content: space-between;
}
.lg-brand { display: flex; align-items: center; gap: 8px; }
.lg-brand__logo { width: 30px; height: 30px; flex-shrink: 0; }
.lg-wordmark { font-family: var(--lg-font-brand); font-weight: 700; font-size: 18px; letter-spacing: -.4px; line-height: 1; }
.lg-wordmark .care { color: var(--lg-green); }
.lg-wordmark .food { color: var(--lg-coral); }

/* ---------- Segmented control (ES/EN, Día/Semana/Mes, Poco/Normal/Mucho) ---------- */
.lg-segmented {
  display: flex; gap: 2px; padding: 4px;
  border-radius: var(--lg-r-pill);
}
.lg-segmented--inset { background: var(--lg-fill-soft); padding: 3px; }
.lg-segmented--inset > button { height: 32px; }
.lg-header .lang { flex-shrink: 1; min-width: 0; }
.lg-header #profile-btn { flex-shrink: 0; }
.lg-segmented > button {
  flex: 1; height: 36px; border: 0; background: transparent; white-space: nowrap;
  border-radius: var(--lg-r-pill); padding: 0 12px;
  font: 600 13px/1 var(--lg-font-body); color: var(--lg-ink); cursor: pointer;
}
.lg-segmented > button[aria-pressed="true"],
.lg-segmented > button.is-active {
  background: #fff; color: #1F2A2E;
  box-shadow: 0 2px 8px rgba(31, 42, 46, .12);
}

/* ---------- Buttons ---------- */
.lg-btn {
  min-height: 50px; border-radius: var(--lg-r-pill); padding: 0 20px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 700 16px/1 var(--lg-font-body); cursor: pointer; text-decoration: none;
  border: 0; color: var(--lg-ink);
  transition: transform .12s ease, filter .12s ease;
}
.lg-btn:active { transform: scale(.97); }
.lg-btn--block { width: 100%; }
.lg-btn.lg-glass--green, .lg-fab.lg-glass--green { color: #fff; }
.lg-btn--sm { min-height: 34px; font-size: 14px; padding: 0 14px; }
/* Use with .lg-glass--green for primary, .lg-glass for secondary */

/* ---------- Chips / tags ---------- */
.lg-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.lg-chip {
  height: 34px; border-radius: var(--lg-r-pill); padding: 0 14px; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px;
  font: 600 13px/1 var(--lg-font-body); color: var(--lg-ink); cursor: pointer;
}
.lg-chip[aria-pressed="true"], .lg-chip.is-on { background: var(--lg-green); color: #fff; border-color: transparent; }
.lg-tag {
  display: inline-flex; align-items: center; border-radius: var(--lg-r-pill);
  height: 22px; padding: 0 8px; font: 600 12px/1 var(--lg-font-body); white-space: nowrap;
  color: var(--lg-green-text); background: rgba(46, 158, 91, .13);
}
.lg-tag--coral { color: var(--lg-coral-text); background: rgba(255, 122, 69, .15); }
.lg-tag--blue  { color: var(--lg-blue-text);  background: rgba(45, 156, 219, .14); }

/* ---------- Progress bars & rings ---------- */
.lg-bar { height: 6px; border-radius: 99px; background: var(--lg-fill-track); overflow: hidden; }
.lg-bar > span { display: block; height: 100%; border-radius: 99px; background: var(--lg-green); width: var(--v, 0%); transition: width .5s ease; }
.lg-bar--protein > span { background: var(--lg-protein); }
.lg-bar--carbs   > span { background: var(--lg-carbs); }
.lg-bar--fat     > span { background: var(--lg-fat); }
.lg-bar--sugar   > span { background: var(--lg-sugar); }
.lg-bar--water   > span { background: var(--lg-blue); }
.lg-ring__track { stroke: var(--lg-fill-track); }
.lg-ring__value { stroke: var(--lg-green); stroke-linecap: round; transition: stroke-dasharray .6s ease; }
.lg-ring__value--water { stroke: var(--lg-blue); }

/* ---------- Macro tiles (Prot / Carb / Grasas / Azúcar) ---------- */
.lg-macros { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.lg-macros > div { display: flex; flex-direction: column; gap: 2px; }
.lg-macros b { font: 700 16px/20px var(--lg-font-title); }
.lg-macros b small { font: 600 11px var(--lg-font-body); color: var(--lg-muted); }
.lg-macros span { font-size: 11px; line-height: 14px; font-weight: 600; color: var(--lg-muted); }

/* ---------- Portion multiplier (½× 1× 1½× 2× Quitar) ---------- */
.lg-mult { display: flex; gap: 6px; }
.lg-mult > button {
  flex: 1; height: 32px; border: 0; border-radius: var(--lg-r-pill);
  background: var(--lg-fill-soft); color: var(--lg-ink);
  font: 700 12px/1 var(--lg-font-body); cursor: pointer;
}
.lg-mult > button[aria-pressed="true"] { background: var(--lg-green); color: #fff; }
.lg-mult > .lg-mult__remove { color: var(--lg-coral-text); }

/* ---------- Alerts (allergy, health) ---------- */
.lg-alert {
  border-radius: var(--lg-r-card); padding: 14px 16px;
  display: flex; gap: 12px; align-items: flex-start;
  background: rgba(255, 122, 69, .16); border: 1px solid rgba(255, 122, 69, .35);
  color: #8E3420;
}

/* ---------- Floating tab bar + camera button ---------- */
.lg-tabbar {
  position: fixed; z-index: 30;
  left: 16px; right: 16px;
  bottom: calc(var(--lg-safe-bottom) + 16px);
  max-width: 528px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px;
  transition: transform .25s ease;
}
.lg-tabbar__nav {
  position: relative;
  flex: 1; height: var(--lg-tabbar-h); border-radius: var(--lg-r-pill);
  display: flex; align-items: center; padding: 0 4px;
}
.lg-tab {
  flex: 1; height: 54px; display: flex; flex-direction: column; align-items: center; gap: 3px;
  justify-content: center; padding: 0; border-radius: var(--lg-r-pill);
  font: 600 11px/1 var(--lg-font-body); color: var(--lg-muted); text-decoration: none;
  transition: background .2s ease, color .2s ease;
}
.lg-tab svg { width: 22px; height: 22px; }
.lg-tab[aria-current="page"], .lg-tab.is-active { background: rgba(46, 158, 91, .16); color: var(--lg-green-text); }
.lg-fab {
  width: var(--lg-tabbar-h); height: var(--lg-tabbar-h); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  cursor: pointer; border: 0;
}
.lg-fab svg { width: 26px; height: 26px; }
/* Compact on scroll down (iOS behaviour), set by liquid-glass.js */
.lg-tabbar.is-compact .lg-tab { font-size: 0; gap: 0; }
.lg-tabbar.is-compact .lg-tabbar__nav { height: 52px; }
.lg-tabbar.is-compact .lg-fab { width: 52px; height: 52px; }

/* ---------- Bottom sheet / modal screens ---------- */
.lg-sheet-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(31, 42, 46, .28); }
.lg-sheet {
  position: fixed; z-index: 41; left: 10px; right: 10px;
  bottom: calc(var(--lg-safe-bottom) + 10px);
  max-width: 540px; margin: 0 auto;
  border-radius: var(--lg-r-sheet); padding: 22px 18px 18px;
  display: flex; flex-direction: column; gap: 10px;
  max-height: 88dvh; overflow-y: auto;
}
.lg-sheet::before {
  content: ""; width: 40px; height: 5px; border-radius: 99px;
  background: rgba(31, 42, 46, .22); align-self: center; margin-top: -10px; margin-bottom: 4px;
}
.lg-sheet-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
/* Sticky total at the bottom of result screens */
.lg-total { position: sticky; bottom: calc(var(--lg-safe-bottom) + 10px); border-radius: 30px; padding: 14px 16px; }

/* ---------- Calendar (monthly report, cycle) ---------- */
.lg-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.lg-cal__dow { text-align: center; font-size: 12px; font-weight: 600; color: var(--lg-muted); }
.lg-cal__day {
  height: 38px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  font: 700 13px/1 var(--lg-font-body); background: var(--lg-fill-soft);
}
.lg-cal__day.is-ok    { background: var(--lg-green); color: #fff; }
.lg-cal__day.is-over  { background: var(--lg-coral); color: #1F2A2E; }
.lg-cal__day.is-today { outline: 2px solid var(--lg-ink); outline-offset: -2px; }

/* ---------- Focus & motion ---------- */
.lg-app :focus-visible { outline: 3px solid var(--lg-blue); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  .lg-app *, .lg-app *::before { transition: none !important; animation: none !important; }
}

/* ==========================================================================
   iOS 27 refresh (Oliver 2026-10-11, prototipo "Liquid Glass iOS 27").
   Lleva el mismo vidrio a las clases viejas de app-inline.css y corrige la
   barra de pestañas: cápsula de vidrio + botón de cámara verde aparte.
   ========================================================================== */
html { background: #EEF3EF; }
.lg-app { --display: var(--lg-font-title); --body: var(--lg-font-body); --muted: var(--lg-muted); }
.lg-app .brand, .lg-app .lg-brand { font-family: var(--lg-font-brand); }

/* Tab bar: the old `nav.tabs` rule painted a white strip behind the glass */
nav.tabs.lg-tabbar { left: 14px; right: 14px; bottom: calc(var(--lg-safe-bottom) + 16px); background: transparent; border: 0; padding: 0; }
nav.tabs.lg-tabbar .in { display: flex; grid-template-columns: none; align-items: center; max-width: none; margin: 0; }
nav.tabs .lg-tab { display: flex; padding: 0; }
.lg-tabbar .snap.lg-fab { border: 0; margin: 0; justify-self: auto; display: flex; }
.lg-fab.lg-glass--green { width: 64px; height: 64px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), inset 0 -2px 4px rgba(0, 0, 0, .12), 0 14px 30px rgba(46, 158, 91, .38); }
.lg-tabbar.is-compact .lg-fab.lg-glass--green { width: 54px; height: 54px; }

/* Bars float over content: more frosted than cards so text behind never competes */
.lg-tabbar__nav.lg-glass, .lg-header.lg-glass { background: linear-gradient(160deg, rgba(255, 255, 255, .86), rgba(255, 255, 255, .70)); -webkit-backdrop-filter: blur(30px) saturate(190%); backdrop-filter: blur(30px) saturate(190%); }
/* Header: lighter pill so the page title leads */
.lg-header.lg-glass { height: 54px; }

/* Cards, sheets */
.lg-card { padding: 18px; }
.lg-sheet.lg-glass, .lg-sheet.lg-glass--strong { background: linear-gradient(170deg, rgba(255, 255, 255, .88), rgba(255, 255, 255, .72)); border-color: rgba(255, 255, 255, .85); }
.lg-sheet-backdrop { background: rgba(20, 26, 24, .32); }
.lg-sheet-close { width: 44px; height: 44px; }

/* Legacy surfaces -> glass */
.lg-app .card, .lg-app .act, .lg-app .item {
  background: linear-gradient(160deg, rgba(255, 255, 255, .62), rgba(255, 255, 255, .38));
  -webkit-backdrop-filter: blur(var(--lg-blur)) saturate(var(--lg-saturate));
  backdrop-filter: blur(var(--lg-blur)) saturate(var(--lg-saturate));
  border: 1px solid var(--lg-glass-border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), 0 10px 26px rgba(31, 42, 46, .08);
}
.lg-app .card { border-radius: var(--lg-r-card); }
.lg-app .act { border-radius: var(--lg-r-tile); min-height: 72px; font-weight: 700; }
/* "¿Qué como?" uses the glass tile too: dark text like the other buttons, coral icon as the accent */
.lg-app .act.hot { color: var(--ink); border-color: rgba(255, 122, 69, .45); }
.lg-app .act.hot svg { color: var(--lg-coral-text); }
.lg-app .item { border-radius: 22px; background: rgba(255, 255, 255, .72); }
.lg-app .nudge { border-radius: 24px; border: 1px solid rgba(255, 255, 255, .8); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9); }

/* Buttons and chips */
.lg-app .pill { border: 1px solid rgba(255, 255, 255, .9); background: rgba(255, 255, 255, .72); font-weight: 700; min-height: 40px; box-shadow: inset 0 1px 0 #fff, 0 2px 8px rgba(31, 42, 46, .06); }
.lg-app .pill.primary { background: linear-gradient(160deg, #3EB46D, #2E9E5B); border-color: transparent; color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 8px 20px rgba(46, 158, 91, .3); }
.lg-app .pill.coral { background: linear-gradient(160deg, #FF9A6B, #FF7A45); border-color: transparent; color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 8px 20px rgba(255, 122, 69, .3); }
.lg-app .pill.ghost { background: transparent; border-color: transparent; box-shadow: none; }
.lg-app .pill.sm { min-height: 32px; }
.lg-app .pill[aria-pressed="true"] { background: #1F2A2E; border-color: #1F2A2E; color: #fff; box-shadow: 0 6px 16px rgba(31, 42, 46, .22); }
.lg-app .chip { font-weight: 700; }

/* Inputs */
.lg-app textarea, .lg-app input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), .lg-app select {
  border-radius: 18px; border: 1px solid rgba(255, 255, 255, .85); background: rgba(255, 255, 255, .74);
  min-height: 46px; box-shadow: inset 0 1px 2px rgba(31, 42, 46, .06);
}

/* Grids must shrink to the screen (Perfil overflowed the right edge) */
.lg-app .two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lg-app .three, .lg-app .grid, .lg-app .jgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.lg-app .two > *, .lg-app .three > *, .lg-app .grid > *, .lg-app .jgrid > *, .lg-app .stack > *, .lg-screen > * { min-width: 0; }

/* The old .sheet rule (width:100%) pushed the glass sheet past the right edge */
.lg-sheet.sheet { width: auto; }
.lg-sheet textarea, .lg-sheet input, .lg-sheet select { max-width: 100%; }

/* Report stat tiles and journal photo cells: glass instead of solid cream */
.lg-app .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lg-app .tile, .lg-app .jcell { background: rgba(255, 255, 255, .62); border: 1px solid rgba(255, 255, 255, .85); box-shadow: inset 0 1px 0 #fff, 0 6px 18px rgba(31, 42, 46, .06); }
.lg-app .tile { border-radius: 22px; padding: 14px; }
.lg-app .jcell { border-radius: 18px; }

/* Promo / quota dialogs follow the same glass */
.lg-app .promo-card { border-radius: 38px; background: linear-gradient(165deg, rgba(255, 255, 255, .92), rgba(255, 255, 255, .80)); -webkit-backdrop-filter: blur(26px) saturate(190%); backdrop-filter: blur(26px) saturate(190%); border: 1px solid rgba(255, 255, 255, .85); }
.lg-app .promo-cta { background: #1F2A2E; }
.lg-app .quota-premium { background: rgba(255, 255, 255, .7); }

@media (prefers-reduced-transparency: reduce) {
  .lg-app .card, .lg-app .act, .lg-app .item, .lg-app .promo-card, .lg-sheet.lg-glass { background: #FFFFFF; -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* Gym stopwatch + GPS (run / walk / bike) */
.gps-card { border-radius: 26px; padding: 16px; display: grid; gap: 12px; background: linear-gradient(150deg, rgba(63, 167, 214, .14), rgba(127, 211, 160, .18)); border: 1px solid rgba(255, 255, 255, .85); box-shadow: inset 0 1px 0 #fff; }
.gps-time { font: 800 48px/1 var(--lg-font-title); letter-spacing: -1px; text-align: center; font-variant-numeric: tabular-nums; }
.gps-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.gps-stat { border-radius: 16px; background: rgba(255, 255, 255, .7); padding: 8px 10px; display: grid; gap: 2px; min-width: 0; }
.gps-stat b { font: 700 15px/1.2 var(--lg-font-title); white-space: normal; overflow-wrap: anywhere; }
.gps-grid { grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); }
.gps-live { width: 12px; height: 12px; border-radius: 50%; background: #E5484D; box-shadow: 0 0 0 4px rgba(229, 72, 77, .2); animation: gps-pulse 1.4s ease-in-out infinite; }
@keyframes gps-pulse { 50% { opacity: .35; } }
.gps-card .btn-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cyint .btn-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

/* Glycemic load + grocery scanner */
.gl-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 14px; margin-top: 8px; }
.gl-tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.gl-low { background: rgba(46, 158, 91, .14); color: var(--green-ink); }
.gl-mid { background: rgba(232, 185, 47, .2); color: var(--amber-ink, #8a6100); }
.gl-high { background: rgba(255, 122, 69, .16); color: var(--lg-coral-text, #b4441c); }
.shop-seal { margin-top: 8px; padding: 8px 12px; border-radius: 12px; font-size: 14px; font-weight: 600; }
.shop-seal.hi { background: #1F2A2E; color: #fff; }
.shop-seal.lo { background: rgba(46, 158, 91, .14); color: var(--green-ink); }

/* Grouped "More" menu (iOS Settings style) */
.mn-group-t { margin: 14px 6px 6px; font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.mn-group { padding: 4px 0 !important; overflow: hidden; }
.mn-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 8px 16px; border: 0; background: transparent; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.mn-row + .mn-row { border-top: 1px solid rgba(31, 42, 46, .07); }
.mn-row:active { background: rgba(31, 42, 46, .05); }
.mn-ic { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 10px; background: rgba(46, 158, 91, .12); font-size: 18px; }
.mn-l { flex: 1; min-width: 0; font-size: 16px; font-weight: 600; }
.mn-chev { color: var(--muted); font-size: 22px; line-height: 1; }
.mn-back { align-self: flex-start; border: 0; background: transparent; color: var(--green-ink); font: inherit; font-size: 17px; font-weight: 600; padding: 6px 2px; cursor: pointer; min-height: 44px; }
.mn-offers { display: flex; align-items: center; gap: 12px; width: 100%; padding: 16px; border: 0; cursor: pointer; text-align: left; font: inherit; color: #fff;
  background: linear-gradient(135deg, #2E9E5B, #1F7A45 55%, #FF7A45); border-radius: 24px; box-shadow: 0 12px 28px rgba(46, 158, 91, .3), inset 0 1px 0 rgba(255,255,255,.35); }
.mn-offers-ic { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 14px; background: rgba(255,255,255,.22); font-size: 24px; }
.mn-offers-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mn-offers-txt b { font-size: 17px; }
.mn-offers-txt span { font-size: 13px; opacity: .92; }
.mn-offers .mn-chev { color: #fff; }
.mn-badge { flex: none; padding: 4px 10px; border-radius: 999px; background: #fff; color: #1F7A45; font-size: 12px; font-weight: 800; }

/* Today bell */
.bell-btn { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.8); background: rgba(255,255,255,.6); font-size: 20px; cursor: pointer; }
.bell-bar { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 14px; border-radius: 16px; background: rgba(232, 185, 47, .16); font-size: 14px; font-weight: 600; }
.bell-bar span { flex: 1; min-width: 0; }
.bell-x { flex: none; width: 36px; height: 36px; border: 0; background: transparent; font-size: 20px; color: var(--muted); cursor: pointer; }

/* Contextual offer stands out a bit more */
.ad-card--hero { border: 1.5px solid rgba(255, 122, 69, .35) !important; }

/* Challenge accepted */
.chal-party { position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; padding: 16px; background: rgba(31, 42, 46, .45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: cp-fade .25s ease-out; }
.chal-party .confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.chal-party .confetti i { position: absolute; top: -12px; width: 9px; height: 14px; border-radius: 2px; animation: cp-fall 2s ease-in forwards; }
.chal-party-card { width: min(360px, 100%); padding: 28px 22px 20px; border-radius: 30px; text-align: center; background: rgba(255,255,255,.92); animation: cp-pop .45s cubic-bezier(.2, 1.4, .4, 1); }
.chal-party-card h2 { margin: 10px 0 6px; font-size: 28px; }
.chal-party-card p { margin: 0 0 6px; font-size: 16px; }
.chal-party-card .lg-btn { margin-top: 14px; }
.chal-party-ic { font-size: 72px; line-height: 1; animation: cp-bounce 1s ease-in-out infinite; }
@keyframes cp-fade { from { opacity: 0; } }
@keyframes cp-pop { from { transform: scale(.6); opacity: 0; } }
@keyframes cp-bounce { 50% { transform: translateY(-12px) rotate(-6deg); } }
@keyframes cp-fall { to { transform: translateY(110vh) rotate(540deg); opacity: .8; } }
@media (prefers-reduced-motion: reduce) { .chal-party, .chal-party-card, .chal-party-ic { animation: none; } }

/* Diario: habits rows */
.mn-l .mn-sub { display: block; font-size: 13px; font-weight: 500; color: var(--muted); margin-top: 1px; }
.dots7--mini { display: flex; gap: 4px; margin-top: 6px; }
.dots7--mini i { width: 18px; height: 18px; font-size: 10px; line-height: 18px; }

/* Line icons instead of emoji */
.li { display: block; flex: none; }
.mn-ic { color: var(--green-ink); }
.mn-offers-ic { color: #fff; }
.bell-btn { display: grid; place-items: center; color: var(--ink); }
.bell-bar .li { color: #9a6b00; }
.pill .li, .lg-btn .li { display: inline-block; vertical-align: -4px; }
.lg-btn .li { margin-right: 4px; }
.lock-hero { width: 76px; height: 76px; margin: 0 auto 16px; border-radius: 24px; display: grid; place-items: center; color: var(--green-ink);
  background: linear-gradient(160deg, rgba(255,255,255,.9), rgba(255,255,255,.5)); border: 1px solid rgba(255,255,255,.9); box-shadow: inset 0 1px 0 #fff, 0 10px 24px rgba(31,42,46,.1); }
.chal-party-ic { width: 108px; height: 108px; margin: 0 auto; border-radius: 34px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(145deg, #3DBE73, #2E9E5B 55%, #1F7A45); box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 14px 30px rgba(46,158,91,.4); }
.chal-party-ic .li { stroke-width: 2; }

/* Reports: weekly recap share call to action */
.recap-cta-top { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.recap-cta-score { flex: none; width: 74px; height: 74px; border-radius: 22px; display: grid; place-content: center; text-align: center; color: #fff;
  background: linear-gradient(145deg, #16283a, #2D9CDB); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 10px 22px rgba(45,156,219,.35); }
.recap-cta-score b { font-size: 28px; line-height: 1; }
.recap-cta-score span { font-size: 9px; font-weight: 800; letter-spacing: .12em; opacity: .9; margin-top: 3px; }
.recap-cta h3 { margin-bottom: 2px; }
.recap-img { border-radius: 16px; width: 100%; display: block; margin-bottom: 12px; }
.share-cta { width: 100%; min-height: 58px; border: 0; border-radius: 999px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px;
  font: inherit; font-size: 18px; font-weight: 800; color: #fff; background: linear-gradient(120deg, #2E9E5B, #2D9CDB 60%, #FF7A45);
  background-size: 180% 100%; box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 12px 28px rgba(45,156,219,.35); animation: share-shine 4s ease-in-out infinite; }
.share-cta:active { transform: scale(.98); }
@keyframes share-shine { 50% { background-position: 100% 0; } }
@media (prefers-reduced-motion: reduce) { .share-cta { animation: none; } }

/* App guide (swipeable cards) */
.guide { position: fixed; inset: 0; z-index: 9998; display: flex; flex-direction: column; gap: 12px; padding: max(16px, env(safe-area-inset-top)) 0 max(16px, env(safe-area-inset-bottom));
  background: linear-gradient(170deg, rgba(238,243,239,.97), rgba(220,239,250,.97)); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); animation: cp-fade .25s ease-out; }
.guide-top { display: flex; align-items: center; justify-content: space-between; padding: 0 20px; font-size: 15px; }
.guide-skip { border: 0; background: transparent; font: inherit; font-weight: 700; color: var(--muted); min-height: 44px; padding: 0 6px; cursor: pointer; }
.guide-track { flex: 1; min-height: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.guide-track::-webkit-scrollbar { display: none; }
.guide-card { flex: 0 0 100%; box-sizing: border-box; scroll-snap-align: center; margin: 0; padding: 0 20px; overflow-y: auto; display: flex; flex-direction: column; align-items: center; text-align: center;
  background: none !important; border: 0 !important; box-shadow: none !important; }
.guide-ic { width: 76px; height: 76px; margin: 6px 0 12px; border-radius: 24px; display: grid; place-items: center; color: #fff; flex: none;
  background: linear-gradient(145deg, #3DBE73, #2E9E5B 55%, #1F7A45); box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 14px 30px rgba(46,158,91,.35); }
.guide-card h2 { font-size: 24px; margin: 0 0 6px; }
.guide-d { font-size: 16px; color: var(--ink); margin: 0 0 14px; max-width: 460px; }
.guide-how { width: 100%; max-width: 460px; text-align: left; padding: 14px 16px; border-radius: 22px; background: rgba(255,255,255,.7); border: 1px solid rgba(255,255,255,.95);
  box-shadow: inset 0 1px 0 #fff, 0 10px 24px rgba(31,42,46,.08); }
.guide-how ul { margin: 6px 0 0; padding-left: 20px; display: grid; gap: 6px; font-size: 15px; line-height: 1.35; }
.guide-go { margin-top: 14px; }
.guide-dots { display: flex; justify-content: center; gap: 6px; }
.guide-dots i { width: 7px; height: 7px; border-radius: 99px; background: rgba(31,42,46,.2); transition: width .2s; }
.guide-dots i.on { width: 20px; background: var(--green); }
.guide-nav { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; padding: 0 20px; }
.guide-nav .lg-btn { margin: 0; }

/* Notification settings: iOS switches with a one-line explanation */
.nsw-group { padding: 4px 0 !important; }
.nsw { display: flex; align-items: center; gap: 12px; padding: 10px 16px; min-height: 56px; cursor: pointer; }
.nsw + .nsw { border-top: 1px solid rgba(31, 42, 46, .07); }
.nsw > span { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.nsw b { font-size: 16px; }
.nsw .note { font-size: 13px; }
.ios-sw { appearance: none; -webkit-appearance: none; flex: none; width: 51px; height: 31px; margin: 0; border-radius: 999px; position: relative; cursor: pointer;
  background: rgba(120, 120, 128, .24); transition: background .2s; border: 0 !important; padding: 0 !important; min-height: 0 !important; box-shadow: none !important; }
.ios-sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff;
  box-shadow: 0 3px 8px rgba(0,0,0,.15), 0 1px 1px rgba(0,0,0,.16); transition: transform .2s; }
.ios-sw:checked { background: #34C759; }
.ios-sw:checked::after { transform: translateX(20px); }
.ios-sw:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

/* ==========================================================================
   Liquid Glass 2 — aesthetic layer only (same layout and behaviour).
   Lens rim, specular highlight, soft green caustic, grain, glossy buttons,
   glass water tumblers, tinted icon tiles, rounded numerals.
   ========================================================================== */
:root {
  --lg2-rim: linear-gradient(140deg, rgba(255,255,255,.95), rgba(255,255,255,.15) 38%, rgba(255,255,255,.05) 62%, rgba(255,255,255,.8));
  --lg2-spec: radial-gradient(120% 60% at 12% 0%, rgba(255,255,255,.62), transparent 55%), radial-gradient(80% 50% at 100% 100%, rgba(255,255,255,.22), transparent 60%);
  --lg2-shadow: inset 0 1.5px 0 rgba(255,255,255,.95), inset 0 -10px 22px -14px rgba(46,158,91,.22), 0 1px 2px rgba(23,35,31,.05), 0 18px 40px -12px rgba(23,35,31,.16);
  --lg2-green: linear-gradient(170deg, #4CC27E, #2E9E5B 52%, #1F7A45);
  --lg2-green-shadow: inset 0 1.5px 0 rgba(255,255,255,.7), inset 0 -6px 12px rgba(10,60,30,.28), 0 16px 30px -8px rgba(46,158,91,.55);
  --lg2-num: ui-rounded, 'SF Pro Rounded', -apple-system, 'Inter', system-ui, sans-serif;
}

/* Background: brand blobs plus a fine grain so the glass has texture to refract */
.lg-app::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .22; mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .6 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Cards: lens rim + specular sheen + inner caustic */
.lg-card.lg-glass, .lg-app .card, .lg-app .act, .lg-tabbar__nav.lg-glass, .lg-header.lg-glass {
  box-shadow: var(--lg2-shadow);
}
.lg-card.lg-glass, .lg-app .card, .lg-app .act {
  border: 1px solid transparent;
  background:
    var(--lg2-spec) padding-box,
    linear-gradient(165deg, rgba(255,255,255,.66), rgba(255,255,255,.42) 55%, rgba(240,250,244,.50)) padding-box,
    var(--lg2-rim) border-box;
}
.lg-tabbar__nav.lg-glass, .lg-header.lg-glass {
  border: 1px solid transparent;
  background:
    var(--lg2-spec) padding-box,
    linear-gradient(160deg, rgba(255,255,255,.86), rgba(255,255,255,.70)) padding-box,
    var(--lg2-rim) border-box;
}
/* The old 1px rim pseudo-element is replaced by the border-box rim above */
.lg-card.lg-glass::before, .lg-header.lg-glass::before, .lg-tabbar__nav.lg-glass::before { display: none; }

/* "¿Qué como?": warm coral glass */
.lg-app .act.hot {
  background:
    var(--lg2-spec) padding-box,
    linear-gradient(165deg, rgba(255,236,226,.85), rgba(255,214,196,.5)) padding-box,
    linear-gradient(140deg, rgba(255,255,255,.95), rgba(255,122,69,.4)) border-box;
}
/* Sponsored card: coral tint in the rim */
.lg-app .ad-card--hero.lg-glass {
  background:
    var(--lg2-spec) padding-box,
    linear-gradient(165deg, rgba(255,255,255,.68), rgba(255,243,236,.47)) padding-box,
    linear-gradient(140deg, rgba(255,255,255,.95), rgba(255,122,69,.35) 50%, rgba(255,255,255,.7)) border-box;
}
/* Reminder bar: soft amber glass */
.bell-bar {
  border: 1px solid transparent;
  background: linear-gradient(165deg, rgba(255,245,214,.8), rgba(255,236,190,.5)) padding-box, linear-gradient(140deg, rgba(255,255,255,.95), rgba(232,185,47,.3)) border-box;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 10px 24px -12px rgba(150,110,0,.35);
}

/* Glossy green: primary buttons, camera button, green glass */
.lg-glass--green, .lg-app .pill.primary, .lg-fab.lg-glass--green {
  position: relative; isolation: isolate;
  border: 1px solid transparent;
  background: var(--lg2-green) padding-box, linear-gradient(150deg, rgba(255,255,255,.85), rgba(255,255,255,.1) 45%, rgba(255,255,255,.45)) border-box;
  box-shadow: var(--lg2-green-shadow);
}
.lg-fab.lg-glass--green::after, .lg-btn.lg-glass--green::after, .lg-app .pill.primary::after {
  content: ""; position: absolute; left: 14%; right: 14%; top: 3px; height: 40%; border-radius: 999px; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.45), rgba(255,255,255,0));
}
.lg-app .pill.coral {
  border: 1px solid transparent;
  background: linear-gradient(170deg, #FF9C74, #FF7A45 55%, #F0602A) padding-box, linear-gradient(150deg, rgba(255,255,255,.85), rgba(255,255,255,.1) 45%, rgba(255,255,255,.45)) border-box;
  box-shadow: inset 0 1.5px 0 rgba(255,255,255,.6), inset 0 -6px 12px rgba(120,40,0,.2), 0 14px 26px -10px rgba(255,122,69,.6);
}
/* Secondary pills: clear glass capsule */
.lg-app .pill:not(.primary):not(.coral):not(.ghost):not([aria-pressed="true"]) {
  background: linear-gradient(180deg, rgba(255,255,255,.82), rgba(255,255,255,.5));
  box-shadow: inset 0 1px 0 #fff, inset 0 -2px 4px rgba(23,35,31,.04), 0 6px 14px -8px rgba(23,35,31,.3);
}
/* Selected pill (feel buttons, toggles): green drop instead of black */
.lg-app .pill[aria-pressed="true"] {
  background: var(--lg2-green); border-color: rgba(255,255,255,.6); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 6px 14px -6px rgba(46,158,91,.6);
}

/* Tab bar: active tab is a magnifying lens */
.lg-tab[aria-current="page"], .lg-tab.is-active {
  background: radial-gradient(90% 120% at 50% 0%, rgba(255,255,255,.95), rgba(255,255,255,.35));
  box-shadow: inset 0 1px 0 #fff, inset 0 -2px 6px rgba(46,158,91,.18), 0 6px 14px -6px rgba(46,158,91,.45);
}
/* Language switch: inset track with a raised thumb */
.lg-segmented { box-shadow: inset 0 1px 2px rgba(23,35,31,.08); }
.lg-segmented > button.is-active, .lang button[aria-pressed="true"] { background: linear-gradient(180deg, #fff, rgba(255,255,255,.75)); box-shadow: 0 2px 6px rgba(23,35,31,.12), inset 0 1px 0 #fff; }

/* Chips: tinted glass capsules */
.lg-app .chip {
  border: 1px solid rgba(255,255,255,.7);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 4px 10px -6px rgba(23,35,31,.25);
}
.lg-app .chip.score { background: linear-gradient(180deg, rgba(76,194,126,.22), rgba(46,158,91,.14)); }
.lg-app .chip.streak { background: linear-gradient(180deg, rgba(255,150,105,.26), rgba(255,122,69,.14)); }
.lg-app .chip.water { background: linear-gradient(180deg, rgba(94,180,232,.26), rgba(45,156,219,.14)); color: #1A6E9E; }
.lg-app .gl-tag { border: 1px solid rgba(255,255,255,.7); box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 4px 10px -6px rgba(23,35,31,.25); }

/* Rounded numerals that never jump */
.lg-app .num, .lg-num, .hero-num .big, .lg-app .tile b, .gps-stat b { font-family: var(--lg2-num); font-variant-numeric: tabular-nums; }
.hero-num .big { font-weight: 800; letter-spacing: -1px; font-size: 38px; }

/* Macro bars: recessed track, glossy fill */
.lg-app .bar { box-shadow: inset 0 1px 2px rgba(23,35,31,.10); }
.lg-app .bar i { position: relative; }
.lg-app .bar i::after { content: ""; position: absolute; inset: 0 0 50% 0; border-radius: inherit; background: linear-gradient(180deg, rgba(255,255,255,.45), rgba(255,255,255,0)); }

/* Rings: soft depth under each arc */
.rings svg circle[stroke-linecap] { filter: drop-shadow(0 1.5px 1.6px rgba(23,35,31,.18)); }

/* Water: glass tumblers with liquid and a side glint */
.lg-app .glass {
  width: 24px; height: 32px; border: 1px solid rgba(45,156,219,.45); border-radius: 4px 4px 9px 9px;
  background: linear-gradient(180deg, rgba(255,255,255,.75), rgba(255,255,255,.3));
  box-shadow: inset 0 1px 0 #fff, 0 3px 8px -4px rgba(45,156,219,.5);
}
.lg-app .glass::before { content: ""; position: absolute; left: 3px; top: 3px; width: 3px; height: 20px; border-radius: 2px; background: rgba(255,255,255,.75); z-index: 1; }
.lg-app .glass.full::after { inset: 0; opacity: 1; background: linear-gradient(180deg, #8FD0F5, #2D9CDB); box-shadow: inset 0 2px 0 rgba(255,255,255,.6); }

/* Icon tiles: tinted glass per topic */
.mn-ic, .mn-offers-ic {
  border: 1px solid rgba(255,255,255,.75);
  box-shadow: inset 0 1px 0 #fff, 0 4px 10px -5px rgba(23,35,31,.3);
}
.mn-offers-ic { border-color: rgba(255,255,255,.4); box-shadow: inset 0 1px 0 rgba(255,255,255,.5); }
.mn-row[data-v="learn"] .mn-ic { background: rgba(142,108,239,.16); color: #6A48D6; }
.mn-row[data-v="challenges"] .mn-ic, .mn-row[data-v="notif"] .mn-ic { background: rgba(232,185,47,.2); color: #8E6A06; }
.mn-row[data-v="cycle"] .mn-ic { background: rgba(238,111,150,.16); color: #B83A63; }
.mn-row[data-v="fast"] .mn-ic { background: rgba(255,122,69,.16); color: #C2531F; }
.mn-row[data-v="guide"] .mn-ic, .mn-row[data-v="help"] .mn-ic { background: rgba(45,156,219,.16); color: #1A6E9E; }
.mn-row[data-v="report"] .mn-ic, .mn-row[data-v="privacy"] .mn-ic, .mn-row[data-v="terms"] .mn-ic, .mn-row[data-v="eval"] .mn-ic { background: rgba(23,35,31,.06); color: #3E4B47; }
.mn-offers {
  border: 1px solid transparent;
  background: linear-gradient(120deg, #2E9E5B, #1F7A45 50%, #F0703A) padding-box, linear-gradient(150deg, rgba(255,255,255,.85), rgba(255,255,255,.08) 45%, rgba(255,255,255,.5)) border-box;
  box-shadow: inset 0 1.5px 0 rgba(255,255,255,.55), inset 0 -8px 16px rgba(0,0,0,.15), 0 18px 34px -12px rgba(31,122,69,.6);
}
.mn-group .mn-row + .mn-row { border-top-color: rgba(23,35,31,.06); }

/* Meal thumbnails and inputs: soft depth */
.lg-app .thumb { box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 8px 16px -8px rgba(23,35,31,.35); }
.lg-app textarea, .lg-app input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), .lg-app select {
  box-shadow: inset 0 2px 4px rgba(23,35,31,.08), inset 0 -1px 0 rgba(255,255,255,.9);
}

/* Share button: glossy sweep */
.share-cta { box-shadow: inset 0 1.5px 0 rgba(255,255,255,.6), inset 0 -6px 12px rgba(0,0,0,.15), 0 16px 30px -10px rgba(45,156,219,.7); }

/* Older or slower devices: keep everything legible without the extras */
@media (prefers-reduced-transparency: reduce) {
  .lg-app::after { display: none; }
  .lg-card.lg-glass, .lg-app .card, .lg-app .act, .lg-tabbar__nav.lg-glass, .lg-header.lg-glass { background: var(--lg-bg); }
}
