/* BarkiPets — full styles. Follows the Barkibu design system:
   pale-blue background, white cards, large rounded corners, orange primary,
   ES Rebond Grotesque typography, pill buttons. */

@font-face {
  font-family: 'ES Rebond Grotesque';
  src: local('ES Rebond Grotesque');
  font-display: swap;
}

:root {
  --color-bg: #E8F0F7;
  --color-card: #FFFFFF;
  --color-text: #1A1A2E;
  --color-text-muted: #6B7280;
  --color-text-soft: #9CA3AF;
  --color-primary: #FF6B35;
  --color-primary-hover: #E55A2B;
  --color-primary-soft: #FFF0E9;
  --color-accent-blue: #2563EB;
  --color-divider: #E5E7EB;
  --color-heart: #FF3366;
  --radius-card: 32px;
  --radius-photo: 24px;
  --radius-button: 999px;
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.06);
  --shadow-soft: 0 4px 16px rgba(0, 0, 0, 0.05);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  font-family: 'ES Rebond Grotesque', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input { font-family: inherit; }

/* ===== LANDING (logged-out home) ===== */

.landing {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

.landing .card {
  background: var(--color-card);
  border-radius: var(--radius-card);
  padding: 56px 48px;
  max-width: 480px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-card);
}

.logo { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
.landing .logo { font-size: 32px; margin-bottom: 32px; }
.logo-bark { color: var(--color-accent-blue); }
.logo-pets { color: var(--color-primary); }

.landing h1 {
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin-bottom: 32px;
}

.google-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--color-primary);
  color: white;
  padding: 14px 28px;
  border-radius: var(--radius-button);
  font-size: 16px;
  font-weight: 600;
  transition: background 0.15s ease, transform 0.15s ease;
}
.google-button:hover { background: var(--color-primary-hover); }
.google-button:active { transform: scale(0.98); }
.google-button svg { background: white; border-radius: 50%; padding: 2px; }

.err-msg {
  background: #FEF2F2;
  color: #B91C1C;
  border: 1px solid #FECACA;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 24px;
  font-size: 14px;
  line-height: 1.5;
  text-align: left;
}

.footer-note {
  margin-top: 24px;
  font-size: 13px;
  color: var(--color-text-muted);
}
.footer-note code {
  background: var(--color-bg);
  padding: 2px 8px;
  border-radius: 6px;
  font-family: 'SF Mono', Menlo, monospace;
}

/* ===== APP SHELL (logged-in) ===== */

body.app { background: var(--color-bg); }

.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 24px;
  padding: 16px 32px;
  background: rgba(232, 240, 247, 0.85);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--color-divider);
}

.header-search {
  position: relative;
  max-width: 520px;
  width: 100%;
  justify-self: center;
}

.counters {
  display: flex;
  gap: 4px;
}
.saves-count {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-muted);
  white-space: nowrap;
  padding: 8px 16px;
  border-radius: var(--radius-button);
  transition: background 0.15s ease, color 0.15s ease;
}
.saves-count:hover {
  background: var(--color-card);
  color: var(--color-text);
}

@media (max-width: 720px) {
  .saves-count { padding: 6px 10px; font-size: 12px; }
  .counters { gap: 2px; }
  .app-header { grid-template-columns: auto 1fr auto auto; gap: 12px; }
}

/* Wave button — standalone next to the heart on saved cards (saver is someone else).
   Same skin as the heart-off: white circle stays clean; only the emoji is desaturated.
     - default (not waved): grayscale 👋 inside a clean white circle
     - .is-waved: yellow circle + colored 👋
     - .just-waved (transient 2.2s): "Wave sent" tooltip to the left */
