/* PetAge UI polish — visual only; no calculator logic */

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  background: var(--bg-secondary);
  color: var(--text-primary);
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}

main {
  isolation: isolate;
}

/* Nav */
.navbar {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: none;
}

.nav-container {
  max-width: var(--max-width);
  height: 64px;
}

.nav-logo h2 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--primary-color);
}

.nav-menu {
  gap: 0.25rem;
}

.nav-link {
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  font-size: 0.925rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.nav-link:hover {
  color: var(--primary-color);
  background: var(--bg-soft);
}

.nav-link.active {
  color: var(--primary-color);
  background: var(--bg-soft);
}

.nav-link.active::after {
  display: none;
}

/* Buttons — rounded rectangles (never circles) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.35rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  min-height: 44px;
  height: auto;
  aspect-ratio: auto;
  box-sizing: border-box;
  text-align: center;
  white-space: normal;
  overflow: visible;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease, border-color 0.2s ease;
}

.btn-primary {
  background: var(--primary-color);
  color: #fff;
  box-shadow: 0 8px 20px rgb(15 118 110 / 0.22);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgb(15 118 110 / 0.28);
}

.btn-secondary {
  background: #fff;
  color: var(--primary-color);
  border-color: var(--border-color);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--bg-soft);
  border-color: #99f6e4;
}

.btn-calculate {
  width: 100%;
  padding: 1rem 1.5rem;
  font-size: 1.05rem;
  border-radius: 12px;
  min-height: 48px;
  height: auto;
  aspect-ratio: auto;
}

.btn-share {
  background: #fff;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
}

.btn-share:hover {
  background: var(--bg-tertiary);
}

/* Hero — soft, trustworthy, not flashy */
.hero {
  background:
    radial-gradient(1200px 400px at 50% -10%, rgb(15 118 110 / 0.12), transparent 60%),
    linear-gradient(180deg, #ffffff 0%, #f0fdfa 55%, #f7f8fb 100%);
  color: var(--text-primary);
  padding: 4.5rem 1rem 3.5rem;
}

.hero-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 750;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 0.85rem;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 36rem;
  margin: 0 auto 1.75rem;
  line-height: 1.7;
  opacity: 1;
}

.hero-buttons {
  gap: 0.75rem;
}

.pet-illustration {
  gap: 1rem;
  margin-top: 2.5rem;
}

.pet-card {
  background: #fff;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 1.35rem 1.5rem;
  min-width: 160px;
  box-shadow: var(--shadow-md);
  backdrop-filter: none;
}

.pet-card:hover {
  transform: translateY(-3px);
  background: #fff;
  border-color: #99f6e4;
  box-shadow: var(--shadow-lg);
}

.pet-card h3 {
  margin: 0.35rem 0 0.15rem;
  font-size: 1.05rem;
}

.pet-card p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin: 0;
}

.pet-avatar {
  font-size: 2.5rem;
  margin-bottom: 0.35rem;
}

/* Features / stats */
.features {
  background: transparent;
  padding: 3.5rem 0 2rem;
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  letter-spacing: -0.025em;
  margin-bottom: 2rem;
}

.features-grid {
  max-width: var(--max-width);
  gap: 1.25rem;
}

.feature-card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  padding: 1.75rem 1.5rem;
  background: #fff;
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #ccfbf1;
}

.feature-icon {
  font-size: 2rem;
  width: 3rem;
  height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.9rem;
  background: var(--bg-soft);
  margin-bottom: 1rem;
}

.stats {
  background: #0f766e;
  border-radius: var(--radius-xl);
  max-width: var(--max-width);
  margin: 1rem auto 3rem;
  padding: 2rem 1rem;
}

.stats-container {
  max-width: 100%;
}

.stat-item h3 {
  font-size: 2rem;
  letter-spacing: -0.02em;
}

/* Calculator page */
.calculator-main {
  background:
    radial-gradient(900px 280px at 50% 0%, rgb(15 118 110 / 0.08), transparent 55%),
    var(--bg-secondary);
  padding: 2.5rem 0 3.5rem;
}

.calculator-container {
  max-width: 720px;
}

.calculator-title {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  letter-spacing: -0.03em;
  margin-bottom: 0.4rem;
}

