/* ==========================================================================
   Карточка подопечного: галерея, просмотр, анкета, вопросы. Цвета — токены из daylapu.css.
   ========================================================================== */

/* Карточка подопечного. Телефон: фото → имя → история → анкета (side раскрыт через contents).
   Десктоп: слева фото + история, справа имя + анкета; колонки близки по высоте. */
.pet { display: grid; gap: 24px var(--dl-space); margin-top: var(--dl-space); }
.pet > *, .pet__side > * { min-width: 0; }
.pet__side { display: contents; }
.pet__media { order: 1; }
.pet__head { order: 2; display: grid; gap: 16px; }
.pet__body { order: 3; display: grid; gap: 20px; align-content: start; }
.pet__apply { order: 4; }
.pet__curator { order: 2; }
@media (min-width: 960px) {
  .pet { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-areas: "media side" "body side"; align-items: start; }
  .pet__media { grid-area: media; }
  .pet__body { grid-area: body; }
  .pet__side { display: grid; gap: 20px; grid-area: side; align-content: start; }
}
.pet__subtitle { font-size: 22px; margin-bottom: 4px; }

/* Куратор подопечного: к кому звонить напрямую. Контакты — только с согласия волонтёра */
.curator__title { font-size: 22px; }
.curator .apply__sub { margin-bottom: 16px; }
.curator__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.curator__item { display: flex; gap: 14px; align-items: flex-start; }
.curator__avatar { flex: none; }
.curator__avatar img, .curator__avatar .volunteer__initial { width: 64px; height: 64px; font-size: 32px; border-radius: 50%; object-fit: cover; border: 3px solid var(--dl-surface); box-shadow: var(--dl-shadow-sm); }
.curator__info { display: grid; gap: 2px; min-width: 0; }
.curator__name { font-size: 18px; font-weight: 800; color: var(--dl-heading); }
.curator__name a:hover { color: var(--dl-accent); }
.curator__contacts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.curator__hint { font-size: 14px; color: var(--dl-text-muted); }

.gallery { display: grid; gap: 12px; }
.gallery__stage { position: relative; aspect-ratio: 4 / 3; border-radius: var(--dl-radius-lg); overflow: hidden; background: var(--dl-surface-2); border: 4px solid var(--dl-surface); box-shadow: var(--dl-shadow); }
.gallery__stage img, .gallery__stage video { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery__stage video { object-fit: contain; background: var(--dl-footer-bg); }
.gallery__stage.is-swapping > :first-child { animation: dl-fade .35s ease; }
@keyframes dl-fade { from { opacity: .2; transform: scale(1.02); } }
.gallery__stage .stamp { position: absolute; left: 16px; top: 18px; font-size: 13px; z-index: 1; }
.gallery__open { display: block; width: 100%; height: 100%; cursor: zoom-in; }
.gallery__open img { transition: transform .5s ease; }
.gallery__open:hover img { transform: scale(1.03); }
.gallery__expand { position: absolute; right: 14px; bottom: 14px; width: 40px; height: 40px; border-radius: 999px; display: flex; align-items: center; justify-content: center; background: var(--dl-surface); color: var(--dl-heading); box-shadow: var(--dl-shadow); opacity: .9; transition: transform .2s; }
.gallery__open:hover .gallery__expand { transform: scale(1.1); }
.gallery__thumbs { list-style: none; margin: 0; padding: 2px; display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; }
@media (max-width: 639px) { .gallery__thumbs { grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)); gap: 8px; } }
.gallery__thumbs a { position: relative; display: block; aspect-ratio: 1; border-radius: var(--dl-radius-sm); overflow: hidden; border: 3px solid transparent; background: var(--dl-surface-2); transition: border-color .15s, transform .15s; }
.gallery__thumbs a:hover { transform: translateY(-2px); }
.gallery__thumbs a[aria-current] { border-color: var(--dl-accent-solid); }
.gallery__thumbs img { width: 100%; height: 100%; object-fit: cover; }
.gallery__play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--dl-on-accent); }
.gallery__play .icon { width: 34px; height: 34px; padding: 7px 5px 7px 9px; border-radius: 50%; background: var(--dl-accent-solid); box-shadow: var(--dl-shadow); }
/* ролики ВК/Rutube: обложка до нажатия, потом iframe */
.video-facade { position: relative; display: block; width: 100%; height: 100%; background: var(--dl-footer-bg); cursor: pointer; }
.video-facade img { width: 100%; height: 100%; object-fit: cover; opacity: .85; transition: opacity .2s, transform .5s; }
.video-facade:hover img { opacity: 1; transform: scale(1.02); }
.video-facade__play { position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: 72px; height: 72px; border-radius: 50%; display: flex; align-items: center; justify-content: center; padding-left: 4px; background: var(--dl-accent-solid); color: var(--dl-on-accent); box-shadow: var(--dl-shadow-lg); transition: transform .2s cubic-bezier(.3, 1.6, .5, 1); }
.video-facade:hover .video-facade__play { transform: scale(1.1); }
.video-facade__label, .gallery__provider { position: absolute; left: 12px; bottom: 12px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; background: rgba(0, 0, 0, .6); color: var(--dl-on-brand); }
.gallery__provider { left: 4px; bottom: 4px; padding: 2px 6px; }
.video-embed { display: block; width: 100%; height: 100%; border: 0; background: var(--dl-footer-bg); }
.lightbox__stage .video-embed { width: min(100%, 1200px); height: auto; aspect-ratio: 16 / 9; max-height: 100%; border-radius: var(--dl-radius); }
.gallery__count { font-size: 13px; font-weight: 700; color: var(--dl-text-soft); }

