/* PrintShelf — public pages.
   Dark-first, photo-forward, no framework. ~6KB. */

:root {
    --bg: #0f1115;
    --bg-elev: #181b22;
    --bg-card: #1e2129;
    --border: #2a2e38;
    --text: #e8e9ed;
    --text-dim: #9ba0aa;
    --accent: #ff6a3d;
    --accent-soft: #ff6a3d22;
    --fail: #ff5c5c;
    --partial: #f5a623;
    --radius: 12px;
    --gap: 18px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif; line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 24px; border-bottom: 1px solid var(--border);
    background: var(--bg-elev); position: sticky; top: 0; z-index: 10;
}
.brand { font-weight: 700; font-size: 1.15rem; color: var(--text); }
.brand:hover { text-decoration: none; color: var(--accent); }
.nav-search { flex: 1; max-width: 320px; margin: 0 24px; }
.nav-search input { width: 100%; background: var(--bg-card); color: var(--text); border: 1px solid var(--border); border-radius: 20px; padding: 6px 14px; font-size: 0.88rem; font-family: inherit; }
.nav-search input:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.topnav a, .topnav button { color: var(--text-dim); margin-left: 18px; font-size: 0.95rem; }
.topnav a:hover { color: var(--text); text-decoration: none; }
.topnav .cta-link { color: var(--accent); border: 1px solid var(--accent-soft); padding: 6px 12px; border-radius: 6px; }
.topnav .cta-link:hover { background: var(--accent-soft); }
.linklike { background: none; border: 0; color: var(--text-dim); cursor: pointer; padding: 0; font: inherit; }
.linklike:hover { color: var(--text); }

/* ── Mobile hamburger ── */
.nav-toggle { display: none; background: none; border: 0; color: var(--text-dim); cursor: pointer; font-size: 1.4rem; padding: 4px 6px; line-height: 1; }
.nav-toggle:hover { color: var(--text); }

/* Auth forms */
.auth-form { max-width: 420px; margin: 40px auto; padding: 32px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); }
.auth-form h1 { margin: 0 0 4px; font-size: 1.5rem; }
.auth-form .auth-sub { color: var(--text-dim); margin: 0 0 24px; }
.auth-form form { display: flex; flex-direction: column; gap: 16px; }
.auth-form label { display: flex; flex-direction: column; gap: 6px; font-size: 0.9rem; color: var(--text-dim); }
.auth-form .hint { color: var(--text-dim); font-size: 0.8rem; font-weight: 400; }
.auth-form input { background: var(--bg-card); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; font-size: 16px; font-family: inherit; }
.auth-form input:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.auth-form button.primary { background: var(--accent); color: white; border: 0; border-radius: 8px; padding: 12px; font-size: 1rem; font-weight: 600; cursor: pointer; margin-top: 4px; }
.auth-form button.primary:hover { filter: brightness(1.1); }
.auth-alt { margin: 20px 0 0; text-align: center; color: var(--text-dim); font-size: 0.9rem; }
.errors { list-style: none; padding: 12px 14px; margin: 0 0 20px; background: #3a1414; border: 1px solid #5c1f1f; border-radius: 8px; color: #ffb4b4; }
.errors li { font-size: 0.9rem; }

/* Dashboard stub */
.dashboard-stub { max-width: 720px; margin: 0 auto; }
.dashboard-stub h1 { margin: 0 0 8px; }
.dashboard-stub .quick-links { list-style: none; padding: 0; margin: 24px 0; display: flex; flex-direction: column; gap: 12px; }
.dashboard-stub .quick-links li { background: var(--bg-elev); border: 1px solid var(--border); border-radius: 8px; padding: 14px 18px; color: var(--text-dim); }
.dashboard-stub .quick-links strong { color: var(--text); }
.dashboard-stub details { margin-top: 28px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 8px; padding: 14px 18px; }
.dashboard-stub summary { cursor: pointer; color: var(--text); font-weight: 500; }
.dashboard-stub .apikey { background: var(--bg-card); padding: 10px 12px; border-radius: 6px; font-size: 0.85rem; word-break: break-all; margin: 14px 0 6px; color: var(--accent); }

/* Dashboard shell */
.dash-shell { display: grid; grid-template-columns: 200px 1fr; gap: 28px; align-items: start; background: linear-gradient(to right, var(--bg-elev) 200px, transparent 200px); }
.dash-sidebar { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; position: sticky; top: 80px; }
.dash-sidebar ul { list-style: none; padding: 0; margin: 0; }
.dash-sidebar li { margin: 0; }
.dash-sidebar a { display: block; padding: 9px 12px; border-radius: 6px; color: var(--text-dim); font-size: 0.95rem; }
.dash-sidebar a:hover { color: var(--text); background: var(--bg-card); text-decoration: none; }
.dash-sidebar a.active { background: var(--accent-soft); color: var(--accent); font-weight: 500; }

.dash-main { min-width: 0; }
.dash-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; margin-bottom: 24px; }
.dash-header h1 { margin: 0; font-size: 1.45rem; }
.dash-subtitle { color: var(--text-dim); margin: 4px 0 0; font-size: 0.95rem; }
.header-actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.tabs { display: flex; gap: 4px; background: var(--bg-elev); padding: 4px; border-radius: 8px; border: 1px solid var(--border); }
.tabs a { padding: 6px 12px; border-radius: 6px; color: var(--text-dim); font-size: 0.9rem; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.active { background: var(--bg-card); color: var(--text); }

.btn-primary { background: var(--accent); color: white; padding: 9px 16px; border-radius: 8px; border: 0; font-weight: 600; cursor: pointer; font-size: 0.95rem; display: inline-block; }
.btn-primary:hover { filter: brightness(1.08); text-decoration: none; color: white; }
.btn-secondary { background: var(--bg-card); color: var(--text); padding: 7px 12px; border-radius: 6px; border: 1px solid var(--border); cursor: pointer; font-size: 0.85rem; }
.btn-secondary:hover { border-color: var(--accent); }

/* Dashboard cards */
.dash-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-bottom: 32px; }
.dash-card { display: block; padding: 18px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); transition: border-color 0.15s; }
.dash-card:hover { border-color: var(--accent); text-decoration: none; }
.dash-card h3 { margin: 0 0 6px; font-size: 1rem; color: var(--accent); }
.dash-card p { margin: 0; color: var(--text-dim); font-size: 0.85rem; }
.dash-apikey { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 18px; }
.dash-apikey summary { cursor: pointer; color: var(--text); font-weight: 500; }
.dash-apikey .apikey { background: var(--bg-card); padding: 10px 12px; border-radius: 6px; font-size: 0.85rem; word-break: break-all; margin: 14px 0 6px; color: var(--accent); }

