/* === Reset & Base === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg: #0f0f1a;
    --bg-card: #1a1a2e;
    --bg-input: #16213e;
    --border: #2a2a4a;
    --text: #e2e2f0;
    --text-muted: #8888a8;
    --primary: #6c63ff;
    --primary-hover: #5a52d5;
    --secondary: #2a2a4a;
    --secondary-hover: #3a3a5a;
    --accent: #00d2ff;
    --success: #00c853;
    --error: #ff5252;
    --radius: 12px;
    --radius-sm: 8px;
}

html { font-size: 16px; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* === Navbar === */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    background: rgba(15, 15, 26, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.nav-brand:hover { text-decoration: none; color: var(--primary); }
.brand-icon { font-size: 1.4rem; }

.nav-links { display: flex; gap: 1.5rem; }
.nav-link {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}
.nav-link:hover { color: var(--text); text-decoration: none; }

/* === Container === */
.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

/* === Typography === */
h1 { font-size: 2rem; font-weight: 700; line-height: 1.2; }
h2 { font-size: 1.35rem; font-weight: 600; }
.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* === Landing === */
.landing { padding-top: 1rem; }
.hero { text-align: center; margin-bottom: 3rem; }
.hero h1 { font-size: 2.5rem; margin-bottom: 1rem; }
.hero-sub { color: var(--text-muted); font-size: 1.1rem; max-width: 540px; margin: 0 auto; }

/* === Cards === */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 1.5rem;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
}
.card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}
.card-icon { font-size: 1.5rem; }
.card-desc { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1.5rem; }

/* === Forms === */
.form-group { margin-bottom: 1rem; }
.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}
input[type="text"],
input[type="email"],
input[type="tel"] {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s;
}
input:focus {
    outline: none;
    border-color: var(--primary);
}
input::placeholder { color: #555570; }

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--secondary); color: var(--text); }
.btn-secondary:hover { background: var(--secondary-hover); }
.btn-full { width: 100%; }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.85rem; }
.btn-copy { background: var(--secondary); color: var(--text); }
.btn-copy.copied { background: var(--success); color: white; }

/* === Alerts === */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}
.alert-error { background: rgba(255,82,82,0.15); border: 1px solid rgba(255,82,82,0.3); color: var(--error); }

/* === Page Header === */
.page-header { margin-bottom: 2rem; }
.page-header h1 { margin-bottom: 0.25rem; }
.subtitle { color: var(--text-muted); font-size: 1rem; }

/* === Upload === */
.upload-section { margin-bottom: 2.5rem; }

/* Dropzone: a styled container with a transparent <input type="file"> stretched
   across the entire surface. The user's tap/click physically hits the real
   native input — no JS .click() forwarding, no <label> delegation. Works on
   every mobile and desktop browser. The decorative content underneath is
   pointer-events:none so it never intercepts taps. */
.dropzone {
    position: relative;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    -webkit-tap-highlight-color: rgba(108, 99, 255, 0.15);
}
.dropzone:hover, .dropzone.dragover {
    border-color: var(--primary);
    background: rgba(108, 99, 255, 0.05);
}
.dropzone.disabled {
    opacity: 0.4;
    pointer-events: none;
}
.dropzone-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    /* Ensure the native input sits on top of everything */
    z-index: 2;
    /* Remove default browser styling for the file input */
    -webkit-appearance: none;
    appearance: none;
}
.dropzone-content {
    pointer-events: none;
    position: relative;
    z-index: 1;
}
.dropzone-icon { font-size: 3rem; margin-bottom: 0.75rem; }
.dropzone-text { font-size: 1.15rem; font-weight: 600; }
.dropzone-sub { color: var(--text-muted); font-size: 0.9rem; margin-top: 0.25rem; }
.dropzone-formats { color: var(--text-muted); font-size: 0.8rem; margin-top: 0.75rem; }

/* Upload button */
.upload-go-btn {
    margin-top: 1rem;
    min-height: 52px;
    font-size: 1.05rem;
    gap: 0.35rem;
}

/* File remove button */
.file-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    line-height: 1;
    padding: 0 0.3rem;
    cursor: pointer;
    flex-shrink: 0;
}
.file-remove:hover { color: var(--error); }
.file-item-icon { margin-right: 0.4rem; flex-shrink: 0; }

