:root {
    --primary: #2aa8d9;
    --primary-dark: #1c91bf;
    --primary-light: #dbf2fb;
    --accent: #1c232f;
    --bg: #f5f0dd;
    --bg-shell: #fffef8;
    --bg-card: #ffffff;
    --text: #1d1d1d;
    --text-muted: #535353;
    --border: #dadada;
    --shadow: 0 8px 18px rgba(0,0,0,0.10);
    --radius: 22px;
    --radius-sm: 14px;
    --transition: all 0.22s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 15% 12%, rgba(255,255,255,0.55) 0, rgba(255,255,255,0.0) 18%),
        radial-gradient(circle at 85% 18%, rgba(255,255,255,0.4) 0, rgba(255,255,255,0.0) 14%),
        radial-gradient(circle at 10% 70%, rgba(255,255,255,0.35) 0, rgba(255,255,255,0.0) 12%),
        linear-gradient(180deg, #f9f4e4 0%, #f7f0dc 100%);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

.site-nav.nav {
    max-width: 760px;
    margin: 18px auto 0;
    padding: 14px 18px;
    background: rgba(255,255,255,0.96);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 18px 18px 0 0;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    position: sticky;
    top: 8px;
    z-index: 1000;
}

.nav-left,
.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-back {
    border: none;
    background: transparent;
    font-size: 22px;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 999px;
}
.nav-back:hover { background: #f2f2f2; }

.nav-logo-ref {
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.nav-logo-img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.nav-logo-stacked {
    display: flex;
    flex-direction: column;
    line-height: 0.86;
    font-size: 18px;
    font-weight: 500;
    letter-spacing: -0.06em;
}

.desktop-nav-links {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 500;
    color: #2e2e2e;
    margin-left: 12px;
}

.desktop-nav-links a {
    text-decoration: none;
}

.desktop-nav-links span { color: #808080; }

.nav-step {
    font-size: 11px;
    font-weight: 700;
    color: #5d5d5d;
    background: #f3f3f3;
    padding: 6px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

.account-pill,
.btn-sign-in {
    width: auto;
    min-height: 42px;
    border-radius: 14px;
    padding: 10px 16px;
    border: 1px solid #cfcfcf;
    background: white;
    color: #2e2e2e;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.steps {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 14px 0 0;
}
.step-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: rgba(0,0,0,0.14);
    transition: var(--transition);
}
.step-dot.active {
    width: 28px;
    background: var(--primary);
}
.step-dot.done { background: #8fd3ea; }

.container {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 14px 40px;
}
.screen { display: none; }
.screen.active { display: block; }
.reference-shell,
.screen-panel {
    background: var(--bg-shell);
    border: 1px solid rgba(0,0,0,0.08);
    border-top: none;
    border-radius: 0 0 22px 22px;
    box-shadow: var(--shadow);
    overflow: hidden;
}
.reference-shell { padding-bottom: 18px; }
.screen-panel { padding: 18px; }

.reference-hero {
    min-height: 255px;
    position: relative;
    overflow: hidden;
}

/* New banner hero */
.hero-with-banner {
    display: block;
    border-radius: 18px 18px 0 0;
}

.hero-banner-img {
    width: 100%;
    height: 340px;
    object-fit: cover;
    object-position: center 40%;
    display: block;
}

.hero-banner-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 60px 26px 24px;
    background: linear-gradient(0deg, rgba(20,16,10,0.92) 0%, rgba(20,16,10,0.6) 55%, transparent 100%);
    color: white;
}

.hero-logo-wordmark {
    height: 48px;
    width: auto;
    display: block;
    margin-bottom: 10px;
    filter: brightness(10);
}

.hero-banner-overlay p {
    max-width: 320px;
    font-size: 15px;
    line-height: 1.45;
    color: rgba(255,255,255,0.88);
    margin: 0;
}

/* Legacy hero styles kept for fallback */
.reference-hero-copy {
    padding: 42px 26px 26px 26px;
    position: relative;
    z-index: 1;
    color: white;
}

.reference-hero-copy h1 {
    font-size: 56px;
    line-height: 0.9;
    font-weight: 900;
    letter-spacing: -0.06em;
    margin-bottom: 14px;
}

.reference-hero-copy p {
    max-width: 245px;
    font-size: 16px;
    line-height: 1.45;
    color: rgba(255,255,255,0.9);
}

.reference-hero-image { min-height: 255px; }

.reference-section {
    padding: 18px 16px 0;
}

.reference-title {
    text-align: center;
    font-size: 19px;
    font-weight: 800;
    margin-bottom: 16px;
}
.reference-title-small {
    font-size: 17px;
    margin-bottom: 12px;
}

.reference-how-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    align-items: stretch;
}

.reference-how-card,
.dual-section-card,
.product-example-card,
.upload-card,
.product-card,
.material-main-preview,
.multiview-card,
.testimonial-card,
.config-card,
.success-card,
.quote-card,
.viewer-container,
.order-preview,
.auth-card,
.portal-panel,
.product-pet-preview,
.saved-model-card {
    background: white;
    border: 1px solid #e1e1e1;
    box-shadow: 0 4px 8px rgba(0,0,0,0.08);
}

.reference-how-card {
    border-radius: 12px;
    padding: 18px 10px 16px;
    text-align: center;
}

.reference-how-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 12px;
    color: #555;
}
.reference-how-icon svg {
    width: 100%;
    height: 100%;
}

.reference-how-heading {
    font-size: 17px;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.reference-how-sub {
    font-size: 12px;
    font-weight: 700;
    color: #444;
    margin-top: 4px;
}

.reference-cta-wrap {
    display: flex;
    justify-content: center;
    margin-top: -10px;
    position: relative;
    z-index: 2;
}

.reference-cta {
    border: none;
    background: linear-gradient(180deg, #3cb8ea 0%, #229ccc 100%);
    color: white;
    font-size: 18px;
    font-weight: 500;
    padding: 13px 54px;
    border-radius: 999px;
    box-shadow: 0 7px 14px rgba(31, 143, 186, 0.35);
    cursor: pointer;
}

.dual-section-row {
    display: grid;
    grid-template-columns: 1.2fr 0.88fr;
    gap: 16px;
}

.dual-section-card {
    border-radius: 12px;
    padding: 14px 14px 12px;
}

.material-pill-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.material-pill-item {
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
}

.material-pill-swatch {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin: 0 auto 8px;
    border: 1px solid rgba(0,0,0,0.08);
}
.swatch-white { background: #f0f0f0; }
.swatch-black { background: #151515; }
.swatch-rainbow { background: linear-gradient(135deg, #ff5959, #ffd93d, #5dde6d, #4d8dff, #b84dff); }
.swatch-bronze { background: radial-gradient(circle at 30% 30%, #b87a40, #6a431f); }

/* Material showcase: original photo + 4 material renders */
/* Desktop: all 5 in a row */
.material-showcase {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    align-items: start;
}

.material-showcase-original,
.material-showcase-card {
    border-radius: 12px;
    overflow: hidden;
    background: white;
    border: 1px solid #e1e1e1;
    text-align: center;
}

.material-showcase-original img,
.material-showcase-card img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    display: block;
}

.material-showcase-grid {
    display: contents;
}

.showcase-icon {
    width: 16px;
    height: 16px;
    display: inline-block;
    vertical-align: -2px;
    color: #555;
}

.showcase-label {
    font-size: 12px;
    font-weight: 700;
    padding: 8px 6px 2px;
    text-align: center;
}
.showcase-tier {
    font-size: 12px;
    font-weight: 800;
    color: #b8860b;
    letter-spacing: 1px;
    padding: 0 6px 8px;
    text-align: center;
}

.product-example-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.product-example-card {
    border-radius: 14px;
    overflow: hidden;
    padding: 0;
}

img.product-example-image {
    width: 100%;
    min-height: 180px;
    object-fit: cover;
    border-radius: 0;
    display: block;
}

.product-example-label {
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    padding: 10px 8px 12px;
}

.upload-section-card {
    margin: 18px 16px 0;
    border-radius: 14px;
    padding: 18px;
    background: white;
    border: 1px solid #e1e1e1;
}

.upload-hero-title {
    font-size: 36px;
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1;
    margin-bottom: 6px;
}

.upload-hero-sub {
    font-size: 16px;
    font-weight: 600;
    color: #444;
    margin-bottom: 4px;
}

.upload-hero-desc {
    font-size: 14px;
    color: #888;
    margin-bottom: 14px;
}

.page-divider {
    height: 1px;
    background: #ddd;
    margin: 28px 16px;
}

.section-label,
.eyebrow {
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary-dark);
    margin-bottom: 8px;
}

.upload-section-copy h2,
.hero h1 {
    font-size: 30px;
    line-height: 1.02;
    font-weight: 900;
    letter-spacing: -0.04em;
    margin-bottom: 10px;
}

.upload-section-copy p,
.hero p,
.product-card-desc,
.config-card p,
.auth-card > p,
.testimonial-text,
.printer-info-label,
.printer-info-vol,
.secure-badge,
.material-thumb-label,
.auth-terms,
.auth-divider,
.empty-state,
.saved-model-date,
.saved-model-id,
.order-meta,
.order-status,
.footer-links,
.footer-links a,
.portal-email,
.quote-label,
.quote-breakdown,
.size-limits,
.form-group label {
    color: var(--text-muted);
}

.upload-section-copy p { line-height: 1.5; margin-bottom: 14px; }

.upload-card {
    border-radius: 14px;
    border-style: dashed;
    border-width: 2px;
    border-color: #d3d3d3;
    padding: 22px 18px;
    text-align: center;
}

.upload-prompt {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 500;
}

.upload-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--primary-light);
    display: grid;
    place-items: center;
}

.upload-btns {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.upload-preview {
    position: relative;
    margin-top: 16px;
    border-radius: 12px;
    overflow: hidden;
}

.upload-preview img,
.order-preview img,
.product-pet-preview img,
.material-main-preview img,
.multiview-card img,
.saved-model-img,
.saved-model-views img {
    width: 100%;
    display: block;
    object-fit: contain;
    background: #fbfbfb;
}

.upload-preview img,
#upload-preview-img { max-height: 320px !important; }
.product-pet-preview img,
.material-main-preview img { max-height: 350px; }
.multiview-card img { aspect-ratio: 1; }
.saved-model-img { max-height: 190px; }
.saved-model-views img { width: 70px; height: 70px; border-radius: 8px; }

.preview-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0,0,0,0.7);
    color: white;
    cursor: pointer;
}

.hero,
.app-step-hero { text-align: center; padding: 8px 0 16px; }
.hero p { max-width: 620px; margin: 0 auto; line-height: 1.5; }

.app-step-layout {
    display: grid;
    grid-template-columns: 0.92fr 1.08fr;
    gap: 18px;
}

.product-grid,
.material-reroll-actions,
.material-choice-buttons,
.app-step-actions,
.saved-model-actions,
.finish-row,
.color-row,
.size-presets { display: flex; flex-direction: column; gap: 12px; }

.product-card,
.product-pet-preview,
.material-main-preview,
.viewer-container,
.order-preview,
.config-card,
.success-card,
.quote-card,
.auth-card,
.portal-panel,
.multiview-card,
.testimonial-card,
.saved-model-card {
    border-radius: 14px;
    overflow: hidden;
}

.product-pet-preview,
.material-main-preview,
.config-card,
.success-card,
.auth-card,
.portal-panel,
.saved-model-card,
.testimonial-card { padding: 16px; }

.product-card { cursor: pointer; transition: var(--transition); }
.product-card:hover,
.material-thumb:hover,
.multiview-card:hover { transform: translateY(-1px); }
.product-card.selected,
.material-thumb.active,
.preset-btn.active,
.material-option.selected,
.finish-chip.selected {
    border-color: rgba(42,168,217,0.55);
    box-shadow: 0 0 0 3px rgba(42,168,217,0.15);
}

.product-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px;
}

.product-card-kicker {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary-dark);
    margin-bottom: 6px;
}
.product-card-title { font-size: 22px; font-weight: 900; margin-bottom: 6px; }
.product-card-icon { font-size: 30px; }

.material-thumbs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 14px;
}

.material-thumb {
    width: 96px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #dddddd;
    cursor: pointer;
    background: white;
}

.material-thumb img {
    width: 100%;
    height: 72px;
    object-fit: contain;
    background: #fafafa;
}

.material-thumb-label {
    padding: 6px 6px 2px;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
}

.material-tier {
    display: block;
    padding: 2px 6px 0;
    font-size: 11px;
    font-weight: 800;
    text-align: center;
    color: #b8860b;
    letter-spacing: 1px;
}

.material-size-note {
    display: block;
    padding: 1px 6px 6px;
    font-size: 9px;
    font-weight: 600;
    text-align: center;
    color: #999;
}

/* Size reference objects */
.size-reference {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #eee;
}
.size-ref-label {
    font-size: 11px;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}
.size-ref-items {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}
.size-ref-item {
    font-size: 13px;
    font-weight: 600;
    color: #444;
}
.size-ref-mm {
    font-size: 11px;
    color: #999;
    font-weight: 500;
}
.size-ref-arrow {
    font-size: 11px;
    font-weight: 700;
    color: var(--primary);
    padding: 2px 6px;
    background: #f0f6ff;
    border-radius: 6px;
}

/* Material info card */
.material-info-card {
    background: white;
    border: 1px solid #e1e1e1;
    border-radius: 14px;
    padding: 16px 18px;
    margin-bottom: 16px;
}
.mat-info-header {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.mat-info-header h3 {
    margin: 0;
    font-size: 16px;
}
.mat-info-process {
    font-size: 12px;
    font-weight: 600;
    color: #888;
    background: #f3f3f3;
    padding: 3px 8px;
    border-radius: 6px;
}
.mat-info-desc {
    font-size: 13px;
    line-height: 1.55;
    color: #444;
    margin: 0 0 10px;
}
.mat-info-highlights {
    list-style: none;
    padding: 0;
    margin: 0 0 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.mat-info-highlights li {
    font-size: 12px;
    font-weight: 600;
    color: #555;
    background: #f8f8f8;
    padding: 4px 10px;
    border-radius: 8px;
    border: 1px solid #eee;
}
.mat-info-max {
    font-size: 11px;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.material-main-label {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(4px);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.material-tier-badge {
    color: #b8860b;
    font-weight: 800;
    letter-spacing: 1px;
}

.banked-float {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    z-index: 5;
}

.banked-float-thumb {
    width: 68px;
    height: 68px;
    border-radius: 12px;
    overflow: hidden;
    background: white;
    border: 2px solid var(--primary);
}
.banked-float-thumb img { width: 100%; height: 100%; object-fit: contain; }
.banked-float-label,
.banked-float-hint {
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 999px;
    color: white;
    font-weight: 800;
    letter-spacing: 0.04em;
}
.banked-float-label { background: var(--primary-dark); }
.banked-float-hint { background: rgba(0,0,0,0.55); }

.multiview-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.multiview-label {
    text-align: center;
    padding: 10px;
    font-size: 12px;
    font-weight: 700;
}
.multiview-original { border-color: rgba(42,168,217,0.5); }
.multiview-tip {
    background: #fffbeb;
    border: 1px solid #f0d070;
    margin-bottom: 14px;
}
.multiview-tip p {
    font-size: 13px;
    line-height: 1.5;
    color: #665520;
    margin: 0;
}

.multiview-card { position: relative; }
.multiview-redo-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.1);
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(4px);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.15s;
    z-index: 5;
}
.multiview-card:hover .multiview-redo-btn { opacity: 1; }
/* Always show on touch devices */
@media (hover: none) { .multiview-redo-btn { opacity: 0.8; } }

.multiview-loading {
    opacity: 0.5;
    pointer-events: none;
}
.multiview-loading::after {
    content: '⏳';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    z-index: 10;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    cursor: pointer;
}

.multiview-confirmations .checkbox-label {
    padding: 10px 0;
    border-bottom: 1px solid #ececec;
}
.multiview-confirmations .checkbox-label:last-child { border-bottom: none; }
.multiview-confirmations input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--primary-dark); }

.generating-progress,
.processing-overlay { text-align: center; }
.spinner {
    width: 46px;
    height: 46px;
    border: 4px solid rgba(42,168,217,0.18);
    border-top-color: var(--primary-dark);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 14px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.generating-status,
.processing-text { font-size: 17px; font-weight: 800; }
.processing-sub { font-size: 13px; margin-top: 6px; }
.progress-bar {
    width: min(280px, 100%);
    height: 8px;
    border-radius: 999px;
    background: #e8f4f9;
    margin: 14px auto 0;
    overflow: hidden;
}
.progress-fill {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--primary-dark), var(--primary));
    transition: width 0.35s ease;
}

.testimonial-card { margin-bottom: 12px; }
.testimonials-section h3,
.social-proof-gallery h3,
.config-card h3 { margin-bottom: 12px; font-size: 18px; }
.testimonial-text { line-height: 1.5; margin-bottom: 12px; }
.testimonial-author,
.portal-header,
.portal-user,
.credits-display,
.order-row,
.printer-info,
.saved-model-views,
.footer-socials,
.form-row,
.share-buttons { display: flex; align-items: center; gap: 10px; }
.testimonial-avatar,
.portal-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #eef9fd;
}
.portal-avatar img,
.nav-avatar img { width: 100%; height: 100%; object-fit: cover; }
.nav-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #d4d4d4;
    background: white;
    overflow: hidden;
    cursor: pointer;
}

