/* =========================================================
   GoALL · Design System v2
   Minimalist · Premium · Apple/Notion/Linear inspired
   Paleta: negro/blanco/cian · Dark + Light mode
   ========================================================= */

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

/* ---------- Tokens · Dark (default) ---------- */
:root {
  --bg:          #0a0a0a;
  --bg-elev:     #141414;
  --surface:     #1a1a1a;
  --surface-2:   #202020;
  --border:      #262626;
  --border-strong: #383838;
  --text:        #f5f5f5;
  --text-2:      #a8a8a8;
  --text-faint:  #5a5a5a;
  --accent:      #00d4ff;        /* cian */
  --accent-soft: rgba(0, 212, 255, 0.12);
  --accent-strong:#00b8de;
  --success:     #4ade80;
  --warn:        #fbbf24;
  --danger:      #f87171;
  --shadow-sm:   0 1px 2px rgba(0,0,0,0.4);
  --shadow-md:   0 4px 16px rgba(0,0,0,0.5);
  --shadow-lg:   0 10px 40px rgba(0,0,0,0.6);
  --radius-sm:   8px;
  --radius:      12px;
  --radius-lg:   16px;
  --radius-xl:   20px;
  --safe-top:    env(safe-area-inset-top, 0);
  --safe-bottom: env(safe-area-inset-bottom, 0);
  --header-h:    56px;
  --tabbar-h:    66px;
}

/* ---------- Tokens · Light ---------- */
[data-theme="light"] {
  --bg:          #fafafa;
  --bg-elev:     #ffffff;
  --surface:     #ffffff;
  --surface-2:   #f5f5f5;
  --border:      #e5e5e5;
  --border-strong: #d4d4d4;
  --text:        #0a0a0a;
  --text-2:      #525252;
  --text-faint:  #a3a3a3;
  --accent:      #0099cc;
  --accent-soft: rgba(0, 153, 204, 0.10);
  --accent-strong:#007aa3;
  --shadow-sm:   0 1px 2px rgba(0,0,0,0.06);
  --shadow-md:   0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg:   0 10px 40px rgba(0,0,0,0.12);
}

/* ---------- Base ---------- */
html, body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  overscroll-behavior-y: contain;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  letter-spacing: -0.005em;
}
body {
  padding-top: var(--safe-top);
  padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom));
  min-height: 100vh;
  min-height: 100dvh;
  transition: background-color .25s ease, color .25s ease;
}
body.is-fullscreen {
  padding-bottom: var(--safe-bottom);
}

a { color: inherit; text-decoration: none; }
button { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; }

input, select, textarea {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  font: inherit;
  font-size: 15px;
  width: 100%;
  transition: border-color .15s, background-color .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
}
input[type="date"] { max-width: 100%; min-width: 0; }
textarea { min-height: 96px; resize: vertical; font-family: inherit; }
label {
  display: block;
  font-size: 12px;
  color: var(--text-2);
  font-weight: 500;
  margin-bottom: 8px;
  letter-spacing: 0.01em;
}

::placeholder { color: var(--text-faint); }
::selection { background: var(--accent-soft); color: var(--text); }

/* ---------- Splash ---------- */
.splash {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 100vh; gap: 12px;
}
.splash-logo {
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: 56px;
  letter-spacing: -0.04em;
  color: var(--text);
}
.splash-logo span { color: var(--accent); }
.splash-tag {
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--text-faint);
  text-transform: uppercase;
  font-weight: 500;
}

/* ---------- Header ---------- */
.header {
  min-height: var(--header-h);
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: var(--safe-top);
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: background-color .25s ease, border-color .25s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}
.header-brand {
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.03em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}
.header-brand span { color: var(--accent); }
.header-meta {
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 0.05em;
  font-weight: 500;
}

/* Avatar + dropdown */
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 14px;
  color: var(--text);
  cursor: pointer;
  transition: all .15s;
}
.avatar:hover { border-color: var(--accent); }