.file-list { margin-top: 1rem; }
.file-item {
    padding: 0.75rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    position: relative;
    overflow: hidden;
    transition: border-color 0.3s;
}
.file-item.uploading { border-color: var(--primary); }
.file-item.done { border-color: var(--success); }
.file-item-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
}
.file-item-name { font-weight: 500; color: var(--text); word-break: break-all; }
.file-item-size { color: var(--text-muted); font-size: 0.8rem; white-space: nowrap; margin-left: 1rem; }
.file-item-progress {
    height: 4px;
    background: var(--bg-input);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.3rem;
}
.progress-bar {
    height: 100%;
    width: 0%;
    background: var(--primary);
    border-radius: 2px;
    transition: width 0.15s;
}
.progress-bar.complete { background: var(--success); }
.progress-bar.error { background: var(--error); width: 100%; }
.file-item-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.file-item-status {
    font-size: 0.75rem;
    color: var(--text-muted);
}
.file-item-status.success { color: var(--success); }
.file-item-status.skipped { color: var(--accent); }
.file-item-status.error { color: var(--error); }
.btn-retry {
    background: var(--error);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: opacity 0.2s;
}
.btn-retry:hover { opacity: 0.85; }
.upload-status {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    color: var(--accent);
    text-align: center;
}

.section { margin-top: 2rem; }
.section h2 { margin-bottom: 1rem; }
.badge {
    background: var(--secondary);
    color: var(--text-muted);
    font-size: 0.8rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    margin-left: 0.5rem;
    font-weight: 500;
}

.upload-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
}
.upload-item {
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border);
}
.upload-item img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
}
.video-thumb {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-input);
    gap: 0.5rem;
}
.video-icon { font-size: 2rem; }
.video-label { font-size: 0.7rem; color: var(--text-muted); padding: 0 0.5rem; text-align: center; word-break: break-all; }
.upload-meta {
    padding: 0.4rem 0.6rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.upload-delete-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    opacity: 0;
    transition: opacity 0.15s, color 0.15s;
}
.upload-item:hover .upload-delete-btn { opacity: 1; }
.upload-delete-btn:hover { color: var(--error); }

/* Upload item fade-out on delete */
.upload-item {
    transition: opacity 0.3s, border-color 0.3s;
}

/* === Organize === */
.organize-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.25rem;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}
.stats-row { display: flex; gap: 2rem; }
.stat { text-align: center; }
.stat-num { display: block; font-size: 1.5rem; font-weight: 700; color: var(--accent); }
.stat-label { font-size: 0.8rem; color: var(--text-muted); }

/* Processing status indicator */
.process-status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.status-dot.status-active {
    background: var(--primary);
    animation: status-pulse 1.2s ease-in-out infinite;
}
.status-dot.status-done { background: var(--success); }
.status-dot.status-idle { background: var(--border); }
@keyframes status-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}
.status-text { white-space: nowrap; }

.people-cluster-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
}
.person-cluster {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem 1rem 1.25rem;
    transition: border-color 0.2s;
}
.person-cluster.labeled { border-color: var(--success); }
.face-avatar-wrap {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 0.75rem;
    border: 3px solid var(--border);
    transition: border-color 0.2s;
    flex-shrink: 0;
}
.person-cluster.labeled .face-avatar-wrap { border-color: var(--success); }
.face-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.face-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-input);
    font-size: 2.5rem;
    color: var(--text-muted);
}
.person-name-display {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text);
    margin-bottom: 0.1rem;
}
.person-contact-display {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
    word-break: break-all;
}
.person-photo-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}
.person-label-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.person-label-form input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    text-align: center;
}
.person-label-form .btn {
    width: 100%;
}

/* === Share === */
.share-page { max-width: 600px; margin: 0 auto; }
.share-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
}
.qr-section { margin-bottom: 2rem; }
.qr-image {
    width: 240px;
    height: 240px;
    border-radius: var(--radius);
}
.qr-hint { color: var(--text-muted); font-size: 0.85rem; margin-top: 0.5rem; }

.share-details { text-align: left; }
.share-item { margin-bottom: 1.5rem; }
.share-item label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.code-display {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    color: var(--accent);
    margin-bottom: 0.5rem;
}
.link-display {
    font-size: 0.85rem;
    color: var(--text);
    background: var(--bg-input);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    word-break: break-all;
    margin-bottom: 0.5rem;
    border: 1px solid var(--border);
}
.organizer-name { font-size: 1.1rem; font-weight: 500; }

