:root {
    color-scheme: dark;
    --primary-color: #72b7d8;
    --primary-dark: #477f9a;
    --accent-color: #d99455;
    --surface-tint: rgba(5, 17, 31, 0.84);
    --paper-color: rgba(6, 20, 36, 0.9);
    --page-bg: #071424;
    --ink-color: #f7f1e7;
    --ink-muted: #bdc9d7;
    --line-soft: rgba(255, 255, 255, 0.14);
    --shadow-lift: 0 28px 80px rgba(0, 0, 0, 0.36);
    --white: #f7f1e7;
    --gray-50: #091a2d;
    --gray-100: #0b2036;
    --gray-200: #17324a;
    --gray-300: #29465d;
    --gray-600: #a8b8c6;
    --gray-700: #d1dae2;
    --gray-900: #f7f1e7;
}

html {
    min-width: 320px;
    background: #071424;
}

body.site-shell {
    min-height: 100vh;
    color: var(--ink-color);
    background:
        linear-gradient(90deg, rgba(3, 12, 24, 0.82), rgba(3, 12, 24, 0.46) 52%, rgba(3, 12, 24, 0.72)),
        linear-gradient(180deg, rgba(2, 9, 18, 0.08), rgba(2, 9, 18, 0.72)),
        url("/static/core/assets/moonlit-workshop.png") center / cover fixed,
        #071424;
}

body.site-shell::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(2, 9, 18, 0.02), rgba(2, 9, 18, 0.42));
}

.site-background-glow {
    background: radial-gradient(circle at 92% 4%, rgba(91, 178, 220, 0.18), transparent 28%);
}

body.site-shell,
body.site-shell input,
body.site-shell select,
body.site-shell textarea,
body.site-shell button {
    font-family: Inter, Manrope, "Segoe UI", system-ui, sans-serif;
}

body.site-shell h1,
body.site-shell h2,
body.site-shell h3,
body.site-shell h4,
body.site-shell h5,
body.site-shell h6 {
    color: #f7f1e7;
}

.header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(5, 17, 31, 0.78);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(22px) saturate(120%);
}

.logo-mark {
    padding: 3px;
    border: 1px solid rgba(255, 201, 107, 0.28);
    border-radius: 13px;
    background: linear-gradient(145deg, rgba(217, 148, 85, 0.16), rgba(114, 183, 216, 0.08));
    filter: drop-shadow(0 0 18px rgba(255, 201, 107, 0.12));
}

