* { box-sizing: border-box; }
html { padding-top: max(0px, env(safe-area-inset-top)); }
body { font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; margin: 0; background: #f7f7f8; color: #333; font-weight: 400; font-size: 16px; }
header { padding: max(12px, env(safe-area-inset-top)) 20px 12px 20px; background: #ffffff; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; flex-shrink: 1; }
.user-info { display: flex; align-items: center; gap: 6px; font-size: 14px; flex-wrap: wrap; }
.logo { width: 40px; height: 40px; border-radius: 999px; display: grid; place-items: center; background: #0e162f; color: #d4af37; font-size: 20px; }
h1 { margin: 0; font-size: 22px; color: #d4af37; font-weight: 700; }
h2 { color: #d4af37; font-weight: 600; }
h3 { color: #d4af37; font-weight: 600; }
h4 { color: #d4af37; font-weight: 500; }
.card h3 { color: #d4af37; }
.sub { color: #666; margin: 4px 0 0; font-weight: 400; font-size: 14px; }
.controls, .uploaders { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); padding: 16px; background: #fff; border-bottom: 1px solid #eee; }
.controls button, .shopping-list button { padding: 12px 14px; border: none; background: #d4af37; color: #0e162f; cursor: pointer; border-radius: 14px; box-shadow: 0 2px 4px rgba(212, 175, 55, 0.3); font-weight: 600; transition: all 0.2s; min-height: 44px; }
.controls button:hover, .shopping-list button:hover { background: #e5c04a; transform: translateY(-1px); box-shadow: 0 4px 8px rgba(212, 175, 55, 0.4); }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); padding: 16px max(12px, env(safe-area-inset-left)) 16px max(12px, env(safe-area-inset-right)); }
.card { background: #fff; padding: 14px; border-radius: 14px; border: 1px solid #eee; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 1px 0 rgba(0,0,0,0.03); }
.badges { display: flex; gap: 6px; flex-wrap: wrap; }
.badge { font-size: 12px; padding: 4px 8px; border-radius: 999px; border: 1px solid #1e3a8a; background:#e8f0fe; color: #0c1633; font-weight: 500; }
.meta { font-size: 13px; color: #0c1633; font-weight: 500; }
.actions { display: flex; gap: 8px; margin-top: 8px; }
.actions button { padding: 8px 12px; border: none; background: #d4af37; color: #0e162f; cursor: pointer; border-radius: 10px; font-size: 13px; font-weight: 600; transition: all 0.2s; box-shadow: 0 2px 4px rgba(212, 175, 55, 0.3); }
.actions button:hover { background: #e5c04a; transform: translateY(-1px); }
.shopping-list { background: #fff; padding: 16px max(12px, env(safe-area-inset-left)) max(16px, calc(16px + env(safe-area-inset-bottom))) max(12px, env(safe-area-inset-right)); border-top: 1px solid #eee; }
textarea { width: 100%; padding: 10px; border-radius: 14px; border: 1px solid #ddd; }
footer { text-align: center; padding: 16px; color: #666; font-size: 15px; }
.footer-link { color: #0c1633; text-decoration: none; font-weight: 500; transition: color 0.2s; }
.footer-link:hover { color: #d4af37; text-decoration: underline; }
.safe-true { color: #096; }
.safe-false { color: #c00; }
.safe-null { color: #777; }
a { color: #0c1633; font-weight: 500; }
.tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 12px max(12px, env(safe-area-inset-left)) 12px max(12px, env(safe-area-inset-right)); background: #fff; border-bottom: 1px solid #eee; overflow: visible; position: relative; z-index: 50; }
.tab-btn { padding: 8px 16px; border: none; background: transparent; cursor: pointer; border-radius: 8px; font-size: 15px; color: #0c1633; white-space: nowrap; transition: all 0.2s; font-weight: 500; }
.tab-btn:hover { background: #f0f0f0; }
.tab-btn.active { background: #d4af37; color: #0e162f; font-weight: 600; }

.tab-group { position: relative; }
.tab-group-btn { padding: 8px 16px; border: none; background: transparent; cursor: pointer; border-radius: 8px; font-size: 15px; color: #0c1633; white-space: nowrap; transition: all 0.2s; font-weight: 500; display: inline-flex; align-items: center; gap: 4px; }
.tab-group-btn:hover { background: #f0f0f0; }
.tab-group-btn.active { background: #d4af37; color: #0e162f; font-weight: 600; }
.tab-group .caret { font-size: 11px; line-height: 1; transition: transform 0.2s; }
.tab-group.open .caret { transform: rotate(180deg); }
.tab-dropdown { position: absolute; top: calc(100% + 4px); left: 0; min-width: 220px; background: #fff; border: 1px solid #eee; border-radius: 12px; box-shadow: 0 8px 28px rgba(0,0,0,0.14); padding: 6px; display: none; flex-direction: column; gap: 2px; z-index: 200; }
.tab-group.open .tab-dropdown { display: flex; }
.tab-dropdown .tab-btn { text-align: left; width: 100%; padding: 10px 14px; border-radius: 8px; }
.tab-dropdown .tab-btn:hover { background: #f7f3e6; }
.tabs .tab-group:last-child .tab-dropdown,
.tabs .tab-group:nth-last-child(2) .tab-dropdown { left: auto; right: 0; }
.tab-dropdown { max-width: calc(100vw - 24px); }

/* Reusable utility classes for consistent visuals */
.ps-card { background: #fff; padding: 1.5rem; border-radius: 14px; box-shadow: 0 2px 12px rgba(0,0,0,0.06); border: 1px solid rgba(212, 175, 55, 0.15); margin-bottom: 1.5rem; }
.ps-card-accent { background: rgba(212, 175, 55, 0.06); padding: 1.5rem; border-radius: 12px; border-left: 5px solid #d4af37; margin-bottom: 1.5rem; }
.ps-btn-primary { display: inline-block; padding: 12px 22px; background: #0e162f; color: #d4af37; border: 2px solid #d4af37; border-radius: 10px; font-weight: 600; font-size: 15px; cursor: pointer; text-decoration: none; transition: all 0.2s; }
.ps-btn-primary:hover { background: #d4af37; color: #0e162f; transform: translateY(-1px); box-shadow: 0 4px 14px rgba(212, 175, 55, 0.35); }
.ps-btn-secondary { display: inline-block; padding: 12px 22px; background: #fff; color: #0e162f; border: 2px solid #0e162f; border-radius: 10px; font-weight: 600; font-size: 15px; cursor: pointer; text-decoration: none; transition: all 0.2s; }
.ps-btn-secondary:hover { background: #0e162f; color: #d4af37; }
.ps-section-title { color: #d4af37; margin: 0 0 1rem; font-weight: 700; }
.ps-muted { color: #666; font-size: 14px; line-height: 1.6; }
.ps-onboarding-step { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; background: rgba(255,255,255,0.06); border: 1px solid rgba(212,175,55,0.25); color: #fff; padding: 14px 16px; border-radius: 12px; cursor: pointer; transition: all 0.2s; font-family: inherit; }
.ps-onboarding-step:hover { background: rgba(212,175,55,0.12); border-color: #d4af37; transform: translateY(-2px); }
.ps-onboarding-step .step-num { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; background: #d4af37; color: #0e162f; border-radius: 999px; font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.ps-onboarding-step .step-title { color: #d4af37; font-weight: 600; font-size: 15px; }
.ps-onboarding-step .step-desc { color: rgba(255,255,255,0.75); font-size: 13px; line-height: 1.4; }
.nav-new-badge { display: inline-block; margin-left: 6px; padding: 2px 6px; background: #d4af37; color: #0e162f; font-size: 10px; font-weight: 700; border-radius: 999px; letter-spacing: 0.5px; vertical-align: middle; }
.tab-btn.active .nav-new-badge { background: #0e162f; color: #d4af37; }
.ps-pei-play-card { display: flex; align-items: center; gap: 1.25rem; background: linear-gradient(135deg, #d4af37 0%, #f0c850 100%); color: #0e162f; padding: 1.25rem 1.5rem; border-radius: 14px; margin: 1.5rem auto; max-width: 800px; box-shadow: 0 4px 18px rgba(212,175,55,0.3); }
.ps-pei-play-card .icon { font-size: 36px; line-height: 1; }
.ps-pei-play-card h4 { margin: 0 0 4px; color: #0e162f; font-size: 17px; }
.ps-pei-play-card p { margin: 0; color: #0e162f; font-size: 14px; line-height: 1.5; }
.ps-pei-play-card a { display: inline-block; padding: 10px 18px; background: #0e162f; color: #d4af37; border-radius: 8px; font-weight: 600; text-decoration: none; white-space: nowrap; transition: all 0.2s; }
.ps-pei-play-card a:hover { background: #1a2444; transform: translateY(-1px); }
@media (max-width: 480px) { .ps-pei-play-card { flex-direction: column; text-align: center; } }

.recipe-card { padding: 1.5rem; }
.recipe-card h3 { margin: 0 0 0.5rem; color: #0e162f; font-size: 19px; }
.recipe-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.recipe-meta-row { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; padding: 0.5rem 0 0.75rem; border-bottom: 1px solid #f0e9d6; margin-bottom: 1rem; font-size: 13px; color: #555; }
.recipe-meta-row span { white-space: nowrap; }
.recipe-section { margin: 1rem 0; }
.recipe-section h4 { margin: 0 0 0.5rem; color: #d4af37; font-size: 14px; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 700; }
.recipe-list { margin: 0; padding-left: 1.25rem; line-height: 1.7; color: #333; }
.recipe-list li { margin: 2px 0; }
.recipe-steps { margin: 0; padding-left: 1.5rem; line-height: 1.7; color: #333; }
.recipe-steps li { margin: 0.5rem 0; padding-left: 0.25rem; }
.recipe-steps li::marker { color: #d4af37; font-weight: 700; }
.recipe-benefits { background: #f7f3e4; border-left: 3px solid #d4af37; padding: 0.75rem 1rem; border-radius: 6px; font-size: 14px; line-height: 1.5; }
.recipe-storage { background: #eef4f8; border-left: 3px solid #4a90c2; padding: 0.75rem 1rem; border-radius: 6px; font-size: 14px; line-height: 1.5; }
.recipe-notes { background: #fff4e6; border-left: 3px solid #e89c2e; padding: 0.75rem 1rem; border-radius: 6px; font-size: 14px; line-height: 1.5; }
.recipe-actions { margin-top: 1.25rem; display: flex; gap: 8px; }
.recipe-actions button { flex: 1; padding: 10px; font-size: 13px; font-weight: 600; border: none; border-radius: 6px; background: #0e162f; color: #d4af37; cursor: pointer; transition: all 0.2s; }
.recipe-actions button:hover { background: #1a2444; transform: translateY(-1px); }
.dual-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1rem 0; }
.dual-col { padding: 1rem; border-radius: 8px; }
.dual-col-dog { background: #f7f3e4; border: 1px solid #e8dcb8; }
.dual-col-human { background: #f0f4f8; border: 1px solid #d8e1ec; }
.dual-col h4 { margin: 0 0 0.5rem; font-size: 13px; color: #0e162f; text-transform: none; letter-spacing: 0; font-weight: 700; }
.dual-col .dual-note { font-weight: 400; color: #666; font-size: 11px; }
.dual-col .recipe-list { padding-left: 1.1rem; font-size: 13px; }
@media (max-width: 640px) { .dual-grid { grid-template-columns: 1fr; } }
.sub-nav { display: flex; gap: 8px; padding: 12px 16px; background: #faf9f7; border-bottom: 1px solid #eee; }
.sub-tab-btn { padding: 6px 14px; border: none; background: #d4af37; color: #0e162f; cursor: pointer; border-radius: 8px; font-size: 14px; font-weight: 600; transition: all 0.2s; }
.sub-tab-btn:hover { background: #e5c04a; }
.sub-tab-btn.active { background: #0e162f; color: #d4af37; }
.info-card { background: #fff; padding: 16px; border-radius: 14px; border: 1px solid #eee; margin-bottom: 12px; }
.info-card h2 { margin: 0 0 12px; font-size: 20px; color: #d4af37; }
.info-card h3 { margin: 0 0 8px; font-size: 16px; color: #d4af37; }
.info-card .detail { font-size: 13px; color: #333; margin: 4px 0; line-height: 1.6; }
.card p { color: #333; line-height: 1.6; }
.card ul { color: #333; }
.card li { color: #333; line-height: 1.5; margin: 2px 0; }
.info-card p { color: #333; line-height: 1.6; }
.info-card ul { color: #333; }
.info-card li { color: #333; line-height: 1.5; }
.info-card .warning { background: #fff3cd; border-left: 3px solid #ffc107; padding: 8px; margin-top: 8px; border-radius: 4px; font-size: 13px; }
.info-card .danger { background: #f8d7da; border-left: 3px solid #dc3545; padding: 8px; margin-top: 8px; border-radius: 4px; font-size: 13px; }
.login-screen { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: #ffffff; }
.login-card { background: #0e162f; padding: 40px; border-radius: 20px; box-shadow: 0 10px 40px rgba(0,0,0,0.15); text-align: center; max-width: 400px; width: 90%; }
.logo-large { width: 80px; height: 80px; margin: 0 auto 20px; border-radius: 999px; display: grid; place-items: center; background: #d4af37; font-size: 40px; }
.login-card h1 { color: #ffffff; margin-bottom: 10px; font-size: 24px; }
.login-card p { color: #e0e0e0; margin-bottom: 20px; }
.login-card form { display: flex; flex-direction: column; gap: 12px; }
.login-card input[type="email"], .login-card input[type="password"] { padding: 12px; border: 2px solid #ffffff; border-radius: 12px; font-size: 16px; transition: border 0.3s; background: #ffffff; }
.login-card input[type="email"]:focus, .login-card input[type="password"]:focus { outline: none; border-color: #d4af37; }
.login-card button { padding: 12px; border: none; background: #d4af37; color: #0e162f; border-radius: 12px; font-size: 16px; font-weight: 600; cursor: pointer; transition: all 0.3s; }
.login-card button:hover { background: #e5c04a; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4); }
.error-message { color: #ff6b6b; font-size: 14px; margin-top: 10px; padding: 8px; background: rgba(255, 255, 255, 0.15); border-radius: 8px; border: 1px solid rgba(255, 107, 107, 0.3); }

@media (max-width: 768px) {
  body { font-size: 17px; }
  .tabs { 
    padding: 10px max(8px, env(safe-area-inset-left)) 10px max(8px, env(safe-area-inset-right)); 
    gap: 6px;
  }
  .tab-btn { 
    padding: 8px 14px; 
    font-size: 15px;
    flex-shrink: 0;
    min-height: 40px;
    display: flex;
    align-items: center;
  }
  .sub-tab-btn { font-size: 15px; min-height: 40px; padding: 8px 14px; }
  h1 { font-size: 20px; }
  h2 { font-size: 22px; }
  h3 { font-size: 18px; }
  h4 { font-size: 17px; }
  .sub { font-size: 14px; }
  .brand { gap: 8px; }
  .logo { width: 36px; height: 36px; font-size: 18px; }
  header { padding: max(10px, env(safe-area-inset-top)) 12px 10px 12px; }
  .grid { grid-template-columns: 1fr; padding: 12px max(8px, env(safe-area-inset-left)) 12px max(8px, env(safe-area-inset-right)); }
  .info-card { padding: 14px; }
  .info-card h2 { font-size: 22px; }
  .info-card h3 { font-size: 18px; }
  .info-card p, .card p { font-size: 17px; }
  .info-card li, .card li { font-size: 17px; }
  .controls { padding: 12px; grid-template-columns: 1fr; }
  .shopping-list { padding: 12px max(8px, env(safe-area-inset-left)) max(12px, calc(12px + env(safe-area-inset-bottom))) max(8px, env(safe-area-inset-right)); }
  .meta { font-size: 15px; }
  .badge { font-size: 13px; }
  footer { font-size: 16px; }
  .user-info { margin-top: 8px; flex-basis: 100%; }
  header { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  body { font-size: 18px; }
  .tab-group { position: static; }
  .tab-dropdown { left: 12px !important; right: 12px !important; min-width: 0; width: auto; }
  .tab-btn { 
    padding: 8px 12px; 
    font-size: 14px;
    min-height: 40px;
  }
  .sub-tab-btn { font-size: 14px; min-height: 40px; padding: 8px 12px; }
  h1 { font-size: 19px; }
  h2 { font-size: 24px; }
  h3 { font-size: 20px; }
  .logo { width: 32px; height: 32px; }
  .info-card p, .card p { font-size: 18px; }
  .info-card li, .card li { font-size: 18px; }
  footer { font-size: 17px; }
  .actions button { padding: 10px 12px; min-height: 40px; }
  .login-card { max-width: 95%; padding: 30px 20px; }
}

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #0e162f;
  color: #ffffff;
  padding: 20px;
  box-shadow: 0 -4px 12px rgba(0,0,0,0.2);
  z-index: 9999;
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.cookie-content {
  max-width: 1200px;
  margin: 0 auto;
}

.cookie-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.cookie-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 15px;
}

.cookie-btn-accept {
  background: #d4af37;
  color: #0e162f;
}

.cookie-btn-accept:hover {
  background: #e5c04a;
  transform: translateY(-1px);
}

.cookie-btn-manage {
  background: transparent;
  color: #d4af37;
  border: 2px solid #d4af37;
}

.cookie-btn-manage:hover {
  background: rgba(212, 175, 55, 0.1);
}

.cookie-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

.cookie-modal-content {
  background: #ffffff;
  padding: 30px;
  border-radius: 16px;
  max-width: 600px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
}

.cookie-category {
  padding: 16px;
  background: #f7f7f8;
  border-radius: 12px;
  margin-bottom: 12px;
}

.cookie-toggle {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
}

.cookie-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.3s;
  border-radius: 26px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

.cookie-toggle input:checked + .toggle-slider {
  background-color: #d4af37;
}

.cookie-toggle input:checked + .toggle-slider:before {
  transform: translateX(24px);
}

.cookie-toggle input:disabled + .toggle-slider {
  cursor: not-allowed;
  opacity: 0.5;
}

.search-container {
  position: relative;
  padding: 12px 16px 0;
  background: #fff;
}
.search-container input {
  width: 100%;
  padding: 12px 40px 12px 16px;
  border: 2px solid #eee;
  border-radius: 12px;
  font-size: 15px;
  font-family: Inter, system-ui, sans-serif;
  transition: border-color 0.2s;
  background: #f7f7f8;
}
.search-container input:focus {
  outline: none;
  border-color: #d4af37;
  background: #fff;
}
.search-container input::placeholder {
  color: #999;
}
#search-clear {
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-25%);
  background: none;
  border: none;
  font-size: 20px;
  color: #999;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}
#search-clear:hover {
  color: #333;
}
.search-highlight {
  background: rgba(212, 175, 55, 0.25);
  border-radius: 2px;
  padding: 0 1px;
}

#scroll-top-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: #0e162f;
  color: #d4af37;
  font-size: 22px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s, transform 0.2s;
  z-index: 999;
}
#scroll-top-btn.visible {
  opacity: 1;
  visibility: visible;
}
#scroll-top-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}

.card {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.tab-btn {
  transition: all 0.2s ease;
}

.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: #666;
}
.no-results h3 {
  color: #d4af37;
  margin-bottom: 8px;
}

@media (max-width: 768px) {
  .search-container {
    padding: 10px 12px 0;
  }
  .search-container input {
    font-size: 16px;
    padding: 12px 40px 12px 14px;
  }
  #scroll-top-btn {
    bottom: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    font-size: 20px;
  }
}

@media (max-width: 768px) {
  .cookie-banner {
    padding: 16px;
  }
  .cookie-buttons {
    flex-direction: column;
  }
  .cookie-btn {
    width: 100%;
  }
  .cookie-modal-content {
    padding: 20px;
  }
}

.recipe-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.recipe-modal {
  background: #fff;
  border-radius: 16px;
  max-width: 600px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 24px;
  position: relative;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}
.recipe-modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
  padding: 4px 8px;
  border-radius: 8px;
  line-height: 1;
}
.recipe-modal-close:hover {
  background: #f0f0f0;
  color: #333;
}
.recipe-modal h2 {
  margin: 0 0 16px;
  padding-right: 30px;
}
.recipe-modal h4 {
  margin: 16px 0 8px;
  color: #0e162f;
}
.recipe-modal ul {
  margin: 0;
  padding-left: 20px;
}
.recipe-modal li {
  margin-bottom: 4px;
  line-height: 1.6;
}

.loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: #999;
  font-size: 16px;
  gap: 10px;
}
.loading-spinner::before {
  content: '';
  width: 24px;
  height: 24px;
  border: 3px solid #e0e0e0;
  border-top-color: #d4af37;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

.section-error {
  text-align: center;
  padding: 40px 20px;
  color: #dc3545;
  font-size: 15px;
}

.trial-banner {
  background: linear-gradient(135deg, #0e162f 0%, #1a2744 100%);
  color: #fff;
  padding: 10px 16px;
  text-align: center;
  font-size: 14px;
  border-bottom: 2px solid #d4af37;
}
.trial-banner-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.founder-badge {
  background: rgba(212,175,55,0.15);
  border: 1px solid rgba(212,175,55,0.4);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  color: #d4af37;
  font-weight: 600;
}
.trial-subscribe-btn {
  background: #d4af37;
  color: #0e162f;
  border: none;
  padding: 6px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}
.trial-subscribe-btn:hover {
  background: #e5c04a;
  transform: scale(1.05);
}

.trial-expired-screen {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, #0e162f 0%, #1a2744 50%, #0e162f 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
  overflow-y: auto;
}
.trial-expired-card {
  background: #fff;
  border-radius: 20px;
  padding: 40px 32px;
  max-width: 480px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.trial-expired-card h1 {
  font-size: 24px;
  color: #0e162f;
  margin: 0 0 12px;
}
.trial-expired-card p {
  color: #555;
  font-size: 15px;
  line-height: 1.6;
  margin: 8px 0;
}
.founders-price-box {
  background: linear-gradient(135deg, #0e162f 0%, #1a2744 100%);
  border-radius: 16px;
  padding: 24px;
  margin: 24px 0;
  color: #fff;
}
.founders-badge-large {
  font-size: 18px;
  color: #d4af37;
  font-weight: 700;
  margin-bottom: 8px;
}
.founders-price {
  font-size: 48px;
  font-weight: 800;
  color: #d4af37;
}
.founders-price span {
  font-size: 18px;
  font-weight: 500;
  color: rgba(212,175,55,0.7);
}
.founders-note {
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  margin-top: 4px;
}
.trial-expired-features {
  text-align: left;
  margin: 20px 0;
}
.trial-expired-features h3 {
  color: #0e162f;
  font-size: 16px;
  margin: 0 0 12px;
}
.trial-expired-features ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.trial-expired-features li {
  padding: 6px 0;
  font-size: 14px;
  color: #444;
}
.subscribe-btn-large {
  background: #d4af37;
  color: #0e162f;
  border: none;
  padding: 16px 32px;
  border-radius: 14px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(212,175,55,0.4);
}
.subscribe-btn-large:hover {
  background: #e5c04a;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(212,175,55,0.5);
}
.cancel-note {
  font-size: 13px;
  color: #888;
  margin-top: 8px;
}
.expired-logout-btn {
  background: none;
  border: 1px solid #ddd;
  padding: 8px 24px;
  border-radius: 10px;
  color: #888;
  cursor: pointer;
  font-size: 13px;
  margin-top: 16px;
  transition: all 0.2s;
}
.expired-logout-btn:hover {
  border-color: #999;
  color: #555;
}

.subscription-success-toast {
  position: fixed;
  bottom: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border: 2px solid #d4af37;
  border-radius: 14px;
  padding: 16px 24px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  z-index: 10001;
  transition: bottom 0.4s ease;
  max-width: 400px;
}
.subscription-success-toast.show {
  bottom: 30px;
}
.toast-content {
  display: flex;
  align-items: center;
  gap: 12px;
}
.toast-content span { font-size: 28px; }
.toast-content strong { color: #0e162f; font-size: 16px; }
.toast-content p { margin: 4px 0 0; font-size: 13px; color: #666; }

/* Vet report action buttons — mobile-first */
.vet-report-actions {
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.vet-report-actions .vra-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.vet-report-actions .vra-row .vra-btn { flex: 1 1 140px; }
.vra-btn {
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 10px;
  border: none;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform 0.08s ease, box-shadow 0.15s ease;
}
.vra-btn:active { transform: translateY(1px); }
.vra-primary {
  background: #d4af37;
  color: #0e162f;
  box-shadow: 0 2px 6px rgba(212, 175, 55, 0.3);
  width: 100%;
}
.vra-primary:hover { box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4); }
.vra-secondary {
  background: #0e162f;
  color: #d4af37;
}
.vra-tertiary {
  background: #fff;
  color: #0e162f;
  border: 1px solid #0e162f;
}
@media (min-width: 600px) {
  .vet-report-actions {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
  }
  .vra-primary { width: auto; order: 2; }
  .vet-report-actions .vra-row { order: 1; }
  .vet-report-actions .vra-row .vra-btn { flex: 0 0 auto; }
}

/* ===== Footer revamp ===== */
footer {
  background: #0e162f;
  color: #cfd3dd;
  padding: 28px 20px 20px;
  text-align: center;
  margin-top: 40px;
}
.footer-pei-play {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, #d4af37 0%, #f0c850 100%);
  color: #0e162f;
  padding: 14px 18px;
  border-radius: 12px;
  margin: 0 auto 18px;
  max-width: 760px;
  text-align: left;
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.25);
}
.footer-pei-play .fpp-icon { font-size: 32px; line-height: 1; flex-shrink: 0; }
.footer-pei-play .fpp-text { flex: 1; min-width: 0; }
.footer-pei-play .fpp-text h4 { margin: 0 0 3px; color: #0e162f; font-size: 16px; font-weight: 700; }
.footer-pei-play .fpp-text p { margin: 0; color: #0e162f; font-size: 13px; line-height: 1.45; }
.footer-pei-play .fpp-cta {
  display: inline-block; padding: 10px 16px; background: #0e162f; color: #d4af37;
  border-radius: 8px; font-weight: 600; font-size: 14px; text-decoration: none;
  white-space: nowrap; flex-shrink: 0;
}
.footer-pei-play .fpp-cta:hover { background: #1a2444; }
@media (max-width: 560px) {
  .footer-pei-play { flex-direction: column; text-align: center; gap: 10px; }
  .footer-pei-play .fpp-text { text-align: center; }
}

.footer-socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 0 auto 16px;
  max-width: 900px;
}
.footer-socials .fs-label {
  color: #d4af37; font-weight: 600; font-size: 13px;
  letter-spacing: 0.5px; text-transform: uppercase;
  margin-right: 6px;
}
.footer-socials .fs-link {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.35);
  color: #d4af37;
  border-radius: 999px;
  font-size: 13px; font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, transform 0.08s, border-color 0.15s;
}
.footer-socials .fs-link:hover {
  background: rgba(212, 175, 55, 0.22);
  border-color: #d4af37;
}
.footer-socials .fs-link:active { transform: translateY(1px); }
.footer-socials .fs-icon {
  display: inline-grid; place-items: center;
  width: 22px; height: 22px;
  background: #d4af37; color: #0e162f;
  border-radius: 50%;
  font-size: 11px; font-weight: 800;
  font-family: Helvetica, Arial, sans-serif;
}
@media (max-width: 480px) {
  .footer-socials .fs-text { display: none; }
  .footer-socials .fs-link { padding: 8px 10px; }
  .footer-socials .fs-label { width: 100%; text-align: center; margin: 0 0 4px; }
}

.footer-copy {
  margin: 14px auto 8px; max-width: 800px;
  font-size: 13px; color: #cfd3dd; line-height: 1.55;
}
.footer-policy {
  margin: 6px 0 10px; font-size: 14px;
}
.footer-policy a { color: #d4af37; text-decoration: none; }
.footer-policy a:hover { text-decoration: underline; }
.footer-company {
  margin: 6px auto 0; max-width: 800px;
  font-size: 12px; color: #8a92a3; line-height: 1.55;
}

/* ===== Home hero photo slideshow ===== */
.home-hero-slideshow { position: relative; width: 100%; max-width: 700px; height: 380px; margin: 0 auto 2rem; border-radius: 16px; overflow: hidden; box-shadow: 0 6px 24px rgba(0,0,0,0.18); background: #0e162f; }
.home-hero-slideshow .hhs-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.2s ease; }
.home-hero-slideshow .hhs-img.active { opacity: 1; }
.home-hero-slideshow .hhs-caption { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(0deg, rgba(14,22,47,0.85) 0%, rgba(14,22,47,0) 100%); color: #fff; padding: 1.5rem 1rem 1rem; text-align: center; font-size: 14px; letter-spacing: 0.5px; }
@media (max-width: 600px) { .home-hero-slideshow { height: 260px; } }

/* ===== Gallery page ===== */
.gallery-wrap { max-width: 1100px; margin: 0 auto; padding: 1rem; }
.gallery-head { text-align: center; margin-bottom: 2rem; }
.gallery-head h2 { color: #d4af37; font-size: 32px; margin: 0 0 0.75rem; }
.gallery-head p { color: #555; max-width: 640px; margin: 0 auto; line-height: 1.7; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.gal-card { margin: 0; background: #fff; border: 1px solid #efe4c5; border-radius: 12px; overflow: hidden; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; position: relative; }
.gal-delete { position: absolute; top: 8px; right: 8px; background: rgba(180,0,0,0.85); color: #fff; border: none; width: 32px; height: 32px; border-radius: 50%; font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(0,0,0,0.3); transition: background 0.15s, transform 0.15s; z-index: 2; }
.gal-delete:hover { background: #c00; transform: scale(1.1); }
.gal-delete:disabled { opacity: 0.5; cursor: wait; }
.gal-card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(14,22,47,0.12); border-color: #d4af37; }
.gal-card img { display: block; width: 100%; height: 200px; object-fit: cover; }
.gal-card figcaption { padding: 0.6rem 0.75rem; font-size: 13px; color: #0e162f; font-weight: 600; text-align: center; }
.gallery-foot { text-align: center; color: #888; font-size: 12px; margin-top: 2rem; }

/* Lightbox */
.gal-lightbox { position: fixed; inset: 0; background: rgba(10, 15, 34, 0.95); z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 2rem; }
.gal-lightbox[hidden] { display: none; }
.gal-lightbox img { max-width: 92vw; max-height: 82vh; border-radius: 10px; box-shadow: 0 8px 40px rgba(0,0,0,0.6); }
.gal-lb-cap { position: absolute; bottom: 1.5rem; left: 0; right: 0; text-align: center; color: #fff; font-size: 15px; letter-spacing: 0.5px; }
.gal-close, .gal-prev, .gal-next { position: absolute; background: rgba(212,175,55,0.95); color: #0e162f; border: none; border-radius: 50%; width: 48px; height: 48px; font-size: 24px; font-weight: 800; cursor: pointer; display: flex; align-items: center; justify-content: center; line-height: 1; transition: background 0.2s; }
.gal-close:hover, .gal-prev:hover, .gal-next:hover { background: #e5c04a; }
.gal-close { top: 1rem; right: 1rem; }
.gal-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.gal-next { right: 1rem; top: 50%; transform: translateY(-50%); }
@media (max-width: 600px) { .gal-prev, .gal-next { width: 40px; height: 40px; font-size: 20px; } .gal-card img { height: 160px; } }