/* === Download === */
.section-desc { color: var(--text-muted); margin-bottom: 1.5rem; }
.people-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}
.person-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
}
.person-info h3 { font-size: 1.1rem; margin-bottom: 0.15rem; }

/* === Preview === */
.preview-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    position: sticky;
    top: 57px;
    z-index: 50;
}
.summary-stats { font-size: 0.95rem; color: var(--text); }
.preview-section { margin-bottom: 2rem; }
.preview-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}
.preview-section-header h2 { margin: 0; }
.toggle-all {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    cursor: pointer;
}
.toggle-all input { accent-color: var(--primary); width: 16px; height: 16px; cursor: pointer; }
.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.5rem;
}
.preview-item {
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.15s, opacity 0.15s;
}
.preview-item:has(.file-cb:checked) { border-color: var(--primary); }
.preview-item:has(.file-cb:not(:checked)) { opacity: 0.4; }
.preview-item img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
}
.preview-item .video-thumb {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-input);
    font-size: 0.7rem;
}
.preview-item .file-cb {
    position: absolute;
    top: 6px;
    left: 6px;
    z-index: 3;
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}
.preview-check { display: none; }

/* === Empty State === */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--bg-card);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    color: var(--text-muted);
}

/* === Gallery === */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.75rem;
}
.gallery-item {
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: transform 0.15s, border-color 0.15s;
}
.gallery-item:hover { transform: scale(1.02); border-color: var(--primary); }
.gallery-item img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
}
.gallery-meta {
    padding: 0.4rem 0.6rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* === Lightbox === */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.92);
    align-items: center;
    justify-content: center;
    flex-direction: column;
}
.lightbox.active { display: flex; }
.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    z-index: 1001;
    line-height: 1;
}
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    font-size: 3rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-radius: var(--radius-sm);
    z-index: 1001;
    transition: background 0.2s;
}
.lightbox-nav:hover { background: rgba(255,255,255,0.2); }
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }
.lightbox-content {
    max-width: 90vw;
    max-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox-content img,
.lightbox-content video {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: var(--radius-sm);
}
.lightbox-info {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 1rem;
    text-align: center;
}

/* === Confirmed === */
.confirmed-page {
    display: flex;
    justify-content: center;
    padding-top: 2rem;
}
.confirmed-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 3rem 2.5rem;
    text-align: center;
    max-width: 480px;
    width: 100%;
}
.confirmed-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 1rem;
    border: 3px solid var(--success);
}
.confirmed-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.confirmed-check {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--success);
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}
.confirmed-contact {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}
.confirmed-msg {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 2rem;
}
.confirmed-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* === Process Progress Bar === */
.process-progress {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 2rem;
}
.process-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    color: var(--text);
}
.process-progress-track {
    height: 8px;
    background: var(--bg-input);
    border-radius: 4px;
    overflow: hidden;
}
.process-progress-bar {
    height: 100%;
    width: 0%;
    background: var(--primary);
    border-radius: 4px;
    transition: width 0.3s ease;
}
.process-progress-bar.complete { background: var(--success); }
.process-progress-bar.error { background: var(--error); width: 100%; }

/* === Merge Section === */
.merge-section {
    margin-top: 2.5rem;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.merge-section h2 { margin-bottom: 0.25rem; }
.merge-section .section-desc { margin-bottom: 1rem; }
.merge-form { display: flex; flex-direction: column; gap: 1rem; }
.merge-selects {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.merge-select-group { flex: 1; min-width: 200px; }
.merge-select-group label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
}
.merge-select-group select {
    width: 100%;
    padding: 0.65rem 0.75rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: inherit;
    font-size: 0.9rem;
}
.merge-select-group select:focus { outline: none; border-color: var(--primary); }
.merge-arrow {
    font-size: 1.5rem;
    color: var(--text-muted);
    padding-top: 1.2rem;
    flex-shrink: 0;
}

/* === Preview Save Links === */
.summary-actions { display: flex; gap: 0.75rem; align-items: center; }
.save-link {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(108, 99, 255, 0.9);
    color: white;
    text-align: center;
    padding: 0.4rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 4;
    transition: background 0.2s;
}
.save-link:hover { background: rgba(108, 99, 255, 1); text-decoration: none; }

/* === Review Scenery (Organize page) === */
.scenery-review-section { margin-top: 2.5rem; }
.scenery-review-header { margin-bottom: 0.5rem; }
.scenery-review-header h2 { margin-bottom: 0.25rem; }
.scenery-review-header .section-desc { margin-bottom: 1rem; }
.scenery-review-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
}
.scenery-review-item {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: opacity 0.3s;
}
.scenery-review-item.scenery-uncertain { border-color: rgba(255, 193, 7, 0.4); }
.scenery-review-item img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
}
.scenery-uncertain-badge {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 193, 7, 0.85);
    color: #000;
    font-size: 0.6rem;
    font-weight: 700;
    text-align: center;
    padding: 0.2rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.scenery-mark-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    width: 100%;
    padding: 0.4rem;
    background: var(--secondary);
    border: none;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.scenery-mark-btn:hover { background: var(--primary); color: white; }
