.poster-gallery { max-width: 100%; }
.poster-gallery .poster-photo-open { display: block; cursor: zoom-in; }
.poster-gallery .poster-photo-zoom { display: block; margin: 10px 0; color: #7f1933; text-decoration: underline; }
.poster-photo-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.poster-photo-thumbs button { padding: 3px; border: 2px solid #ccc; background: #fff; cursor: pointer; }
.poster-photo-thumbs button[aria-pressed="true"] { border-color: #7f1933; }
.poster-photo-thumbs img { display: block; width: 72px; height: 72px; object-fit: contain; }
.poster-lightbox { width: 96vw; max-width: 1800px; height: 94vh; height: 94dvh; max-height: 100dvh;
    padding: 10px; border: 0; background: #161616; color: #fff; overflow: hidden; box-sizing: border-box; }
.poster-lightbox::backdrop { background: rgb(0 0 0 / 85%); }
.poster-lightbox-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
    gap: 8px; min-height: 48px; }
.poster-lightbox-controls button { min-width: 44px; min-height: 44px; padding: 6px 12px;
    background: #fff; color: #111; border: 1px solid #aaa; border-radius: 3px; cursor: pointer; }
.poster-lightbox-controls button:last-child { margin-left: auto; }
.poster-lightbox-stage { display: flex; position: relative; align-items: center; justify-content: center;
    height: calc(100% - 60px); overflow: hidden; touch-action: none; user-select: none; }
.poster-lightbox-stage img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto;
    object-fit: contain; transform-origin: center; flex-shrink: 0; }
.poster-lightbox-stage[data-zoomed="true"] { cursor: grab; }
.poster-lightbox-stage[data-zoomed="true"]:active { cursor: grabbing; }
.poster-lightbox-status { position: absolute; text-align: center; padding: 15px; color: #fff; }
.poster-photo-error, .photo-editor-message[data-error="true"] { color: #a00000; font-weight: 600; }
.photo-editor { margin: 30px 0; border-top: 2px solid #7f1933; padding-top: 20px; }
.photo-editor fieldset { min-width: 0; padding: 16px; }
.photo-editor button { min-height: 44px; margin: 4px; padding: 8px 12px; cursor: pointer; }
.photo-editor button:disabled { cursor: wait; opacity: .6; }
.photo-drop { display: block; padding: 18px; margin: 12px 0; border: 2px dashed #7f1933; border-radius: 6px; }
.photo-drop[data-dragging="true"] { background: #fff1f3; }
.photo-editor .photo-drop input { margin-top: 10px; }
.photo-ratio, .photo-corner-fields { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.photo-ratio label { flex: 1; min-width: 130px; }
.photo-corner-fields label { width: 46%; }
.photo-editor .photo-corner-fields input { display: inline-block; width: 42%; margin: 3px; }
.photo-editor canvas { display: block; max-width: 100%; height: auto; border: 1px solid #aaa; }
.photo-editor [data-crop-canvas], .photo-editor [data-detail-canvas] { touch-action: none; cursor: crosshair; }
.photo-editor [data-crop-preview], .photo-editor [data-detail-preview] { max-height: 650px; width: auto; }
.photo-detail-crop { border: 1px solid #aaa; padding: 12px; margin: 12px 0; }
.photo-editor-list { padding-left: 26px; }
.photo-editor-list li { padding: 8px; border-bottom: 1px solid #ddd; }
.photo-editor-list img { width: 90px; height: 100px; object-fit: contain; vertical-align: middle; margin-right: 10px; }
.photo-editor [hidden], .poster-lightbox [hidden], .poster-gallery [hidden] { display: none !important; }
@media (max-width: 600px) {
    .poster-lightbox { width: 100vw; height: 100vh; height: 100dvh; padding: 6px; }
    .poster-lightbox-controls { gap: 4px; }
    .poster-lightbox-controls button { padding: 5px 8px; }
    .poster-lightbox-stage { height: calc(100% - 110px); }
    .photo-editor fieldset { padding: 8px; }
}
