/* Upload drafts and the direct-manipulation photo viewer. */
.upload-composer{max-width:700px;margin:0 auto;background:white;border:1px solid var(--line);border-radius:20px;padding:24px}
#uploadContent>.screen-heading{max-width:700px;margin:0 auto 22px}
.photo-drop-zone{padding:16px;background:#f0f4fa;border:1px dashed #b9c9dd;border-radius:16px;margin-bottom:10px}
.photo-drop-zone.drag-over{background:#e5efff;border-color:var(--accent)}
.photo-add-controls{display:flex;align-items:center;justify-content:space-between;gap:12px}
.photo-add-controls>span{font-size:.875rem;color:var(--muted);font-variant-numeric:tabular-nums}
.photo-hint{display:block;margin-top:12px;font-size:.75rem}
.preparation-status{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 18px;font-size:.8125rem;min-height:24px;color:var(--muted)}
.upload-composer>label{display:block;font-size:.875rem;margin-top:18px;margin-bottom:8px}
.upload-composer>input,.upload-composer>select{width:100%;min-height:48px}
.preview-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:0 0 16px}
.preview-grid:empty{display:none}
.preview-tile{position:relative;aspect-ratio:.9;min-width:0;overflow:hidden;border-radius:12px;background:#132a4d;cursor:grab}
.preview-tile>img{width:100%;height:100%;object-fit:cover}
.photo-position{position:absolute;top:8px;left:8px;background:#071b35dc;color:white;padding:6px 8px;border-radius:7px;font-size:.75rem}
.draft-photo-actions{position:absolute;right:5px;top:5px;display:flex;gap:3px}
.draft-photo-move{position:absolute;left:5px;right:5px;bottom:5px;display:flex;justify-content:space-between}
.draft-photo-actions>button,.draft-photo-move>button{position:static;right:auto;top:auto;display:grid;place-items:center;width:44px;height:44px;min-width:44px;min-height:44px;padding:0;background:#071b35dc;color:white;border:1px solid #ffffff2b;border-radius:9px;backdrop-filter:none}
.draft-photo-actions .icon,.draft-photo-move .icon{width:17px;height:17px}
.draft-photo-actions>button:disabled,.draft-photo-move>button:disabled{opacity:.4}
.composer-actions{display:flex;gap:12px;margin-top:24px}
.composer-actions>*{flex:1}
.recent-gear{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:12px 0}
.recent-gear>button{border:1px solid var(--line);background:white;color:var(--accent);border-radius:10px;min-height:44px;padding:8px 12px;font-size:.8125rem}
.upload-preview>img{width:100%;max-height:60svh;object-fit:contain;background:#132a4d;border-radius:14px}
.upload-preview>h3{font-size:1.5rem;margin:20px 0 8px}
.upload-preview>span{font-size:.8125rem;color:var(--muted)}
.preview-switches{display:flex;justify-content:center;gap:8px;margin-top:12px}
.preview-switches>button{min-width:44px;min-height:44px;border:1px solid var(--line);background:#fff;border-radius:10px}
.preview-switches>button[aria-pressed=true]{background:var(--blue-soft);color:var(--accent);border-color:#b6cef0}
.preview-gear{display:flex;gap:8px;flex-wrap:wrap;margin-top:18px}
.preview-gear>span{background:#edf2f9;border-radius:8px;padding:7px 10px;font-size:.8125rem}
.gallery-heading>div{flex:1;min-width:0}
.gallery-heading h1{font-size:1.5rem;line-height:1.2;overflow-wrap:anywhere}
.gallery-heading>div>span{font-size:.8125rem;color:var(--muted);display:block;margin-top:5px}
.gallery-media{min-width:0}
.gallery-media .detail-stage{height:min(65svh,650px);min-height:280px;overflow:hidden;background:#10213a;border-radius:18px;touch-action:pan-y pinch-zoom;position:relative}
.gallery-media .gallery-track{display:flex;height:100%}
.gallery-media .gallery-slide{flex:0 0 100%;min-width:0;height:100%;overflow:hidden;display:grid;place-items:center}
.gallery-media .gallery-slide>img{width:100%;height:100%;object-fit:contain;transform-origin:center;user-select:none;will-change:transform}
.gallery-media .detail-stage.is-zoomed{touch-action:none;cursor:grab}
.gallery-media .detail-stage.is-zoomed:active{cursor:grabbing}
.viewer-controls{display:flex;align-items:center;justify-content:center;gap:4px;flex-wrap:wrap;padding:12px 0}
.viewer-controls>.iconbtn{width:44px;height:44px;flex:none}
.viewer-controls>span{font-size:.8125rem;color:var(--muted);font-variant-numeric:tabular-nums;padding:0 4px}
.viewer-controls>.text-btn{min-height:44px;min-width:54px;font-size:.8125rem;letter-spacing:0}
.viewer-divider{height:22px;width:1px;background:var(--line);margin:0 5px}
.gallery-gear{padding:24px;border:1px solid var(--line);border-radius:18px;background:white}
.gallery-gear h2{font-size:1.375rem;margin-bottom:18px}
.gallery-actions{display:flex;flex-direction:column;gap:12px;margin-top:24px}
.gallery-actions>.btn{width:100%}
.gallery-focus .topbar,.gallery-focus .bottomnav,.gallery-focus .gallery-gear,.gallery-focus .detail-thumbs{display:none}
.gallery-focus main{grid-column:1/-1;padding:14px}
.gallery-focus .app{padding:0;max-width:none;grid-template-columns:1fr}
.gallery-focus .detail-layout{display:block}
.gallery-focus .gallery-media .detail-stage{height:calc(100svh - 160px);max-height:none}
.gallery-focus .gallery-heading{margin:0 0 12px}
.gallery-focus .gallery-heading>div>span{display:none}
@media(max-width:650px){
 .upload-composer{padding:18px 16px;border-radius:18px}.photo-drop-zone{padding:12px}.preview-grid{gap:10px}.preview-tile{aspect-ratio:.8}.draft-photo-actions{flex-direction:column}.photo-position{max-width:calc(100% - 56px);font-size:.75rem}
 .gallery-heading h1{font-size:1.125rem}.gallery-heading{gap:8px}.gallery-heading>.iconbtn{width:44px;height:44px;flex:none}
 .gallery-media .detail-stage{height:55svh;min-height:280px;border-radius:16px}.gallery-gear{padding:20px}.viewer-controls{gap:2px}.viewer-controls>.iconbtn{width:44px}
 .gallery-focus .gallery-media .detail-stage{height:calc(100svh - 165px)}
}
