/* PETVITY · App styles · v2 · luxury · futuristic · warm
 * --------------------------------------------------------------
 * Design language: Apple × Aēsop × Hermès digital.
 * No emoji icons. Glass surfaces. Soft ambient glows.
 * Hairline gold strokes. Refined typography hierarchy.
 * -------------------------------------------------------------- */

@import url('https://fonts.googleapis.com/css2?family=Italiana&family=Inter:wght@200;300;400;500;600;700&display=swap');

:root {
  --forest: #2d4a3e;
  --forest-deep: #0f2419;
  --forest-mid: #1a3a2a;
  --forest-light: #f0ede5;
  --gold: #d4af37;
  --gold-bright: #e6c450;
  --gold-warm: #b8941f;
  --gold-soft: #f5f1e8;
  --ivory: #fdfcf8;
  --ivory-warm: #f9f6ee;
  --linen: #ede4d3;
  --text: #2d4a3e;
  --text-soft: #5c7a6c;
  --text-faint: #9ba89e;
  --glow-gold: 0 0 40px rgba(212, 175, 55, 0.15);
  --glass-border: rgba(212, 175, 55, 0.18);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  font-family: 'Inter', -apple-system, sans-serif;
  font-weight: 300;
  letter-spacing: 0.005em;
  background: var(--ivory);
  background-image:
    radial-gradient(ellipse at 20% -10%, rgba(212,175,55,0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 100% 100%, rgba(45,74,62,0.04) 0%, transparent 50%);
  color: var(--text);
  padding-bottom: 96px;
  min-height: 100vh;
}
a { color: inherit; -webkit-tap-highlight-color: transparent; }

/* App shell · phone width on tablet/desktop */
.app-shell {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
}

/* ─────────── ICON SYSTEM ─────────── */
.icon { width: 22px; height: 22px; flex-shrink: 0; vertical-align: middle; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 32px; height: 32px; }
.icon-xl { width: 48px; height: 48px; }

/* ─────────── TOP BAR ─────────── */
.app-top {
  padding: 22px 22px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(180deg, var(--ivory) 60%, transparent 100%);
  position: sticky; top: 0;
  z-index: 10;
  backdrop-filter: saturate(140%) blur(16px);
}
.app-top .greet { font-size: 11px; color: var(--text-faint); letter-spacing: 1.5px; text-transform: uppercase; font-weight: 500; }
.app-top .greet strong {
  display: block;
  font-family: 'Italiana', Georgia, serif;
  font-size: 26px; font-weight: 400; letter-spacing: 0.01em;
  color: var(--forest-deep); margin-top: 4px;
  line-height: 1.1;
}
.app-top h1 {
  font-family: 'Italiana', Georgia, serif;
  font-size: 32px; font-weight: 400; letter-spacing: 0.005em;
  color: var(--forest-deep);
  line-height: 1.05;
  margin: 0;
}
.app-top h1 em { color: var(--gold-warm); font-style: italic; }
.app-top p { font-size: 12px; color: var(--text-soft); margin: 6px 0 0; letter-spacing: 0.3px; }

/* Hero pet photo (small avatar in app top) */
.pet-avatar-sm {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--forest-mid), var(--forest-deep));
  background-size: cover; background-position: center;
  border: 2px solid rgba(212, 175, 55, 0.4);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.15);
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.pet-avatar-sm:hover { transform: scale(1.05); border-color: var(--gold-warm); }
.pet-avatar-sm .silhouette-mini {
  width: 100%; height: 100%;
  background-image: url('../assets/pet-silhouette.svg');
  background-size: 92%; background-position: center; background-repeat: no-repeat;
  opacity: 0.85;
}
.pet-avatar-sm .live-pet-mini { width: 100%; height: 100%; display: grid; place-items: center; overflow: hidden; }
.pet-avatar-sm .live-pet-mini svg { width: 110%; height: auto; }
.pet-avatar-sm.has-photo .silhouette-mini,
.pet-avatar-sm.has-photo .live-pet-mini { display: none; }