.product-label,
.material-badge {
    text-align: center;
    font-weight: 800;
    padding: 12px 16px;
    border-radius: 12px;
    background: white;
    border: 1px solid #e1e1e1;
    margin-bottom: 12px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.05);
}
.material-badge {
    background: #eef9fd;
    color: var(--primary-dark);
}

.viewer-container {
    position: relative;
    height: 320px;
    width: 100%;
    overflow: hidden;
    touch-action: none;
}
.viewer-container canvas { width: 100% !important; height: 100% !important; }
.viewer-reset,
.viewer-reroll {
    position: absolute;
    top: 12px;
    background: rgba(255,255,255,0.92);
    border: 1px solid #d8d8d8;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    z-index: 10;
}
.viewer-reset { right: 12px; }
.viewer-reroll { left: 12px; }
.viewer-hint {
    position: absolute;
    left: 50%;
    bottom: 12px;
    transform: translateX(-50%);
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 11px;
    white-space: nowrap;
}

.size-badge {
    margin-left: auto;
    background: #eef9fd;
    color: var(--primary-dark);
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 13px;
}

.printer-info,
.material-option,
.finish-chip,
.preset-btn,
.form-group input,
.form-group select,
.order-row,
.lead-time-note {
    border: 1px solid #e4e4e4;
    background: white;
}
.printer-info {
    justify-content: space-between;
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 12px;
}
.size-control input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: #dfeff6;
    outline: none;
}
.size-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
}
.size-limits {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    margin-top: 8px;
}
.size-warning {
    display: none;
    background: #fff3da;
    color: #8a5a10;
    border: 1px solid #f2d18a;
    border-radius: 10px;
    padding: 10px 12px;
    margin-top: 10px;
}
.size-warning.visible { display: block; }