.wave {
  position: absolute;
  right: 60px;
  bottom: 76px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.wave:hover { transform: translateY(-1px); }
.wave:active { transform: scale(0.96); }

.wave .wave-icon {
  font-size: 20px;
  line-height: 1;
  filter: grayscale(1);
  opacity: 0.55;
  transition: filter 0.15s ease, opacity 0.15s ease;
}
.wave.is-waved {
  background: #FFC857;
  box-shadow: 0 4px 14px rgba(255, 200, 87, 0.5);
}
.wave.is-waved .wave-icon {
  filter: none;
  opacity: 1;
}

.wave .wave-tip { display: none; }
.wave.just-waved .wave-tip {
  display: inline-block;
  background: rgba(21, 128, 61, 0.95);
  color: white;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 10px;
  white-space: nowrap;
  position: absolute;
  top: 50%;
  right: calc(100% + 10px);
  transform: translateY(-50%);
  animation: wave-tip-fade 2.2s ease-out forwards;
  pointer-events: none;
  z-index: 2;
}
.wave.just-waved .wave-tip::after {
  content: '';
  position: absolute;
  right: -5px; top: 50%;
  transform: translateY(-50%);
  width: 0; height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 5px solid rgba(21, 128, 61, 0.95);
}
@keyframes wave-tip-fade {
  0% { opacity: 0; transform: translate(6px, -50%); }
  10% { opacity: 1; transform: translate(0, -50%); }
  80% { opacity: 1; transform: translate(0, -50%); }
  100% { opacity: 0; transform: translate(-4px, -50%); }
}

#breed-search {
  width: 100%;
  max-width: 360px;
  padding: 8px 16px;
  border-radius: var(--radius-button);
  border: 1px solid transparent;
  background: var(--color-card);
  font-size: 14px;
  color: var(--color-text);
  outline: none;
  box-shadow: var(--shadow-soft);
  transition: border-color 0.15s ease;
}
#breed-search::placeholder { color: var(--color-text-soft); }
#breed-search:focus { border-color: var(--color-primary); }

.breed-suggest {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--color-card);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  list-style: none;
  overflow: hidden;
  max-height: 320px;
  overflow-y: auto;
}
.suggest-item, .suggest-empty {
  padding: 12px 20px;
  font-size: 15px;
  cursor: pointer;
  color: var(--color-text);
}
.suggest-item:hover { background: var(--color-primary-soft); }
.suggest-empty { color: var(--color-text-soft); cursor: default; }

.user-menu { position: relative; }
.avatar-button {
  padding: 0;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
#user-avatar { width: 40px; height: 40px; object-fit: cover; }
.avatar-initials {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 15px;
}

.user-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: var(--color-card);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  padding: 8px;
}
.user-popover-name {
  padding: 8px 16px 12px;
  font-weight: 600;
  border-bottom: 1px solid var(--color-divider);
  margin-bottom: 4px;
}
.user-popover-link {
  display: block;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 15px;
  color: var(--color-text);
}
.user-popover-link:hover { background: var(--color-primary-soft); }

#app-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 32px 80px;
}

.section { margin-bottom: 56px; }

.section-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 24px;
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.section-header .section-title { margin-bottom: 0; }
.see-more-inline {
  padding: 10px 22px;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.2);
}

.info-tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-bg);
  color: var(--color-text-muted);
  font-family: Georgia, 'Times New Roman', serif;
  font-style: italic;
  font-size: 13px;
  font-weight: 600;
  margin-left: 8px;
  vertical-align: 2px;
  cursor: pointer;
  border: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.info-tip:hover { background: var(--color-primary-soft); color: var(--color-primary); }

.info-popover {
  position: absolute;
  z-index: 50;
  background: var(--color-text);
  color: white;
  padding: 14px 16px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.5;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
  max-width: 320px;
}

.waves-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 480px;
}

/* Top waved BarkiMates — vertical numbered list (variant B from lab).
   Same width as the waves-list (480px) so it sits within the same column
   as the "Your waves" section above it. */