/* Streak pill · refined */
.app-top .pill {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 13px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.12), rgba(212, 175, 55, 0.04));
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 999px;
  font-size: 11.5px;
  color: var(--gold-warm);
  font-weight: 500; letter-spacing: 0.4px;
  backdrop-filter: blur(10px);
}
.app-top .pill .icon { width: 14px; height: 14px; color: var(--gold-warm); }

/* ─────────── SECTION HEADINGS ─────────── */
.app-h2 {
  font-family: 'Italiana', Georgia, serif;
  font-size: 26px; font-weight: 400; letter-spacing: 0.01em;
  color: var(--forest-deep);
  margin: 16px 22px 6px;
  line-height: 1.15;
}
.app-h2 em { color: var(--gold-warm); font-style: italic; }
.app-sub { font-size: 12px; color: var(--text-soft); margin: 0 22px 16px; line-height: 1.7; letter-spacing: 0.3px; }

/* ─────────── STAT STRIP · glassmorphic ─────────── */
.stat-strip {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px;
  padding: 6px 22px 22px;
}
.stat-strip .stat {
  padding: 16px 12px;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid rgba(212, 175, 55, 0.12);
  border-radius: 18px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease;
}
.stat-strip .stat::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(212,175,55,0.04), transparent 60%);
  pointer-events: none;
}
.stat-strip .stat:active { transform: scale(0.98); }
.stat-strip .stat .v {
  font-family: 'Italiana', Georgia, serif;
  font-size: 28px; line-height: 1;
  color: var(--forest-deep);
  font-weight: 400;
}
.stat-strip .stat .v em {
  color: var(--gold-warm); font-style: normal;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold-warm));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-strip .stat .l {
  font-size: 9px; letter-spacing: 1.8px; text-transform: uppercase;
  color: var(--text-faint); margin-top: 6px; font-weight: 500;
}

/* ─────────── HERO RITUAL CARD · forest gradient with glow ─────────── */
.today-summary {
  margin: 22px;
  padding: 28px 24px;
  background: linear-gradient(135deg, var(--forest-mid) 0%, var(--forest-deep) 100%);
  background-image:
    radial-gradient(ellipse at top right, rgba(212,175,55,0.18), transparent 50%),
    radial-gradient(ellipse at bottom left, rgba(45,74,62,0.4), transparent 60%),
    linear-gradient(135deg, var(--forest-mid) 0%, var(--forest-deep) 100%);
  color: #fff;
  border-radius: 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(15, 36, 25, 0.35), var(--glow-gold);
  border: 1px solid rgba(212, 175, 55, 0.18);
}
.today-summary::before {
  content: ''; position: absolute; top: -50%; right: -30%;
  width: 70%; height: 200%;
  background: radial-gradient(ellipse, rgba(212, 175, 55, 0.15) 0%, transparent 60%);
  pointer-events: none;
}
.today-summary .label {
  font-size: 10px; letter-spacing: 3px; text-transform: uppercase;
  color: var(--gold-bright); margin-bottom: 14px; font-weight: 500;
  position: relative; z-index: 1;
}
.today-summary .progress-ring {
  display: inline-grid; place-items: center;
  width: 124px; height: 124px;
  border-radius: 50%;
  background: conic-gradient(var(--gold) 0deg 0deg, rgba(254,253,251,0.08) 0deg 360deg);
  position: relative;
  margin: 0 auto 16px;
  transition: background 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 1;
  box-shadow: 0 0 40px rgba(212, 175, 55, 0.25);
}
.today-summary .progress-ring::after {
  content: '';
  position: absolute; inset: 8px;
  background: linear-gradient(135deg, var(--forest-mid), var(--forest-deep));
  border-radius: 50%;
}
.today-summary .progress-ring .text { position: relative; z-index: 1; text-align: center; }
.today-summary .progress-ring .text .num {
  font-family: 'Italiana', serif; font-size: 38px;
  line-height: 1; color: #fff; font-weight: 400;
}
.today-summary .progress-ring .text .lbl {
  font-size: 9px; letter-spacing: 2.5px; text-transform: uppercase;
  color: rgba(254,253,251,0.5); margin-top: 6px; font-weight: 500;
}
.today-summary p {
  font-size: 13px; color: rgba(254,253,251,0.78);
  line-height: 1.6; margin: 0; letter-spacing: 0.3px;
  position: relative; z-index: 1;
  max-width: 320px; margin-left: auto; margin-right: auto;
}

