@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap");

:root {
  --bg-cream: #fff5e8;
  --bg-apricot: #ffd7ba;
  --bg-mint: #d2f0e2;
  --bg-sky: #cbe8ff;
  --ink: #181613;
  --ink-soft: #5f574d;
  --surface: rgba(255, 250, 244, 0.9);
  --surface-strong: #fffdf9;
  --surface-muted: rgba(255, 255, 255, 0.7);
  --border-soft: rgba(61, 47, 34, 0.14);
  --accent-like: #18805e;
  --accent-nope: #c84b3f;
  --accent-warm: #f0a437;
  --shadow-lg: 0 32px 70px rgba(39, 27, 14, 0.2);
  --shadow-md: 0 14px 36px rgba(39, 27, 14, 0.13);
  --radius-xl: 30px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 22px;
  --space-6: 30px;
  --focus-ring: rgba(24, 128, 94, 0.35);
}

* {
  box-sizing: border-box;
}

*:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

html,
body {
  width: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  background: radial-gradient(circle at 12% -10%, #fff 0%, transparent 52%),
    radial-gradient(circle at 90% -8%, var(--bg-sky) 0%, transparent 46%),
    linear-gradient(135deg, var(--bg-cream), var(--bg-apricot));
  overflow-x: hidden;
}

.background {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

.glow {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(58px);
  opacity: 0.52;
}

.glow-a {
  background: var(--bg-mint);
  right: -80px;
  top: -140px;
}

.glow-b {
  background: #ffc6bf;
  left: -110px;
  bottom: -170px;
}

.grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.16) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: 0.35;
}

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  padding: clamp(18px, 3vw, 34px) clamp(16px, 4vw, 44px)
    calc(30px + env(safe-area-inset-bottom));
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
}

.topbar-meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  justify-content: flex-end;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.brand-mark {
  width: 56px;
  height: 56px;
  border-radius: 17px;
  background: linear-gradient(145deg, #ff7a59, #1b9f79);
  box-shadow: 0 10px 26px rgba(27, 159, 121, 0.35);
  color: #fff;
  font-weight: 700;
  font-size: 1.08rem;
  display: grid;
  place-items: center;
}

.brand h1 {
  margin: 0;
  font-family: "Fraunces", "Times New Roman", serif;
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  line-height: 1;
}

.brand p {
  margin: var(--space-1) 0 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.stats {
  padding: 9px 14px;
  border-radius: 999px;
  background: var(--surface-muted);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: var(--shadow-md);
  color: #3e3328;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.hero {
  width: min(96vw, 780px);
  margin: 0 auto;
  display: grid;
  gap: var(--space-2);
  text-align: center;
}

.hero-kicker {
  margin: 0;
  color: var(--accent-like);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.77rem;
  font-weight: 700;
}

.hero h2 {
  margin: 0;
  font-family: "Fraunces", "Times New Roman", serif;
  font-size: clamp(1.34rem, 3.8vw, 2rem);
  line-height: 1.16;
}

.hero-copy {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.96rem;
}

.flash {
  width: min(92vw, 620px);
  margin: 0 auto;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(24, 128, 94, 0.13);
  border: 1px solid rgba(24, 128, 94, 0.24);
  color: #0d5a41;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
}

.filter-strip {
  width: min(96vw, 1020px);
  margin: 0 auto;
}

.breed-filter-form {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr)) auto;
  align-items: end;
  gap: 10px;
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow-md);
}

.breed-filter-form .filter-field {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.breed-filter-form label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-soft);
}

.breed-filter-form input[type="text"],
.breed-filter-form input[type="number"],
.breed-filter-form select {
  width: 100%;
  min-height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(24, 22, 19, 0.14);
  background: rgba(255, 255, 255, 0.9);
  padding: 8px 10px;
  color: var(--ink);
  font-size: 0.9rem;
}

.breed-filter-form select {
  appearance: none;
}

.btn.filter {
  min-height: 40px;
}

.clear-filter {
  align-self: end;
  color: #735a3a;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 6px;
}

.clear-filter:hover {
  text-decoration: underline;
}

