[hidden] { display: none !important; }
.popup { max-height: calc(100dvh - 40px); overflow-y: auto; }
.popup .popup-close { position: absolute; top: 8px; right: 8px; display: inline-flex;
  align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0;
  background: transparent; color: #596253; border-radius: 50%; font: 28px/1 system-ui,sans-serif; }
.popup .popup-close:hover { background: #edf2e3; color: #30392f; }
.popup .popup-close:focus-visible { outline: 3px solid #ba9542; outline-offset: 2px; }
.popup #popupAdopt { background: #396843; margin-bottom: 12px; }
.popup #popupAdoptionStatus { font-size: 14px; margin-bottom: 12px; }
.cat-treat-row { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px; }
.treat-count { display: inline-flex; align-items: center; white-space: nowrap; gap: 4px; padding: 4px 9px;
  font: 600 14px/1.5 system-ui,sans-serif; background: #f5e9d9; color: #63513c; border-radius: 999px; }
.popup #giveTreat { background: #e6eddf; color: #315e3c; border: 1px solid #c5d2b9;
  font: 600 14px/1.5 system-ui,sans-serif; padding: 8px 12px; border-radius: 20px; margin: 0; }
.popup #giveTreat:focus-visible { outline: 3px solid #ba9542; outline-offset: 3px; }
.popup .treat-note { font: 12px/1.5 system-ui,sans-serif; color: #596253; margin: 8px 0 16px; }
.adoption-card .owner-treats { font-size: 13px; color: #596253; margin: 14px 0; }
button:disabled { opacity: .6; cursor: wait; }
.adoption-notice { position: fixed; bottom: 10px; left: 50%; transform: translateX(-50%);
  pointer-events: none;
  z-index: 150; width: max-content; max-width: min(600px,90vw); padding: 12px 18px;
  border-radius: 14px; background: #fffdf8; color: #303e2e; border: 1px solid #8d9f79;
  font: 14px/1.5 system-ui, sans-serif; box-shadow: 0 3px 15px #0002; }
.adoption-page { margin: 0; background: radial-gradient(ellipse at 12% 0%,#e4ecd8,transparent 55%),#f6f3eb;
  color: #30392f; font: 16px/1.6 system-ui,sans-serif; }
.adoption-page * { box-sizing: border-box; }
.adoption-card { width: min(1040px,calc(100% - 32px)); margin: 32px auto; padding: clamp(20px,4vw,48px);
  border-radius: 28px; background: #fffdf8; border: 1px solid #ccd5bc; box-shadow: 0 16px 55px #30402b0d; }
.adoption-page:not(.is-adopted) .adoption-card { max-width: 680px; }
.adoption-topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 14px; }
.adoption-topbar a { text-decoration: none; }
.adoption-wordmark { display: inline-flex; align-items: center; gap: 7px; font: 700 19px/1 Georgia,serif; letter-spacing: -.4px; }
.brand-paw { display: block; width: 23px; height: 23px; transform: rotate(8deg); }
.welcome-header { text-align: center; margin: 42px auto 0; max-width: 720px; }
.adoption-card h1 { margin: 12px 0 16px; line-height: 1.13; font-family: Georgia,serif;
  font-weight: 500; letter-spacing: -1.3px; font-size: clamp(34px,5.5vw,62px); overflow-wrap: anywhere; }
.adoption-eyebrow { margin: 0; color: #607452; font-size: 11px; font-weight: 750; letter-spacing: 1.8px; text-transform: uppercase; }
.welcome-scene { height: 154px; display: flex; justify-content: center; align-items: flex-end; gap: 0; margin: 10px auto 22px; }
.scene-cat { display: block; width: 98px; height: 126px; object-fit: contain; transform: translateX(20px); z-index: 1; }
.scene-house { display: block; width: 132px; height: 126px; object-fit: contain; }
.scene-spark { align-self: center; font-size: 34px; color: #c59a43; }
.scene-spark-one { margin: 0 12px 30px 0; }
.scene-spark-two { color: #c6867d; margin: 20px 0 0 14px; }
.celebrating .scene-house { animation: welcome-home .8s ease-out both; }
.celebrating .scene-cat { animation: welcome-cat 1.1s ease-out both; }
.adoption-card a { color: #315e3c; }
.adoption-card h2 { margin: 8px 0 12px; font-size: 23px; line-height: 1.3; letter-spacing: -.5px; }
.welcome-actions { text-align: center; }
.welcome-actions .action + .action { margin-left: 8px; }
.is-managing .welcome-header { margin-top: 26px; }
.is-managing .welcome-header h1 { font-size: clamp(30px,4vw,42px); }
.is-managing .welcome-story,.is-managing .payment-badge,.is-managing .impact-ribbon { display: none; }
.is-managing .owner-layout { margin-top: 26px; }
.welcome-story { max-width: 640px; margin: 0 auto 16px; color: #64705d; }
.payment-badge { font-size: 12px; color: #657958; margin: 12px 0 28px; }
.impact-ribbon { display: flex; align-items: center; gap: 18px; padding: 22px 26px; margin: 30px 0;
  background: #edf2e3; border-radius: 18px; }
.impact-icon { display: grid; width: 52px; height: 52px; flex: 0 0 52px; place-items: center; border-radius: 50%; background: #fffdf8; box-shadow: 0 3px 10px #30402b12; }
.impact-icon img { display: block; width: 31px; height: 31px; transform: rotate(-7deg); }
.inline-paw { display: inline-block; width: 19px; height: 19px; margin-left: 4px; vertical-align: -4px; }
.impact-ribbon h2 { font-size: 16px; letter-spacing: 0; margin: 0 0 6px; }
.impact-ribbon p { margin: 0; color: #5a6951; font-size: 13px; }
.owner-layout { display: grid; grid-template-columns: 1.15fr 1fr; gap: 24px; }
.owner-panel { min-width: 0; padding: 26px; border: 1px solid #e0e4d7; border-radius: 20px; }
.panel-intro { margin: 0 0 20px; color: #63705c; font-size: 14px; }
.key-panel { background: #faf6ee; align-self: start; }
.key-icon { display: block; font-size: 36px; margin: 18px 0 10px; }
.adoption-card label { display: block; margin: 18px 0 5px; font-weight: 600; }
.adoption-card input,.adoption-card textarea { box-sizing: border-box; width: 100%; border: 1px solid #9aa78e;
  border-radius: 10px; padding: 11px; background: white; color: #30392f; font: inherit; }
.adoption-card textarea { min-height: 120px; resize: vertical; }
.adoption-card input::placeholder,.adoption-card textarea::placeholder { color: #75806e; }
.adoption-card button,.adoption-card .action { display: inline-block; background: #396843; color: white;
  border: none; padding: 13px 22px; border-radius: 25px; font: inherit; cursor: pointer; margin: 12px 0 0;
  text-decoration: none; white-space: normal; }
.adoption-card button:hover,.adoption-card .action:hover { background: #2c5435; color: white; }
.adoption-card :focus-visible { outline: 3px solid #ba9542; outline-offset: 4px; }
.adoption-card .secondary { background: #e6eddf; color: #30392f; }
.adoption-card .privacy-note { font-size: 13px; color: #596253; margin: 8px 0 18px; }
.adoption-card #result { white-space: pre-wrap; overflow-wrap: anywhere; color: #516449; }
.adoption-card #manageLink { font-size: 13px; }
.welcome-signoff { text-align: center; color: #7b856f; margin: 36px 0 0; font-size: 14px; }
.welcome-signoff span { color: #c6867d; }
.legal-footer { display:flex; justify-content:center; flex-wrap:wrap; gap:8px 18px; padding:0 18px 30px;
  color:#687362; font:13px/1.5 system-ui,sans-serif; }
.legal-footer a { color:#496149; text-underline-offset:3px; }
.celebration { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 200; }
.celebration-particle { position: absolute; top: -40px; font-size: 22px; opacity: 0;
  animation: welcome-shower var(--duration) var(--delay) ease-in both; }
@keyframes welcome-shower {
  0% { opacity: 0; transform: translate3d(0,0,0) rotate(0); }
  12% { opacity: .9; }
  80% { opacity: .85; }
  100% { opacity: 0; transform: translate3d(var(--drift),calc(100dvh + 80px),0) rotate(var(--turn)); }
}
@keyframes welcome-home { from { opacity: 0; transform: translateY(12px) scale(.85); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes welcome-cat { from { opacity: 0; transform: translateX(-16px) scale(.86) rotate(-5deg); } to { opacity: 1; transform: translateX(20px) scale(1) rotate(0); } }
@media(max-width:720px) {
  .adoption-card { margin: 16px auto; }
  .owner-layout { grid-template-columns: 1fr; gap: 18px; }
  .welcome-header { margin-top: 34px; }
  .owner-panel { padding: 22px; }
  .impact-ribbon { padding: 20px; gap: 12px; align-items: flex-start; }
  .welcome-story { font-size: 15px; }
  .welcome-actions .action { display: block; width: 100%; }
  .welcome-actions .action + .action { margin-left: 0; }
}
@media(max-width:380px) {
  .adoption-topbar { font-size: 12px; }
  .scene-house { width: 105px; height: 105px; }
  .scene-cat { width: 78px; height: 105px; transform: translateX(15px); }
  .scene-spark { font-size: 24px; margin-left: 6px; margin-right: 6px; }
  .owner-panel { padding: 16px; }
}
@media(prefers-reduced-motion:reduce) {
  .celebration { display: none; }
  .adoption-page .scene-house,.adoption-page .scene-cat,.celebration-particle { animation: none; }
}