.scenery-mark-icon { font-size: 0.85rem; }

.section-desc-sm { color: var(--text-muted); font-size: 0.8rem; margin-bottom: 0.75rem; }

/* === Manage Uploads (Organize page) === */
.manage-uploads-section {
    margin-top: 2.5rem;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.manage-uploads-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.manage-uploads-header h2 { margin: 0; }
.manage-uploads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}
.manage-upload-item {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: opacity 0.3s;
}
.manage-upload-item img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
}
.manage-upload-info {
    padding: 0.35rem 0.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.25rem;
}
.manage-upload-name {
    font-size: 0.65rem;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}
.manage-delete-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
    transition: color 0.15s;
}
.manage-delete-btn:hover { color: var(--error); }

/* === Floating Upload Pill === */
.upload-pill {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 1.25rem;
    background: rgba(26, 26, 46, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 999px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.4);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    min-width: 200px;
    max-width: 90vw;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
}
.upload-pill.pill-done { border-color: var(--success); }
.upload-pill.pill-error { border-color: var(--error); }

.upload-pill-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: pill-spin 0.8s linear infinite;
    flex-shrink: 0;
}
.pill-done .upload-pill-spinner { border-top-color: var(--success); animation: none; border-color: var(--success); }
.pill-error .upload-pill-spinner { border-top-color: var(--error); animation: none; border-color: var(--error); }

@keyframes pill-spin { to { transform: rotate(360deg); } }

.upload-pill-text { flex-shrink: 0; }

.upload-pill-bar {
    width: 60px;
    height: 4px;
    background: var(--bg-input);
    border-radius: 2px;
    overflow: hidden;
    flex-shrink: 0;
}
.upload-pill-bar-fill {
    height: 100%;
    width: 0%;
    background: var(--primary);
    border-radius: 2px;
    transition: width 0.3s;
}
.pill-done .upload-pill-bar-fill { background: var(--success); }
.pill-error .upload-pill-bar-fill { background: var(--error); }

/* === Resume Banner === */
.resume-banner {
    position: fixed;
    top: 57px;
    left: 0;
    right: 0;
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.6rem 1.5rem;
    background: rgba(108, 99, 255, 0.15);
    border-bottom: 1px solid rgba(108, 99, 255, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    font-size: 0.85rem;
    color: var(--text);
    animation: banner-slide 0.3s ease-out;
}
@keyframes banner-slide { from { transform: translateY(-100%); } to { transform: translateY(0); } }

.resume-banner-text { font-weight: 500; }
.resume-banner-dismiss {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0 0.25rem;
    line-height: 1;
}
.resume-banner-dismiss:hover { color: var(--text); }

/* === Responsive === */
@media (max-width: 640px) {
    .hero h1 { font-size: 1.75rem; }
    .card-grid { grid-template-columns: 1fr; }
    .navbar { padding: 0.75rem 1rem; }
    .nav-links { gap: 0.75rem; flex-wrap: wrap; }
    .nav-link { font-size: 0.8rem; }
    .container { padding: 1.5rem 1rem 3rem; }
    .organize-actions { flex-direction: column; text-align: center; }
    .stats-row { justify-content: center; }
    .form-row { flex-direction: column; }
    .form-row input { width: 100%; }
    .share-content { padding: 1.5rem; }
    .qr-image { width: 200px; height: 200px; }
    .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
    .merge-selects { flex-direction: column; }
    .merge-arrow { transform: rotate(-90deg); padding: 0; }
    .lightbox-nav { font-size: 2rem; padding: 0.3rem 0.6rem; }
    .summary-actions { flex-direction: column; width: 100%; }
    .summary-actions .btn { width: 100%; }
    .preview-summary { flex-direction: column; text-align: center; }
    .confirmed-card { padding: 2rem 1.5rem; }
}