.top-waved-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 480px;
}
.top-waved-see-all {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-primary);
  text-decoration: none;
}
.top-waved-see-all:hover { text-decoration: underline; }
.top-waved-list {
  list-style: none;
  padding: 16px 20px;
  margin: 0;
  background: var(--color-card);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
  max-width: 480px;
}
.top-waved-list-full { max-width: 640px; }
.top-waved-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #f1ecdc;
}
.top-waved-row:last-child { border-bottom: none; }
.tw-rank-name { display: inline-flex; align-items: baseline; gap: 6px; }
.tw-rank { color: var(--color-text-soft); font-weight: 700; font-size: 14px; }
.tw-name { font-weight: 600; font-size: 15px; color: var(--color-text); }
.tw-count { display: inline-flex; align-items: baseline; gap: 4px; font-weight: 700; font-size: 14px; color: #B57600; }
.tw-unit { font-weight: 500; color: var(--color-text-muted); font-size: 12px; }
.top-waved-row.is-zero .tw-name { color: var(--color-text-soft); }
.top-waved-row.is-zero .tw-count { color: var(--color-text-soft); }

/* Visit frequency distribution (admin analytics) */
.visit-dist {
  background: var(--color-card);
  border-radius: 16px;
  padding: 16px 20px;
  box-shadow: var(--shadow-soft);
  max-width: 640px;
  margin-bottom: 28px;
}
.visit-meta {
  display: flex; gap: 8px; flex-wrap: wrap;
  color: var(--color-text-muted);
  font-size: 13px;
  margin-bottom: 14px;
}
.visit-meta strong { color: var(--color-text); }
.visit-row {
  display: grid;
  grid-template-columns: 90px 1fr 70px;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
}
.visit-label { font-size: 13px; color: var(--color-text); font-weight: 600; }
.visit-bar-wrap {
  background: #f1ecdc;
  border-radius: 999px;
  height: 12px;
  overflow: hidden;
}
.visit-bar {
  height: 100%;
  background: #FFC857;
  border-radius: 999px;
  transition: width 0.3s ease;
  min-width: 2px;
}
.visit-num { text-align: right; font-weight: 700; font-size: 13px; color: var(--color-text); }
.visit-pct { display: block; font-size: 11px; color: var(--color-text-muted); font-weight: 500; }

.wave-line {
  background: var(--color-card);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.wave-line:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}
.wave-line-text { flex: 1; min-width: 0; line-height: 1.25; }
.wave-line-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wave-line-action {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 2px;
}
.wave-line-thumb {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
}

/* Analytics page */
.analytics-h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 32px 0 12px;
  color: var(--color-text);
  letter-spacing: -0.01em;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 8px;
}
@media (max-width: 720px) { .stats-grid { grid-template-columns: 1fr 1fr; } }
.stat {
  background: var(--color-card);
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: var(--shadow-soft);
}
.stat-value {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--color-text);
}
.stat-label {
  margin-top: 6px;
  font-size: 12px;
  color: var(--color-text-muted);
  line-height: 1.3;
}
.stat-hint {
  margin-top: 4px;
  font-size: 11px;
  color: var(--color-text-soft);
}
.analytics-note {
  font-size: 13px;
  color: var(--color-text-muted);
  margin: 16px 0 24px;
  padding: 12px 14px;
  background: var(--color-card);
  border-radius: 12px;
  line-height: 1.5;
}
.analytics-table-wrap { overflow-x: auto; }
.analytics-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-card);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  font-size: 13px;
}
.analytics-table th,
.analytics-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--color-divider);
}
.analytics-table th {
  background: var(--color-bg);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
}
.analytics-table tr:last-child td { border-bottom: none; }
.analytics-table .muted { color: var(--color-text-soft); }
.analytics-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 20px;
}
@media (max-width: 900px) { .analytics-cols { grid-template-columns: 1fr; } }