/* ─────────── RITUAL LIST · glass cards ─────────── */
.ritual-list { padding: 0 22px; display: grid; gap: 10px; }
.ritual-card {
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(212, 175, 55, 0.14);
  border-radius: 16px;
  display: grid; grid-template-columns: 40px 1fr 28px;
  gap: 14px; align-items: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  position: relative; overflow: hidden;
}
.ritual-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, transparent, var(--gold), transparent);
  opacity: 0; transition: opacity 0.3s;
}
.ritual-card:active { transform: scale(0.99); }
.ritual-card.done {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.08), rgba(255, 255, 255, 0.85));
  border-color: rgba(212, 175, 55, 0.4);
  box-shadow: 0 8px 30px rgba(212, 175, 55, 0.08);
}
.ritual-card.done::before { opacity: 1; }

.ritual-card .ic-wrap {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(212,175,55,0.1), rgba(212,175,55,0.04));
  border: 1px solid rgba(212,175,55,0.18);
  display: grid; place-items: center;
  color: var(--gold-warm);
  transition: all 0.3s ease;
}
.ritual-card.done .ic-wrap {
  background: linear-gradient(135deg, var(--gold-bright), var(--gold-warm));
  border-color: var(--gold-warm);
  color: var(--forest-deep);
  box-shadow: 0 4px 16px rgba(212, 175, 55, 0.35);
}
.ritual-card .ic-wrap .icon { width: 20px; height: 20px; }

.ritual-card h4 {
  font-family: 'Inter', sans-serif;
  font-size: 14.5px; font-weight: 500; letter-spacing: 0.1px;
  color: var(--forest-deep); margin-bottom: 3px;
}
.ritual-card.done h4 { text-decoration: line-through; text-decoration-color: rgba(45,74,62,0.3); color: var(--text-soft); }
.ritual-card p {
  font-size: 11.5px;
  color: var(--text-soft); margin: 0; line-height: 1.5;
  letter-spacing: 0.2px;
}

.ritual-card .check {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1.5px solid rgba(212, 175, 55, 0.25);
  display: grid; place-items: center;
  font-size: 11px; color: transparent;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.ritual-card.done .check {
  background: linear-gradient(135deg, var(--gold-bright), var(--gold-warm));
  border-color: var(--gold-warm);
  color: var(--forest-deep);
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.4);
}

/* ─────────── INSIGHT CARD ─────────── */
.insight-card {
  margin: 0 22px 24px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(212, 175, 55, 0.14);
  border-radius: 18px;
}
.insight-card p {
  font-size: 13.5px; color: var(--text);
  line-height: 1.7; margin: 0; letter-spacing: 0.2px;
}
.insight-card strong { color: var(--forest-deep); font-weight: 500; }

/* ─────────── COMPANION TEASER ─────────── */
.ai-teaser {
  margin: 0 22px 28px;
  padding: 22px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.06), rgba(255, 255, 255, 0.6));
  border: 1px dashed rgba(212, 175, 55, 0.4);
  border-radius: 18px;
  text-align: center;
  backdrop-filter: blur(10px);
}
.ai-teaser .label { font-size: 10px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--gold-warm); font-weight: 500; margin-bottom: 8px; }
.ai-teaser p { font-size: 13px; color: var(--text); line-height: 1.6; margin: 0; letter-spacing: 0.2px; }