.logo-text { color: #fff; }
.logo-dot { color: #d99455; }

.nav-link,
.btn-text { color: #d4dee7; }
.nav-link:hover,
.nav-link:focus-visible,
.btn-text:hover { color: #ffc96b; }

.btn {
    border-radius: 15px;
}

.btn-primary {
    border-color: transparent;
    color: #172130;
    background: linear-gradient(180deg, #ffd98d, #d99455);
    box-shadow: 0 12px 28px rgba(217, 148, 85, 0.24);
}

.btn-primary:hover {
    color: #172130;
    filter: brightness(1.06);
    box-shadow: 0 16px 32px rgba(217, 148, 85, 0.3);
}

.btn-outline {
    color: #f7f1e7;
    border-color: rgba(255, 201, 107, 0.28);
    background: rgba(255, 255, 255, 0.055);
}

.btn-outline:hover {
    color: #ffc96b;
    border-color: rgba(255, 201, 107, 0.5);
    background: rgba(255, 201, 107, 0.08);
}

.main-content {
    position: relative;
    z-index: 1;
}

.floating-panel,
.catalog-side-card,
.catalog-hero,
.catalog-results,
.catalog-check-card,
.catalog-3d-panel,
.catalog-item-card,
.item-gallery,
.price-card,
.maker-card,
.detail-block,
.seller-card,
.review-card,
.review-form-card,
.detail-section,
.profile-panel,
.profile-summary-card,
.feature-card,
.settings-card,
.showcase-card,
.orders-column,
.order-card,
.brand-visual-card,
.checkbox-panel,
.seller-hero,
.seller-action-card,
.seller-stat-card,
.studio-story-card,
.rating-breakdown,
.no-reviews,
.community-panel,
.ideas-panel,
.message-card,
.conversation-panel {
    color: #f7f1e7;
    border-color: rgba(255, 255, 255, 0.14) !important;
    background: linear-gradient(145deg, rgba(8, 25, 43, 0.9), rgba(5, 17, 31, 0.84)) !important;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32) !important;
    backdrop-filter: blur(22px) saturate(120%);
}

.form-input,
.filter-input,
.filter-select,
body.site-shell input[type="text"],
body.site-shell input[type="email"],
body.site-shell input[type="password"],
body.site-shell input[type="search"],
body.site-shell input[type="number"],
body.site-shell input[type="url"],
body.site-shell input[type="tel"],
body.site-shell select,
body.site-shell textarea {
    color: #f7f1e7 !important;
    border-color: rgba(255, 255, 255, 0.16) !important;
    background: rgba(3, 14, 26, 0.78) !important;
}

.form-input::placeholder,
.filter-input::placeholder,
body.site-shell input::placeholder,
body.site-shell textarea::placeholder { color: rgba(189, 201, 215, 0.58); }

.form-input:focus,
.filter-input:focus,
.filter-select:focus,
body.site-shell input:focus,
body.site-shell select:focus,
body.site-shell textarea:focus {
    border-color: rgba(114, 183, 216, 0.68) !important;
    box-shadow: 0 0 0 4px rgba(114, 183, 216, 0.12) !important;
}

.catalog-title,
.filters-title,
.catalog-results-head h2,
.catalog-empty h2,
.catalog-note-title,
.catalog-page .item-title,
.item-info > .item-title,
.price-amount,
.price-text,
.seller-name,
.profile-page h1,
.profile-page h2,
.profile-page h3 { color: #f7f1e7 !important; }

.catalog-side-text,
.catalog-check-help,
.catalog-lead,
.catalog-count,
.catalog-card-author,
.catalog-card-tech,
.filter-label,
.item-meta-line,
.item-meta-line span,
.seller-info p,
.rich-copy,
.profile-username,
.profile-summary-card p,
.showcase-info p,
.feature-card p,
.order-card p,
.settings-intro p,
.seller-username,
.seller-bio,
.seller-meta span,
.seller-action-card p,
.seller-action-note,
.seller-stat-card span,
.story-points p,
.contact-links p,
.muted-copy { color: #bdc9d7 !important; }

.catalog-side-kicker,
.catalog-kicker,
.catalog-card-kind,
.catalog-card-category,
.catalog-chip,
.section-kicker,
.seller-eyebrow,
.item-badge,
.rating-badge,
.status-pill.active,
.order-status-chip {
    color: #9bd3ea !important;
    border-color: rgba(114, 183, 216, 0.22) !important;
    background: rgba(114, 183, 216, 0.1) !important;
}

.catalog-quick-link,
.catalog-tag-link,
.catalog-switch,
.tab-btn,
.seller-chip,
.specialty-chip,
.contact-links a,
.profile-meta span,
.profile-summary-grid span,
.settings-badges span {
    color: #d9e5ed !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
    background: rgba(255, 255, 255, 0.055) !important;
}

.tab-btn.active,
.catalog-switch.is-active,
.category-tab.active {
    color: #172130 !important;
    border-color: #d99455 !important;
    background: linear-gradient(180deg, #ffd98d, #d99455) !important;
}

.gallery-main,
.gallery-thumbnail,
.showcase-cover,
.brand-visual-preview {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(3, 14, 26, 0.72) !important;
}

.seller-profile-page.has-custom-background::before {
    background: linear-gradient(180deg, rgba(3, 12, 24, 0.72), rgba(3, 12, 24, 0.9)), var(--seller-page-background-image);
}

.verified-badge { border-color: #071424; }

.print3d-hero {
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: linear-gradient(145deg, rgba(8, 25, 43, 0.94), rgba(5, 17, 31, 0.88));
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
}

/* Home: the same moonlit workshop language as the maintenance page. */
.home-page {
    --home-ink: #f7f1e7;
    --home-muted: #bdc9d7;
    --home-navy: #071424;
    --home-accent: #d99455;
    --home-line: rgba(255, 255, 255, 0.14);
}

.home-hero {
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: linear-gradient(145deg, rgba(8, 25, 43, 0.9), rgba(5, 17, 31, 0.84));
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(22px) saturate(120%);
}

.home-hero::after {
    border-color: rgba(114, 183, 216, 0.075);
}

.home-eyebrow,
.home-hero .home-eyebrow { color: #8bc7df; }
.home-hero-copy > p,
.home-search-heading span { color: #bdc9d7; }

.home-search-panel {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(4, 15, 28, 0.5);
}

.home-search-form input,
.home-search-form select {
    color: #f7f1e7;
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(3, 14, 26, 0.82);
}

.home-search-form .btn {
    color: #172130;
    background: linear-gradient(180deg, #ffd98d, #d99455);
}

.home-categories a,
.home-product-card,
.home-maker-card,
.home-empty {
    color: #f7f1e7;
    border-color: rgba(255, 255, 255, 0.14);
    background: linear-gradient(145deg, rgba(8, 25, 43, 0.86), rgba(5, 17, 31, 0.8));
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(18px);
}

.home-categories a:hover,
.home-text-link,
.home-maker-link,
.home-product-bottom strong { color: #ffc96b; }

.home-product-media,
.home-maker-cover { background: rgba(3, 14, 26, 0.78); }
.home-product-media > span:not(.home-product-type) { color: rgba(255, 201, 107, 0.34); }
.home-product-type { color: #ffe1a9; background: rgba(5, 17, 31, 0.88); }
.home-product-author,
.home-product-bottom,
.home-maker-main p,
.home-maker-about,
.home-empty p { color: #bdc9d7; }
.home-maker-avatar { color: #172130; background: linear-gradient(180deg, #ffd98d, #d99455); }

.home-creator-callout {
    color: #f7f1e7;
    border: 1px solid rgba(255, 201, 107, 0.24);
    background: linear-gradient(145deg, rgba(94, 53, 28, 0.88), rgba(8, 25, 43, 0.9));
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(20px);
}

.home-creator-callout .home-eyebrow { color: #ffc96b; }
.home-light-button { color: #172130; background: linear-gradient(180deg, #ffd98d, #d99455); }

/* Sign-in and registration use one focused glass panel. */
.auth-form-panel {
    color: #f7f1e7;
    border-color: rgba(255, 255, 255, 0.14);
    background: linear-gradient(145deg, rgba(8, 25, 43, 0.91), rgba(5, 17, 31, 0.86));
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(22px) saturate(120%);
}

.auth-panel-head h1 { color: #f7f1e7; }
.auth-panel-head p,
.auth-footer-panel { color: #bdc9d7; }
.auth-back,
.auth-footer-panel a,
.auth-checkbox-label a { color: #ffc96b; }
.auth-label,
.auth-checkbox,
.auth-checkbox-label { color: #d9e5ed; }
.auth-label span { color: rgba(189, 201, 215, 0.62); }
.auth-agreements { border: 1px solid rgba(114, 183, 216, 0.14); background: rgba(114, 183, 216, 0.06); }
.auth-password-toggle { color: #bdc9d7; }
.auth-password-toggle:hover,
.auth-password-toggle.is-active { color: #ffc96b; background: rgba(255, 201, 107, 0.1); }
.auth-footer-panel { border-color: rgba(255, 255, 255, 0.12); }
.auth-error-box { color: #ffd1c9; border-color: rgba(235, 124, 108, 0.28); background: rgba(148, 48, 42, 0.22); }
.auth-page .form-error { color: #ffb9ad; }

.category-tab {
    color: #d9e5ed;
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(5, 17, 31, 0.82);
}

.footer {
    color: #f7f1e7;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: linear-gradient(145deg, rgba(8, 25, 43, 0.94), rgba(5, 16, 29, 0.96));
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.36);
}

.footer-section a,
.footer-brand a,
.footer-brand p,
.footer-bottom { color: rgba(215, 226, 235, 0.76); }
.footer-section a:hover { color: #ffc96b; }
.footer-badge { color: #ffe1a9; border: 1px solid rgba(255, 201, 107, 0.2); background: rgba(217, 148, 85, 0.1); }

.alert {
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(6, 20, 36, 0.96);
    color: #f7f1e7;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
}

@media (max-width: 760px) {
    body.site-shell { background-attachment: scroll; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}
