:root {
  --apasa-green: #5c8d42;
  --apasa-green-dark: #4c7537;
  --apasa-orange: #f5a300;
  --apasa-orange-dark: #df9200;
  --apasa-cream: #f8f2e4;
  --apasa-card: #fff;
  --apasa-text: #444;
  --apasa-radius: 18px;
  --apasa-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  --apasa-transition: 0.25s ease;
}

#asm3-adoptables { width: 100%; max-width: 1400px; margin: 0 auto; padding: 20px; box-sizing: border-box; color: var(--apasa-text); font-family: Lato, "Helvetica Neue", Arial, sans-serif; }
#asm3-adoptable-list { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; align-items: stretch; }
#asm3-adoptable-filters { display: none !important; }
.asm3-adoptable-item { position: relative; display: flex !important; flex-direction: column; height: 100%; overflow: hidden; text-align: center; background: var(--apasa-card); border-radius: var(--apasa-radius); box-shadow: var(--apasa-shadow); transition: var(--apasa-transition); }
.asm3-adoptable-item:hover { transform: translateY(-6px); }
.asm3-adoptable-link { position: relative; display: flex; flex: 1; flex-direction: column; color: inherit; text-decoration: none; }
.asm3-adoptable-thumbnail { width: calc(100% - 24px) !important; max-width: none !important; height: auto !important; aspect-ratio: 1 / 1; margin: 12px; display: block; object-fit: cover; object-position: center 15%; border-radius: 18px !important; }
.asm3-adoptable-name { margin: 4px 0; padding: 0 18px; color: #111; font-family: "Comic Sans MS", "Chalkboard SE", "Comic Neue", cursive; font-size: 30px; font-weight: 400; line-height: 1.15; }
.asm3-adoptable-tagline { display: none !important; }
.apasa-extra { display: flex; flex: 1; flex-direction: column; padding: 0 20px 20px; }
.apasa-breed { height: 56px; min-height: 56px; margin: 4px 0 10px; display: flex; align-items: center; justify-content: center; overflow: hidden; color: var(--apasa-orange); font-size: 18px; font-weight: 700; line-height: 1.3; }
.apasa-breed-long { font-size: 15.5px; line-height: 1.25; }
.apasa-summary { height: 72px; min-height: 72px; margin-bottom: 18px; overflow: hidden; display: -webkit-box; color: #555; font-size: 15px; line-height: 1.6; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.apasa-details { min-height: 42px; margin-top: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #666; font-size: 14px; font-weight: 500; line-height: 1.5; }
.apasa-details-age, .apasa-details-sex-size { display: block; width: 100%; min-height: 21px; white-space: nowrap; }
.apasa-waiting { min-height: 55px; margin-top: 0; padding: 14px 0 20px; box-sizing: border-box; display: flex; align-items: flex-start; justify-content: center; color: #777; font-size: 14px; font-weight: 600; }
.apasa-waiting-new span { padding: 5px 11px; color: #244b20; background: #dff6dd; border-radius: 30px; font-size: 12px; font-weight: 700; line-height: 1.25; }
.apasa-button { width: 85%; height: 62px; margin: auto auto 0; padding: 8px 18px; box-sizing: border-box; border: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; color: #fff; background: var(--apasa-orange); border-radius: 40px; cursor: pointer; font: inherit; font-size: 16px; font-weight: 600; line-height: 1.2; text-align: center; transition: var(--apasa-transition); }
.asm3-adoptable-item:hover .apasa-button { background: var(--apasa-orange-dark); }
.apasa-toolbar { margin: 0 0 28px; padding: 18px; background: #fff; border-radius: 14px; box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08); }
.apasa-toolbar-controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: 12px; align-items: end; }
.apasa-toolbar input, .apasa-toolbar select, .apasa-clear { width: 100%; min-height: 44px; padding: 10px 12px; box-sizing: border-box; border: 1px solid #d7d7d7; border-radius: 9px; color: #444; background: #fff; font: inherit; font-size: 14px; }
.apasa-sort-field { display: grid; gap: 4px; }
.apasa-sort-label { color: #666; font-size: 12px; font-weight: 800; line-height: 1.2; }
.apasa-toolbar input:focus, .apasa-toolbar select:focus, .apasa-clear:focus-visible { border-color: var(--apasa-orange); outline: 3px solid rgba(245, 163, 0, 0.2); }
.apasa-clear { border-color: var(--apasa-green); color: #fff; background: var(--apasa-green); cursor: pointer; font-weight: 700; }
.apasa-clear:hover { background: var(--apasa-green-dark); }
.apasa-results { margin-top: 12px; color: #666; font-size: 14px; font-weight: 700; }
.apasa-empty { margin-top: 18px; padding: 24px; color: #666; text-align: center; }
.apasa-intro { max-width: 1120px; margin: 0 auto 24px; padding: 28px 28px 8px; box-sizing: border-box; color: var(--apasa-text); text-align: center; }
.apasa-intro h1 { margin: 0 0 34px; color: #171717; font-family: "Comic Sans MS", "Chalkboard SE", "Comic Neue", cursive; font-size: clamp(30px, 4vw, 44px); font-weight: 700; line-height: 1.15; }
.apasa-intro h1::before { content: "🐾"; margin-right: 14px; font-size: .8em; }
.apasa-intro-main { margin: 0 0 18px; font-size: 17px; font-weight: 600; line-height: 1.55; text-align: left; }
.apasa-intro-interest { margin: 0 0 4px; color: var(--apasa-orange); font-size: 18px; font-weight: 800; }
.apasa-intro p:not(.apasa-intro-main):not(.apasa-intro-interest) { margin: 3px 0; font-size: 17px; line-height: 1.45; }
.apasa-intro a { color: var(--apasa-orange); font-weight: 800; text-decoration: none; }
.apasa-intro a:hover, .apasa-intro a:focus-visible { color: var(--apasa-orange-dark); text-decoration: underline; }
.apasa-list-footer { max-width: 1120px; margin: 30px auto 10px; padding: 22px 24px; box-sizing: border-box; color: var(--apasa-text); background: #fff; border-radius: 18px; box-shadow: var(--apasa-shadow); font-size: 18px; line-height: 1.5; text-align: center; }
.apasa-list-footer p { margin: 0; }
.apasa-list-footer a { color: var(--apasa-orange); font-weight: 800; text-decoration: none; }
.apasa-list-footer a:hover, .apasa-list-footer a:focus-visible { color: var(--apasa-orange-dark); text-decoration: underline; }
.apasa-home-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; align-items: stretch; padding: 20px; }
.apasa-home-grid .asm3-adoptable-item { width: auto !important; }
.apasa-home-loading { padding: 40px 20px; color: #666; font-weight: 700; text-align: center; }
.apasa-hidden { display: none !important; }
.apasa-badge { display: none !important; }
.apasa-senior-rosette { position: absolute; top: 8px; left: 8px; z-index: 3; width: 72px; height: 72px; padding: 6px 5px 5px; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: center; transform: rotate(-9deg); color: #111; background: var(--apasa-orange); border: 3px solid #111; border-radius: 50%; box-shadow: 0 3px 10px rgba(0,0,0,.3), inset 0 0 0 2px rgba(255,255,255,.85); font-size: 7px; font-weight: 900; line-height: 1.02; letter-spacing: .1px; text-align: center; text-transform: uppercase; white-space: pre-line; cursor: help; }
.apasa-senior-rosette::before { content: ""; width: 22px; height: 19px; margin-bottom: 1px; flex: 0 0 auto; background: #fff; -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20viewBox=%270%200%2064%2056%27%3E%3Cellipse%20cx=%2732%27%20cy=%2740%27%20rx=%2718%27%20ry=%2714%27/%3E%3Cellipse%20cx=%2710%27%20cy=%2724%27%20rx=%277%27%20ry=%279%27%20transform=%27rotate(-25%2010%2024)%27/%3E%3Cellipse%20cx=%2724%27%20cy=%2711%27%20rx=%277%27%20ry=%279%27%20transform=%27rotate(-10%2024%2011)%27/%3E%3Cellipse%20cx=%2740%27%20cy=%2711%27%20rx=%277%27%20ry=%279%27%20transform=%27rotate(10%2040%2011)%27/%3E%3Cellipse%20cx=%2754%27%20cy=%2724%27%20rx=%277%27%20ry=%279%27%20transform=%27rotate(25%2054%2024)%27/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20viewBox=%270%200%2064%2056%27%3E%3Cellipse%20cx=%2732%27%20cy=%2740%27%20rx=%2718%27%20ry=%2714%27/%3E%3Cellipse%20cx=%2710%27%20cy=%2724%27%20rx=%277%27%20ry=%279%27%20transform=%27rotate(-25%2010%2024)%27/%3E%3Cellipse%20cx=%2724%27%20cy=%2711%27%20rx=%277%27%20ry=%279%27%20transform=%27rotate(-10%2024%2011)%27/%3E%3Cellipse%20cx=%2740%27%20cy=%2711%27%20rx=%277%27%20ry=%279%27%20transform=%27rotate(10%2040%2011)%27/%3E%3Cellipse%20cx=%2754%27%20cy=%2724%27%20rx=%277%27%20ry=%279%27%20transform=%27rotate(25%2054%2024)%27/%3E%3C/svg%3E") center / contain no-repeat; }
.apasa-senior-rosette:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.apasa-puppy-rosette { position: absolute; top: 8px; left: 8px; z-index: 3; width: 64px; height: 64px; padding: 5px 4px 4px; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: center; transform: rotate(-9deg); color: #111; background: var(--apasa-orange); border: 3px solid #111; border-radius: 50%; box-shadow: 0 3px 10px rgba(0,0,0,.3), inset 0 0 0 2px rgba(255,255,255,.85); font-size: 8.5px; font-weight: 900; line-height: 1.02; letter-spacing: .1px; text-align: center; text-transform: uppercase; cursor: help; }
.apasa-puppy-rosette::before { content: "🐾"; margin-bottom: 1px; font-size: 18px; line-height: 1; }
.apasa-puppy-rosette:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.apasa-reserved-ribbon { position: absolute; top: calc(var(--apasa-photo-bottom, 230px) - 30px); right: -7px; z-index: 4; padding: 7px 12px; transform: rotate(-38deg); transform-origin: center; color: #fff; background: var(--apasa-orange); border: 2px solid #fff; border-radius: 5px; box-shadow: 0 3px 9px rgba(0,0,0,.3); font-size: 11px; font-weight: 900; line-height: 1; letter-spacing: .5px; text-transform: uppercase; pointer-events: none; }
.asm3-adoptable-link:focus-visible { outline: 3px solid var(--apasa-orange); outline-offset: 4px; border-radius: 18px; }

@media (max-width: 1200px) { #asm3-adoptable-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) { #asm3-adoptable-list, .apasa-home-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; } .asm3-adoptable-name { font-size: 28px; } }
@media (max-width: 640px) { #asm3-adoptables { padding: 12px; } #asm3-adoptable-list, .apasa-home-grid { grid-template-columns: 1fr; gap: 18px; align-items: start; } .apasa-home-grid { padding: 12px; } .asm3-adoptable-item { height: auto; } .asm3-adoptable-link { flex: none; } .asm3-adoptable-name { font-size: 30px; } .apasa-extra { flex: none; padding: 0 16px 16px; } .apasa-breed { height: auto; min-height: 0; margin: 12px 0 10px; font-size: 20px; } .apasa-breed-long { font-size: 18px; } .apasa-summary { height: auto; min-height: 0; margin-bottom: 12px; font-size: 17px; line-height: 1.55; -webkit-line-clamp: 4; } .apasa-details { min-height: 0; font-size: 16px; } .apasa-details-age, .apasa-details-sex-size { min-height: 24px; } .apasa-waiting { min-height: 0; padding: 10px 0 14px; font-size: 16px; } .apasa-waiting-new span { font-size: 14px; } .apasa-button { height: 56px; margin: 0 auto; font-size: 18px; } .apasa-intro { padding: 18px 14px 4px; } .apasa-intro h1 { margin-bottom: 22px; } .apasa-intro-main { font-size: 16px; text-align: center; } .apasa-intro p:not(.apasa-intro-main):not(.apasa-intro-interest) { font-size: 16px; } .apasa-toolbar { padding: 14px; } .apasa-toolbar-controls { grid-template-columns: 1fr; } .apasa-list-footer { margin-top: 22px; padding: 18px 16px; font-size: 17px; } }
@media (max-width: 640px) { .apasa-puppy-rosette { top: 10px; left: 10px; width: 72px; height: 72px; font-size: 9.5px; } .apasa-puppy-rosette::before { font-size: 21px; } }
@media print { .asm3-adoptable-item { break-inside: avoid; border: 1px solid #ccc; box-shadow: none; } }