.menu-dropdown {
  position: fixed;
  top: calc(var(--safe-top) + var(--header-h) + 4px);
  right: 12px;
  width: 220px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 70;
  overflow: hidden;
  animation: dropIn .15s ease;
}
@keyframes dropIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.menu-item {
  width: 100%;
  padding: 12px 14px;
  display: flex; align-items: center; gap: 10px;
  font-size: 14px;
  color: var(--text);
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.menu-item:last-child { border-bottom: none; }
.menu-item:hover { background: var(--surface-2); }
.menu-item .ico { width: 18px; height: 18px; color: var(--text-2); }
.menu-item.danger { color: var(--danger); }
.menu-item.danger .ico { color: var(--danger); }

/* ---------- Screen / containers ---------- */
.screen {
  padding: 16px 16px 24px;
  max-width: 720px;
  margin: 0 auto;
}
/* Date strip dentro de screen: añadir aire arriba para que no choque con sticky header */
.screen > .date-strip:first-child { margin-top: 4px; }
.screen-stack {
  padding: 16px 16px calc(16px + var(--safe-bottom));
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-sizing: border-box;
}

/* Section title */
.section-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-faint);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 24px 0 10px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  transition: all .15s;
  letter-spacing: -0.01em;
}
.btn:hover { border-color: var(--accent); }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}
.btn-primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
[data-theme="light"] .btn-primary { color: white; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--border); color: var(--text); }
.btn-danger { color: var(--danger); border-color: rgba(248,113,113,0.3); }
.btn-danger:hover { background: rgba(248,113,113,0.1); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 12px; font-size: 12px; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 12px;
  transition: border-color .15s;
}
.card.interactive { cursor: pointer; }
.card.interactive:hover { border-color: var(--accent); }
.card h3, .card .h3 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.card-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.muted { color: var(--text-2); }
.faint { color: var(--text-faint); }
.mono { font-family: 'SF Mono', 'JetBrains Mono', monospace; font-size: 12px; letter-spacing: 0; }

/* ---------- Tags / chips ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-2);
}
.tag.accent { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.tag.success { color: var(--success); border-color: rgba(74,222,128,0.3); background: rgba(74,222,128,0.1); }
.tag.warn { color: var(--warn); border-color: rgba(251,191,36,0.3); background: rgba(251,191,36,0.1); }
.tag.danger { color: var(--danger); border-color: rgba(248,113,113,0.3); background: rgba(248,113,113,0.1); }

/* ---------- Tabbar ---------- */
.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 6px 4px calc(6px + var(--safe-bottom));
  display: flex;
  justify-content: space-around;
  z-index: 60;
  height: calc(var(--tabbar-h) + var(--safe-bottom));
  transition: background-color .25s ease;
}
.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 8px;
  min-width: 56px;
  color: var(--text-faint);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color .15s;
  border-radius: var(--radius-sm);
}
.tab .ico { width: 22px; height: 22px; display: inline-flex; }
.tab .ico svg { width: 100%; height: 100%; }
.tab.active { color: var(--accent); }
.tab:hover { color: var(--text-2); }
.tab.active:hover { color: var(--accent); }