.calculator-subtitle {
  margin-bottom: 2rem;
  color: var(--text-secondary);
}

.calculator-form {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  padding: 1.75rem 1.5rem;
  background: #fff;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group > label {
  font-size: 0.925rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.65rem;
}

.pet-type-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.pet-type-option {
  min-width: 0;
  padding: 1.15rem 1rem;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  background: #fff;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.pet-type-option:hover {
  border-color: #5eead4;
  background: #f0fdfa;
}

.pet-type-option.selected {
  border-color: var(--primary-color);
  background: #f0fdfa;
  box-shadow: 0 0 0 3px rgb(15 118 110 / 0.12);
  color: var(--primary-color);
}

.pet-icon {
  font-size: 1.85rem;
  margin-bottom: 0.35rem;
}

.input-mode-switch {
  display: inline-flex;
  background: var(--bg-tertiary);
  border-radius: 999px;
  padding: 0.25rem;
  gap: 0.15rem;
  margin-bottom: 1rem;
  width: 100%;
  max-width: 360px;
}

.mode-btn {
  flex: 1;
  border: none;
  background: transparent;
  border-radius: 999px;
  padding: 0.55rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
}

.mode-btn:hover {
  color: var(--text-primary);
}

.mode-btn.active {
  background: #fff;
  color: var(--primary-color);
  box-shadow: var(--shadow-sm);
}

.age-input-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.age-input label,
.birthday-input-wrapper label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}

.age-input select,
.age-input input,
select#petSize,
.date-input-container input[type="date"] {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.8rem 0.95rem;
  font-size: 1rem;
  background: #fff;
  color: var(--text-primary);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.age-input select:focus,
select#petSize:focus,
.date-input-container input[type="date"]:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgb(15 118 110 / 0.15);
}

/* Result */
.result-section {
  margin-top: 1.25rem;
}

.result-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(180deg, #f0fdfa 0%, #ffffff 100%);
  border-bottom: 1px solid var(--border-light);
}

.result-header h2 {
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  margin: 0;
}

.pet-result-icon {
  font-size: 1.75rem;
}

.result-content {
  padding: 1.5rem;
}

.age-comparison {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1.25rem;
}

.pet-age,
.human-age {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: 1rem;
  text-align: center;
  border: 1px solid var(--border-light);
}

.human-age {
  background: #f0fdfa;
  border-color: #ccfbf1;
}

.pet-age h3,
.human-age h3 {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
}

.age-display {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 0;
}

.human-age .age-display {
  color: var(--primary-color);
  font-size: 1.55rem;
}

.age-arrow {
  font-size: 1.25rem;
  color: var(--text-light);
}

.age-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.detail-item {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.detail-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.detail-value {
  font-weight: 600;
  color: var(--text-primary);
}

.health-advice {
  padding: 0 1.5rem 1.25rem;
}

.health-advice h3 {
  font-size: 1rem;
  margin-bottom: 0.65rem;
}

.advice-content {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
  color: var(--text-primary);
}

.advice-content ul {
  margin: 0.5rem 0 0 1.1rem;
  color: var(--text-secondary);
}

.share-result {
  padding: 0 1.5rem 1.5rem;
}

.history-section {
  margin-top: 1.75rem;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow-sm);
}

.history-section h3 {
  font-size: 1rem;
  margin-bottom: 0.85rem;
}

/* Content pages */
.guide-main,
.faq-main,
.about-main,
.content-main {
  background: var(--bg-secondary);
}

/* Footer */
.footer {
  background: #0f172a;
  color: #cbd5e1;
  margin-top: 0;
  padding: 3rem 0 1.5rem;
}

.footer-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.75rem;
}

.footer a {
  color: #e2e8f0;
  text-decoration: none;
}

.footer a:hover {
  color: #5eead4;
}

.footer-section h3,
.footer-section h4 {
  color: #fff;
  margin-bottom: 0.75rem;
}

.footer-section ul {
  list-style: none;
  padding: 0;
}

.footer-section li {
  margin-bottom: 0.4rem;
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 1.75rem auto 0;
  padding: 1rem 1rem 0;
  border-top: 1px solid #1e293b;
  text-align: center;
  color: #94a3b8;
  font-size: 0.875rem;
}

