/* ==========================================================================
   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; }
.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; }