/* ---------- Date strip ---------- */
.date-strip {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 4px 4px;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.date-strip::-webkit-scrollbar { display: none; }
.date-pill {
  flex: 0 0 auto;
  min-width: 54px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  transition: all .15s;
  scroll-snap-align: center;
}
.date-pill:hover { border-color: var(--accent); }
.date-pill .dow {
  font-size: 10px;
  color: var(--text-faint);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
}
.date-pill .day {
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}
.date-pill.active {
  background: var(--accent);
  border-color: var(--accent);
}
.date-pill.active .dow,
.date-pill.active .day { color: var(--bg); }
[data-theme="light"] .date-pill.active .dow,
[data-theme="light"] .date-pill.active .day { color: white; }
.date-pill.race { background: var(--warn); border-color: var(--warn); }
.date-pill.race .dow, .date-pill.race .day { color: #000; }

/* ---------- Progress bar ---------- */
.bar {
  height: 4px;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
}
.bar > span {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transition: width .35s cubic-bezier(0.4, 0, 0.2, 1);
}
.bar.success > span { background: var(--success); }

/* ---------- KPI grid ---------- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
}
.kpi-label {
  font-size: 11px;
  color: var(--text-2);
  font-weight: 500;
  letter-spacing: 0.05em;
}
.kpi-value {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.1;
  margin-top: 6px;
  letter-spacing: -0.02em;
}
.kpi-value .unit { font-size: 13px; font-weight: 500; color: var(--text-2); margin-left: 2px; }
.kpi.accent .kpi-value { color: var(--accent); }

/* ---------- Exercise / sets ---------- */
.exercise {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 10px;
}
.exercise-name {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.exercise-meta {
  font-size: 12px;
  color: var(--text-2);
  margin-bottom: 12px;
}
.sets { display: flex; gap: 6px; flex-wrap: wrap; }
.set-pill {
  flex: 1;
  min-width: 60px;
  padding: 10px 6px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  transition: all .15s;
  font-family: inherit;
}
.set-pill:hover:not(:disabled):not(.done) { border-color: var(--accent); }
.set-pill.done {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}
.set-pill.locked { opacity: 0.4; cursor: not-allowed; }
.set-pill .reps { font-size: 13px; font-weight: 700; color: inherit; }
.set-pill .nlabel {
  font-size: 9px;
  color: var(--text-faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}
.set-pill.done .nlabel { color: var(--accent); }

/* ---------- Habits ---------- */
.habit-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  transition: all .2s;
}
.habit-card.done {
  background: var(--accent-soft);
  border-color: var(--accent);
}
.habit-icon {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  color: var(--text-2);
  flex-shrink: 0;
}
.habit-card.done .habit-icon { background: var(--accent); color: var(--bg); }
[data-theme="light"] .habit-card.done .habit-icon { color: white; }
.habit-icon svg { width: 18px; height: 18px; }
.habit-info { flex: 1; min-width: 0; }
.habit-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.habit-detail {
  font-size: 12px;
  color: var(--text-2);
  margin-top: 2px;
}
.habit-action {
  display: flex; align-items: center; gap: 12px;
  margin-left: 12px;
  flex-shrink: 0;
}
.habit-action .timer-btn {
  margin-right: 8px;
  padding: 8px 12px;
}
.habit-action .check {
  margin-left: 4px;
}

/* Checkbox elegante */
.check {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  flex-shrink: 0;
}
.check svg { width: 14px; height: 14px; color: var(--bg); opacity: 0; transform: scale(0.5); transition: all .2s; }
.check.done { background: var(--accent); border-color: var(--accent); }
.check.done svg { opacity: 1; transform: scale(1); }
[data-theme="light"] .check.done svg { color: white; }

/* Vasos de agua (mantengo del híbrido) */
.cups { display: flex; gap: 5px; flex-wrap: wrap; }
.cup {
  width: 24px; height: 30px;
  border: 2px solid var(--border-strong);
  border-radius: 4px 4px 8px 8px;
  background: var(--surface-2);
  cursor: pointer;
  position: relative;
  transition: all .15s;
}
.cup:hover { border-color: var(--accent); }
.cup.filled {
  background: linear-gradient(180deg, var(--accent-soft) 0%, var(--accent) 100%);
  border-color: var(--accent);
}

/* Cronómetro discreto */
.timer-btn {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  display: inline-flex; align-items: center; gap: 6px;
}
.timer-btn:hover { border-color: var(--accent); color: var(--accent); }
.timer-btn svg { width: 14px; height: 14px; }
.stopwatch-display {
  font-family: 'SF Mono', 'JetBrains Mono', monospace;
  font-size: 56px;
  font-weight: 700;
  text-align: center;
  color: var(--accent);
  letter-spacing: -0.02em;
  margin: 16px 0;
}

/* ---------- Diet / Foods ---------- */
.food-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(94px, 1fr));
  gap: 8px;
}
.food-card {
  aspect-ratio: 1;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 6px;
  padding: 10px 6px;
  cursor: pointer;
  transition: all .15s;
  text-align: center;
}
.food-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.food-card.selected {
  background: var(--accent-soft);
  border-color: var(--accent);
}
.food-card .food-ico {
  width: 32px; height: 32px;
  color: var(--text-2);
}
.food-card.selected .food-ico { color: var(--accent); }
.food-card .food-ico svg { width: 100%; height: 100%; }
.food-card .food-emoji {
  font-size: 30px;
  line-height: 1;
  filter: grayscale(0);
}
.food-card .food-name {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

/* ---------- Mood selector ---------- */
.mood-btn {
  flex: 1;
  min-width: 60px;
  padding: 10px 6px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex; flex-direction: column;
  align-items: center; gap: 4px;
  cursor: pointer;
  transition: all .15s;
  font-family: inherit;
}
.mood-btn:hover { border-color: var(--accent); }
.mood-btn.mood-active {
  background: var(--accent-soft);
  border-color: var(--accent);
}
.mood-btn .mood-emo { font-size: 26px; line-height: 1; }
.mood-btn .mood-lbl { font-size: 10px; color: var(--text-2); font-weight: 500; letter-spacing: 0.02em; }
.mood-btn.mood-active .mood-lbl { color: var(--accent); }

/* ---------- Frase del día ---------- */
.daily-quote {
  position: relative;
  padding: 22px 22px 22px 50px;
  margin-bottom: 14px;
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  border-left: 3px solid var(--accent);
}
.daily-quote-mark {
  position: absolute;
  top: 6px;
  left: 16px;
  font-size: 56px;
  font-weight: 700;
  color: var(--accent);
  opacity: 0.5;
  line-height: 1;
  font-family: Georgia, serif;
}
.daily-quote-text {
  font-size: 15px;
  font-style: italic;
  font-weight: 500;
  line-height: 1.5;
  color: var(--text);
  letter-spacing: -0.01em;
}

/* ---------- Astrales (chakras + dimensiones) ---------- */
.astral-holo-wrap {
  display: flex; justify-content: center; align-items: center;
  padding: 12px 0;
  background:
    radial-gradient(ellipse at center, rgba(0, 212, 255, 0.10) 0%, transparent 60%),
    radial-gradient(ellipse at top, rgba(155, 89, 182, 0.12) 0%, transparent 50%),
    linear-gradient(180deg, #050a18 0%, #0a0a18 100%);
  border-radius: var(--radius-lg);
  margin: 16px 0;
  overflow: visible;
  border: 1px solid rgba(255,255,255,0.06);
}
.astral-holo {
  width: 100%;
  max-width: 420px;
  height: auto;
  filter: drop-shadow(0 0 22px rgba(0,212,255,0.25));
}
.astral-ring {
  transition: opacity .2s, stroke-width .2s;
  transform-origin: center;
}
.astral-ring:hover { opacity: 1 !important; stroke-width: 3; }
.astral-ring-user { animation: ringPulse 3.5s ease-in-out infinite; }
@keyframes ringPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}
.astral-tabs {
  display: flex;
  gap: 6px;
  background: var(--surface);
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--border);
}
.astral-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-2);
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  cursor: pointer;
  transition: all .15s;
  font-family: inherit;
}
.astral-tab:hover { color: var(--text); }
.astral-tab.active {
  background: var(--accent);
  color: #000;
}

