/* ============================================================
   Meow Peace — Global Stylesheet
   Mobile-first, 480px centered, PC also uses mobile layout
   Cat + calm + lavender aesthetic
   ============================================================ */

/* --- Reset & base --- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: 'Nunito', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.55;
  color: #3D3D5C;
  background: #FBF7F4;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}

img, picture, svg, video, canvas { max-width: 100%; height: auto; display: block; }
a { color: #8E9AAF; text-decoration: none; }
a:hover { color: #FFD6A5; }
button { font-family: inherit; cursor: pointer; }

:root {
  --c-primary: #8E9AAF;
  --c-primary-2: #CBC3E3;
  --c-accent: #FFD6A5;
  --c-bg: #FBF7F4;
  --c-text: #3D3D5C;
  --c-text-2: #5F5F84;
  --c-soft: #F0EAE0;
  --c-soft-2: #E8E1F2;
  --c-card: #FFFFFF;
  --c-border: #ECE6DA;
  --c-success: #7DBE9E;
  --c-warning: #E8A05E;
  --c-danger: #E07B7B;
  --shadow-sm: 0 2px 8px rgba(142, 154, 175, 0.10);
  --shadow-md: 0 6px 18px rgba(142, 154, 175, 0.14);
  --shadow-lg: 0 14px 32px rgba(142, 154, 175, 0.18);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;
  --max-width: 480px;
  --grid-cols: 2;
  --header-h: 56px;
  --grad-soft: linear-gradient(135deg, #CBC3E3 0%, #FFD6A5 100%);
  --grad-soft-2: linear-gradient(180deg, #E8E1F2 0%, #FBF7F4 100%);
  --grad-cat: linear-gradient(135deg, #8E9AAF 0%, #CBC3E3 100%);
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Fredoka One', 'Nunito', system-ui, sans-serif;
  font-weight: 400;
  letter-spacing: 0.01em;
  margin: 0 0 12px;
  line-height: 1.2;
  color: #3D3D5C;
}
h1 { font-size: 30px; }
h2 { font-size: 24px; }
h3 { font-size: 20px; }
h4 { font-size: 17px; }
p { margin: 0 0 12px; }

.muted { color: var(--c-text-2); }
.tiny { font-size: 12px; }

/* --- Page shell --- */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  background: var(--c-bg);
  min-height: 100vh;
  position: relative;
  box-shadow: 0 0 0 1px rgba(142, 154, 175, 0.06);
}
@media (min-width: 540px) {
  body { padding: 0; }
}