/* Feedback page */
.feedback-section { max-width: 640px; }
.feedback-lead {
  font-size: 16px;
  color: var(--color-text-muted);
  line-height: 1.5;
  margin-bottom: 24px;
}
.feedback-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.feedback-textarea {
  width: 100%;
  border-radius: 18px;
  border: 1px solid var(--color-divider);
  background: var(--color-card);
  padding: 16px 18px;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.5;
  color: var(--color-text);
  outline: none;
  resize: vertical;
  min-height: 160px;
  transition: border-color 0.15s ease;
  box-shadow: var(--shadow-soft);
}
.feedback-textarea:focus { border-color: var(--color-primary); }
.feedback-meta {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.5;
}
.feedback-meta code {
  background: var(--color-bg);
  padding: 2px 8px;
  border-radius: 6px;
  font-family: 'SF Mono', Menlo, monospace;
  font-size: 12px;
  color: var(--color-text);
}
.feedback-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.feedback-submit {
  padding: 12px 28px;
  background: var(--color-primary);
  color: white;
  border-radius: var(--radius-button);
  font-weight: 600;
  font-size: 15px;
  box-shadow: 0 4px 16px rgba(255, 107, 53, 0.25);
  transition: background 0.15s ease, transform 0.15s ease;
}
.feedback-submit:hover:not(:disabled) { background: var(--color-primary-hover); }
.feedback-submit:disabled { opacity: 0.7; cursor: not-allowed; }
.feedback-status {
  font-size: 14px;
  line-height: 1.5;
}
.feedback-status-ok { color: #15803D; }
.feedback-status-err { color: #B91C1C; }

.wave-more {
  background: var(--color-card);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.wave-more:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}
.wave-more-emojis {
  font-size: 22px;
  letter-spacing: -4px;
  flex-shrink: 0;
}
.wave-more-text { flex: 1; line-height: 1.25; min-width: 0; }
.wave-more-headline {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--color-text);
}
.wave-more-cta {
  font-size: 12px;
  color: var(--color-primary);
  margin-top: 2px;
}

.more-avatars {
  background: var(--color-card);
  border-radius: var(--radius-photo);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  min-height: 220px;
}
.more-avatars:hover { transform: translateY(-2px); box-shadow: var(--shadow-card); }
.avatar-stack { display: flex; }
.avatar-stack .av {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid var(--color-card);
  background: var(--color-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  margin-left: -14px;
}
.avatar-stack .av:first-child { margin-left: 0; }
.avatar-stack .av-plus {
  background: var(--color-text-soft);
  color: white;
}
.more-avatars-num {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--color-text);
}
.more-avatars-cta {
  color: var(--color-primary);
  font-weight: 600;
  font-size: 14px;
}

.card-saver-hero {
  font-size: 15px;
  letter-spacing: -0.01em;
  color: var(--color-text);
  line-height: 1.35;
  font-weight: 400;
}
.card-saver-prefix { color: var(--color-text-muted); font-weight: 400; }
.card-saver-name { color: var(--color-text); font-weight: 700; }
.card-saver-sub {
  margin-top: 6px;
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.4;
}

.section-count {
  color: var(--color-text-muted);
  font-size: 14px;
  margin-bottom: 24px;
  margin-top: -16px;
}

.back-link {
  display: inline-block;
  font-size: 14px;
  color: var(--color-text-muted);
  margin-bottom: 16px;
}
.back-link:hover { color: var(--color-text); }

/* ===== GRID ===== */

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* Saved row uses denser layout: 6 cards per row so more fits above the fold. */
.grid-saved { grid-template-columns: repeat(6, 1fr); gap: 12px; }
.grid-saved .card-pet { border-radius: 18px; }
.grid-saved .card-caption { padding: 10px 12px 12px; }
.grid-saved .card-saver-hero { font-size: 13px; line-height: 1.3; }
.grid-saved .card-saver-prefix { font-size: 12px; }
.grid-saved .card-saver-sub { font-size: 11px; margin-top: 4px; line-height: 1.35; }
.grid-saved .card-line { font-size: 12px; }
.grid-saved .heart { width: 32px; height: 32px; bottom: 60px; }
.grid-saved .heart svg { width: 18px; height: 18px; }
.grid-saved .wave { width: 32px; height: 32px; right: 50px; bottom: 60px; }
.grid-saved .wave .wave-icon { font-size: 16px; }
.grid-saved .wave.just-waved .wave-tip { font-size: 10px; padding: 4px 8px; }
.grid-saved .more-avatars { padding: 18px 12px; gap: 10px; min-height: 0; }
.grid-saved .more-avatars .avatar-stack .av {
  width: 34px; height: 34px; font-size: 12px; margin-left: -11px;
}
.grid-saved .more-avatars-num { font-size: 14px; }
.grid-saved .more-avatars-cta { font-size: 12px; }

@media (max-width: 1200px) {
  .grid-saved { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .grid-saved { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .grid-saved { grid-template-columns: repeat(2, 1fr); }
  #app-main { padding: 24px 16px 64px; }
  .app-header { padding: 12px 16px; gap: 12px; }
  .section-title { font-size: 20px; }
}

/* ===== PHOTO CARD ===== */

.card-pet {
  position: relative;
  background: var(--color-card);
  border-radius: var(--radius-photo);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card-pet:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.card-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--color-bg);
}

.heart {
  position: absolute;
  right: 12px;
  bottom: 76px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-soft);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  transition: transform 0.12s ease, color 0.15s ease;
  border: none;
}
.heart svg { width: 22px; height: 22px; }

/* Saves-count badge — only rendered when opts.showSavesCount is on
   (currently the admin-only /most-saved page). */
.heart-count {
  position: absolute;
  bottom: -4px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: white;
  color: var(--color-text);
  font-size: 11px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}
.heart.is-saved .heart-count { background: #FF3366; color: white; }

.heart-count { cursor: pointer; }
.heart-count-tip {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  background: rgba(20, 20, 30, 0.95);
  color: white;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  padding: 8px 12px;
  border-radius: 8px;
  white-space: nowrap;
  text-align: left;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease;
  z-index: 20;
  max-width: 260px;
}
.heart-count-tip::after {
  content: '';
  position: absolute;
  top: 100%;
  right: 12px;
  border: 6px solid transparent;
  border-top-color: rgba(20, 20, 30, 0.95);
}
.heart-count.is-open .heart-count-tip { opacity: 1; }

.card-saver-link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1.5px;
  cursor: pointer;
}
.card-saver-link:hover { text-decoration-thickness: 2px; }
.heart:hover { transform: scale(1.08); }
.heart:active { transform: scale(0.92); }
.heart.is-saved { color: var(--color-heart); }

.card-caption {
  padding: 12px 14px 14px;
}

.card-line {
  font-size: 14px;
  line-height: 1.4;
}
.card-name { font-weight: 400; color: var(--color-text); }
.card-sep { color: var(--color-text-soft); white-space: pre; }
.card-link { color: var(--color-primary); font-weight: 500; }
.card-link:hover { text-decoration: underline; }
.card-link-tag { color: var(--color-accent-blue); }

.card-saved-by,
.card-meta {
  margin-top: 6px;
  font-size: 12px;
  color: var(--color-text-muted);
}

/* ===== SEE MORE CTA ===== */

.see-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}