/* ─────────── SCORE PAGE · refined ring ─────────── */
.score-hero { padding: 36px 22px 28px; text-align: center; }
.score-ring {
  display: inline-grid; place-items: center;
  width: 220px; height: 220px;
  border-radius: 50%;
  position: relative;
  margin-bottom: 20px;
  background: conic-gradient(var(--gold) 0deg 313deg, rgba(45, 74, 62, 0.08) 313deg 360deg);
  filter: drop-shadow(0 0 32px rgba(212, 175, 55, 0.2));
}
.score-ring::after {
  content: ''; position: absolute; inset: 14px;
  background: linear-gradient(135deg, var(--ivory), var(--ivory-warm));
  border-radius: 50%;
  box-shadow: inset 0 2px 12px rgba(0,0,0,0.04);
}
.score-ring .text { position: relative; z-index: 1; text-align: center; }
.score-ring .text .num {
  font-family: 'Italiana', serif; font-size: 80px;
  line-height: 0.9; color: var(--forest-deep); font-weight: 400;
}
.score-ring .text .lbl {
  font-size: 10px; letter-spacing: 3px; text-transform: uppercase;
  color: var(--gold-warm); margin-top: 8px; font-weight: 500;
}
.score-trend { font-size: 13px; color: var(--text-soft); letter-spacing: 0.2px; }
.score-trend strong { color: #5b8c6e; font-weight: 500; }

/* Pillar cards */
.pillar-section { padding: 24px 22px; }
.pillar-section h2 { font-family: 'Italiana', serif; font-size: 22px; color: var(--forest-deep); font-weight: 400; margin-bottom: 18px; letter-spacing: 0.01em; }
.pillar-card {
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(212, 175, 55, 0.12);
  border-radius: 16px;
  margin-bottom: 10px;
}
.pillar-row-1 { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.pillar-name { font-size: 13.5px; color: var(--forest-deep); font-weight: 500; letter-spacing: 0.3px; }
.pillar-val { font-family: 'Italiana', serif; font-size: 26px; color: var(--gold-warm); font-weight: 400; }
.pillar-bar { height: 5px; background: rgba(45, 74, 62, 0.08); border-radius: 100px; overflow: hidden; margin-bottom: 10px; }
.pillar-bar > div {
  height: 100%;
  background: linear-gradient(90deg, var(--forest), var(--gold));
  border-radius: 100px;
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.3);
  transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.pillar-card p { font-size: 11.5px; color: var(--text-soft); margin: 0; line-height: 1.55; letter-spacing: 0.2px; }

/* Trend card */
.trend-card {
  margin: 22px;
  padding: 28px 24px;
  background: linear-gradient(135deg, var(--forest-mid), var(--forest-deep));
  color: #fff;
  border-radius: 22px;
  border: 1px solid rgba(212, 175, 55, 0.18);
  box-shadow: 0 24px 60px rgba(15, 36, 25, 0.3);
  position: relative;
  overflow: hidden;
}
.trend-card::before {
  content: ''; position: absolute; top: -50%; right: -30%; width: 60%; height: 200%;
  background: radial-gradient(ellipse, rgba(212,175,55,0.15) 0%, transparent 60%);
  pointer-events: none;
}
.trend-card h3 { font-family: 'Italiana', serif; font-size: 22px; color: var(--gold-bright); font-weight: 400; margin-bottom: 4px; position: relative; z-index: 1; }
.trend-card p { font-size: 11.5px; color: rgba(254,253,251,0.6); margin: 0 0 22px; position: relative; z-index: 1; letter-spacing: 0.2px; }
.trend-bars { display: flex; align-items: flex-end; gap: 6px; height: 96px; position: relative; z-index: 1; }
.trend-bars .b {
  flex: 1;
  background: linear-gradient(180deg, var(--gold), var(--gold-warm));
  border-radius: 4px 4px 0 0;
  opacity: 0.35;
  transition: opacity 0.3s;
}
.trend-bars .b.now {
  opacity: 1;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.5);
}
.trend-labels { display: flex; gap: 6px; margin-top: 10px; position: relative; z-index: 1; }
.trend-labels span { flex: 1; font-size: 10px; color: rgba(254,253,251,0.5); text-align: center; letter-spacing: 0.5px; }

/* Recommendations list */
.recs { padding: 0 22px; margin-bottom: 28px; }
.recs h2 { font-family: 'Italiana', serif; font-size: 22px; color: var(--forest-deep); font-weight: 400; margin-bottom: 14px; letter-spacing: 0.01em; }
.rec-item {
  display: grid; grid-template-columns: 48px 1fr; gap: 14px; align-items: center;
  padding: 14px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(212, 175, 55, 0.12);
  border-radius: 14px;
  text-decoration: none; color: inherit;
  margin-bottom: 8px;
  transition: all 0.25s ease;
}
.rec-item:active { transform: scale(0.99); }
.rec-item .img {
  width: 48px; height: 48px; border-radius: 12px;
  background-size: cover; background-position: center;
  border: 1px solid rgba(212, 175, 55, 0.2);
}
.rec-item h6 { font-size: 13px; color: var(--forest-deep); font-weight: 500; margin-bottom: 2px; letter-spacing: 0.1px; }
.rec-item p { font-size: 11.5px; color: var(--text-soft); margin: 0; letter-spacing: 0.2px; }

/* ─────────── BOTTOM NAV · glass · gold accents ─────────── */
.app-nav {
  position: fixed; bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%; max-width: 480px;
  background: rgba(253, 252, 248, 0.85);
  backdrop-filter: saturate(180%) blur(28px);
  border-top: 1px solid rgba(212, 175, 55, 0.15);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  z-index: 100;
  box-shadow: 0 -8px 24px rgba(15, 36, 25, 0.04);
}
.app-nav a {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 9px 4px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--text-faint);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
}
.app-nav a .icon {
  width: 22px; height: 22px;
  transition: all 0.3s ease;
  color: var(--text-faint);
}
.app-nav a.active {
  color: var(--forest-deep);
}
.app-nav a.active .icon {
  color: var(--gold-warm);
  filter: drop-shadow(0 0 6px rgba(212, 175, 55, 0.4));
  transform: scale(1.05);
}
.app-nav a:active .icon { transform: scale(0.92); }