main {
  flex: 1;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: var(--space-4);
  align-items: center;
}

.stack {
  position: relative;
  width: min(92vw, 440px);
  height: min(72vh, 580px);
  margin: 0 auto;
}

.state {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-xl);
  background: var(--surface-strong);
  border: 1px dashed var(--border-soft);
  box-shadow: var(--shadow-lg);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 34px 26px;
  color: var(--ink-soft);
  line-height: 1.45;
  font-size: 1rem;
}

.state::before {
  content: "";
  width: 58px;
  height: 58px;
  border-radius: 50%;
  margin-bottom: var(--space-3);
  background: linear-gradient(145deg, rgba(255, 122, 89, 0.2), rgba(24, 128, 94, 0.2));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.state-empty::before {
  background: linear-gradient(145deg, rgba(240, 164, 55, 0.2), rgba(24, 128, 94, 0.2));
}

.state-error {
  border-color: rgba(200, 75, 63, 0.35);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(255, 238, 236, 0.9));
}

.state-complete {
  position: relative;
  overflow: hidden;
  border-color: rgba(24, 128, 94, 0.34);
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.95), rgba(223, 248, 238, 0.9));
}

.state-complete::before {
  display: none;
}

.complete-title {
  margin: 0;
  font-family: "Fraunces", "Times New Roman", serif;
  font-size: clamp(1.42rem, 3vw, 1.9rem);
  color: #0e5b43;
  animation: complete-pop 300ms ease-out both;
}

.complete-copy {
  margin: 10px 0 0;
  font-size: 0.96rem;
  color: #305347;
  max-width: 260px;
}

.celebrate-burst {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.burst-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.4);
  animation: burst-pop 720ms ease-out both;
}

.dot-a {
  background: #ff7a59;
  animation-delay: 20ms;
  --x: -112px;
  --y: -92px;
}

.dot-b {
  background: #1b9f79;
  animation-delay: 70ms;
  --x: -48px;
  --y: -118px;
}

.dot-c {
  background: #f0a437;
  animation-delay: 100ms;
  --x: 98px;
  --y: -84px;
}

.dot-d {
  background: #c84b3f;
  animation-delay: 140ms;
  --x: 120px;
  --y: 30px;
}

.dot-e {
  background: #55a4e0;
  animation-delay: 180ms;
  --x: -98px;
  --y: 66px;
}

.dot-f {
  background: #7dba66;
  animation-delay: 220ms;
  --x: 18px;
  --y: 110px;
}

@keyframes complete-pop {
  0% {
    transform: scale(0.92);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes burst-pop {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.35);
  }
  20% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) scale(1);
  }
}

.card {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: var(--surface-strong);
  box-shadow: var(--shadow-lg);
  transition: transform 0.25s ease, opacity 0.25s ease;
  touch-action: pan-y;
  user-select: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.card.is-dragging {
  cursor: grabbing;
}

.card-photo {
  position: relative;
  flex: 0 0 clamp(230px, 46vh, 430px);
  background: linear-gradient(135deg, rgba(255, 122, 89, 0.2), rgba(31, 156, 126, 0.24));
}

.card-photo::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 34%;
  background: linear-gradient(to top, rgba(22, 15, 9, 0.34), transparent);
  pointer-events: none;
}

.card-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.photo-fallback {
  height: 100%;
  display: grid;
  place-items: center;
  font-family: "Fraunces", "Times New Roman", serif;
  font-size: 2.25rem;
  color: rgba(24, 22, 19, 0.7);
}