.see-more {
  display: inline-block;
  padding: 14px 32px;
  background: var(--color-primary);
  color: white;
  border-radius: var(--radius-button);
  font-weight: 600;
  font-size: 15px;
  box-shadow: 0 4px 16px rgba(255, 107, 53, 0.25);
  transition: background 0.15s ease, transform 0.15s ease;
}
.see-more:hover { background: var(--color-primary-hover); }
.see-more:active { transform: scale(0.98); }

/* ===== PROFILE ===== */

.profile-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 40px;
  padding: 32px;
  background: var(--color-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
}

.profile-avatar-wrap { flex-shrink: 0; }
.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
}
.avatar-initials-large {
  width: 72px !important;
  height: 72px !important;
  font-size: 26px !important;
}

.profile-name {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* ===== STATES ===== */

.loading, .empty {
  padding: 48px;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 15px;
}

.empty {
  grid-column: 1 / -1;
  background: var(--color-card);
  border-radius: var(--radius-photo);
  padding: 64px 24px;
}

.feed-sentinel {
  height: 1px;
  margin-top: 20px;
}

/* ===== TOAST ===== */

.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%) translateY(20px);
  background: var(--color-text);
  color: white;
  padding: 12px 24px;
  border-radius: var(--radius-button);
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 100;
}

.toast-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