/* ─────────── MORE PAGE · MENU ─────────── */
.menu-section { padding: 8px 22px 24px; }
.menu-section h3 {
  font-size: 10px; letter-spacing: 3px; text-transform: uppercase;
  color: var(--text-faint); margin: 14px 4px 10px;
  font-weight: 500;
}
.menu-link {
  display: grid; grid-template-columns: 40px 1fr 16px;
  gap: 14px; align-items: center;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(212, 175, 55, 0.12);
  border-radius: 14px;
  text-decoration: none; color: inherit;
  margin-bottom: 8px;
  transition: all 0.25s ease;
}
.menu-link:active { transform: scale(0.99); }
.menu-link .ic {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(212,175,55,0.1), rgba(212,175,55,0.04));
  border: 1px solid rgba(212,175,55,0.15);
  display: grid; place-items: center;
  color: var(--gold-warm);
}
.menu-link .ic .icon { width: 20px; height: 20px; }
.menu-link h4 { font-size: 13.5px; color: var(--forest-deep); font-weight: 500; margin-bottom: 2px; letter-spacing: 0.1px; }
.menu-link p { font-size: 11.5px; color: var(--text-soft); margin: 0; line-height: 1.45; letter-spacing: 0.2px; }
.menu-link .arr { color: var(--text-faint); font-size: 12px; }

/* Install card */
.install-card {
  margin: 14px 22px;
  padding: 24px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), rgba(255, 255, 255, 0.7));
  backdrop-filter: blur(20px);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 18px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(212, 175, 55, 0.08);
}
.install-card h4 { font-family: 'Italiana', serif; font-size: 22px; color: var(--forest-deep); font-weight: 400; margin-bottom: 6px; letter-spacing: 0.01em; }
.install-card p { font-size: 12px; color: var(--text-soft); line-height: 1.55; margin: 0 0 14px; letter-spacing: 0.2px; }
.install-card button {
  background: linear-gradient(135deg, var(--forest-mid), var(--forest-deep));
  color: #fff; border: none;
  padding: 12px 24px; border-radius: 999px;
  font-family: 'Inter', sans-serif; font-size: 12.5px; font-weight: 500;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 8px 20px rgba(15, 36, 25, 0.2);
}
.install-card button:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(15, 36, 25, 0.3); }

/* Misc helpers */
.text-gold { color: var(--gold-warm); }
.italiana { font-family: 'Italiana', serif; font-weight: 400; }