.quote-card {
    text-align: center;
    background: linear-gradient(180deg, #202020 0%, #3a2e1f 100%);
    color: white;
    padding: 20px;
}
.quote-price { font-size: 34px; font-weight: 900; }
.currency-selector {
    margin-top: 10px;
    font-size: 13px;
    color: rgba(255,255,255,0.7);
}
.currency-selector label { margin-right: 6px; }
.currency-selector select {
    background: rgba(255,255,255,0.15);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 13px;
    cursor: pointer;
}
.currency-selector select option { color: #333; background: white; }

/* Shipping */
.shipping-card h3 { margin-bottom: 10px; }
.shipping-region-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}
.shipping-region-row label { font-size: 13px; font-weight: 600; white-space: nowrap; }
.shipping-region-row select {
    flex: 1;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 13px;
}
.shipping-options { display: flex; flex-direction: column; gap: 8px; }
.shipping-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid #e1e1e1;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.15s;
}
.shipping-option:has(input:checked) { border-color: var(--primary-dark); background: rgba(29,25,18,0.04); }
.shipping-option input { margin: 0; }
.shipping-option-label { display: flex; justify-content: space-between; flex: 1; }
.shipping-option-price { font-weight: 800; }
.shipping-total {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #e1e1e1;
    font-size: 15px;
    font-weight: 800;
    text-align: right;
}