/* Tables */
.dash-table { width: 100%; border-collapse: collapse; background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.dash-table th, .dash-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); }
.dash-table th { background: var(--bg-card); color: var(--text-dim); font-size: 0.85rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; }
.dash-table tr:last-child td { border-bottom: 0; }
.dash-table .actions { display: flex; gap: 14px; align-items: center; justify-content: flex-end; }
.dash-table .actions a { font-size: 0.9rem; }
.inline-form { display: inline; }
.linklike.danger { color: #ff7c7c; }
.linklike.danger:hover { color: #ff5c5c; }
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; z-index: 900; }
.modal-overlay[hidden] { display: none; }
.modal-box { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px 32px; max-width: 340px; width: 90%; }
.modal-box p { margin: 0 0 22px; font-size: 1rem; color: var(--text); }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }
.btn-danger { background: #c0392b; color: #fff; padding: 8px 16px; border-radius: 6px; border: 0; font-weight: 600; cursor: pointer; font-size: 0.9rem; }
.btn-danger:hover { background: #a93226; }

/* Forms */
.dash-form { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 16px; max-width: 760px; }
.dash-form label { display: flex; flex-direction: column; gap: 6px; font-size: 0.9rem; color: var(--text-dim); }
.dash-form .row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.dash-form input, .dash-form textarea, .dash-form select { background: var(--bg-card); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 9px 12px; font-size: 16px; font-family: inherit; }
.dash-form input:focus, .dash-form textarea:focus, .dash-form select:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.dash-form textarea { resize: vertical; min-height: 80px; }
.dash-form .hint { color: var(--text-dim); font-size: 0.78rem; font-weight: 400; }
.dash-form .form-actions { display: flex; gap: 14px; align-items: center; margin-top: 8px; }
.dash-form .filaments-picker, .dash-form .photo-picker { border: 1px solid var(--border); border-radius: 8px; padding: 12px 16px; min-width: 0; }
.dash-form .filaments-picker legend, .dash-form .photo-picker legend { padding: 0 6px; font-size: 0.9rem; color: var(--text-dim); }
.dash-form .dash-section { border: 1px solid var(--border); border-radius: 8px; padding: 12px 16px; display: flex; flex-direction: column; gap: 12px; }
.dash-form .dash-section legend { padding: 0 6px; font-size: 0.9rem; color: var(--text-dim); }
.dash-socials { border: 1px solid var(--border); border-radius: 8px; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.dash-socials legend { padding: 0 6px; font-size: 0.9rem; color: var(--text-dim); }
.social-field { display: flex; gap: 8px; align-items: center; }
.social-field input { flex: 1; margin: 0; }
.social-fill-btn { white-space: nowrap; font-size: 0.78rem; color: var(--accent); background: none; border: none; cursor: pointer; padding: 0; opacity: 0.8; }
.social-fill-btn:hover { opacity: 1; text-decoration: underline; }
.photo-picker { display: flex; flex-direction: column; gap: 12px; }
.photo-picker .current-photo { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.photo-picker .current-photo img { max-width: 220px; max-height: 220px; border-radius: 8px; border: 1px solid var(--border); }
.photo-file-label input[type="file"] { background: var(--bg-card); color: var(--text); padding: 8px 10px; }
.checkbox-list { list-style: none; padding: 0; margin: 4px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; }
.checkbox-label { flex-direction: row !important; align-items: center; gap: 8px; color: var(--text); cursor: pointer; padding: 6px 8px; border-radius: 6px; }
.checkbox-label:hover { background: var(--bg-card); }
.checkbox-inline { flex-direction: row !important; align-items: center; gap: 8px; color: var(--text); }

/* Print rows */
.prints-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.prints-row { display: grid; grid-template-columns: 90px 1fr auto; gap: 16px; align-items: center; padding: 14px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); }
.thumb-sm { width: 90px; height: 90px; border-radius: 8px; overflow: hidden; background: var(--bg-card); }
.thumb-sm img { width: 100%; height: 100%; object-fit: cover; }
.thumb-fallback-sm { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; opacity: 0.4; }
.prints-row h3 { margin: 0 0 6px; font-size: 1rem; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.prints-row .meta { margin: 0; color: var(--text-dim); font-size: 0.85rem; }
.prints-row .filament-chips { margin: 8px 0 0; display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--bg-card); border: 1px solid var(--border); padding: 3px 8px; border-radius: 999px; font-size: 0.78rem; color: var(--text-dim); }
.prints-row .actions { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }

/* Badges & swatches */
.badge-pill { padding: 2px 10px; border-radius: 999px; font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.badge-queued { background: #2c2c4d; color: #b3b3f2; }
.badge-fail { background: var(--fail); color: white; }
.badge-partial { background: var(--partial); color: #1a1300; }
.badge-private { background: var(--border); color: var(--text-dim); }
.swatch { display: inline-block; width: 18px; height: 18px; border-radius: 4px; border: 1px solid var(--border); }
.swatch-sm { display: inline-block; width: 12px; height: 12px; border-radius: 3px; border: 1px solid var(--border); vertical-align: middle; }
.chip-price { color: var(--text-dim); font-size: 0.73rem; }
.chip-buy { color: var(--accent); font-size: 0.73rem; text-decoration: none; white-space: nowrap; }
.chip-buy:hover { text-decoration: underline; }
.status-pill { padding: 3px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 500; text-transform: capitalize; }
.status-own { background: #1e3a2a; color: #8fdca5; }
.status-want { background: #2a2640; color: #b8a8f0; }
.status-used_up { background: var(--border); color: var(--text-dim); }
.status-low { background: #4a3522; color: #f0c08a; }

.empty-block { background: var(--bg-elev); border: 1px dashed var(--border); border-radius: var(--radius); padding: 40px 24px; text-align: center; color: var(--text-dim); }

/* Import form (above print form) */
.import-form { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; max-width: 760px; margin-bottom: 16px; }
.import-url-label { display: flex; flex-direction: column; gap: 8px; font-size: 0.9rem; color: var(--text-dim); }
.import-row { display: flex; gap: 10px; }
.import-row input { flex: 1; background: var(--bg-card); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 9px 12px; font-size: 16px; }
.import-row input:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.import-form .hint { color: var(--text-dim); font-size: 0.78rem; }

/* Legal pages (privacy, terms) — readable long-form layout */
.legal-page { max-width: 760px; margin: 24px auto 64px; padding: 0 24px; line-height: 1.6; }
.legal-page h1 { margin: 0 0 4px; font-size: 1.7rem; }
.legal-page h2 { margin: 32px 0 10px; font-size: 1.15rem; color: var(--accent); }
.legal-page p, .legal-page ul { color: var(--text-dim); }
.legal-page li { margin: 4px 0; }
.legal-page code { background: var(--bg-card); padding: 1px 5px; border-radius: 4px; font-size: 0.9em; }
.legal-page .legal-updated { color: var(--text-dim); font-size: 0.85rem; margin: 4px 0 24px; }

.notice { padding: 10px 14px; border-radius: 8px; font-size: 0.9rem; margin-bottom: 14px; max-width: 760px; }
.notice-ok { background: #143a26; border: 1px solid #1f5c3a; color: #9be5b6; }
.notice-warn { background: #4a3522; border: 1px solid #6b4d2f; color: #f0c08a; }
.notice-error { background: #4a2222; border: 1px solid #7a3333; color: #f0a0a0; }
.verify-banner { background: #2a2d1a; border: 1px solid #4a5020; color: #d4e08a; font-size: 0.875rem; padding: 10px 14px; border-radius: 8px; margin-bottom: 18px; }
.verify-banner strong { color: #e8f0a0; }

/* ── Auth notice (success/info, used on login after password reset) ── */
.auth-notice { background: #143a26; border: 1px solid #1f5c3a; color: #9be5b6; padding: 10px 14px; border-radius: 8px; font-size: 0.9rem; margin-bottom: 16px; }

/* ── Tables: horizontal scroll wrapper ── */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); }
.table-scroll .dash-table { border-radius: 0; }

@media (max-width: 720px) {
    /* Dashboard layout */
    .dash-shell { grid-template-columns: 1fr; gap: 14px; }
    .dash-sidebar { position: static; padding: 4px; }
    .dash-sidebar ul { display: flex; overflow-x: auto; -webkit-overflow-scrolling: touch; gap: 2px; padding: 0; scrollbar-width: none; }
    .dash-sidebar ul::-webkit-scrollbar { display: none; }
    .dash-sidebar a { white-space: nowrap; padding: 8px 14px; font-size: 0.88rem; }

    /* Prints list */
    .prints-row { grid-template-columns: 70px 1fr; }
    .prints-row .actions { grid-column: 1 / -1; flex-direction: row; justify-content: flex-end; flex-wrap: wrap; gap: 12px; }
    .thumb-sm { width: 70px; height: 70px; }
}

@media (max-width: 600px) {
    /* Global spacing */
    main { padding: 16px 12px 60px; }

    /* Topbar + hamburger */
    .topbar { padding: 12px 14px; position: relative; }
    .nav-toggle { display: block; }
    .topnav {
        display: none; flex-direction: column;
        position: absolute; top: 100%; right: 0;
        background: var(--bg-elev); border: 1px solid var(--border);
        border-radius: var(--radius); min-width: 160px; z-index: 100;
        box-shadow: 0 8px 24px rgba(0,0,0,0.5); overflow: hidden;
    }
    .topnav.nav-open { display: flex; }
    .topnav a, .topnav button { margin: 0; padding: 12px 18px; display: block; font-size: 0.95rem; border-bottom: 1px solid var(--border); }
    .topnav > form { border-bottom: 1px solid var(--border); }
    .topnav > *:last-child, .topnav > form:last-child { border-bottom: 0; }
    .topnav .cta-link { border-radius: 0; border: 0; border-bottom: 1px solid var(--border); }

    /* Hero gallery: 2-col on phones */
    .hero-gallery { grid-template-columns: repeat(2, 1fr); }

    /* Auth form — full bleed on small phones */
    .auth-form { padding: 20px 16px; margin: 16px 0; border-radius: 8px; }

    /* Dashboard form */
    .dash-form { padding: 14px 12px; }
    .dash-header { gap: 10px; margin-bottom: 16px; }
    .dash-header h1 { font-size: 1.2rem; }

    /* Import URL → stack input above button */
    .import-row { flex-direction: column; }
    .import-form { padding: 14px; }

    /* Tables */
    .dash-table { font-size: 0.82rem; }
    .dash-table th, .dash-table td { padding: 10px; }

    /* Profile */
    .profile-hero { flex-direction: column; text-align: center; align-items: center; padding: 20px; }
    .profile-meta .stats { justify-content: center; }
    .filters form { width: 100%; }
    .filters label { flex: 1; min-width: 140px; }
    .filters select { width: 100%; }

    /* Photo upload page */
    .photo-drop-zone { padding: 50px 20px; }
    .drop-sub { display: none; }
}

/* ---------- Homepage ---------- */
.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; padding: 40px 0 56px; }
.hero h1 { font-size: 2.6rem; line-height: 1.1; margin: 0 0 18px; letter-spacing: -0.02em; }
.hero-sub { font-size: 1.15rem; color: var(--text-dim); margin: 0 0 28px; max-width: 48ch; line-height: 1.5; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.btn-lg { padding: 13px 22px; font-size: 1rem; }
.btn-ghost { background: transparent; color: var(--text); padding: 13px 22px; border-radius: 8px; border: 1px solid var(--border); font-weight: 500; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.hero-fineprint { font-size: 0.85rem; color: var(--text-dim); margin: 8px 0 0; }

.hero-gallery-wrap { display: flex; flex-direction: column; gap: 8px; }
.hero-explore-link { font-size: 0.85rem; color: var(--text-dim); text-align: right; margin-top: 4px; }
.hero-explore-link:hover { color: var(--accent); text-decoration: none; }
.hero-gallery-label { margin: 0; font-size: 0.78rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.hero-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.hero-gallery-empty { display: flex; align-items: center; justify-content: center; min-height: 280px; background: var(--bg-elev); border: 1px dashed var(--border); border-radius: var(--radius); }
.empty-placeholder { text-align: center; color: var(--text-dim); }
.empty-placeholder p:first-child { font-size: 3rem; margin: 0 0 6px; opacity: 0.5; }
.empty-placeholder p { margin: 4px 0; }
.empty-placeholder .muted { color: var(--accent); font-size: 0.9rem; }

.home-card { display: block; background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; color: var(--text); transition: transform 0.15s, border-color 0.15s; }
.home-card:hover { transform: translateY(-2px); border-color: var(--accent-soft); text-decoration: none; }
.home-thumb { position: relative; aspect-ratio: 1 / 1; background: #0a0c10; overflow: hidden; }
.home-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.home-thumb .badge-pill { position: absolute; top: 8px; left: 8px; }
.home-card-body { padding: 8px 10px 10px; }
.home-card-body h4 { margin: 0 0 2px; font-size: 0.85rem; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.home-maker { margin: 0; color: var(--text-dim); font-size: 0.72rem; }

.how { padding: 48px 0; border-top: 1px solid var(--border); }
.how h2, .features h2, .closing-cta h2 { font-size: 1.7rem; margin: 0 0 32px; }
.how-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.how-steps li { position: relative; padding-top: 8px; }
.step-num { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 1rem; margin-bottom: 14px; }
.how-steps h3 { font-size: 1.1rem; margin: 0 0 8px; }
.how-steps p { color: var(--text-dim); margin: 0; line-height: 1.5; }
.how-steps code { background: var(--bg-elev); padding: 1px 6px; border-radius: 4px; font-size: 0.85rem; color: var(--accent); }

.features { padding: 48px 0; border-top: 1px solid var(--border); }
.feat-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.feat-grid li { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.feat-grid h4 { margin: 0 0 8px; font-size: 1.05rem; display: flex; align-items: center; gap: 8px; }
.feat-grid p { margin: 0; color: var(--text-dim); line-height: 1.5; font-size: 0.92rem; }
.feat-grid .soon { background: var(--accent-soft); color: var(--accent); font-size: 0.65rem; padding: 2px 8px; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; }

.closing-cta { padding: 60px 0 40px; border-top: 1px solid var(--border); text-align: center; }
.closing-cta p { color: var(--text-dim); margin: 0 0 22px; }

@media (max-width: 800px) {
    .hero { grid-template-columns: 1fr; gap: 28px; padding: 28px 0 40px; }
    .hero h1 { font-size: 2rem; }
    .how-steps { grid-template-columns: 1fr; gap: 28px; }
}

main { max-width: 1100px; margin: 0 auto; padding: 28px 20px 80px; }

/* Profile hero */
.profile-hero {
    display: flex; gap: 22px; align-items: center;
    padding: 24px; background: var(--bg-elev);
    border: 1px solid var(--border); border-radius: var(--radius);
    margin-bottom: 22px;
}
.avatar { flex-shrink: 0; width: 96px; height: 96px; border-radius: 50%; overflow: hidden; background: var(--bg-card); display: flex; align-items: center; justify-content: center; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-fallback { font-size: 2.4rem; font-weight: 700; color: var(--accent); }
.profile-meta h1 { margin: 0 0 4px; font-size: 1.6rem; }
.profile-meta .handle { margin: 0 0 8px; color: var(--text-dim); }
.profile-meta .bio { margin: 0 0 12px; color: var(--text); max-width: 56ch; }
.shelf-views-owner { font-size: 0.78rem; color: var(--text-dim); margin: 0 0 8px; opacity: 0.7; }
.profile-meta .stats { list-style: none; padding: 0; margin: 0; display: flex; gap: 22px; flex-wrap: wrap; }
.profile-meta .stats li { color: var(--text-dim); font-size: 0.95rem; }
.profile-meta .stats strong { color: var(--text); font-size: 1.15rem; margin-right: 4px; }
.machines { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.machine-chip { display: inline-block; padding: 3px 10px; border-radius: 20px; background: var(--bg-card); border: 1px solid var(--border); color: var(--text-dim); font-size: 0.8rem; }
.profile-follow-meta { display: flex; gap: 18px; margin-top: 12px; font-size: 0.9rem; color: var(--text-dim); }
.profile-follow-meta strong { color: var(--text); margin-right: 3px; }
.follow-btn { min-width: 90px; }
.socials { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 12px; }
.social-link { display: inline-block; padding: 3px 10px; border-radius: 20px; background: var(--bg-card); border: 1px solid var(--border); color: var(--text-dim); font-size: 0.8rem; text-decoration: none; transition: border-color .15s, color .15s; }
.social-link:hover { color: var(--accent); border-color: var(--accent); text-decoration: none; }

/* Filters */
.filters { margin-bottom: 22px; }
.filters form { display: flex; gap: 14px; align-items: end; flex-wrap: wrap; }
.filters label { display: flex; flex-direction: column; gap: 4px; font-size: 0.85rem; color: var(--text-dim); }
.filters select {
    background: var(--bg-card); color: var(--text); border: 1px solid var(--border);
    border-radius: 8px; padding: 8px 12px; font-size: 16px; min-width: 140px;
    appearance: none; -webkit-appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--text-dim) 50%), linear-gradient(135deg, var(--text-dim) 50%, transparent 50%);
    background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-right: 32px;
}
.filters select:focus { outline: 2px solid var(--accent); }
.clear-link { align-self: end; padding-bottom: 10px; font-size: 0.9rem; }

/* Grid */
.print-grid {
    display: grid; gap: var(--gap);
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.print-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column;
    transition: transform 0.15s ease, border-color 0.15s ease;
}
.print-card:hover { transform: translateY(-2px); border-color: var(--accent-soft); }
.thumb { position: relative; aspect-ratio: 1 / 1; background: #0a0c10; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-fallback { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 3rem; opacity: 0.4; }
.badge { padding: 4px 10px; border-radius: 999px; font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.thumb .badge { position: absolute; top: 10px; left: 10px; }
.badge-fail { background: var(--fail); color: white; }
.badge-partial { background: var(--partial); color: #1a1300; }
.badge-video { background: #1a1a2e; color: #a78bfa; }

.card-body { padding: 12px 14px 14px; }
.card-body h3 { margin: 0 0 4px; font-size: 1rem; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.designer { margin: 0 0 8px; color: var(--text-dim); font-size: 0.85rem; }
.card-meta { display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; gap: 8px; }
.rating { color: #ffc857; letter-spacing: 1px; }
.source { color: var(--text-dim); font-size: 0.8rem; text-transform: capitalize; }

/* Empty */
.empty {
    text-align: center; padding: 60px 24px; background: var(--bg-elev);
    border: 1px dashed var(--border); border-radius: var(--radius); color: var(--text-dim);
}
.empty h1 { color: var(--text); margin: 0 0 12px; }
.empty code { background: var(--bg-card); padding: 2px 8px; border-radius: 4px; color: var(--accent); }

/* ===== Developers page ===== */
.dev-page { max-width: 860px; margin: 0 auto; padding: 40px 16px 80px; }
.dev-header { margin-bottom: 40px; }
.dev-header h1 { font-size: 2rem; margin: 0 0 10px; }
.dev-sub { color: var(--text-dim); margin: 0; }
.dev-section { margin-bottom: 44px; }
.dev-section h2 { font-size: 1.2rem; margin: 0 0 14px; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.dev-section h3 { font-size: 1rem; margin: 20px 0 10px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.8rem; }
.dev-code { background: var(--bg-elev); border: 1px solid var(--border); border-radius: 8px; padding: 14px 16px; font-size: 0.85rem; overflow-x: auto; white-space: pre; margin: 0 0 12px; line-height: 1.6; }
.dev-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.dev-table th { text-align: left; color: var(--text-dim); font-weight: 600; padding: 6px 12px 6px 0; border-bottom: 1px solid var(--border); }
.dev-table td { padding: 7px 12px 7px 0; border-bottom: 1px solid var(--border); color: var(--text); vertical-align: top; }
.dev-table td:first-child, .dev-table td:nth-child(2) { white-space: nowrap; }
.dev-table code { background: var(--bg-elev); padding: 1px 6px; border-radius: 4px; font-size: 0.83rem; color: var(--accent); }

footer {
    border-top: 1px solid var(--border); padding: 18px 24px; text-align: center;
    color: var(--text-dim); font-size: 0.85rem; margin-top: 60px;
}
.footer-links { margin: 6px 0 0; }
.footer-links a { color: var(--text-dim); }
.footer-links a:hover { color: var(--text); }
.footer-sep { margin: 0 6px; opacity: 0.5; }

/* Photo upload page */
.photo-upload-page { max-width: 480px; margin: 40px auto; padding: 0 20px; }
.photo-upload-page h1 { font-size: 1.3rem; margin: 8px 0 20px; }
.photo-upload-page .back-link { color: var(--text-dim); text-decoration: none; font-size: 0.9rem; }
.photo-upload-page .back-link:hover { color: var(--text); }
.current-photo-lg { width: 100%; max-height: 320px; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--border); margin-bottom: 8px; }
.photo-drop-form { display: flex; flex-direction: column; gap: 16px; margin-top: 20px; }
.photo-drop-zone {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 8px; padding: 40px 20px; border: 2px dashed var(--border); border-radius: var(--radius);
    cursor: pointer; text-align: center; transition: border-color 0.15s, background 0.15s;
    background: var(--bg-elev);
}
.photo-drop-zone:hover, .photo-drop-zone.drag-over { border-color: var(--accent); background: var(--accent-soft); }
.photo-drop-zone.has-file { padding: 16px 20px; border-style: solid; border-color: var(--border); }
.photo-drop-zone.has-file .drop-icon { font-size: 1.4rem; }
.photo-drop-zone.has-file .drop-sub { display: none; }
.photo-drop-zone input[type="file"] { display: none; }
.drop-icon { font-size: 2.5rem; line-height: 1; }
.drop-label { font-size: 1rem; font-weight: 600; color: var(--text); }
.drop-sub { font-size: 0.85rem; color: var(--text-dim); }
#preview-wrap { border-radius: var(--radius); overflow: hidden; }
#preview-img { width: 100%; max-height: 360px; object-fit: cover; display: block; }
.btn-full { width: 100%; justify-content: center; }
.btn-primary.uploading { opacity: 0.7; cursor: not-allowed; }

/* Clickable profile card — full-card link overlay */
.print-card { position: relative; }
.card-link {
    position: absolute; inset: 0; z-index: 1;
    border-radius: var(--radius);
}
.card-body a, .card-meta a { position: relative; z-index: 2; }

/* badge-ok (success) on detail pages */
.badge-ok { background: var(--success, #1a4731); color: #6ee7b7; }

/* Print detail page */
.print-detail-page { max-width: 1000px; margin: 0 auto; padding: 32px 24px; }
.detail-breadcrumb { font-size: 0.9rem; color: var(--text-dim); margin-bottom: 24px; display: flex; gap: 8px; align-items: center; }
.detail-breadcrumb a { color: var(--accent); text-decoration: none; }
.detail-breadcrumb a:hover { text-decoration: underline; }
.detail-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.detail-photo img { width: 100%; border-radius: var(--radius); border: 1px solid var(--border); display: block; }
.thumb-fallback-lg { aspect-ratio: 1/1; display: flex; align-items: center; justify-content: center; font-size: 5rem; opacity: 0.3; background: var(--bg-elev); border-radius: var(--radius); }
.detail-info h1 { margin: 0 0 6px; font-size: 1.6rem; line-height: 1.3; }
.detail-designer { margin: 0 0 16px; color: var(--text-dim); font-size: 0.95rem; }
.detail-badges { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.detail-rating { color: #ffc857; font-size: 1.1rem; letter-spacing: 1px; }
.detail-date, .detail-printer { color: var(--text-dim); font-size: 0.9rem; margin: 4px 0; }
.detail-section-label { font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-dim); margin: 20px 0 8px; }
.chip-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.detail-settings { margin-top: 20px; }
.settings-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 20px; }
.settings-list li { font-size: 0.9rem; color: var(--text); }
.setting-key { color: var(--text-dim); font-size: 0.8rem; margin-right: 4px; }
.detail-notes { margin-top: 20px; }
.detail-notes p { color: var(--text-dim); font-size: 0.95rem; line-height: 1.6; white-space: pre-wrap; margin: 0; }
.cost-est { color: var(--text-dim); font-size: 0.9em; }
.detail-video { margin-top: 16px; }
.detail-source { margin-top: 12px; font-size: 0.9rem; }
.detail-source a { color: var(--accent); text-transform: capitalize; }
/* Explore page */
.explore-page { max-width: 1100px; margin: 0 auto; padding: 32px 0; }
.explore-header { margin-bottom: 28px; }
.explore-header h1 { margin: 0 0 6px; font-size: 1.8rem; }
.explore-sub { margin: 0; color: var(--text-dim); }
.explore-user { color: var(--text-dim); font-size: 0.82rem; position: relative; z-index: 2; }
.explore-user:hover { color: var(--accent); text-decoration: none; }
.explore-pager { display: flex; align-items: center; gap: 16px; margin-top: 32px; }
.explore-page-num { color: var(--text-dim); font-size: 0.9rem; }

/* Search page */
.search-page { max-width: 900px; margin: 0 auto; padding: 32px 24px; }
.search-form { display: flex; gap: 10px; margin-bottom: 36px; }
.search-input { flex: 1; background: var(--bg-card); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 10px 16px; font-size: 1rem; font-family: inherit; }
.search-input:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.search-empty { color: var(--text-dim); }
.search-section { margin-bottom: 40px; }
.search-section-heading { font-size: 1rem; font-weight: 600; color: var(--text-dim); margin: 0 0 14px; display: flex; align-items: center; gap: 8px; }
.search-count { background: var(--bg-card); border: 1px solid var(--border); border-radius: 20px; padding: 1px 8px; font-size: 0.8rem; }
.search-users { display: flex; flex-direction: column; gap: 10px; }
.search-user-card { display: flex; align-items: center; gap: 14px; padding: 12px 14px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; transition: border-color .15s; }
.search-user-card:hover { border-color: var(--accent); }
.search-avatar { flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%; overflow: hidden; background: var(--bg-elev); display: flex; align-items: center; justify-content: center; }
.search-avatar img { width: 100%; height: 100%; object-fit: cover; }
.search-avatar .avatar-fallback { font-size: 1.2rem; font-weight: 700; color: var(--accent); }
.search-user-name { margin: 0; font-weight: 600; color: var(--text); font-size: 0.95rem; }
.search-user-handle { margin: 0; color: var(--text-dim); font-size: 0.82rem; }
.search-user-bio { margin: 2px 0 0; color: var(--text-dim); font-size: 0.82rem; }
.search-prints { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
@media (max-width: 600px) { .nav-search { max-width: 140px; } .nav-search input { font-size: 0.8rem; } }

.related-section { max-width: 1000px; margin: 32px auto 0; padding: 0 24px; }
.related-heading { font-size: 1rem; font-weight: 600; margin: 0 0 14px; color: var(--text-dim); }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.related-card { display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: var(--bg-card); text-decoration: none; transition: border-color .15s; }
.related-card:hover { border-color: var(--accent); }
.related-thumb { aspect-ratio: 1/1; overflow: hidden; background: var(--bg-elev); }
.related-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.related-thumb .thumb-fallback { font-size: 2rem; height: 100%; display: flex; align-items: center; justify-content: center; opacity: 0.3; }
.related-info { padding: 8px 10px; }
.related-title { margin: 0 0 2px; font-size: 0.82rem; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.related-user { margin: 0; font-size: 0.75rem; color: var(--text-dim); }
@media (max-width: 680px) {
    .detail-layout { grid-template-columns: 1fr; }
}

/* Feed */
.feed-empty { text-align: center; padding: 60px 20px; color: var(--text-dim); }
.feed-empty p { margin: 0 0 8px; }
.feed-empty .btn-primary { margin-top: 16px; display: inline-block; }
.feed-user { margin: 0 0 4px; font-size: 0.8rem; color: var(--text-dim); position: relative; z-index: 2; }
.feed-user a { color: var(--accent); text-decoration: none; }
.feed-user a:hover { text-decoration: underline; }

/* Sidebar counts */
.nav-count { background: var(--bg-card); color: var(--text-dim); font-size: 0.75rem; padding: 1px 7px; border-radius: 10px; margin-left: 4px; }
.dash-sidebar a.active .nav-count { background: var(--accent-soft); color: var(--accent); }

/* Admin console */
.admin-wrap { max-width: 1000px; margin: 0 auto; padding: 32px 24px; }
.admin-title { margin: 0 0 4px; font-size: 1.6rem; }
.admin-ts { margin: 0 0 32px; color: var(--text-dim); font-size: 0.85rem; }
.admin-section { margin-bottom: 40px; }
.admin-section h2 { font-size: 1rem; font-weight: 600; color: var(--text-dim); margin: 0 0 14px; text-transform: uppercase; letter-spacing: 0.05em; }
.admin-stats { display: flex; flex-wrap: wrap; gap: 12px; }
.admin-stat { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 20px; min-width: 110px; display: flex; flex-direction: column; gap: 4px; }
.admin-stat-val { font-size: 1.6rem; font-weight: 700; color: var(--text); line-height: 1; }
.admin-stat-lbl { font-size: 0.75rem; color: var(--text-dim); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.admin-table th { text-align: left; padding: 6px 10px; border-bottom: 2px solid var(--border); color: var(--text-dim); font-weight: 600; font-size: 0.8rem; }
.admin-table td { padding: 7px 10px; border-bottom: 1px solid var(--border); color: var(--text); }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table a { color: var(--accent); text-decoration: none; }
.admin-table a:hover { text-decoration: underline; }
.admin-dim { color: var(--text-dim); font-size: 0.82rem; }
.admin-empty { color: var(--text-dim); font-size: 0.875rem; }

/* Onboarding */
.onboarding { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 24px; margin-bottom: 24px; }
.onboarding h2 { margin: 0 0 16px; font-size: 1.1rem; }
.onboarding-steps { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.onboarding-steps li { display: flex; align-items: flex-start; gap: 14px; }
.onboarding-steps li div { display: flex; flex-direction: column; gap: 2px; }
.onboarding-steps li div a { font-weight: 600; font-size: 0.95rem; }
.onboarding-steps li div p { margin: 0; color: var(--text-dim); font-size: 0.85rem; }
.step-check { flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--bg-card); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 700; color: var(--text-dim); margin-top: 1px; }
.step-done .step-check { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.step-done a { color: var(--text-dim); text-decoration: line-through; }

/* Overview stats */
.dash-stats { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 28px; }
.stat-item { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; text-align: center; min-width: 80px; flex: 1; }
.stat-value { display: block; font-size: 2rem; font-weight: 700; color: var(--accent); line-height: 1; }
.stat-label { display: block; font-size: 0.78rem; color: var(--text-dim); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.04em; }

/* Prints list filter bar */
.filter-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.filter-search { flex: 1; min-width: 160px; background: var(--bg-card); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; font-size: 0.9rem; font-family: inherit; }
.filter-search:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.filter-sort { background: var(--bg-card); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; font-size: 0.9rem; font-family: inherit; cursor: pointer; }
.clear-link { font-size: 0.85rem; color: var(--text-dim); }
.clear-link:hover { color: var(--text); }

/* Color picker in filament form */
.color-pair { display: flex; gap: 8px; align-items: center; }
.color-pair input[type="color"] { width: 44px; height: 38px; padding: 2px; border-radius: 6px; border: 1px solid var(--border); background: var(--bg-card); cursor: pointer; flex-shrink: 0; }
.color-pair input[type="text"] { flex: 1; }

/* Profile card filament chips */
.card-filaments { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }

/* Account settings */
.avatar-preview { display: flex; align-items: center; gap: 12px; margin-top: -8px; }
.avatar-preview img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); }
.sidebar-divider { border-top: 1px solid var(--border); margin: 6px 4px; }

/* Upgrade / billing */
.sidebar-upgrade { color: var(--accent) !important; font-weight: 500; }
.upgrade-wrap { max-width: 560px; }
.upgrade-pitch { color: var(--text-dim); margin-bottom: 24px; }
.upgrade-plans { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.upgrade-plan { flex: 1; min-width: 200px; border: 1px solid var(--border); border-radius: 12px; padding: 24px; display: flex; flex-direction: column; gap: 8px; position: relative; }
.upgrade-plan--featured { border-color: var(--accent); background: var(--accent-soft); }
.plan-badge { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); background: var(--accent); color: #fff; font-size: 0.75rem; font-weight: 600; padding: 2px 10px; border-radius: 10px; white-space: nowrap; }
.plan-name { font-weight: 600; font-size: 1rem; }
.plan-price { display: flex; align-items: baseline; gap: 2px; }
.plan-amount { font-size: 2rem; font-weight: 700; }
.plan-period { color: var(--text-dim); font-size: 0.9rem; }
.plan-equiv { font-size: 0.82rem; color: var(--text-dim); margin-top: -4px; }
.plan-btn { width: 100%; margin-top: 8px; text-align: center; }
.upgrade-features { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-direction: column; gap: 6px; color: var(--text-dim); font-size: 0.9rem; }
.upgrade-free-note { font-size: 0.82rem; color: var(--text-dim); }
.dash-billing h3 { margin: 0 0 8px; font-size: 1rem; }
