/* Общая палитра КРСТ, самостоятельные превью и неподвижная стеклянная поверхность. */
.object-photos { min-width: 0; }
.object-photos [hidden], .object-photo-lightbox [hidden] { display: none !important; }
.object-photos-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.object-photos-heading .card-title { margin: 0; font-size: 16px; }
.object-photos-heading .btn { flex-shrink: 0; }
.object-photos-count { display: block; margin-top: 5px; font-size: 12px; color: var(--text-tertiary); }
.object-photo-tabs { display: flex; gap: 4px; padding: 4px; margin-bottom: 14px; width: fit-content; border-radius: 11px; background: var(--control-bg); }
.object-photo-tabs button { padding: 7px 12px; border: 0; border-radius: 8px; font-size: 12px; color: var(--text-tertiary); background: transparent; cursor: pointer; transition: color .2s, background .2s; }
.object-photo-tabs button[aria-pressed="true"] { background: var(--accent-soft); color: var(--color-gold); }
.object-photo-drop { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 20px 14px; border: 1px dashed var(--accent-border); border-radius: 16px; background: var(--accent-soft); color: var(--text-secondary); font-size: 13px; line-height: 1.5; transition: border-color .25s, background .25s, box-shadow .25s; }
.object-photo-drop > span { display: grid; place-items: center; width: 42px; height: 42px; flex-shrink: 0; border-radius: 13px; background: var(--control-bg); color: var(--color-gold); }
.object-photo-drop small { display: block; margin-top: 5px; color: var(--text-tertiary); font-size: 11px; }
.object-photos.is-dragging .object-photo-drop { border-color: var(--color-gold); background: var(--control-hover); box-shadow: inset 0 0 0 1px var(--accent-border); }
.object-photo-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(125px, 1fr)); gap: 12px; margin-top: 18px; max-height: 560px; overflow-y: auto; padding: 4px; margin-inline: -4px; scrollbar-gutter: stable; }
.object-photo-gallery:empty { display: none; }
.object-photo-tile { padding: 0; min-width: 0; width: 100%; text-align: left; color: var(--text-primary); background: var(--control-bg); border: 1px solid var(--border-glass); border-radius: 14px; overflow: hidden; cursor: pointer; transition: border-color .25s, box-shadow .3s; animation: object-photo-arrive .42s var(--ease-premium) both; }
.object-photo-thumb { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-solid); }
.object-photo-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .55s var(--ease-premium), filter .35s; }
.object-photo-thumb-fallback { color: var(--text-tertiary); font-size: 11px; text-align: center; padding: 15px; }
.object-photo-caption { display: block; padding: 10px 11px 11px; }
.object-photo-caption b { display: block; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; font-size: 12px; font-weight: 500; line-height: 1.4; }
.object-photo-caption small { display: block; margin-top: 4px; color: var(--text-tertiary); font-size: 10px; }
.object-photo-tile:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 1px; }
.object-photo-empty { padding: 32px 12px 20px; text-align: center; color: var(--text-tertiary); font-size: 13px; line-height: 1.6; }
.object-photo-gallery-footer { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 9px; margin-top: 16px; }
.object-photo-loaded { margin-right: auto; color: var(--text-tertiary); font-size: 11px; }
.object-photo-notice, .object-photo-error, .object-photo-undo { padding: 11px 13px; margin-top: 14px; border-radius: 12px; border: 1px solid var(--accent-border); background: var(--accent-soft); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.object-photo-error { color: var(--color-warm); border-color: color-mix(in srgb, var(--color-warm) 40%, transparent); }
.object-photo-undo { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.object-photo-queue { margin-top: 18px; padding: 14px; border: 1px solid var(--divider); border-radius: 14px; background: var(--control-bg); }
.object-photo-queue-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11px; line-height: 1.5; color: var(--text-secondary); }
.object-photo-queue-heading .btn { font-size: 10px; padding: 6px 8px; }
.object-photo-progress { display: block; appearance: none; border: 0; width: 100%; height: 4px; border-radius: 4px; margin: 12px 0; overflow: hidden; background: var(--divider); color: var(--color-gold); }
.object-photo-progress::-webkit-progress-bar { background: var(--divider); border-radius: 4px; }
.object-photo-progress::-webkit-progress-value { background: var(--color-gold); border-radius: 4px; transition: width .35s var(--ease-premium); }
.object-photo-progress::-moz-progress-bar { background: var(--color-gold); border-radius: 4px; }
.object-photo-queue-list { list-style: none; padding: 0; margin: 0; max-height: 250px; overflow-y: auto; }
.object-photo-queue-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 0; border-top: 1px solid var(--divider); }
.object-photo-queue-item > div { min-width: 0; }
.object-photo-queue-item b { display: block; overflow-wrap: anywhere; font-size: 12px; font-weight: 500; }
.object-photo-queue-item small { display: block; margin-top: 4px; color: var(--text-tertiary); font-size: 10px; }
.object-photo-queue-item p { color: var(--color-warm); font-size: 11px; line-height: 1.5; margin: 5px 0 0; }
.object-photo-queue-item.is-done small { color: var(--status-done); }
.object-photo-queue-item.is-uploading small { color: var(--color-gold); }
.object-photo-queue-actions { display: flex; gap: 4px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.object-photo-queue-actions > .btn { font-size: 11px; padding: 7px 9px; }
.object-photo-lightbox { position: fixed; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 24px 28px; border: 0; background: rgba(10, 21, 15, .97); color: #f1f4ed; overflow: hidden; }
.object-photo-lightbox[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 18px; animation: object-photo-lightbox-arrive .28s ease both; }
.object-photo-lightbox::backdrop { background: rgba(6, 15, 9, .8); }
.object-photo-lightbox-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.object-photo-lightbox-header > div { min-width: 0; }
.object-photo-lightbox-title { margin: 0; font-size: 17px; font-weight: 500; line-height: 1.5; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.object-photo-lightbox-meta { font-size: 12px; color: #a4b5a7; line-height: 1.6; margin: 5px 0 0; }
.object-photo-lightbox .icon-btn { color: #f1f4ed; background: rgba(222, 238, 216, .09); border: 1px solid rgba(222, 238, 216, .18); flex-shrink: 0; width: 44px; height: 44px; }
.object-photo-lightbox .btn { color: #edf2e9; border-color: rgba(222, 238, 216, .18); }
.object-photo-lightbox .btn-primary { color: #233020; }
.object-photo-lightbox button:disabled { opacity: .32; cursor: default; }
.object-photo-view { min-height: 0; min-width: 0; display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; gap: 20px; }
.object-photo-prev > svg { rotate: 180deg; }
.object-photo-image-frame { display: grid; align-items: center; justify-items: center; min-height: 0; height: 100%; min-width: 0; overflow: auto; overscroll-behavior: contain; border-radius: 14px; }
.object-photo-lightbox-image { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 9px; opacity: 0; transition: opacity .3s ease; }
.object-photo-lightbox-image.is-loaded { opacity: 1; }
.object-photo-lightbox.is-zoomed .object-photo-image-frame { display: block; }
.object-photo-lightbox.is-zoomed .object-photo-lightbox-image { max-width: none; max-height: none; margin: auto; }
.object-photo-image-error { position: absolute; max-width: 70%; color: #cfb69b; text-align: center; font-size: 14px; }
.object-photo-lightbox-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 13px; color: #a4b5a7; }
.object-photo-lightbox-footer > div { display: flex; flex-wrap: wrap; gap: 10px; }
.object-photo-lightbox-error { position: absolute; left: 50%; bottom: 86px; translate: -50% 0; max-width: min(650px, calc(100% - 40px)); padding: 14px 18px; border-radius: 14px; background: #503628; color: #f5e4d5; font-size: 13px; }
.object-photo-delete-confirm { position: absolute; left: 50%; bottom: 90px; translate: -50% 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; padding: 20px; width: max-content; max-width: calc(100% - 40px); border: 1px solid rgba(222, 238, 216, .2); border-radius: 18px; box-shadow: 0 18px 70px rgba(0, 0, 0, .45); background: #233b2c; font-size: 13px; }
@keyframes object-photo-arrive { from { opacity: 0; translate: 0 8px; } to { opacity: 1; translate: 0 0; } }
@keyframes object-photo-lightbox-arrive { from { opacity: 0; } to { opacity: 1; } }
@media (hover: hover) and (pointer: fine) {
  .object-photo-tile:hover { border-color: var(--accent-border); box-shadow: 0 8px 24px rgba(0, 0, 0, .12); }
  .object-photo-tile:hover .object-photo-thumb img { transform: scale(1.055); filter: brightness(1.04); }
}
@media (max-width: 600px) {
  .object-photos-heading { flex-wrap: wrap; }
  .object-photo-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .object-photo-lightbox { padding: 18px 12px; }
  .object-photo-lightbox-title { font-size: 14px; }
  .object-photo-lightbox-meta { font-size: 10px; }
  .object-photo-view { grid-template-columns: 32px minmax(0, 1fr) 32px; gap: 7px; }
  .object-photo-view .icon-btn { width: 32px; height: 40px; }
  .object-photo-delete-confirm > span { width: 100%; text-align: center; }
  .object-photo-lightbox-footer .btn { padding-inline: 10px; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .object-photo-tile, .object-photo-lightbox[open] { animation: none; }
  .object-photo-tile, .object-photo-thumb img, .object-photo-lightbox-image, .object-photo-drop { transition: none; }
  .object-photo-tile:hover .object-photo-thumb img { transform: none; }
  .object-photo-progress::-webkit-progress-value { transition: none; }
}