.success-card .row,
.order-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #ececec;
}
.success-card .row:last-child,
.order-row:last-child { border-bottom: none; }
.success-card .value,
.order-id,
.portal-name,
.saved-model-name,
.credits-count { font-weight: 800; }
.credits-count { font-size: 30px; color: var(--primary-dark); }
.lead-time-note { border-radius: 12px; padding: 14px; line-height: 1.5; }
.success-icon { font-size: 58px; text-align: center; margin-top: 10px; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    padding: 12px 18px;
    border-radius: 12px;
    border: none;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
}
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary {
    background: linear-gradient(180deg, #39b8eb 0%, #259fce 100%);
    color: white;
}
.btn-secondary {
    background: white;
    color: #2a2a2a;
    border: 1px solid #d8d8d8;
}
.btn-lg { min-height: 54px; font-size: 15px; }
.btn-sm { min-height: 40px; font-size: 13px; }

.auth-modal,
.portal-overlay,
.processing-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 3000;
}
.auth-modal.active,
.portal-overlay.active,
.processing-overlay.active { display: flex; }
.auth-modal,
.portal-overlay { background: rgba(0,0,0,0.45); }
.auth-card {
    width: min(92vw, 420px);
    margin: auto;
    padding: 24px;
    position: relative;
}
.auth-close {
    position: absolute;
    top: 10px;
    right: 10px;
    border: none;
    background: transparent;
    font-size: 20px;
    cursor: pointer;
}
.auth-logo { font-size: 40px; margin-bottom: 10px; }
.auth-card h2 { font-size: 24px; margin-bottom: 8px; }
.btn-google {
    margin-top: 16px;
    background: white;
    color: #222;
    border: 1px solid #dadada;
}
.auth-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 14px 0;
    font-size: 11px;
    text-transform: uppercase;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e6e6e6;
}