/* --- Header / Top nav --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(251, 247, 244, 0.94);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--c-border);
  height: var(--header-h);
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 10px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Fredoka One', sans-serif;
  font-size: 18px;
  color: var(--c-text);
  flex: 0 0 auto;
}
.brand img { width: 30px; height: 30px; border-radius: 50%; }
.brand-name { display: inline-block; }
.brand-name small { display: block; font-size: 10px; color: var(--c-text-2); font-family: 'Nunito', sans-serif; font-weight: 600; margin-top: -2px; letter-spacing: 0.04em; }

.nav-pills {
  display: flex;
  gap: 6px;
  margin-left: auto;
  align-items: center;
}
.nav-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: transparent;
  border: 1px solid var(--c-border);
  color: var(--c-text);
  font-weight: 700;
  font-size: 13px;
  transition: all 0.2s ease;
}
.nav-pill:hover { background: var(--c-soft-2); }
.nav-pill.active {
  background: var(--grad-cat);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--shadow-sm);
}
.nav-pill .label { display: none; }
@media (min-width: 380px) {
  .nav-pill .label { display: inline; }
}
.nav-icon {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center; justify-content: center;
  background: var(--c-soft);
  border: none;
  color: var(--c-text);
}
.nav-icon:hover { background: var(--c-soft-2); }

/* --- Hero --- */
.hero {
  position: relative;
  padding: 22px 16px 26px;
  background: var(--grad-soft);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  overflow: hidden;
  color: var(--c-text);
  margin-bottom: 14px;
}
.hero::before, .hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.32);
  filter: blur(2px);
  pointer-events: none;
}
.hero::before { width: 110px; height: 110px; top: -28px; right: -28px; animation: float 7s ease-in-out infinite; }
.hero::after { width: 80px; height: 80px; bottom: -20px; left: -10px; animation: float 9s ease-in-out infinite reverse; }
@keyframes float {
  0%, 100% { transform: translateY(0) translateX(0); }
  50% { transform: translateY(-14px) translateX(8px); }
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-pill);
  padding: 4px 12px;
  font-weight: 700;
  font-size: 12px;
  color: var(--c-text);
  margin-bottom: 10px;
  border: 1px solid rgba(255, 255, 255, 0.7);
}
.hero-badge .pulse {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--c-success);
  box-shadow: 0 0 0 0 rgba(125, 190, 158, 0.7);
  animation: pulse 1.6s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(125, 190, 158, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(125, 190, 158, 0); }
  100% { box-shadow: 0 0 0 0 rgba(125, 190, 158, 0); }
}
.hero h1 {
  font-size: 30px;
  line-height: 1.05;
  margin: 6px 0 6px;
  color: var(--c-text);
}
.hero h1 .accent { color: #6E5BA0; }
.hero p {
  margin: 0 0 12px;
  color: var(--c-text-2);
  font-size: 14px;
  max-width: 38ch;
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  background: var(--c-text);
  color: #fff;
  border-radius: var(--radius-pill);
  font-weight: 800;
  font-size: 14px;
  box-shadow: var(--shadow-sm);
  border: none;
}
.hero-cta:hover { background: #2c2c45; color: #fff; }
.hero-cta .paw { font-size: 16px; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
}
.hero-stat {
  background: rgba(255, 255, 255, 0.55);
  border-radius: var(--radius-md);
  padding: 10px 6px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.7);
}
.hero-stat .num {
  font-family: 'Fredoka One', sans-serif;
  font-size: 18px;
  color: var(--c-text);
  display: block;
}
.hero-stat .lbl { font-size: 11px; color: var(--c-text-2); font-weight: 600; }

/* --- Sections --- */
.section {
  padding: 18px 14px 8px;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 6px 4px 12px;
}
.section-head h2 {
  font-size: 19px;
  margin: 0;
}
.section-head .more {
  font-size: 12px;
  font-weight: 700;
  color: var(--c-primary);
}
.section-head .more:hover { color: var(--c-accent); }

/* --- Category chips (horizontal scroll) --- */
.chip-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 14px 6px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-snap-type: x mandatory;
}
.chip-row::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  background: var(--c-card);
  border: 1px solid var(--c-border);
  font-weight: 700;
  font-size: 13px;
  color: var(--c-text);
  white-space: nowrap;
  scroll-snap-align: start;
  transition: all 0.2s ease;
}
.chip:hover { border-color: var(--c-primary-2); }
.chip.active {
  background: var(--grad-cat);
  color: #fff;
  border-color: transparent;
}
.chip .emoji { font-size: 15px; }