.swipe-indicator {
  position: absolute;
  top: 18px;
  border-radius: 12px;
  padding: 9px 14px;
  border: 2px solid currentColor;
  background: rgba(255, 255, 255, 0.86);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.82rem;
  font-weight: 700;
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.card-photo.has-carousel .swipe-indicator {
  top: 66px;
}

.swipe-indicator.like {
  left: 18px;
  color: var(--accent-like);
}

.swipe-indicator.nope {
  right: 18px;
  color: var(--accent-nope);
}

.card.show-like .swipe-indicator.like,
.card.show-nope .swipe-indicator.nope {
  opacity: 1;
  transform: scale(1);
}

.card-body {
  display: grid;
  gap: var(--space-3);
  padding: 18px 20px 20px;
  flex: 0 0 auto;
  overflow: visible;
}

.card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.card-title h2 {
  margin: 0;
  font-family: "Fraunces", "Times New Roman", serif;
  font-size: clamp(1.44rem, 2.8vw, 1.86rem);
  line-height: 1.1;
}

.age-pill {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(24, 128, 94, 0.12);
  color: #0f6047;
  font-size: 0.81rem;
  font-weight: 700;
  white-space: nowrap;
}

.card-facts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.card-facts span {
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.82rem;
  color: #4a4138;
  background: rgba(24, 22, 19, 0.08);
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.badge {
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(24, 128, 94, 0.14);
  color: #0f6047;
  font-size: 0.82rem;
  font-weight: 700;
}

.badge-provider {
  background: rgba(240, 164, 55, 0.2);
  color: #855600;
}

.description-wrap {
  display: grid;
  gap: var(--space-2);
}

.description-label {
  margin: 0;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

.description {
  margin: 0;
  color: #2f2924;
  line-height: 1.5;
}

.provider-panel {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.55);
}

.provider-label {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  font-weight: 700;
}

.card-profile-link {
  width: fit-content;
}

.provider-missing {
  color: var(--ink-soft);
  font-size: 0.88rem;
  font-weight: 600;
}

.carousel-controls {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--space-2);
}

.card-photo .carousel-controls {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  z-index: 3;
  pointer-events: none;
}

.carousel-controls form {
  margin: 0;
}

.card-photo .carousel-controls form,
.card-photo .carousel-controls .carousel-middle {
  pointer-events: auto;
}

.carousel-btn {
  border: none;
  border-radius: 999px;
  padding: 8px 12px;
  min-height: 38px;
  cursor: pointer;
  background: rgba(24, 22, 19, 0.1);
  color: var(--ink);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 700;
}

.card-photo .carousel-btn {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(24, 22, 19, 0.12);
  box-shadow: 0 10px 18px rgba(24, 22, 19, 0.2);
}

.carousel-btn:hover {
  background: rgba(24, 22, 19, 0.15);
}

.carousel-middle {
  display: grid;
  gap: 5px;
  justify-items: center;
}

.card-photo .carousel-middle {
  min-height: 38px;
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(24, 22, 19, 0.12);
  box-shadow: 0 10px 18px rgba(24, 22, 19, 0.12);
}

.carousel-meta {
  font-size: 0.8rem;
  color: var(--ink-soft);
  font-weight: 600;
}

.carousel-dots {
  display: flex;
  align-items: center;
  gap: 5px;
}

.carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(24, 22, 19, 0.22);
}

.carousel-dot.is-active {
  width: 18px;
  background: var(--accent-like);
}

.controls {
  width: min(92vw, 440px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  border-radius: var(--radius-lg);
  padding: 10px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-md);
}

.controls form {
  margin: 0;
}

.btn {
  width: 100%;
  min-height: 48px;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(1px) scale(0.98);
}

.btn.nope {
  background: rgba(200, 75, 63, 0.16);
  color: #9d372c;
  box-shadow: 0 12px 26px rgba(200, 75, 63, 0.2);
}

.btn.refresh {
  background: rgba(240, 164, 55, 0.19);
  color: #855600;
  box-shadow: 0 12px 26px rgba(240, 164, 55, 0.18);
}

.btn.filter {
  min-height: 40px;
  padding: 0 14px;
  width: auto;
  background: rgba(24, 22, 19, 0.12);
  color: #3f352b;
  box-shadow: none;
  font-size: 0.78rem;
}

.btn.like {
  background: rgba(24, 128, 94, 0.18);
  color: #0f6047;
  box-shadow: 0 12px 26px rgba(24, 128, 94, 0.2);
}

.ecosystem {
  width: min(92vw, 440px);
  margin: 0 auto;
  padding: 14px;
  display: grid;
  gap: var(--space-2);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.84), rgba(244, 255, 250, 0.82));
  border: 1px solid rgba(31, 156, 126, 0.24);
  box-shadow: var(--shadow-md);
}