.dim-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 14px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all .15s;
}
.dim-card:hover { transform: translateY(-1px); border-color: var(--accent); }
.dim-card-head { display: flex; align-items: center; gap: 12px; }
.dim-card-num {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 13px; letter-spacing: -0.02em;
  flex-shrink: 0;
}
.dim-card-name { font-weight: 700; font-size: 15px; }
.dim-card-key { font-size: 12px; color: var(--text-2); margin-top: 2px; }

/* ---------- Meditaciones ---------- */
.med-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.med-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 14px;
  cursor: pointer;
  transition: all .2s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
}
.med-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.med-svg {
  width: 44px; height: 44px;
  margin: 0 auto 12px;
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.med-svg svg { width: 100%; height: 100%; display: block; }
.med-card:hover .med-svg { color: var(--accent-strong); }
.med-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.med-tagline {
  font-size: 11px;
  color: var(--text-2);
  margin-top: 3px;
  line-height: 1.3;
}
.med-meta {
  font-size: 10px;
  color: var(--text-faint);
  margin-top: 8px;
}

.chip {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  transition: all .15s;
}
.chip:hover { border-color: var(--accent); }
.chip-active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}
[data-theme="light"] .chip-active { color: white; }

.menu-meal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 10px;
}
.menu-meal-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 10px;
}
.menu-meal-name { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.menu-meal-time { font-size: 11px; color: var(--accent); font-weight: 600; letter-spacing: 0.04em; }
.menu-meal-items { display: flex; flex-direction: column; gap: 6px; }
.menu-meal-item {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.menu-meal-item:last-child { border-bottom: none; }
.menu-meal-item .name { color: var(--text); }
.menu-meal-item .qty { color: var(--text-2); font-family: 'SF Mono', monospace; font-size: 12px; }

/* ---------- Onboarding ---------- */
.onboarding-progress {
  display: flex; gap: 4px;
  padding: 16px 16px 8px;
}
.onboarding-progress > div {
  flex: 1; height: 3px;
  background: var(--border);
  border-radius: 999px;
  transition: background .2s;
}
.onboarding-progress > div.done { background: var(--accent); }

.ob-content { flex: 1; display: flex; flex-direction: column; gap: 14px; min-height: 0; }
.ob-actions { display: flex; gap: 8px; padding-top: 12px; }
.ob-content h2 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text);
}