.portal-panel {
    width: min(92vw, 430px);
    margin-left: auto;
    height: 100%;
    padding: 20px;
    overflow-y: auto;
    border-radius: 18px 0 0 18px;
}
.portal-header,
.order-row,
.printer-info,
.saved-model-actions { justify-content: space-between; }
.form-group { margin-bottom: 12px; }
.form-group input,
.form-group select {
    width: 100%;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 14px;
}
.saved-model-card { margin-bottom: 10px; display: flex; align-items: center; gap: 12px; padding: 10px; }
.saved-model-img { width: 60px; height: 60px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.saved-model-info { flex: 1; min-width: 0; }
.saved-model-meta { font-size: 12px; color: #888; margin-top: 2px; }
.saved-model-actions { flex-shrink: 0; }
.collapsible-header { cursor: pointer; user-select: none; }
.collapse-arrow { margin-left: auto; transition: transform 0.2s ease; }
.collapse-arrow.open { transform: rotate(90deg); }
.share-buttons { flex-wrap: wrap; }
.share-btn {
    border: none;
    border-radius: 999px;
    padding: 8px 14px;
    color: white;
    font-weight: 800;
    cursor: pointer;
}
.share-fb { background: #1877f2; }
.share-x { background: #111; }
.share-wa { background: #25d366; }
.share-ig { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.share-copy { background: #6f6f6f; }

/* Share & Save discount card */
.share-discount-card { border: 2px dashed var(--primary); background: #f8fbff; }
.share-discount-step { margin-bottom: 14px; }
.share-discount-step .checkbox-label { font-weight: 600; margin-bottom: 8px; }
.share-social-follow,
.share-social-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; padding-left: 26px; }
.follow-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    color: white;
    background: #333;
}
.follow-ig { background: linear-gradient(45deg, #f09433, #dc2743, #bc1888); }
.follow-fb { background: #1877f2; }
.follow-x { background: #111; }
.share-discount-applied {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 14px;
    text-align: center;
    margin-top: 8px;
}

.reference-footer {
    max-width: 760px;
    margin: 0 auto 22px;
    padding: 16px 22px 18px;
    background: linear-gradient(180deg, #1d1a17 0%, #111 100%);
    border-radius: 0 0 18px 18px;
    box-shadow: var(--shadow);
    text-align: center;
}
.footer-brand-reference {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.05em;
    color: white;
}
.footer-socials-reference {
    justify-content: center;
    margin: 8px 0 6px;
}
.footer-socials-reference .social-link {
    color: white;
    text-decoration: none;
    font-size: 28px;
    line-height: 1;
    width: 34px;
    text-align: center;
}
.reference-footer .footer-links,
.reference-footer .footer-links a { color: rgba(255,255,255,0.72); text-decoration: none; font-size: 12px; }

.processing-overlay {
    background: rgba(255,255,255,0.95);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 20px;
}

@media (min-width: 821px) {
    .viewer-container { height: 380px; }
}

@media (max-width: 820px) {
    .site-nav.nav {
        max-width: calc(100% - 18px);
        margin-top: 10px;
        border-radius: 16px 16px 0 0;
    }
    .reference-shell,
    .reference-footer { max-width: calc(100% - 18px); }
    .reference-hero { min-height: auto; }
    .hero-banner-img { height: 280px; }
    .hero-logo-wordmark { height: 40px; }
    .dual-section-row,
    .app-step-layout,
    .product-example-grid,
    .reference-how-grid,
    .multiview-grid { grid-template-columns: 1fr; }

    .material-showcase {
        grid-template-columns: 1fr;
    }
    .material-showcase-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    .reference-cta { width: 100%; max-width: 360px; }
    .desktop-nav-links { display: none; }
}

@media (max-width: 560px) {
    .site-nav.nav {
        padding: 12px 14px;
        gap: 8px;
    }
    .nav-left,
    .nav-right {
        gap: 8px;
    }
    .nav-step { display: none; }
    .nav-logo-stacked { font-size: 16px; }
    .account-pill { padding: 10px 12px; font-size: 13px; }
    .container { padding: 0 8px 30px; }
    .reference-shell,
    .reference-footer { max-width: calc(100% - 8px); }
    .hero-banner-img { height: 240px; }
    .hero-banner-overlay { padding: 50px 18px 18px; }
    .hero-logo-wordmark { height: 34px; }
    .hero-banner-overlay p { font-size: 13px; }
    .reference-hero-copy p { font-size: 14px; }
    .reference-section { padding: 16px 12px 0; }
    .upload-section-card { margin: 16px 12px 0; padding: 14px; }
    .viewer-reset,
    .viewer-reroll { position: static; margin: 10px 10px 0; }
    .viewer-hint { position: static; transform: none; margin: 10px auto 12px; width: fit-content; }
    .portal-panel { width: 100%; border-radius: 0; }
}