.ecosystem h3 {
  margin: 0;
  font-family: "Fraunces", "Times New Roman", serif;
  font-size: 1.14rem;
}

.ecosystem-copy {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.38;
}

.subscribe-form {
  display: grid;
  gap: 8px;
}

.subscribe-label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #3d544a;
}

.subscribe-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.subscribe-row input {
  width: 100%;
  min-height: 46px;
  border-radius: 11px;
  border: 1px solid rgba(31, 156, 126, 0.26);
  padding: 10px 12px;
  font-size: 0.94rem;
  color: #2d2823;
  background: rgba(255, 255, 255, 0.95);
}

.subscribe-row input::placeholder {
  color: #8b837a;
}

.btn.subscribe {
  background: rgba(24, 128, 94, 0.15);
  color: #0f6047;
  box-shadow: 0 10px 22px rgba(24, 128, 94, 0.16);
}

.footer {
  width: min(92vw, 440px);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  color: var(--ink-soft);
  font-size: 0.86rem;
}

.footer-copy {
  margin: 0;
  color: var(--ink-soft);
}

.profile-link {
  color: #0f6047;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.profile-link:hover {
  text-decoration: underline;
}

.top-profile-link {
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-md);
  font-size: 0.86rem;
}

.account-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  justify-content: flex-end;
}

.account-email {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.9);
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-weight: 600;
  max-width: min(70vw, 280px);
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.account-link {
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-md);
  font-size: 0.86rem;
}

.inline-form {
  margin: 0;
}

.inline-form .btn {
  width: auto;
  min-height: 36px;
  padding: 0 12px;
  letter-spacing: 0.05em;
  font-size: 0.74rem;
}

.btn.subtle {
  background: rgba(24, 22, 19, 0.1);
  color: #3f352b;
  box-shadow: none;
}

.auth-shell {
  width: min(92vw, 500px);
  margin: 0 auto;
}

.auth-card {
  display: grid;
  gap: var(--space-3);
  border-radius: var(--radius-xl);
  background: var(--surface-strong);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-lg);
  padding: clamp(18px, 3vw, 28px);
}

.auth-card h2 {
  margin: 0;
  font-family: "Fraunces", "Times New Roman", serif;
  font-size: 1.52rem;
}

.auth-copy {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.45;
}

.auth-form {
  display: grid;
  gap: 8px;
}

.auth-form label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.auth-form input[type="email"],
.auth-form input[type="password"] {
  width: 100%;
  min-height: 46px;
  border-radius: 11px;
  border: 1px solid rgba(24, 22, 19, 0.14);
  padding: 10px 12px;
  font-size: 0.94rem;
  color: #2d2823;
  background: rgba(255, 255, 255, 0.95);
}

.likes-shell {
  width: min(96vw, 980px);
  margin: 0 auto;
}

.catalog-page .filter-strip {
  width: min(98vw, 1760px);
}

.catalog-shell {
  width: min(98vw, 1760px);
}

.likes-filter-strip {
  width: min(96vw, 980px);
  margin: 0 auto 10px;
  border-radius: var(--radius-lg);
  background: var(--surface-strong);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-md);
  padding: 12px;
}

.likes-filter-form {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}

.likes-filter-field {
  display: grid;
  gap: 6px;
}

.likes-filter-field label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.likes-filter-field input,
.likes-filter-field select {
  width: 100%;
  min-height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(24, 22, 19, 0.14);
  padding: 8px 10px;
  font-size: 0.88rem;
  color: #2d2823;
  background: rgba(255, 255, 255, 0.95);
}

.likes-bulk-actions {
  width: min(96vw, 980px);
  margin: 0 auto 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.likes-bulk-actions form {
  margin: 0;
}

.liked-grid {
  display: grid;
  gap: 12px;
}

.catalog-grid {
  grid-template-columns: repeat(auto-fill, minmax(clamp(210px, 15vw, 250px), 1fr));
  gap: 10px;
  align-items: stretch;
}

.liked-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: var(--space-4);
  border-radius: var(--radius-lg);
  background: var(--surface-strong);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-md);
  padding: 12px;
}

