:root {
  --accent: #5C5496;
  --accent-deep: #3E3770;
  --accent-soft: rgba(92, 84, 150, 0.12);
  --accent-ring: rgba(92, 84, 150, 0.28);
  --surface: #F0F0F7;
  --surface-alt: #E7E6F2;
  --card: #FFFFFF;
  --polaroid: #FFFFFF;
  --ink: #1D1B2A;
  --muted: #6A667D;
  --line: rgba(29, 27, 42, 0.09);
  --gold: #B47812;
  --gold-bg: #FEF4DB;
  --gold-line: rgba(180, 120, 18, 0.24);
  --heart: #E04F6E;
  --hero-a: #241F46;
  --hero-b: #3E3770;
  --hero-c: #5C5496;
  --shadow-sm: 0 2px 10px rgba(24, 20, 46, 0.06);
  --shadow-md: 0 10px 28px rgba(24, 20, 46, 0.09);
  --polaroid-shadow: 0 4px 14px rgba(24, 20, 46, 0.10), 0 1px 3px rgba(24, 20, 46, 0.07);
  --polaroid-shadow-hover: 0 14px 30px rgba(24, 20, 46, 0.15), 0 3px 8px rgba(24, 20, 46, 0.08);
  --font: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

[data-theme="plum"] {
  --accent: #7D4E8D;
  --accent-deep: #583466;
  --accent-soft: rgba(125, 78, 141, 0.12);
  --accent-ring: rgba(125, 78, 141, 0.28);
  --surface: #F5F0F5;
  --surface-alt: #EDE4EE;
  --hero-a: #341D3D;
  --hero-b: #583466;
  --hero-c: #7D4E8D;
}

[data-theme="ginger"] {
  --accent: #D96B43;
  --accent-deep: #A44A29;
  --accent-soft: rgba(217, 107, 67, 0.13);
  --accent-ring: rgba(217, 107, 67, 0.30);
  --surface: #F7F0E6;
  --surface-alt: #EFE4D4;
  --hero-a: #422217;
  --hero-b: #7F3921;
  --hero-c: #C85E38;
}

[data-theme="coral"] {
  --accent: #C85A6E;
  --accent-deep: #943A4B;
  --accent-soft: rgba(200, 90, 110, 0.12);
  --accent-ring: rgba(200, 90, 110, 0.28);
  --surface: #F7EDF0;
  --surface-alt: #EFE0E5;
  --hero-a: #3F1C24;
  --hero-b: #7A3040;
  --hero-c: #B84D61;
}

[data-theme="forest"] {
  --accent: #3D7A68;
  --accent-deep: #285649;
  --accent-soft: rgba(61, 122, 104, 0.12);
  --accent-ring: rgba(61, 122, 104, 0.28);
  --surface: #EDF5F0;
  --surface-alt: #E0ECE5;
  --hero-a: #173028;
  --hero-b: #285649;
  --hero-c: #3D7A68;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--surface);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.wrap {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Sticky Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.08rem;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
}

.nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--muted);
}