.option-list { display: flex; flex-direction: column; gap: 8px; }
.option {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  transition: all .15s;
  display: flex; align-items: center; gap: 12px;
}
.option:hover { border-color: var(--accent); }
.option.selected {
  background: var(--accent-soft);
  border-color: var(--accent);
}
.option .ico {
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-2);
  flex-shrink: 0;
}
.option.selected .ico { color: var(--accent); }
.option .opt-title { font-weight: 600; line-height: 1.2; font-size: 14px; }
.option .opt-desc { font-size: 12px; color: var(--text-2); margin-top: 2px; }

.day-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.day-toggle {
  padding: 14px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-align: center;
  background: var(--surface);
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  transition: all .15s;
}
.day-toggle:hover { border-color: var(--accent); }
.day-toggle.selected {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

/* ---------- Hero ---------- */
.hero { padding: 48px 24px 24px; text-align: center; }
.hero-logo {
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: 56px;
  letter-spacing: -0.04em;
  color: var(--text);
  line-height: 1;
}
.hero-logo span { color: var(--accent); }
.hero-tag {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--text-faint);
  text-transform: uppercase;
  margin-top: 10px;
  font-weight: 500;
}
.hero-pillars {
  display: flex; justify-content: center; gap: 32px;
  margin-top: 36px; font-size: 12px; color: var(--text-2);
}
.hero-pillar {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.hero-pillar .ico {
  width: 24px; height: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-2);
}
.hero-pillar .ico svg { width: 100%; height: 100%; display: block; }
.option .ico svg { width: 100%; height: 100%; display: block; }

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 200;
  padding: 16px;
  animation: fadeIn .15s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  max-width: 440px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  animation: slideUp .2s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes slideUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.modal h3 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.modal-actions { display: flex; gap: 8px; margin-top: 18px; justify-content: flex-end; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 12px);
  left: 16px; right: 16px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  z-index: 300;
  max-width: 420px;
  margin: 0 auto;
  box-shadow: var(--shadow-md);
  font-size: 14px;
  animation: slideUp .2s ease;
}
.toast.error { border-color: var(--danger); color: var(--danger); }
.toast.success { border-color: var(--success); color: var(--success); }