.liked-card.is-unavailable {
  opacity: 0.62;
  filter: grayscale(0.45);
}

.liked-card.is-unavailable .liked-photo img {
  filter: grayscale(1);
}

.liked-photo {
  border-radius: 14px;
  overflow: hidden;
  background: rgba(24, 22, 19, 0.06);
  min-height: 150px;
}

.liked-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.liked-body {
  display: grid;
  gap: 8px;
  align-content: start;
}

.liked-body h3 {
  margin: 0;
  font-family: "Fraunces", "Times New Roman", serif;
  font-size: 1.25rem;
}

.liked-meta,
.liked-time,
.liked-id {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.liked-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}

.liked-actions .btn {
  width: auto;
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
}

.catalog-card {
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 10px;
}

.catalog-card .liked-photo {
  min-height: 165px;
}

.catalog-card .liked-body {
  gap: 6px;
}

.catalog-card .liked-body h3 {
  font-size: 1.08rem;
}

.catalog-card .liked-meta,
.catalog-card .liked-time,
.catalog-card .liked-id {
  font-size: 0.82rem;
}

.catalog-card .liked-meta {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.catalog-card .liked-actions {
  justify-content: space-between;
  gap: 8px;
}

.catalog-card .liked-actions .btn {
  min-height: 32px;
}

.badge-unavailable {
  background: rgba(115, 43, 43, 0.14);
  color: #6f2525;
}

.btn.subtle.danger {
  color: #7e2b2b;
  border-color: rgba(126, 43, 43, 0.3);
  background: rgba(126, 43, 43, 0.08);
}

.btn.subtle.danger:hover {
  background: rgba(126, 43, 43, 0.16);
}

@keyframes floatIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.card.enter {
  animation: floatIn 0.32s ease;
}

@media (max-width: 900px) {
  .app {
    padding-top: 18px;
    gap: 18px;
  }

  .stack {
    height: min(68vh, 540px);
  }
}

@media (max-width: 640px) {
  body {
    padding-bottom: calc(94px + env(safe-area-inset-bottom));
  }

  .signin-page .auth-shell {
    width: min(98vw, 520px);
  }

  .signin-page .auth-card {
    gap: 10px;
    padding: 14px 14px 16px;
  }

  .signin-page .auth-card h2 {
    font-size: 1.28rem;
  }

  .signin-page .auth-form {
    gap: 6px;
  }

  .signin-page .auth-copy {
    font-size: 0.9rem;
    line-height: 1.35;
  }

  .signin-page .auth-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 12px;
  }

  .signin-page .auth-links .profile-link {
    font-size: 0.84rem;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar-meta {
    width: 100%;
    justify-content: space-between;
  }

  .account-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .hero {
    text-align: left;
  }

  .breed-filter-form {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .btn.filter {
    width: 100%;
  }

  .clear-filter {
    padding-left: 0;
  }

  .liked-card {
    grid-template-columns: 1fr;
  }

  .likes-filter-form {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .catalog-shell {
    width: min(96vw, 980px);
  }

  .catalog-page .filter-strip {
    width: min(96vw, 1020px);
  }

  .catalog-grid {
    grid-template-columns: 1fr;
  }

  .liked-photo {
    min-height: 220px;
  }

  .stack {
    width: min(94vw, 440px);
    height: min(64vh, 500px);
  }

  .card-photo {
    flex-basis: clamp(210px, 42vh, 360px);
  }

  .card-photo .carousel-controls {
    top: 8px;
    left: 8px;
    right: 8px;
  }

  .card-photo .carousel-btn {
    min-height: 34px;
    padding: 6px 10px;
    font-size: 0.7rem;
  }

  .card-photo .carousel-middle {
    min-height: 34px;
    padding: 5px 10px;
  }

  .card-photo.has-carousel .swipe-indicator {
    top: 56px;
  }

  .controls {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(10px + env(safe-area-inset-bottom));
    width: min(94vw, 460px);
    z-index: 50;
    backdrop-filter: blur(6px);
  }

  .subscribe-row {
    grid-template-columns: 1fr;
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding-bottom: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
