@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:ital,wght@0,600;0,700;1,600;1,700&display=swap');
:root{--ink:#263b35;--green:#355b4b;--cream:#f6f4ed;--orange:#e6a16e;--muted:#78847d}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--cream);color:var(--ink);font-family:'DM Sans',Arial,sans-serif}.topbar{height:82px;padding:0 max(calc((100% - 1160px)/2),5%);display:flex;align-items:center;justify-content:space-between;background:#fff}.brand{display:flex;gap:12px;align-items:center;text-decoration:none;color:var(--ink);font-weight:700;font-size:18px}.brand-mark{width:42px;height:42px;border-radius:50%;background:#f6e6d8;color:#c77f4c;display:grid;place-items:center;font-size:23px}.brand small{display:block;font-size:10px;letter-spacing:1.3px;text-transform:uppercase;color:#849087;font-weight:500;margin-top:3px}.topbar nav{display:flex;gap:24px;align-items:center}.nav-link{border:0;background:none;color:var(--ink);font:inherit;text-decoration:none;cursor:pointer}.nav-add{background:var(--green);color:#fff;text-decoration:none;padding:12px 18px;border-radius:6px;font-size:14px}.inline{display:inline}.container{max-width:1160px;margin:auto;padding:0 24px}.hero{margin:34px 0 72px;background:#dce5d9;border-radius:10px;min-height:390px;display:flex;overflow:hidden;position:relative}.hero-copy{padding:58px 7%;width:58%;position:relative;z-index:2}.eyebrow{font-size:10px;letter-spacing:2.4px;font-weight:700;color:#9b765c}.hero h1,.form-shell h1{font:700 55px/1.08 'Playfair Display',Georgia,serif;margin:17px 0}.hero h1 em{color:#b8784e}.hero p{max-width:440px;color:#5d6e64;line-height:1.7;font-size:15px;margin:18px 0 26px}.button{display:inline-flex;align-items:center;justify-content:center;border:0;border-radius:5px;padding:13px 20px;text-decoration:none;font:600 13px 'DM Sans',sans-serif;cursor:pointer}.light{background:#fff;color:var(--green)}.dark{background:var(--green);color:#fff}.hero-art{position:absolute;right:0;top:0;width:46%;height:100%;background:radial-gradient(circle at 52% 55%,#f3d9bd 0 24%,transparent 24.5%),#b8cbb9;overflow:hidden}.sun{position:absolute;width:280px;height:280px;border:1px solid #fff8;border-radius:50%;top:50px;left:90px}.hero-heart{position:absolute;top:105px;left:190px;font-size:100px;color:#fff8;transform:rotate(-12deg)}.hero-note{position:absolute;bottom:36px;right:40px;font-size:10px;letter-spacing:3px;line-height:1.8;color:#476354;text-align:right}.listing{padding-bottom:80px}.section-heading{display:flex;align-items:end;justify-content:space-between;margin-bottom:24px}.section-heading h2{font:700 38px 'Playfair Display',Georgia,serif;margin:8px 0 0}.count{font-size:13px;color:var(--muted);padding-bottom:7px}.filters{display:flex;gap:10px;margin-bottom:26px}.filters input,.filters select,.animal-form input,.animal-form select,.animal-form textarea{border:1px solid #dce1d9;border-radius:5px;background:#fff;padding:13px 14px;font:14px 'DM Sans',sans-serif;color:var(--ink);min-width:0}.filters input{flex:1}.filters select{width:190px}.reset{align-self:center;color:var(--muted);font-size:13px}.grid{display:grid;grid-template-columns:repeat(3,1fr);gap:22px}.card{background:#fff;border-radius:8px;overflow:hidden;box-shadow:0 5px 22px #243d3010}.photo-wrap{height:220px;position:relative;background:#e9eee7}.photo-wrap img{width:100%;height:100%;object-fit:cover}.placeholder{height:100%;display:grid;place-items:center;background:linear-gradient(135deg,#e8eee4,#f4e9df)}.placeholder span{font-size:74px;filter:grayscale(.15)}.badge{position:absolute;top:14px;left:14px;background:#e6f0e5;color:#3f694d;padding:7px 11px;border-radius:30px;font-size:10px;font-weight:700}.badge.muted{background:#f0eee8;color:#777}.card-body{padding:19px 20px 20px}.animal-type{font-size:11px;color:#8a968e;letter-spacing:.5px}.card h3{font:700 25px 'Playfair Display',Georgia,serif;margin:6px 0}.facts{font-size:12px;color:#879188}.card p{font-size:13px;line-height:1.6;color:#65736b;min-height:42px}.contact{display:inline-block;color:#477257;font-size:12px;font-weight:700;text-decoration:none;margin-top:3px}.admin-actions{border-top:1px solid #edf0eb;margin-top:17px;padding-top:13px;display:flex;gap:18px}.admin-actions a,.admin-actions button{font:600 12px 'DM Sans';color:#52765e;background:none;border:0;padding:0;text-decoration:none;cursor:pointer}.admin-actions button{color:#b16b55}.empty{text-align:center;padding:60px 20px;background:#fff;border-radius:8px}.empty div{font-size:40px}.empty h3{font:700 25px 'Playfair Display'}.empty p,.muted-text{color:var(--muted);font-size:14px}.form-shell{max-width:760px;margin:55px auto 90px;background:#fff;padding:42px;border-radius:9px}.form-shell.narrow{max-width:450px}.form-shell h1{font-size:38px;margin:10px 0}.back{display:inline-block;color:#718078;text-decoration:none;font-size:13px;margin-bottom:28px}.animal-form{margin-top:28px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:19px}.animal-form label{display:flex;flex-direction:column;gap:8px;font-size:12px;font-weight:700;color:#506057}.animal-form .wide{grid-column:1/-1}.animal-form small{font-weight:400;color:#89938c}.animal-form textarea{resize:vertical}.form-buttons{display:flex;gap:10px;margin-top:25px}.outline{border:1px solid #dce1d9;color:#637269}.full{width:100%;margin-top:5px}.messages{padding-top:15px}.alert{padding:12px 16px;border-radius:5px;font-size:13px;margin-bottom:8px}.alert.success{background:#e6f0e5;color:#3f694d}.alert.error{background:#fae9e4;color:#9b4d3b}footer{border-top:1px solid #e5e8e1;text-align:center;padding:25px;color:#89938c;font-size:12px}footer span{color:#c77f4c}
@media(max-width:800px){.hero{min-height:360px}.hero-copy{width:70%;padding:45px 6%}.hero-art{width:38%;opacity:.65}.hero h1{font-size:45px}.grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:560px){.topbar{height:70px;padding:0 18px}.brand{font-size:15px}.brand-mark{width:36px;height:36px}.brand small{font-size:8px}.nav-add{padding:10px;font-size:11px}.nav-link{font-size:12px}.container{padding:0 16px}.hero{margin:20px 0 48px;min-height:380px}.hero-copy{width:100%;padding:38px 25px}.hero-art{width:50%;opacity:.28}.hero h1{font-size:43px}.hero p{max-width:320px}.section-heading h2{font-size:31px}.filters{flex-wrap:wrap}.filters input{flex-basis:100%}.filters select{flex:1}.grid{grid-template-columns:1fr}.photo-wrap{height:245px}.form-shell{margin:25px auto 55px;padding:25px 18px}.form-grid{grid-template-columns:1fr}.animal-form .wide{grid-column:auto}.form-shell h1{font-size:32px}}

/* Галерея фотографий в карточке питомца */
.gallery-image{display:block;width:100%;height:100%;object-fit:cover}
.gallery-image.gallery-hidden{display:none}
.gallery-prev,.gallery-next{position:absolute;top:50%;transform:translateY(-50%);width:34px;height:34px;border:0;border-radius:50%;background:#ffffffdf;color:#263b35;font-size:25px;line-height:1;cursor:pointer;z-index:2}
.gallery-prev{left:10px}.gallery-next{right:10px}
.gallery-count{position:absolute;right:12px;bottom:12px;padding:5px 9px;border-radius:20px;background:#263b35c9;color:#fff;font-size:11px;z-index:2}
.current-photos{display:flex;flex-direction:column;gap:10px}
.current-photos strong{font-size:12px;color:#506057}
.current-photo-list{display:flex;flex-wrap:wrap;gap:8px}
.current-photo-list img{width:88px;height:72px;object-fit:cover;border-radius:5px;border:1px solid #dce1d9}

/* Увеличенный просмотр фотографий */
.gallery-image{cursor:zoom-in}
.photo-lightbox{display:none;position:fixed;inset:0;z-index:9999;background:rgba(12,20,16,.92);align-items:center;justify-content:center;padding:55px 24px 24px}
.photo-lightbox.is-open{display:flex}
.photo-lightbox .lightbox-image{display:block;width:auto;height:auto;max-width:min(96vw,1400px);max-height:calc(100vh - 80px);object-fit:contain;border-radius:5px;box-shadow:0 12px 50px #0008;cursor:default}
.lightbox-close{position:absolute;top:14px;right:22px;width:44px;height:44px;border:0;border-radius:50%;background:#ffffff20;color:#fff;font-size:34px;line-height:1;cursor:pointer}
.lightbox-close:hover{background:#ffffff38}
.current-photo-item{display:flex;flex-direction:column;align-items:center;gap:6px;padding:6px;border:1px solid #dce1d9;border-radius:7px;background:#fff}
.current-photo-item img{width:110px;height:86px;object-fit:cover;border:0}
.delete-photo-button{border:0;border-radius:4px;padding:5px 9px;background:#8f3434;color:#fff;font-size:12px;cursor:pointer}
.delete-photo-button:hover{background:#702626}