/* Mobile */
@media (max-width: 768px) {
  .nav-menu {
    gap: 0.15rem;
  }

  .hero {
    padding: 3rem 1rem 2.5rem;
  }

  .pet-type-selector,
  .age-input-group,
  .age-details {
    grid-template-columns: 1fr;
  }

  .age-comparison {
    grid-template-columns: 1fr;
  }

  .age-arrow {
    transform: rotate(90deg);
    justify-self: center;
  }

  .calculator-form,
  .result-header,
  .result-content,
  .health-advice,
  .share-result {
    padding-left: 1.15rem;
    padding-right: 1.15rem;
  }

  .stats {
    margin: 1rem 1rem 2rem;
    border-radius: var(--radius-lg);
  }
}

@media (max-width: 480px) {
  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .btn,
  .btn-primary,
  .btn-secondary {
    width: 100%;
    max-width: none;
    border-radius: 12px;
    height: auto;
    aspect-ratio: auto;
  }
}

/* ===== Mobile responsive v1.4 — sticky nav, full drawer ===== */
@media (max-width: 768px) {
  :root {
    --touch: 48px;
    --nav-h: 56px;
  }

  body {
    overflow-x: hidden;
  }

  /* Sticky navbar — occupies flow space; no main margin-top needed.
     CRITICAL: no backdrop-filter/filter/transform on .navbar — those make
     position:fixed .nav-menu use the short navbar as containing block. */
  .navbar {
    position: sticky !important;
    top: 0 !important;
    left: auto !important;
    right: auto !important;
    height: auto !important;
    z-index: 1000 !important;
    /* Avoid empty white strip on non-notch phones: only pad when inset > 0 */
    padding-top: env(safe-area-inset-top, 0px);
    background: #ffffff !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    filter: none !important;
    transform: none !important;
    overflow: visible !important;
  }

  .nav-container {
    height: var(--nav-h) !important;
    padding: 0 1rem;
    padding-left: max(1rem, env(safe-area-inset-left, 0px));
    padding-right: max(1rem, env(safe-area-inset-right, 0px));
    overflow: visible !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    filter: none !important;
    transform: none !important;
  }

  .hamburger {
    display: flex !important;
    flex-direction: column !important;
    width: var(--touch);
    height: var(--touch);
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-right: -0.35rem;
    z-index: 1001;
    background: transparent;
    border: none;
  }

  .hamburger .bar {
    display: block !important;
    position: static !important;
    width: 22px !important;
    height: 2.5px !important;
    margin: 0 !important;
    top: auto !important;
    left: auto !important;
    background: var(--primary-color);
    border-radius: 2px;
    transform: none !important;
    opacity: 1;
    transition: transform 0.25s ease, opacity 0.2s ease;
  }

  .hamburger.active {
    gap: 0;
  }

  .hamburger.active .bar:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg) !important;
  }

  .hamburger.active .bar:nth-child(2) {
    opacity: 0 !important;
    transform: none !important;
  }

  .hamburger.active .bar:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg) !important;
  }

  /* Full-height drawer under navbar — viewport-relative fixed (no ancestor filter) */
  .nav-menu {
    position: fixed !important;
    top: calc(var(--nav-h) + env(safe-area-inset-top, 0px)) !important;
    left: -100% !important;
    right: 0 !important;
    bottom: auto !important;
    width: 100% !important;
    height: calc(100dvh - var(--nav-h) - env(safe-area-inset-top, 0px)) !important;
    min-height: calc(100dvh - var(--nav-h) - env(safe-area-inset-top, 0px)) !important;
    max-height: none !important;
    transform: none !important;
    transition: left 0.25s ease !important;
    display: flex !important;
    background: #ffffff !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    filter: none !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: stretch !important;
    gap: 0.15rem;
    padding: 0.75rem 1rem 2rem !important;
    padding-bottom: max(2rem, env(safe-area-inset-bottom, 0px)) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    box-shadow: var(--shadow-lg);
    z-index: 999 !important;
    list-style: none;
    margin: 0;
  }

  .nav-menu.active {
    left: 0 !important;
    transform: none !important;
  }

  .nav-menu li {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none;
    flex: 0 0 auto;
  }

  .nav-link {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    min-height: var(--touch) !important;
    width: 100% !important;
    padding: 0.85rem 1rem !important;
    border-radius: var(--radius-md);
    font-size: 1.05rem !important;
    font-weight: 500;
    background: transparent;
    border-bottom: none;
    transform: none !important;
    box-sizing: border-box;
  }

  .nav-link.active,
  .nav-link:hover {
    background: var(--bg-soft) !important;
    color: var(--primary-color) !important;
    transform: none !important;
  }

  .nav-link.active::after {
    display: none;
  }

  /* Critical: sticky nav already in flow — kill fixed-nav spacer */
  main,
  .calculator-main,
  .guide-main,
  .faq-main,
  .about-main,
  .content-main {
    margin-top: 0 !important;
    padding-left: max(0px, env(safe-area-inset-left, 0px));
    padding-right: max(0px, env(safe-area-inset-right, 0px));
  }

  .hero {
    min-height: auto !important;
    padding: 2.25rem 1rem 2rem;
  }

  .hero-title {
    font-size: clamp(1.65rem, 7vw, 2.15rem);
    line-height: 1.2;
  }

  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 1.25rem;
  }

  .hero-buttons {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
    gap: 0.75rem;
  }

  .hero-buttons .btn,
  .hero-buttons .btn-primary,
  .hero-buttons .btn-secondary,
  .btn.btn-primary,
  .btn.btn-secondary,
  .btn-calculate {
    display: flex !important;
    width: 100% !important;
    max-width: none !important;
    min-height: 48px !important;
    height: auto !important;
    aspect-ratio: auto !important;
    border-radius: 12px !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    overflow: visible !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    flex: 0 0 auto;
  }

  .pet-illustration {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    margin-top: 1.75rem;
  }

  .pet-card {
    min-height: var(--touch);
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
    background: #ffffff !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .pet-card h3 {
    color: #0f172a !important;
  }

  .pet-card p {
    color: var(--text-secondary) !important;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
    padding: 0 1rem;
  }

  .feature-card {
    text-align: left;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.35rem 0.85rem;
    align-items: start;
    padding: 1.15rem;
  }

  .feature-icon {
    grid-row: span 2;
    margin-bottom: 0;
  }

  .stats {
    margin: 0.75rem 1rem 1.75rem;
    padding: 1.25rem 0.75rem;
  }

  .stats-container {
    gap: 1rem;
  }

  .stat-item {
    flex: 1 1 40%;
  }

  .stat-item h3 {
    font-size: 1.5rem;
  }

  /* Calculator */
  .calculator-main {
    padding: 1.25rem 0 2.5rem;
  }

  .calculator-container {
    padding: 0 0.85rem;
  }

  .calculator-title {
    font-size: 1.55rem;
  }

  .calculator-subtitle {
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
  }

  .calculator-form {
    padding: 1.15rem 1rem;
    border-radius: var(--radius-lg);
  }

  .form-group {
    margin-bottom: 1.15rem;
  }

  .pet-type-selector {
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
  }

  .pet-type-option {
    min-height: 88px;
    padding: 1rem 0.65rem;
    touch-action: manipulation;
  }

  .input-mode-switch {
    max-width: none;
    width: 100%;
  }

  .mode-btn {
    min-height: 42px;
    font-size: 0.85rem;
    touch-action: manipulation;
  }

  .age-input-group {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .age-input select,
  select#petSize,
  .date-input-container input[type="date"] {
    min-height: var(--touch);
    font-size: 16px; /* prevent iOS zoom */
    padding: 0.75rem 0.9rem;
  }

  .btn-calculate,
  .btn-share,
  .btn {
    min-height: var(--touch);
    touch-action: manipulation;
  }

  .result-header,
  .result-content,
  .health-advice,
  .share-result {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .result-header {
    padding-top: 1rem;
    padding-bottom: 1rem;
  }

  .age-comparison {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .age-arrow {
    transform: rotate(90deg);
    justify-self: center;
    line-height: 1;
  }

  .age-display {
    font-size: 1.25rem;
    word-break: break-word;
  }

  .human-age .age-display {
    font-size: 1.4rem;
  }

  .age-details {
    grid-template-columns: 1fr;
  }

  .history-section {
    margin-left: 0;
    margin-right: 0;
    padding: 1rem;
  }

  .footer {
    padding: 2rem 1rem 1.25rem;
    padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

@media (max-width: 480px) {
  .pet-type-selector {
    grid-template-columns: 1fr;
  }

  .calculator-form {
    padding: 1rem 0.85rem;
  }

  .result-card {
    border-radius: var(--radius-lg);
  }
}

/* Coarse pointer / touch devices — kill sticky :hover lift */
@media (hover: none) and (pointer: coarse) {
  .pet-type-option,
  .mode-btn,
  .btn,
  .nav-link,
  .pet-card {
    cursor: pointer;
  }

  .btn,
  .btn-primary,
  .btn-secondary,
  .btn-calculate,
  .btn-share,
  a.btn,
  button.btn {
    transition: background 0.2s ease, border-color 0.2s ease, opacity 0.15s ease !important;
  }

  .btn:hover,
  .btn-primary:hover,
  .btn-secondary:hover,
  .btn-calculate:hover,
  .btn-share:hover,
  a.btn:hover,
  button.btn:hover {
    transform: none !important;
    box-shadow: none !important;
  }

  /* Keep primary resting shadow; do not grow on sticky hover */
  .btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 8px 20px rgb(15 118 110 / 0.22) !important;
  }

  .btn-secondary:hover {
    background: var(--bg-soft);
    border-color: #99f6e4;
  }

  .btn:active,
  .btn-primary:active,
  .btn-secondary:active,
  .btn-calculate:active,
  .btn-share:active,
  a.btn:active,
  button.btn:active,
  .pet-type-option:active {
    transform: none !important;
    opacity: 0.88;
  }
}


/* ===== Button shape lock v1.2 — no circular CTAs ===== */
.btn,
.btn-primary,
.btn-secondary,
.btn-calculate,
.btn-share,
a.btn,
button.btn {
  border-radius: 12px !important;
  height: auto !important;
  aspect-ratio: auto !important;
  min-height: 44px;
  box-sizing: border-box;
  text-align: center;
  justify-content: center;
  align-items: center;
}

@media (max-width: 768px) {
  .hero-buttons {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100% !important;
  }

  .hero-buttons > .btn,
  .hero-buttons > a.btn {
    width: 100% !important;
    max-width: none !important;
    min-height: 48px !important;
    padding: 0.9rem 1.25rem !important;
    border-radius: 12px !important;
    overflow: visible !important;
  }

  .btn-calculate {
    width: 100% !important;
    min-height: 48px !important;
    border-radius: 12px !important;
  }
}

/* ===== Nav drawer + pet-card lock v1.6 ===== */
@media (max-width: 768px) {
  main {
    margin-top: 0 !important;
  }

  /* Kill containing-block creators so fixed drawer is viewport-relative */
  .navbar,
  .nav-container {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    filter: none !important;
    transform: none !important;
    overflow: visible !important;
  }

  .navbar {
    position: sticky !important;
    top: 0 !important;
    background: #ffffff !important;
  }

  .nav-menu {
    position: fixed !important;
    top: calc(56px + env(safe-area-inset-top, 0px)) !important;
    left: -100% !important;
    right: 0 !important;
    bottom: auto !important;
    width: 100% !important;
    height: calc(100dvh - 56px - env(safe-area-inset-top, 0px)) !important;
    min-height: calc(100dvh - 56px - env(safe-area-inset-top, 0px)) !important;
    max-height: none !important;
    background: #ffffff !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    overflow-y: auto !important;
    z-index: 999 !important;
  }

  .nav-menu.active {
    left: 0 !important;
  }

  /* Light cards — beat mobile-optimization glass/white-text */
  .pet-card {
    background: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid var(--border-color, #e2e8f0) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .pet-card h3 {
    color: #0f172a !important;
  }

  .pet-card p {
    color: #64748b !important;
  }

  .pet-card:active {
    background: #f8fafc !important;
    transform: none !important;
  }
}