.nav a:hover, .nav a.active { color: var(--accent); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.theme-dots {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
}

.t-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid transparent;
  padding: 0;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.t-dot:hover { transform: scale(1.15); }
.t-dot.on { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--ink); }
.t-dot[data-t="indigo"] { background: #5C5496; }
.t-dot[data-t="plum"]   { background: #7D4E8D; }
.t-dot[data-t="ginger"] { background: #D96B43; }
.t-dot[data-t="coral"]  { background: #C85A6E; }
.t-dot[data-t="forest"] { background: #3D7A68; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease, background-color 0.2s ease;
}

.btn:hover { transform: translateY(-1px); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-soft { background: var(--accent-soft); color: var(--accent); }
.btn-ghost { background: rgba(255, 255, 255, 0.14); color: #fff; border-color: rgba(255, 255, 255, 0.24); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.22); }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(640px 420px at 14% 16%, rgba(255, 255, 255, 0.14), transparent 65%),
    radial-gradient(560px 420px at 88% 82%, rgba(255, 214, 153, 0.16), transparent 65%),
    linear-gradient(135deg, var(--hero-a) 0%, var(--hero-b) 52%, var(--hero-c) 100%);
  padding: 56px 0 64px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  align-items: center;
  gap: 44px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.94);
  margin-bottom: 18px;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(2.15rem, 4.4vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.hero h1 em {
  font-style: normal;
  color: #FFE4A8;
}

.hero-lead {
  margin: 0 0 26px;
  font-size: 1.08rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.86);
  max-width: 520px;
}

.hero-cta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 24px;
}

.store-badge img {
  height: 48px;
  width: auto;
  transition: transform 0.15s ease;
}

.store-badge:hover img { transform: translateY(-2px); }

.theme-picker {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 26px;
}

.theme-picker-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.theme-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 7px;
}

.theme-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.92);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.theme-chip:hover { background: rgba(255, 255, 255, 0.20); transform: translateY(-1px); }
.theme-chip.on { background: #fff; color: #1D1B2A; border-color: #fff; }
.swatch { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex-shrink: 0; }

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-stat strong {
  display: block;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.1;
}

.hero-stat span {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.72);
}

/* Dual Framed iPhones */
.hero-stage {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 460px;
}

.phone-main {
  width: 268px;
  height: auto;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 28px 46px rgba(12, 9, 28, 0.45));
  transform: translateX(-22px) rotate(-1.5deg);
}

.phone-back {
  width: 226px;
  height: auto;
  position: relative;
  z-index: 1;
  margin-left: -68px;
  margin-top: 38px;
  filter: drop-shadow(0 22px 36px rgba(12, 9, 28, 0.38));
  transform: rotate(3.5deg);
  opacity: 0.96;
}

/* Sections */
.section {
  padding: 64px 0;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.kicker {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.55rem, 2.8vw, 2.15rem);
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.section-head p {
  margin: 6px 0 0;
  color: var(--muted);
  max-width: 560px;
}

.more-link {
  font-weight: 700;
  font-size: 0.94rem;
  color: var(--accent);
  white-space: nowrap;
}

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

/* Authentic Polaroid Print Cards */
.polaroid-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.polaroid {
  background: var(--polaroid);
  border-radius: 2px;
  padding: 10px 10px 18px;
  border: 1px solid rgba(29, 27, 42, 0.12);
  box-shadow: var(--polaroid-shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.polaroid:hover {
  transform: translateY(-4px);
  box-shadow: var(--polaroid-shadow-hover);
}

.polaroid-media {
  position: relative;
  border-radius: 0;
  overflow: hidden;
  background: var(--surface-alt);
  aspect-ratio: 1 / 1;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.polaroid-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.badge-crown {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
  background: var(--gold-bg);
  color: var(--gold);
  border: 1px solid var(--gold-line);
}

.polaroid-media .badge-crown {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(254, 244, 219, 0.94);
  color: #8A5804;
  border-color: rgba(180, 120, 18, 0.35);
}

.pill-likes {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
  background: rgba(24, 20, 38, 0.74);
  color: #fff;
  backdrop-filter: blur(6px);
}

.pill-likes span { color: #FF7B96; }

.pill-trait {
  position: absolute;
  bottom: 8px;
  left: 8px;
  max-width: calc(100% - 16px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
}

.polaroid-chin {
  padding: 13px 4px 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: 1;
}

.polaroid-title {
  font-size: 0.94rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cat-name {
  color: var(--ink);
  font-weight: 800;
}

.cat-sep {
  color: var(--muted);
  opacity: 0.6;
}

.cat-caption {
  color: var(--muted);
  font-weight: 600;
}

.cat-caption.solo {
  color: var(--ink);
  font-weight: 700;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.trait-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  background: var(--accent-soft);
  color: var(--accent);
}

.polaroid-meta {
  margin-top: auto;
  padding-top: 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.76rem;
  color: var(--muted);
}

.polaroid-user {
  font-weight: 700;
  color: var(--accent);
}

/* World Map & Country Rankings */
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.map-bento {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.85fr);
  gap: 28px;
  align-items: center;
}

.map-box {
  background: var(--surface);
  border-radius: 18px;
  padding: 18px;
  border: 1px solid var(--line);
}

.world-svg svg {
  width: 100%;
  height: auto;
  display: block;
}

.world-svg path {
  fill: var(--surface-alt);
  stroke: var(--card);
  stroke-width: 0.6;
  transition: fill 0.18s ease, opacity 0.18s ease;
}

.world-svg a path {
  fill: var(--accent);
  cursor: pointer;
}

.world-svg a:hover path {
  fill: var(--accent-deep);
}

.map-caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  font-size: 0.82rem;
  color: var(--muted);
}

.rank-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rank-row {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.rank-row:hover {
  transform: translateX(3px);
  border-color: var(--accent-ring);
}

.rank-flag {
  font-size: 1.35rem;
  text-align: center;
  line-height: 1;
}

.rank-name {
  font-weight: 700;
  font-size: 0.94rem;
}

.rank-bar {
  height: 5px;
  border-radius: 99px;
  background: var(--surface-alt);
  margin-top: 5px;
  overflow: hidden;
}

.rank-bar span {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--accent);
}

.rank-num {
  text-align: right;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--accent);
}

.rank-num small {
  display: block;
  font-weight: 600;
  color: var(--muted);
  font-size: 0.74rem;
}

/* AI & Breeds Spotlight */
.spotlight {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 40px;
  align-items: center;
}

.phone-duo {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 16px;
}

.phone-card {
  width: 224px;
  height: auto;
  filter: drop-shadow(0 18px 32px rgba(24, 20, 46, 0.22));
}

.phone-card.offset {
  width: 204px;
  margin-bottom: 24px;
}

.ai-chat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  margin: 18px 0 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-sm);
}

.bubble {
  max-width: 88%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 0.88rem;
  line-height: 1.42;
}

.bubble-q {
  align-self: flex-end;
  background: var(--accent);
  color: #fff;
  border-bottom-right-radius: 5px;
  font-weight: 600;
}

.bubble-a {
  align-self: flex-start;
  background: var(--surface);
  color: var(--ink);
  border-bottom-left-radius: 5px;
}

.tag-group { margin-top: 16px; }
.tag-group-title {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 10px;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
  background: var(--card);
  border: 1px solid var(--line);
  transition: border-color 0.15s ease, transform 0.15s ease, background-color 0.15s ease;
}

.tag-link:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
  color: var(--accent);
}

.tag-link.breed {
  background: var(--gold-bg);
  color: var(--gold);
  border-color: var(--gold-line);
}

.tag-link em {
  font-style: normal;
  opacity: 0.65;
  font-size: 0.78rem;
}

/* Built for Cat Lovers Bento Cards */
.bento-4 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.bento-card {
  background: var(--card);
  border: 1px solid color-mix(in srgb, var(--c1, var(--accent)) 18%, var(--line));
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.bento-card.b-album   { --c1: #5C5496; --c2: #8579C2; --card-bg: #F8F7FC; }
.bento-card.b-likes   { --c1: #C85A6E; --c2: #E67A8E; --card-bg: #FDF6F8; }
.bento-card.b-focus   { --c1: #D96B43; --c2: #EE9163; --card-bg: #FDF8F2; }
.bento-card.b-privacy { --c1: #3D7A68; --c2: #5CA18C; --card-bg: #F4FAF7; }

.bento-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.bento-icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--c1, var(--accent)), var(--c2, var(--accent-deep)));
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 18px color-mix(in srgb, var(--c1, var(--accent)) 28%, transparent);
  flex-shrink: 0;
}

.bento-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bento-tag {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--c1, var(--accent)) 12%, #fff);
  color: var(--c1, var(--accent));
  border: 1px solid color-mix(in srgb, var(--c1, var(--accent)) 22%, transparent);
}

.bento-card h3 {
  margin: 0 0 8px;
  font-size: 1.14rem;
  letter-spacing: -0.02em;
}

.bento-card p {
  margin: 0 0 18px;
  font-size: 0.93rem;
  color: var(--muted);
  line-height: 1.55;
}

.bento-demo {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px dashed color-mix(in srgb, var(--c1, var(--accent)) 22%, transparent);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.demo-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 0.79rem;
  font-weight: 700;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}

.demo-pill.accent {
  background: color-mix(in srgb, var(--c1, var(--accent)) 13%, #fff);
  color: var(--c1, var(--accent));
  border-color: color-mix(in srgb, var(--c1, var(--accent)) 28%, transparent);
}

.privacy-pill {
  padding: 5px 12px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.privacy-pill.on {
  background: #3D7A68;
  color: #fff;
  border-color: #3D7A68;
}

/* Closing CTA */
.cta-banner {
  border-radius: 26px;
  padding: 40px 32px;
  color: #fff;
  background: linear-gradient(135deg, var(--hero-a) 0%, var(--hero-c) 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-md);
}

.cta-left {
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: 580px;
}

.cta-left img {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
  flex-shrink: 0;
}

.cta-banner h2 {
  margin: 0 0 6px;
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  letter-spacing: -0.02em;
}

.cta-banner p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.96rem;
}

/* Inner Page Header & Controls */
.page-hero {
  padding: 36px 0 24px;
}

.crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 10px;
}

.crumb a:hover { color: var(--accent); }

.page-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(1.75rem, 3.2vw, 2.4rem);
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.page-hero p {
  margin: 0;
  color: var(--muted);
  max-width: 640px;
}

.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ftab {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
}

.ftab.on {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.search-input {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.9rem;
  min-width: 220px;
}

/* Directory Cards */
.dir-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.dir-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.dir-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-ring);
}

.dir-thumb {
  width: 64px;
  height: 64px;
  border-radius: 2px;
  padding: 3px 3px 8px;
  background: #fff;
  border: 1px solid rgba(29, 27, 42, 0.12);
  object-fit: cover;
  flex-shrink: 0;
}

.dir-name {
  font-weight: 800;
  font-size: 0.98rem;
  line-height: 1.25;
}

.dir-sub {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 2px;
}

/* Single Cat Keepsake Page Polaroid Print */
.cat-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 32px;
  align-items: start;
}

.keepsake-frame {
  background: var(--polaroid);
  padding: 16px 16px 26px;
  border-radius: 2px;
  border: 1px solid rgba(29, 27, 42, 0.12);
  box-shadow: var(--polaroid-shadow-hover);
}

.keepsake-frame img {
  width: 100%;
  height: auto;
  border-radius: 0;
  background: var(--surface-alt);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.keepsake-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 4px 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.detail-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.detail-card h1 {
  margin: 12px 0 12px;
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.meta-table {
  margin: 18px 0;
  border-top: 1px solid var(--line);
}

.meta-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}

.meta-row span { color: var(--muted); }
.meta-row strong a { color: var(--accent); }
.meta-row strong a:hover { text-decoration: underline; }

.detail-cta {
  margin-top: 20px;
  padding: 16px;
  border-radius: 14px;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 32px 0 44px;
  margin-top: 28px;
  color: var(--muted);
  font-size: 0.88rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-links a:hover { color: var(--accent); }

/* Responsive */
@media (max-width: 960px) {
  .hero-grid, .map-bento, .spotlight, .cat-detail {
    grid-template-columns: 1fr;
  }
  .hero-stage { min-height: 360px; }
  .polaroid-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dir-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .nav { display: none; }
  .topbar .btn-accent { display: none; }
  .hero { padding: 36px 0 44px; }
  .theme-row { gap: 5px; }
  .theme-chip { padding: 5px 8px; font-size: 0.74rem; gap: 4px; }
  .swatch { width: 8px; height: 8px; }
  .phone-main { width: 206px; transform: translateX(-10px) rotate(-1deg); }
  .phone-back { width: 174px; margin-left: -48px; }
  .phone-card { width: 162px; }
  .phone-card.offset { width: 148px; }
  .section { padding: 44px 0; }
  .panel { padding: 18px; }
  .polaroid-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .polaroid { padding: 7px 7px 14px; }
  .polaroid-title { font-size: 0.85rem; }
  .pill-trait { font-size: 0.68rem; padding: 2px 7px; }
  .bento-4, .dir-grid { grid-template-columns: 1fr; }
  .cta-banner { padding: 26px 20px; }
}