.lightbox { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(12, 17, 14, .94); color: var(--dl-on-brand); }
.lightbox[open] { display: grid; grid-template-rows: 1fr auto; animation: dl-fade .25s ease; }
.lightbox::backdrop { background: transparent; }
.lightbox__stage { display: flex; align-items: center; justify-content: center; padding: 56px 12px 8px; min-height: 0; }
.lightbox__stage img, .lightbox__stage video { max-width: 100%; max-height: 100%; width: auto; height: auto; border-radius: var(--dl-radius); box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.lightbox__caption { padding: 12px 64px 20px; text-align: center; font-family: var(--dl-font-hand); font-weight: 700; font-size: 24px; color: var(--dl-sand); }
.lightbox__btn { position: absolute; width: 48px; height: 48px; border-radius: 50%; border: 0; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .12); color: var(--dl-on-brand); cursor: pointer; transition: background-color .15s, transform .15s; }
.lightbox__btn:hover { background: rgba(255, 255, 255, .24); transform: scale(1.06); }
.lightbox__btn--close { top: 12px; right: 12px; }
.lightbox__btn--prev { left: 12px; top: 50%; translate: 0 -50%; }
.lightbox__btn--next { right: 12px; top: 50%; translate: 0 -50%; }
.lightbox.is-single .lightbox__btn--prev, .lightbox.is-single .lightbox__btn--next, .lightbox.is-single .lightbox__counter { display: none; }
.lightbox__counter { position: absolute; top: 22px; left: 50%; translate: -50% 0; font-weight: 800; font-size: 14px; color: var(--dl-on-brand-muted); }
@media (max-width: 639px) {
  .lightbox__btn--prev, .lightbox__btn--next { top: auto; bottom: 14px; translate: none; }
  .lightbox__caption { padding: 12px 70px 24px; font-size: 20px; }
}

.pet__note { position: relative; }
.pet__note-heart { position: absolute; left: -34px; top: -6px; width: 30px; height: 28px; color: var(--dl-accent-solid); }
@media (max-width: 639px) { .pet__note-heart { display: none; } }

.pet__title { font-size: clamp(34px, 5vw, 48px); letter-spacing: -0.02em; }
.pet__meta { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 800; background: var(--dl-brand-soft); color: var(--dl-heading); }
.tag--accent { background: var(--dl-accent-soft); color: var(--dl-accent); }
.tag--muted { background: var(--dl-surface-2); color: var(--dl-text-muted); }
.pet__note { font-size: 28px; color: var(--dl-accent); }
.pet__story { font-size: 17px; }
.pet__story > * + * { margin-top: .9em; }
.pet__health { padding: 18px 20px; border-radius: var(--dl-radius); background: var(--dl-surface-2); font-size: 15px; color: var(--dl-text-muted); }
.pet__health h2 { font-size: 17px; margin-bottom: 6px; }



/* вопросы о подопечном: сначала ответы, под ними форма. Рядом в две колонки при 1–2 вопросах
   под списком оставалось полэкрана пустоты (аудит пустот 22.09) */
.qa { display: grid; gap: 24px; max-width: 860px; }
.qa > * { min-width: 0; }
.qa .comments__list { margin-bottom: 0; }
.qa__form .apply__title { display: flex; align-items: center; gap: 8px; }
.qa__form .apply__title .icon { color: var(--dl-accent); }

