.carousel-badge{position:absolute;top:10px;right:10px;display:flex;align-items:center;gap:5px;padding:5px 7px;border-radius:6px;background:rgba(0,0,0,.65);color:#fff;font-size:12px}
body.photo-page{height:auto;min-height:100%}
.photo-carousel{position:relative;margin-bottom:14px;border:1px solid var(--border-soft);border-radius:12px;background:#fafafa;overflow:hidden;touch-action:pan-y}
.photo-slides{display:grid;min-height:180px}
.photo-slide{grid-area:1/1;width:100%;height:auto;max-height:72vh;object-fit:contain;opacity:0;visibility:hidden;transition:opacity .2s ease;align-self:center}
.photo-slide.is-active{opacity:1;visibility:visible}
.photo-counter{position:absolute;top:12px;right:12px;background:rgba(0,0,0,.65);color:white;padding:5px 9px;border-radius:6px;font-size:13px}
.photo-arrow{position:absolute;top:50%;transform:translateY(-50%);width:44px;height:44px;border:0;border-radius:50%;background:rgba(255,255,255,.92);color:#222;display:grid;place-items:center;cursor:pointer;box-shadow:0 1px 7px #0002}
.photo-arrow:disabled{opacity:.25;cursor:default}.photo-prev{left:12px}.photo-next{right:12px}
.photo-dots{display:flex;justify-content:center;gap:0;padding:6px;background:#fff}.photo-dots button{width:26px;height:26px;border:0;background:transparent;cursor:pointer;position:relative}
.photo-dots button::after{content:"";position:absolute;width:6px;height:6px;border-radius:50%;background:#bbb;top:10px;left:10px}.photo-dots button[aria-current=true]::after{background:#e11d2e}
#preview.photo-previews{display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,1fr));gap:10px;padding:0;background:transparent;max-height:none;overflow:visible;aspect-ratio:auto}
.photo-preview-item{min-width:0;border:1px solid var(--border-soft);border-radius:8px;overflow:hidden;background:#fff}
#preview.photo-previews.hidden{display:none}
#preview .photo-preview-item img{width:100%;height:130px;object-fit:contain;display:block}.photo-preview-tools{display:flex;align-items:center;justify-content:center;gap:2px;padding:3px}
.photo-preview-tools button{width:32px;height:36px;border:0;border-radius:5px;background:#fff;color:#333;cursor:pointer}.photo-preview-tools button:disabled{opacity:.3}.photo-preview-tools button:hover{background:#fef2f2}.photo-preview-tools .photo-remove{color:#d11}
.upload-form:not([data-upload-type=photo]) .photo-upload-hint{display:none}
@media(max-width:600px){.photo-prev{left:6px}.photo-next{right:6px}.photo-arrow{width:40px;height:40px}.photo-slide{max-height:65vh}}
@media(prefers-reduced-motion:reduce){.photo-slide{transition:none}}