/* ---------- Admin user list ---------- */
.user-row {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 8px;
  display: flex; align-items: center; gap: 12px;
  cursor: pointer;
  transition: border-color .15s;
}
.user-row:hover { border-color: var(--accent); }
.user-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
  flex-shrink: 0;
}
.user-info { flex: 1; min-width: 0; }
.user-name { font-weight: 600; font-size: 14px; }
.user-meta { font-size: 11px; color: var(--text-2); margin-top: 2px; }
.user-status {
  font-size: 10px; padding: 3px 8px; border-radius: 999px;
  letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600;
}
.user-status.active { background: rgba(74,222,128,0.12); color: var(--success); }
.user-status.inactive { background: rgba(248,113,113,0.12); color: var(--danger); }
.user-status.pending { background: rgba(251,191,36,0.12); color: var(--warn); }

/* ---------- Breath ---------- */
.breath-wrap { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 16px; }
.breath-circle-wrap {
  position: relative;
  width: 320px; height: 320px;
  display: flex; align-items: center; justify-content: center;
}
.breath-canvas {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}
.breath-circle {
  width: 160px; height: 160px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center,
      var(--accent) 0%,
      var(--accent) 35%,
      var(--accent-strong) 75%,
      rgba(0, 100, 140, 0.4) 100%);
  box-shadow:
    0 0 80px var(--accent-soft),
    0 0 160px var(--accent-soft);
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.4, 1), box-shadow 0.5s ease;
  position: relative;
  z-index: 2;
}
.breath-circle.inhale {
  box-shadow:
    0 0 120px var(--accent),
    0 0 200px var(--accent-soft);
}
.breath-circle.exhale {
  box-shadow:
    0 0 40px var(--accent-soft),
    0 0 80px transparent;
}
.breath-text {
  position: absolute;
  font-size: 18px; font-weight: 600;
  color: var(--bg);
  letter-spacing: 0.04em;
  pointer-events: none;
  z-index: 3;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
[data-theme="light"] .breath-text { color: white; }
.breath-counter {
  font-family: 'SF Mono', monospace;
  font-size: 13px; color: var(--text-2);
}
.tech-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tech-card {
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all .15s;
}
.tech-card:hover { border-color: var(--accent); }
.tech-card.selected { border-color: var(--accent); background: var(--accent-soft); }
.tech-card h4 { font-size: 14px; font-weight: 700; letter-spacing: -0.01em; }
.tech-card .desc { font-size: 11px; color: var(--text-2); margin-top: 4px; }

/* ---------- Radar ---------- */
.radar-wrap { display: flex; justify-content: center; padding: 8px 0; }
.radar { width: 240px; height: 240px; }

/* ---------- Util ---------- */
.row { display: flex; gap: 8px; align-items: center; }
.col { display: flex; flex-direction: column; gap: 8px; }
.gap-4 { gap: 4px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.flex-1 { flex: 1; }
.between { justify-content: space-between; }
.center { align-items: center; }
.text-center { text-align: center; }
.hidden { display: none !important; }
.divider { height: 1px; background: var(--border); margin: 12px 0; }
.scroll-x { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.scroll-x::-webkit-scrollbar { display: none; }

/* ---------- Responsive tablet/desktop ---------- */
@media (min-width: 768px) {
  .screen { padding: 32px 24px; max-width: 880px; }
  .kpi-grid { grid-template-columns: repeat(4, 1fr); }
  body { padding-bottom: var(--safe-bottom); }
  .tabbar {
    position: sticky; top: var(--safe-top);
    bottom: auto; height: auto;
    border-top: none; border-bottom: 1px solid var(--border);
    padding: 8px 16px;
    margin-top: -1px;
    justify-content: center; gap: 4px;
  }
  .tab { flex-direction: row; padding: 8px 14px; min-width: auto; }
  .tab .ico { width: 18px; height: 18px; }
}
@media (max-width: 380px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .tech-grid { grid-template-columns: 1fr; }
  .food-grid { grid-template-columns: repeat(3, 1fr); }
}
