/* DeLeeno — pet pages (calvin / hobbes / theo) and the Pets landing page.
   Colors come from each pet's JSON "theme" and are set as CSS variables on #pet-page. */
#pet-page {
  --pet-primary: #555;
  --pet-accent: #e8913a;
  --pet-soft: #eee;
  --pet-bg: #fafafa;
  background: var(--pet-bg);
  min-height: 60vh;
  padding-bottom: 40px;
}

.pet-hero { display: flex; align-items: center; gap: 24px; padding: 24px 0 12px; flex-wrap: wrap; justify-content: center; text-align: center; }
.pet-hero-cover { width: 140px; height: 140px; object-fit: cover; border-radius: 50%; border: 4px solid var(--pet-primary); box-shadow: 0 4px 14px rgba(0,0,0,.12); }
.pet-hero h1 { font-size: 2.5rem; color: var(--pet-primary); margin-bottom: 4px; }
.pet-hero .subtitle { font-size: 1rem; color: var(--color-text-light); }

.pet-stats { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 8px 0 20px; }
.pet-stat { background: white; border-radius: 12px; padding: 10px 18px; box-shadow: 0 2px 8px rgba(0,0,0,.06); border-top: 3px solid var(--pet-accent); min-width: 130px; }
.pet-stat-v { font-weight: 700; color: var(--pet-primary); }
.pet-stat-k { font-size: .75rem; color: var(--color-text-light); text-transform: uppercase; letter-spacing: .04em; }

#pet-page .tab-nav a.active { color: var(--pet-primary); }
#pet-page .tab-nav a.active::after { background: var(--pet-primary); }

.pet-hint { text-align: center; font-size: .75rem; color: var(--color-text-light); font-style: italic; margin-bottom: 12px; }
.pet-paw-float { position: fixed; pointer-events: none; font-size: 1.5rem; z-index: 100; animation: petFloat 1.2s ease-out forwards; }
@keyframes petFloat { 0% { opacity: 1; transform: translateY(0) scale(1); } 100% { opacity: 0; transform: translateY(-80px) scale(1.5); } }

/* About */
.pet-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.pet-fact { background: white; border-radius: 16px; padding: 16px; text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,.06); border-bottom: 4px solid var(--pet-soft); transition: transform .2s; }
.pet-fact:hover { transform: translateY(-3px); }
.pet-fact-emoji { font-size: 2rem; margin-bottom: 6px; }
.pet-fact-label { font-size: .75rem; color: var(--color-text-light); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
.pet-fact-value { font-weight: 600; }
.pet-empty { color: var(--color-text-light); text-align: center; padding: 24px; }

/* Timeline */
.pet-timeline { max-width: 680px; margin: 0 auto; }
.pet-tl-year { font-weight: 700; color: var(--pet-primary); font-size: 1.25rem; margin: 20px 0 8px; }
.pet-tl-item { display: flex; gap: 14px; padding: 0 0 16px 0; position: relative; }
.pet-tl-item::before { content: ''; position: absolute; left: 7px; top: 18px; bottom: 0; width: 2px; background: var(--pet-soft); }
.pet-tl-dot { flex: 0 0 16px; height: 16px; border-radius: 50%; background: var(--pet-primary); margin-top: 3px; position: relative; z-index: 1; }
.pet-tl-calendar .pet-tl-dot { background: white; border: 3px solid var(--pet-accent); }
.pet-tl-body { background: white; border-radius: 12px; padding: 10px 14px; box-shadow: 0 2px 6px rgba(0,0,0,.05); flex: 1; }
.pet-tl-date { font-size: .8rem; color: var(--color-text-light); }
.pet-tl-src { font-size: .7rem; background: var(--pet-soft); border-radius: 8px; padding: 1px 6px; margin-left: 4px; }
.pet-tl-title { font-weight: 600; }
.pet-tl-desc { font-size: .9rem; color: var(--color-text-light); margin-top: 2px; }
.pet-tl-album { font-size: .85rem; display: inline-block; margin-top: 4px; }
.pet-tl-locked { text-align: center; margin-top: 12px; }
.pet-tl-locked button { background: var(--pet-soft); border: none; border-radius: 20px; padding: 8px 16px; cursor: pointer; font: inherit; color: var(--pet-primary); }

/* Gallery */
.pet-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.pet-photo { margin: 0; cursor: pointer; border-radius: 12px; overflow: hidden; background: white; box-shadow: 0 2px 6px rgba(0,0,0,.06); }
.pet-photo img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.pet-photo figcaption { font-size: .8rem; padding: 6px 8px; color: var(--color-text-light); }
.pet-placeholder { border-color: var(--pet-soft); grid-column: 1 / -1; }
.pet-section-title { font-weight: 700; color: var(--pet-primary); margin: 28px 0 10px; }
.pet-album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.pet-album { background: white; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 6px rgba(0,0,0,.06); color: inherit; text-decoration: none; }
.pet-album img, .pet-album-noimg { width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block; }
.pet-album-noimg { display: flex; align-items: center; justify-content: center; font-size: 2rem; background: var(--pet-soft); }
.pet-album-body { padding: 8px 12px; }
.pet-album-title { font-weight: 600; }
.pet-album-meta { font-size: .8rem; color: var(--color-text-light); }

.pet-lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.88); display: none; align-items: center; justify-content: center; flex-direction: column; z-index: 200; }
.pet-lightbox img { max-width: 92vw; max-height: 80vh; border-radius: 8px; }
.pet-lb-cap { color: #eee; margin-top: 10px; font-size: .9rem; }
.pet-lightbox button { position: absolute; background: none; border: none; color: white; font-size: 2.2rem; cursor: pointer; padding: 12px; }
.pet-lb-close { top: 10px; right: 14px; }
.pet-lb-prev { left: 10px; top: 50%; transform: translateY(-50%); }
.pet-lb-next { right: 10px; top: 50%; transform: translateY(-50%); }

/* Pets landing page */
.pets-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.pets-card-emoji { font-size: 4rem; height: 200px; display: flex; align-items: center; justify-content: center; }