/* --- Game grid (2 columns) --- */
.game-grid {
  display: grid;
  grid-template-columns: repeat(var(--grid-cols), 1fr);
  gap: 12px;
  padding: 0 14px;
}
.game-card {
  background: var(--c-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--c-border);
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}
.game-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: inherit;
}
.game-card .thumb {
  aspect-ratio: 1 / 1;
  background: var(--grad-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.game-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.game-card .meta {
  padding: 10px 10px 12px;
}
.game-card .meta h3 {
  font-size: 14px;
  margin: 0 0 4px;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.game-card .meta .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--c-text-2);
  font-weight: 600;
}
.game-card .rating { color: #E8A05E; font-weight: 800; }
.game-card .badge {
  position: absolute;
  top: 6px; left: 6px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--c-text);
  font-size: 10px;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.game-card .badge.hot { background: #FFD6A5; color: #8a4a14; }
.game-card .badge.new { background: #CBC3E3; color: #4b3a78; }

/* --- Featured hero card (large, 2-col span) --- */
.featured-card {
  grid-column: span var(--grid-cols);
  display: flex;
  background: var(--c-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--c-border);
  position: relative;
  text-decoration: none;
  color: inherit;
  margin-bottom: 4px;
}
.featured-card .left {
  flex: 0 0 130px;
  background: var(--grad-soft);
  position: relative;
}
.featured-card .left img { width: 100%; height: 100%; object-fit: cover; }
.featured-card .right {
  flex: 1;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.featured-card .right h3 { font-size: 17px; margin: 0 0 4px; }
.featured-card .right p { font-size: 12px; color: var(--c-text-2); margin: 0 0 8px; }
.featured-card .pill {
  align-self: flex-start;
  background: var(--grad-cat);
  color: #fff;
  font-weight: 800;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

/* --- Loading screen --- */
.loading-screen {
  position: fixed;
  inset: 0;
  background: var(--c-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 200;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.loading-screen.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loading-cat {
  width: 64px; height: 64px;
  background: var(--c-primary);
  border-radius: 50%;
  position: relative;
  animation: bounce 1s infinite ease-in-out;
  box-shadow: 0 0 0 8px rgba(142, 154, 175, 0.15);
}
.loading-cat::before, .loading-cat::after {
  content: '';
  position: absolute;
  top: -8px;
  width: 0; height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 16px solid var(--c-primary);
}
.loading-cat::before { left: 8px; transform: rotate(-15deg); }
.loading-cat::after { right: 8px; transform: rotate(15deg); }
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}
.loading-text {
  margin-top: 18px;
  font-weight: 800;
  color: var(--c-text);
  font-size: 14px;
}

/* --- Particle floaters --- */
.particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.particle {
  position: absolute;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  animation: floatUp 14s linear infinite;
}
.particle.p1 { left: 10%; width: 6px; height: 6px; animation-delay: 0s; }
.particle.p2 { left: 30%; width: 10px; height: 10px; animation-delay: 2s; background: rgba(255, 214, 165, 0.7); }
.particle.p3 { left: 50%; animation-delay: 4s; }
.particle.p4 { left: 70%; width: 5px; height: 5px; animation-delay: 6s; background: rgba(203, 195, 227, 0.7); }
.particle.p5 { left: 90%; width: 8px; height: 8px; animation-delay: 8s; }
@keyframes floatUp {
  0% { transform: translateY(100vh) translateX(0); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(-20vh) translateX(20px); opacity: 0; }
}

/* --- Detail page --- */
.detail-banner {
  aspect-ratio: 16 / 9;
  background: var(--grad-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  overflow: hidden;
}
.detail-banner img { width: 100%; height: 100%; object-fit: cover; }
.detail-banner .play-overlay {
  position: absolute;
  bottom: 14px; right: 14px;
  background: rgba(61, 61, 92, 0.92);
  color: #fff;
  font-weight: 800;
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: none;
  box-shadow: var(--shadow-md);
}
.detail-banner .play-overlay:hover { background: var(--c-text); color: #fff; }

.detail-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 14px 0;
  flex-wrap: wrap;
}
.detail-meta .tag {
  background: var(--c-soft-2);
  color: var(--c-text);
  font-weight: 700;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.detail-body { padding: 14px; }
.detail-body h1 { font-size: 26px; margin: 6px 0 8px; }
.detail-body .stats {
  display: flex;
  gap: 14px;
  margin: 8px 0 12px;
  font-size: 13px;
  color: var(--c-text-2);
  font-weight: 700;
}
.detail-body .stats .star { color: #E8A05E; }
.detail-body p { color: var(--c-text); font-size: 14px; line-height: 1.65; }

.detail-howto {
  background: var(--c-soft-2);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin: 12px 0;
}
.detail-howto h3 { font-size: 15px; margin: 0 0 8px; }
.detail-howto ol { margin: 0; padding-left: 20px; }
.detail-howto li { font-size: 13px; color: var(--c-text); margin-bottom: 4px; }

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 14px 0 4px;
}
.detail-tags .tag {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  color: var(--c-text-2);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
}

/* --- Comments section --- */
.comments {
  padding: 6px 14px 24px;
}
.comments h2 { font-size: 18px; margin: 12px 4px; }
.comment {
  display: flex;
  gap: 10px;
  padding: 10px;
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
}
.avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--c-soft-2);
  color: var(--c-text);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  font-size: 14px;
  flex: 0 0 36px;
}
.comment .head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
  flex-wrap: wrap;
}
.comment .name { font-weight: 800; font-size: 13px; color: var(--c-text); }
.comment .stars { color: #E8A05E; font-size: 12px; }
.comment .date { font-size: 11px; color: var(--c-text-2); margin-left: auto; }
.comment .body { font-size: 13px; color: var(--c-text); line-height: 1.5; }

/* --- Ad slot (CLS=0) --- */
.ad-slot {
  margin: 12px 14px;
  background: var(--c-soft);
  border: 1px dashed var(--c-border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-text-2);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  padding: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.ad-slot--leaderboard { min-height: 90px; }
.ad-slot--billboard { min-height: 250px; }
.ad-slot--rectangle { min-height: 250px; }
.ad-slot--halfpage { min-height: 600px; }
.ad-slot--mobile-leaderboard { min-height: 50px; }

.ad-slot[data-ad-lazy="true"] { background: linear-gradient(90deg, var(--c-soft) 0%, var(--c-soft-2) 50%, var(--c-soft) 100%); background-size: 200% 100%; animation: shimmer 1.8s infinite; }
.ad-slot[data-loaded="true"] { animation: none; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* --- Sticky bottom ad (collapsible) --- */
.sticky-ad {
  position: fixed;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--max-width);
  background: var(--c-card);
  border-top: 1px solid var(--c-border);
  padding: 8px 10px;
  z-index: 80;
  box-shadow: 0 -4px 16px rgba(61, 61, 92, 0.08);
  transition: transform 0.3s ease;
}
.sticky-ad.collapsed { transform: translate(-50%, calc(100% - 36px)); }
.sticky-ad .ad-inner {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sticky-ad .ad-content {
  flex: 1;
  background: var(--c-soft);
  border: 1px dashed var(--c-border);
  border-radius: var(--radius-sm);
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-text-2);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.sticky-ad .toggle {
  background: var(--c-soft-2);
  color: var(--c-text);
  border: none;
  border-radius: 50%;
  width: 28px; height: 28px;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.sticky-ad .label {
  font-size: 10px;
  color: var(--c-text-2);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sticky-ad .label .ad-mark { background: var(--c-soft-2); padding: 1px 6px; border-radius: var(--radius-pill); }

/* --- Footer --- */
.site-footer {
  margin-top: 24px;
  padding: 28px 16px 90px;
  background: var(--grad-soft-2);
  color: var(--c-text);
  font-size: 13px;
  border-top: 1px solid var(--c-border);
}
.footer-cols {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 14px;
}
.footer-col h4 {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-text);
  margin: 0 0 8px;
  font-family: 'Nunito', sans-serif;
}
.footer-col p { font-size: 12px; color: var(--c-text-2); margin: 0 0 6px; line-height: 1.5; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 4px; }
.footer-col a { color: var(--c-text); font-weight: 600; font-size: 12px; }
.footer-col a:hover { color: var(--c-primary); }
.footer-bottom {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(142, 154, 175, 0.18);
  text-align: center;
  font-size: 11px;
  color: var(--c-text-2);
}
.footer-bottom .paw-row { letter-spacing: 0.4em; }

/* --- Category page header --- */
.cat-header {
  padding: 18px 14px 12px;
  background: var(--grad-soft);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  color: var(--c-text);
  margin-bottom: 10px;
  position: relative;
  overflow: hidden;
}
.cat-header h1 { font-size: 24px; margin: 6px 0 4px; }
.cat-header p { color: var(--c-text-2); font-size: 13px; margin: 0; }
.cat-header .icon-pill {
  position: absolute;
  top: 14px; right: 14px;
  font-size: 28px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
}

/* --- Play page --- */
.play-frame-wrap {
  position: relative;
  width: 100%;
  height: 75vh;
  background: #000;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  overflow: hidden;
}
.play-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.play-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--c-card);
  border-bottom: 1px solid var(--c-border);
}
.play-controls h1 { font-size: 15px; margin: 0; flex: 1; }
.play-controls button {
  background: var(--c-soft);
  border: none;
  border-radius: var(--radius-pill);
  padding: 6px 12px;
  font-weight: 700;
  font-size: 12px;
  color: var(--c-text);
}
.play-controls button:hover { background: var(--c-soft-2); }
.play-info {
  padding: 14px;
  font-size: 13px;
  color: var(--c-text);
}
.play-info p { margin: 0 0 8px; }

/* --- Search box --- */
.search-row {
  padding: 10px 14px;
  position: sticky;
  top: var(--header-h);
  background: var(--c-bg);
  z-index: 50;
  border-bottom: 1px solid transparent;
}
.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-pill);
  padding: 7px 12px;
  box-shadow: var(--shadow-sm);
}
.search-box input {
  border: none;
  outline: none;
  background: transparent;
  flex: 1;
  font-family: inherit;
  font-size: 14px;
  color: var(--c-text);
}
.search-box .icon { color: var(--c-primary); }

/* --- List toolbar --- */
.list-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  position: sticky;
  top: var(--header-h);
  background: var(--c-bg);
  z-index: 40;
  border-bottom: 1px solid var(--c-border);
}
.list-toolbar .sort {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-pill);
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--c-text);
  cursor: pointer;
}
.list-toolbar .count {
  font-size: 12px;
  color: var(--c-text-2);
  margin-left: auto;
  font-weight: 600;
}

/* --- Privacy/Terms page --- */
.legal-page {
  padding: 18px 14px 100px;
  max-width: 100%;
}
.legal-page h1 { font-size: 26px; margin-bottom: 4px; }
.legal-page .updated { font-size: 12px; color: var(--c-text-2); margin-bottom: 18px; }
.legal-page h2 { font-size: 18px; margin: 22px 0 8px; }
.legal-page p, .legal-page li { font-size: 14px; line-height: 1.7; color: var(--c-text); }
.legal-page ul, .legal-page ol { padding-left: 20px; }
.legal-page a { color: var(--c-primary); font-weight: 700; }
.legal-page a:hover { text-decoration: underline; }
.legal-page hr { border: none; border-top: 1px solid var(--c-border); margin: 18px 0; }

/* --- Contact page --- */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}
.contact-form input, .contact-form textarea {
  width: 100%;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  padding: 11px 14px;
  font-family: inherit;
  font-size: 14px;
  color: var(--c-text);
  background: var(--c-card);
  outline: none;
  transition: border-color 0.2s ease;
}
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--c-primary-2); }
.contact-form textarea { min-height: 110px; resize: vertical; }
.contact-form .btn {
  background: var(--grad-cat);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  border: none;
  border-radius: var(--radius-pill);
  padding: 11px 20px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}
