.collection-dialog { width: min(760px, calc(100vw - 32px)); max-height: 85dvh; padding: 24px; border: 1px solid #444; border-radius: 8px; color: #eee; background: #111; overflow: auto; }
.collection-dialog::backdrop { background: #000b; }
html.collection-modal-open, body.collection-modal-open { overflow: hidden !important; overscroll-behavior: none; }
.collection-dialog, .collection-options { overscroll-behavior: contain; }
.collection-dialog form { display: grid; gap: 12px; grid-template-rows: repeat(4, auto) minmax(60px, 1fr) auto auto; max-height: calc(85dvh - 48px); }
.collection-dialog [role=status] { margin: 0; font-size: 13px; }
.collection-dialog h2, .collection-detail h2 { font-size: 18px; margin: 0; }
.collection-dialog label { display: grid; gap: 8px; font-size: 13px; }
.collection-dialog input:not([type=checkbox]), .collection-dialog select { width: 100%; min-width: 0; box-sizing: border-box; padding: 10px; color: #eee; background: #222; border: 1px solid #444; border-radius: 4px; }
.collection-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.collection-options { min-height: 0; max-height: 40dvh; overflow: auto; display: grid; gap: 8px; }
.collection-options label { display: flex; align-items: center; padding: 8px; border-bottom: 1px solid #333; cursor: pointer; }
.collection-options input[type=checkbox] { width: 18px; height: 18px; flex: 0 0 18px; margin: 0; }
.collection-options img { width: 88px; height: 50px; object-fit: cover; }
.collection-options span { overflow-wrap: anywhere; }
.collection-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.collection-actions button, .collection-home-button { padding: 10px 16px; border: 1px solid #555; border-radius: 4px; background: #151515; color: #eee; cursor: pointer; font-size: 12px; }
.collection-actions button:hover, .collection-home-button:hover { background: #eee; color: #111; }
.collection-actions button:disabled { opacity: .5; cursor: wait; }
.collection-detail { width: min(1080px, calc(100% - 40px)); margin: 20px auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.collection-detail h2 { text-align: center; overflow-wrap: anywhere; }
.collection-detail > .collection-actions { justify-content: center; }
.collection-thumbnails { display: flex; gap: 8px; overflow-x: auto; padding: 4px; width: max-content; max-width: 100%; min-width: 0; box-sizing: border-box; margin-inline: auto; }
.collection-thumbnails a { display: block; flex: 0 0 88px; width: 88px; height: 50px; border: 2px solid transparent; border-radius: 4px; overflow: hidden; }
.collection-thumbnails a[aria-current] { border-color: white; }
.collection-thumbnails a[draggable=true] { cursor: grab; }
.collection-thumbnails a.is-dragging { opacity: .45; }
.collection-thumbnails a.is-drop-target { border-color: #9794ed; }
.collection-order-state { margin: 0; text-align: center; font-size: 12px; }
.collection-order-state:empty { display: none; }
.collection-thumbnails img { width: 100%; height: 100%; object-fit: cover; }
.collection-home-button { margin: 10px 3%; }
.collection-badge { position: absolute; top: 12px; left: 12px; padding: 4px 8px; border-radius: 4px; background: #111c; color: white; font-size: 12px; pointer-events: none; z-index: 3; }