.contact-form .btn:hover { transform: translateY(-1px); }

.contact-info {
  background: var(--c-soft-2);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-top: 18px;
}
.contact-info h3 { font-size: 15px; margin: 0 0 6px; }
.contact-info p { font-size: 13px; color: var(--c-text-2); margin: 0; }
.contact-info a { color: var(--c-primary); font-weight: 700; }

/* --- 404 page --- */
.notfound {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 18px 80px;
  min-height: 60vh;
}
.notfound .big {
  font-family: 'Fredoka One', sans-serif;
  font-size: 92px;
  background: var(--grad-soft);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
  margin: 0;
}
.notfound .face {
  font-size: 64px;
  margin: 6px 0 12px;
  animation: shake 2.5s infinite ease-in-out;
  display: inline-block;
}
@keyframes shake {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-6deg); }
  75% { transform: rotate(6deg); }
}
.notfound p { color: var(--c-text-2); max-width: 32ch; margin: 0 0 16px; }
.notfound .btn {
  background: var(--grad-cat);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  border: none;
  border-radius: var(--radius-pill);
  padding: 10px 20px;
  box-shadow: var(--shadow-md);
}
.notfound .btn:hover { color: #fff; }

/* --- Breadcrumb --- */
.breadcrumb {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 12px;
  color: var(--c-text-2);
  font-weight: 600;
  padding: 10px 14px 0;
}
.breadcrumb a { color: var(--c-text-2); }
.breadcrumb a:hover { color: var(--c-primary); }
.breadcrumb .sep { color: var(--c-primary-2); }

/* --- Reusable utility --- */
.spacer-sm { height: 8px; }
.spacer-md { height: 18px; }
.spacer-lg { height: 36px; }
.text-center { text-align: center; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-4 { gap: 4px; } .gap-6 { gap: 6px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; }
.mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; } .mb-20 { margin-bottom: 20px; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; }
.rounded { border-radius: var(--radius-md); }
.hidden { display: none !important; }

/* --- Animations --- */
.cat-breathe {
  animation: breathe 4s ease-in-out infinite;
  transform-origin: center bottom;
}
@keyframes breathe {
  0%, 100% { transform: scale(1) translateY(0); }
  50% { transform: scale(1.03) translateY(-2px); }
}

.cat-tailwag {
  animation: tailwag 2.5s ease-in-out infinite;
  transform-origin: 0% 50%;
}
@keyframes tailwag {
  0%, 100% { transform: rotate(-6deg); }
  50% { transform: rotate(6deg); }
}

.cat-wiggle {
  animation: wiggle 3.6s ease-in-out infinite;
}
@keyframes wiggle {
  0%, 100% { transform: rotate(-2deg); }
  50% { transform: rotate(2deg); }
}

.fade-in-up {
  animation: fadeInUp 0.5s ease-out both;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Print --- */
@media print {
  .site-header, .site-footer, .sticky-ad, .ad-slot { display: none !important; }
  body { background: #fff; }
  main { box-shadow: none; }
}

/* --- Dark accent (in-page components) --- */
.card-pad {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  padding: 14px;
  margin: 0 14px 14px;
}
.card-pad h3 { font-size: 15px; margin: 0 0 6px; }
.card-pad p { font-size: 13px; color: var(--c-text-2); margin: 0; }

/* --- Feature row --- */
.feature-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 0 14px;
  margin-bottom: 8px;
}
.feature-mini {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  padding: 12px;
  text-align: center;
  text-decoration: none;
  color: var(--c-text);
}
.feature-mini:hover { background: var(--c-soft); }
.feature-mini .ico { font-size: 26px; margin-bottom: 4px; }
.feature-mini .lbl { font-size: 12px; font-weight: 700; }

/* --- Tabs --- */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--c-border);
  margin: 0 14px 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--c-text-2);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  cursor: pointer;
}
.tab.active {
  color: var(--c-text);
  border-bottom-color: var(--c-primary);
}

/* --- No-results --- */
.no-results {
  text-align: center;
  padding: 40px 18px;
  color: var(--c-text-2);
  font-size: 14px;
}
.no-results .emo { font-size: 48px; margin-bottom: 8px; }

/* --- Scroll padding for sticky ad --- */
body { padding-bottom: 0; }
main.has-sticky-ad { padding-bottom: 70px; }
