:root {
    --p3d-bg: #f5f8fb;
    --p3d-bg-soft: #edf3f8;
    --p3d-surface: #ffffff;
    --p3d-text: #0f172a;
    --p3d-text-muted: #475569;
    --p3d-primary: #0ea5b7;
    --p3d-primary-dark: #0b7285;
    --p3d-accent: #f59e0b;
    --p3d-border: #d8e2ea;
    --p3d-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
    --p3d-radius: 16px;
}

body {
    background:
        radial-gradient(circle at 10% -20%, rgba(14, 165, 183, 0.12), transparent 36%),
        radial-gradient(circle at 92% 12%, rgba(245, 158, 11, 0.1), transparent 30%),
        var(--p3d-bg);
    color: var(--p3d-text);
    font-family: "Manrope", "Noto Sans JP", sans-serif;
}

h1,
h2,
h3,
h4 {
    letter-spacing: -0.02em;
}

main {
    isolation: isolate;
}

body:not(.home) .site-main {
    padding-top: 64px;
}

.site-header {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(216, 226, 234, 0.7);
    box-shadow: 0 2px 18px rgba(15, 23, 42, 0.06);
}

.nav-link {
    position: relative;
    font-weight: 600;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 100%;
    height: 2px;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 180ms ease;
    background: linear-gradient(90deg, var(--p3d-primary), var(--p3d-accent));
}

.nav-link:hover::after {
    transform: scaleX(1);
}

.hero-stage::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(150deg, rgba(2, 6, 23, 0.62), rgba(2, 6, 23, 0.32) 60%, rgba(14, 165, 183, 0.15));
    z-index: 1;
}

.hero-stage > .relative {
    z-index: 2;
}

.hero-shell .grid > a {
    border-radius: var(--p3d-radius);
    border: 1px solid var(--p3d-border);
    box-shadow: var(--p3d-shadow);
}

.hero-shell .grid > a:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.14);
}

.quote-shell .bg-white.rounded-2xl.shadow-xl {
    border: 1px solid var(--p3d-border);
    box-shadow: var(--p3d-shadow);
}

.quote-shell #file-drop-zone,
.quote-shell #ai-step-1 {
    background: linear-gradient(180deg, #f8fbfd, #eef5fa);
    border-color: #c8d9e8;
}

.quote-shell #file-drop-zone:hover,
.quote-shell #ai-step-1:hover {
    background: linear-gradient(180deg, #f0f9fb, #e5f4f8);
    border-color: var(--p3d-primary);
}

section.bg-gray-50 {
    background: linear-gradient(180deg, #f7fafc, #eef4f9);
}

.bg-white.rounded-lg,
.bg-white.rounded-xl,
.bg-white.rounded-2xl {
    border: 1px solid rgba(216, 226, 234, 0.9);
}

.site-footer {
    background:
        radial-gradient(circle at 4% 8%, rgba(14, 165, 183, 0.18), transparent 28%),
        linear-gradient(180deg, #0b1220, #070d16);
}

.site-footer .border-t {
    border-color: rgba(148, 163, 184, 0.24);
}

.text-primary {
    color: var(--p3d-primary);
}

.bg-primary {
    background-color: var(--p3d-primary);
}

.border-primary {
    border-color: var(--p3d-primary);
}

.hover\:text-primary:hover {
    color: var(--p3d-primary);
}

.hover\:border-primary:hover {
    border-color: var(--p3d-primary);
}

.hover\:bg-primary:hover,
.hover\:bg-primary-dark:hover {
    background-color: var(--p3d-primary-dark);
}

.bg-pink-50\/30,
.peer-checked\:bg-pink-50,
.hover\:bg-pink-50\/30:hover,
.hover\:bg-pink-50:hover {
    background-color: rgba(14, 165, 183, 0.09);
}

@keyframes fadeRise {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-shell,
.quote-shell,
.site-footer {
    animation: fadeRise 420ms ease-out both;
}

@media (max-width: 767px) {
    :root {
        --p3d-radius: 14px;
    }

    .site-header {
        backdrop-filter: blur(6px);
    }

    .hero-shell .grid {
        gap: 0.75rem;
    }
}

/* Stitch 3D homepage: Industrial Precision */
.material-symbols-outlined {
    font-family: "Material Symbols Outlined";
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: "liga";
    -webkit-font-smoothing: antialiased;
    font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
}

.p3d-stitch-header,
.p3d-stitch-footer,
.p3d-stitch-home {
    --stitch-primary: #0055ff;
    --stitch-primary-dark: #0039b3;
    --stitch-ink: #1a1c1c;
    --stitch-muted: #434656;
    --stitch-line: #c3c5d9;
    --stitch-surface: #f9f9f9;
    --stitch-low: #f3f3f3;
    --stitch-high: #e8e8e8;
    --stitch-higher: #e2e2e2;
    font-family: "Inter", "Noto Sans JP", sans-serif;
}

.p3d-stitch-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 50;
    background: var(--stitch-primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
}

.home .p3d-stitch-header {
    position: sticky;
    top: 0;
}

body.admin-bar.home .p3d-stitch-header {
    top: 32px;
}

.p3d-stitch-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    min-height: 64px;
    padding: 0 32px;
}

.p3d-stitch-brand,
.p3d-stitch-nav a,
.p3d-stitch-start,
.p3d-stitch-icon {
    color: inherit;
    text-decoration: none;
}

.p3d-stitch-brand {
    font-family: "Manrope", sans-serif;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.06em;
}

.p3d-stitch-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-right: auto;
}

.p3d-stitch-nav a {
    font-family: "Space Grotesk", sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.72;
}

.p3d-stitch-nav a:hover,
.p3d-stitch-nav a.is-active {
    opacity: 1;
}

.p3d-stitch-nav a.is-active {
    border-bottom: 2px solid #fff;
    padding-bottom: 4px;
}

.p3d-stitch-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.p3d-stitch-header .p3d-stitch-start {
    background: #fff;
    color: var(--stitch-primary);
    display: inline-flex;
    padding: 10px 16px;
    font-family: "Space Grotesk", sans-serif;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.p3d-stitch-header .p3d-stitch-icon {
    align-items: center;
    background: transparent;
    color: #fff;
    display: inline-flex;
    height: 40px;
    justify-content: center;
    opacity: 0.95;
    width: 40px;
}

.p3d-stitch-header .p3d-stitch-icon .material-symbols-outlined {
    color: #fff;
    font-size: 30px;
}

.p3d-stitch-home {
    background: var(--stitch-surface);
    color: var(--stitch-ink);
    margin-top: -1px;
    padding-top: 64px;
    font-size: 16px;
}

.home .p3d-stitch-home {
    padding-top: 5px;
}

.p3d-stitch-hero {
    min-height: calc(100vh - 64px);
    display: flex;
    margin-top: 0;
    border-bottom: 1px solid var(--stitch-line);
    background-image: radial-gradient(circle, var(--stitch-higher) 1px, transparent 1px);
    background-size: 20px 20px;
}

.p3d-stitch-rail {
    width: 56px;
    border-right: 1px solid var(--stitch-line);
    background: rgba(243, 243, 243, 0.72);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    padding: 28px 0;
}

.p3d-stitch-rail a {
    color: #5e5e5e;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 48px;
    padding: 0;
    position: relative;
    text-decoration: none;
}

.p3d-stitch-rail a.is-ai-beta {
    color: #8a8d97;
}

.p3d-stitch-rail a.is-ai-beta span {
    color: currentColor;
}

.p3d-stitch-rail a.is-ai-beta::after,
.p3d-stitch-quick a.is-ai-beta::after {
    background: var(--stitch-ink);
    color: #fff;
    content: attr(data-tooltip);
    font-family: "Noto Sans JP", sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    opacity: 0;
    padding: 7px 10px;
    pointer-events: none;
    position: absolute;
    transform: translateY(4px);
    transition: opacity 160ms ease, transform 160ms ease;
    white-space: nowrap;
    z-index: 20;
}

.p3d-stitch-rail a.is-ai-beta::after {
    left: calc(100% + 10px);
    top: 50%;
    transform: translateY(calc(-50% + 4px));
}

.p3d-stitch-quick a.is-ai-beta::after {
    left: 50%;
    top: calc(100% + 10px);
    transform: translate(-50%, 4px);
}

.p3d-stitch-rail a.is-ai-beta:hover::after,
.p3d-stitch-quick a.is-ai-beta:hover::after {
    opacity: 1;
}

.p3d-stitch-rail a.is-ai-beta:hover::after {
    transform: translateY(-50%);
}

.p3d-stitch-quick a.is-ai-beta:hover::after {
    transform: translate(-50%, 0);
}

.p3d-stitch-rail span {
    color: #5e5e5e;
}

.p3d-stitch-rail a:hover,
.p3d-stitch-rail a.is-active {
    color: var(--stitch-primary);
}

.p3d-stitch-rail a.is-active {
    border-left: 5px solid var(--stitch-primary);
    background: rgba(255, 255, 255, 0.74);
}

.p3d-stitch-rail a:hover span,
.p3d-stitch-rail a.is-active span {
    color: currentColor;
}

.p3d-stitch-rail b {
    margin-top: auto;
    transform: rotate(-90deg);
    transform-origin: center;
    white-space: nowrap;
    font-family: "Space Grotesk", sans-serif;
    font-size: 8px;
    letter-spacing: 0.18em;
    color: var(--stitch-muted);
}

.p3d-stitch-canvas {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 5px 56px 104px;
    overflow: hidden;
}

.p3d-stitch-canvas::before {
    content: "";
    position: absolute;
    inset: 5px 56px 104px;
    border: 2px dashed rgba(195, 197, 217, 0.3);
    pointer-events: none;
}

.p3d-stitch-hero__head {
    display: none !important;
}

.p3d-stitch-section h2 {
    font-family: "Manrope", sans-serif;
    font-weight: 800;
    letter-spacing: -0.06em;
    text-transform: uppercase;
}

.p3d-stitch-section__title span,
.p3d-stitch-demos,
.p3d-stitch-quick,
.p3d-stitch-upload__label span,
.p3d-stitch-upload__meta,
.p3d-stitch-specs span,
.p3d-stitch-specs b,
.p3d-stitch-pricing span,
.p3d-stitch-pricing a,
.p3d-stitch-work span,
.p3d-stitch-work b,
.p3d-stitch-footer {
    font-family: "Space Grotesk", sans-serif;
}

.p3d-stitch-upload {
    position: relative;
    z-index: 1;
    width: min(1280px, calc(100vw - 176px));
    min-height: clamp(520px, 68vh, 760px);
    margin: 0 auto;
    color: var(--stitch-ink);
    text-decoration: none;
    border: 0;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.p3d-stitch-corner {
    display: block;
    height: 18px;
    position: absolute;
    width: 18px;
    z-index: 6;
}

.p3d-stitch-corner--tl {
    top: 0;
    left: 0;
    border-top: 2px solid var(--stitch-primary);
    border-left: 2px solid var(--stitch-primary);
}

.p3d-stitch-corner--br {
    right: 0;
    bottom: 0;
    border-right: 2px solid var(--stitch-primary);
    border-bottom: 2px solid var(--stitch-primary);
}

.p3d-stitch-upload::before,
.p3d-stitch-upload::after {
    content: "";
    position: absolute;
    pointer-events: none;
    z-index: 5;
}

.p3d-stitch-upload::before {
    inset: 0 18px;
    border-top: 1px solid rgba(195, 197, 217, 0.7);
    border-bottom: 1px solid rgba(195, 197, 217, 0.7);
}

.p3d-stitch-upload::after {
    inset: 18px 0;
    border-left: 1px solid rgba(195, 197, 217, 0.7);
    border-right: 1px solid rgba(195, 197, 217, 0.7);
}

.p3d-stitch-model {
    position: absolute;
    inset: 0;
    background: transparent;
    border: 0;
    filter: none;
    overflow: hidden;
    z-index: 1;
}

.p3d-stitch-model canvas {
    cursor: default;
    height: 100% !important;
    left: 0;
    pointer-events: none;
    position: absolute;
    top: 0;
    width: 100% !important;
    z-index: 3;
}

.p3d-stitch-upload.is-viewer-active .p3d-stitch-model canvas {
    cursor: default;
    pointer-events: auto;
}

.p3d-stitch-hero-placeholder {
    align-items: center;
    color: rgba(255, 255, 255, 0.78);
    display: flex;
    font-family: "Space Grotesk", sans-serif;
    font-size: 12px;
    font-weight: 800;
    inset: 0;
    justify-content: center;
    letter-spacing: 0.18em;
    position: absolute;
    pointer-events: none;
    z-index: 2;
}

.p3d-stitch-hero-input {
    display: none;
}

.p3d-stitch-model i {
    display: none;
}

.p3d-stitch-model i:nth-child(2) {
    inset: 34%;
}

.p3d-stitch-model i:nth-child(3) {
    inset: 45%;
    background: rgba(23, 29, 32, 0.36);
}

.p3d-stitch-upload__label,
.p3d-stitch-upload__meta {
    position: absolute;
    pointer-events: none;
}

.p3d-stitch-upload__label {
    display: none;
    top: 32px;
    left: 32px;
}

.p3d-stitch-upload__label span {
    color: var(--stitch-primary);
    display: block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.14em;
}

.p3d-stitch-upload__label strong {
    font-family: "Manrope", sans-serif;
    display: block;
    font-size: 28px;
    line-height: 1.2;
    letter-spacing: -0.04em;
    margin-top: 8px;
    max-width: 480px;
}

.p3d-stitch-upload__meta {
    right: 32px;
    bottom: 32px;
    display: grid;
    gap: 2px;
    color: var(--stitch-muted);
    font-size: 11px;
    letter-spacing: 0.12em;
    text-align: right;
    text-transform: uppercase;
}

.p3d-stitch-hero-stats {
    background: rgba(255, 255, 255, 0.86);
    border-left: 2px solid var(--stitch-primary);
    box-shadow: 0 18px 36px rgba(26, 28, 28, 0.1);
    color: var(--stitch-ink);
    min-width: 250px;
    padding: 18px 20px;
    pointer-events: none;
    position: absolute;
    right: 32px;
    text-align: left;
    top: 32px;
    z-index: 4;
    display: none;
}

.p3d-stitch-upload.has-model .p3d-stitch-hero-stats {
    display: block;
}

.p3d-stitch-hero-stats > span {
    color: var(--stitch-primary);
    display: block;
    font-family: "Space Grotesk", sans-serif;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.14em;
    margin-bottom: 8px;
}

.p3d-stitch-hero-stats strong {
    display: block;
    font-family: "Manrope", sans-serif;
    font-size: 32px;
    letter-spacing: -0.06em;
    line-height: 1;
    margin-bottom: 14px;
}

.p3d-stitch-hero-stats dl {
    display: grid;
    gap: 8px;
    margin: 0;
}

.p3d-stitch-hero-stats__actions {
    display: grid;
    gap: 8px;
    margin-top: 16px;
    pointer-events: auto;
}

.p3d-stitch-hero-stats__actions a,
.p3d-stitch-hero-stats__actions button {
    align-items: center;
    background: transparent;
    border: 1px solid var(--stitch-primary);
    color: var(--stitch-primary);
    display: flex;
    font-family: "Space Grotesk", sans-serif;
    font-size: 10px;
    font-weight: 800;
    justify-content: center;
    letter-spacing: 0.12em;
    padding: 10px;
    text-decoration: none;
    text-transform: uppercase;
    width: 100%;
}

.p3d-stitch-hero-stats__actions button {
    background: var(--stitch-primary);
    color: #fff;
    cursor: pointer;
}

.p3d-stitch-hero-stats__actions a:hover {
    background: var(--stitch-primary);
    color: #fff;
}

.p3d-stitch-hero-stats__actions button:disabled {
    cursor: wait;
    opacity: 0.62;
}

.p3d-stitch-hero-stats div {
    align-items: center;
    display: flex;
    justify-content: space-between;
    gap: 18px;
}

.p3d-stitch-hero-stats dt,
.p3d-stitch-hero-stats dd {
    font-family: "Space Grotesk", sans-serif;
    font-size: 10px;
    letter-spacing: 0.1em;
    margin: 0;
    text-transform: uppercase;
}

.p3d-stitch-hero-stats dt {
    color: var(--stitch-muted);
}

.p3d-stitch-hero-stats dd {
    color: var(--stitch-ink);
    font-weight: 800;
    text-align: right;
}

.p3d-stitch-upload__overlay {
    position: absolute;
    left: 50%;
    top: 46%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    min-width: 240px;
    transform: translate(-50%, -50%);
    z-index: 5;
}

.p3d-stitch-upload__actions {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: 8px;
    left: 50%;
    margin: 0;
    min-width: 240px;
    position: absolute;
    bottom: 18px;
    top: auto;
    transform: translateX(-50%);
    z-index: 7;
}

.p3d-stitch-upload__main-icon {
    color: var(--stitch-primary);
    font-size: 56px;
    filter: drop-shadow(10px 12px 0 rgba(0, 85, 255, 0.12));
    transform: perspective(360px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) translate3d(var(--tilt-shift-x, 0px), var(--tilt-shift-y, 0px), 0);
    transition: filter 180ms ease, transform 80ms linear;
    will-change: transform;
}

.p3d-stitch-upload__overlay > strong {
    color: var(--stitch-ink);
    font-family: "Noto Sans JP", sans-serif;
    font-size: clamp(22px, 2.2vw, 34px);
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.45;
    max-width: 760px;
    text-align: center;
}

.p3d-stitch-upload__button {
    align-items: center;
    background: transparent;
    border: 0;
    box-shadow: none;
    color: var(--stitch-primary);
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    gap: 8px;
    justify-content: center;
    min-width: 0;
    width: auto;
    height: auto;
    padding: 0;
}

.p3d-stitch-upload__button .material-symbols-outlined {
    color: var(--stitch-primary);
    font-size: 30px;
}

.p3d-stitch-upload__actions p {
    color: var(--stitch-muted);
    font-family: "Space Grotesk", sans-serif;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.14em;
    margin: 0;
    text-transform: uppercase;
}

.p3d-stitch-upload__button b {
    color: var(--stitch-primary);
    font-family: "Space Grotesk", sans-serif;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.p3d-stitch-upload__decor {
    color: var(--stitch-muted);
    font-family: "Space Grotesk", sans-serif;
    letter-spacing: 0.14em;
    pointer-events: none;
    position: absolute;
    text-transform: uppercase;
    z-index: 4;
}

.p3d-stitch-upload__decor span,
.p3d-stitch-upload__decor b {
    display: block;
}

.p3d-stitch-upload__decor span {
    color: var(--stitch-primary);
    font-size: 10px;
    font-weight: 800;
    margin-bottom: 6px;
}

.p3d-stitch-upload__decor b {
    color: var(--stitch-muted);
    font-size: 11px;
    font-weight: 800;
}

.p3d-stitch-upload__decor--lt {
    left: 32px;
    top: 32px;
}

.p3d-stitch-upload__decor--rt {
    right: 32px;
    text-align: right;
    top: 32px;
}

.p3d-stitch-upload__decor--lb {
    bottom: 32px;
    left: 32px;
}

.p3d-stitch-upload__decor--rb {
    bottom: 32px;
    right: 32px;
    text-align: right;
}

.p3d-stitch-upload.has-model .p3d-stitch-upload__main-icon,
.p3d-stitch-upload.has-model .p3d-stitch-upload__overlay > strong,
.p3d-stitch-upload.has-model .p3d-stitch-upload__decor {
    display: none;
}

.p3d-stitch-quick {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-top: 6px;
}

.p3d-stitch-quick a {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--stitch-primary);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-decoration: none;
    text-transform: uppercase;
}

.p3d-stitch-quick a.is-ai-beta {
    color: #9aa0aa;
    filter: grayscale(1);
    opacity: 0.58;
}

.p3d-stitch-demos {
    position: relative;
    left: 0;
    bottom: auto;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 24px;
    max-width: min(560px, calc(100vw - 200px));
}

.p3d-stitch-demos > span {
    width: 100%;
    color: var(--stitch-muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.p3d-stitch-demos a {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid var(--stitch-line);
    color: var(--stitch-ink);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
    padding: 10px 14px;
    text-decoration: none;
    text-transform: uppercase;
}

.p3d-stitch-demos b {
    color: var(--stitch-primary);
}

.p3d-stitch-demo-list {
    display: grid;
    gap: 6px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
}

.p3d-stitch-demo-list button {
    align-items: flex-start;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid var(--stitch-line);
    color: var(--stitch-ink);
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    gap: 10px;
    min-height: 92px;
    padding: 12px;
    text-align: left;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.p3d-stitch-demo-list button:disabled {
    cursor: default;
    opacity: 0.5;
}

.p3d-stitch-demo-list button:hover:not(:disabled) {
    border-color: var(--stitch-primary);
    box-shadow: 0 10px 28px rgba(26, 28, 28, 0.08);
    color: var(--stitch-primary);
    transform: translateY(-1px);
}

.p3d-stitch-demo-list button.is-active {
    border-color: var(--stitch-primary);
    box-shadow: inset 3px 0 0 var(--stitch-primary);
}

.p3d-stitch-demo-list button > b {
    color: var(--stitch-primary);
    flex: 0 0 auto;
    font-size: 11px;
    letter-spacing: 0.14em;
    line-height: 1.2;
    padding-top: 2px;
}

.p3d-stitch-demo-list button > span {
    display: grid;
    gap: 3px;
}

.p3d-stitch-demo-list small,
.p3d-stitch-demo-list strong,
.p3d-stitch-demo-list em,
.p3d-stitch-demo-list i {
    display: block;
    font-style: normal;
}

.p3d-stitch-demo-list small,
.p3d-stitch-demo-list i {
    color: var(--stitch-primary);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.p3d-stitch-demo-list strong {
    color: var(--stitch-ink);
    font-family: "Manrope", "Noto Sans JP", sans-serif;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.p3d-stitch-demo-list em {
    color: var(--stitch-muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.45;
}

.p3d-stitch-section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 96px 32px 0;
}

.p3d-stitch-section--last {
    padding-bottom: 96px;
}

.p3d-stitch-section__title {
    display: flex;
    align-items: end;
    gap: 16px;
    border-bottom: 1px solid var(--stitch-line);
    padding-bottom: 16px;
    margin-bottom: 48px;
}

.p3d-stitch-section__title--split {
    justify-content: space-between;
}

.p3d-stitch-section h2 {
    font-size: clamp(34px, 4.5vw, 56px);
    line-height: 0.95;
}

.p3d-stitch-section__title span {
    color: var(--stitch-primary);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.14em;
}

.p3d-stitch-specs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid var(--stitch-line);
    border-left: 1px solid var(--stitch-line);
}

.p3d-stitch-specs article {
    position: relative;
    padding: 32px;
    border-right: 1px solid var(--stitch-line);
    border-bottom: 1px solid var(--stitch-line);
    background: #fff;
    overflow: hidden;
}

.p3d-stitch-specs article::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 48px;
    height: 48px;
    opacity: 0.22;
    background-image: repeating-linear-gradient(45deg, transparent, transparent 10px, var(--stitch-higher) 10px, var(--stitch-higher) 11px);
}

.p3d-stitch-specs i {
    display: block;
    width: 48px;
    height: 2px;
    background: var(--stitch-primary);
    margin-bottom: 28px;
}

.p3d-stitch-specs span {
    color: #737688;
    display: block;
    font-size: 10px;
    letter-spacing: 0.14em;
    margin-bottom: 8px;
}

.p3d-stitch-specs h3,
.p3d-stitch-pricing h3 {
    font-family: "Manrope", sans-serif;
    font-weight: 800;
    letter-spacing: -0.04em;
    text-transform: uppercase;
}

.p3d-stitch-specs h3 {
    font-size: 21px;
}

.p3d-stitch-specs p {
    color: var(--stitch-muted);
    font-size: 14px;
    line-height: 1.75;
    margin: 12px 0 28px;
}

.p3d-stitch-specs b {
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.p3d-stitch-shop__lead {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 32px;
    align-items: end;
    margin: -24px 0 32px;
}

.p3d-stitch-shop__lead p {
    color: var(--stitch-muted);
    font-size: 15px;
    line-height: 1.8;
    max-width: 620px;
}

.p3d-stitch-shop__lead a,
.p3d-stitch-shop-card a {
    font-family: "Space Grotesk", sans-serif;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-decoration: none;
    text-transform: uppercase;
}

.p3d-stitch-shop__lead a {
    background: var(--stitch-primary);
    box-shadow: 0 4px 0 var(--stitch-primary-dark);
    color: #fff;
    padding: 12px 24px;
}

.p3d-stitch-shop__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: 1px solid var(--stitch-line);
    border-left: 1px solid var(--stitch-line);
}

.p3d-stitch-shop-card {
    background: #fff;
    border-right: 1px solid var(--stitch-line);
    border-bottom: 1px solid var(--stitch-line);
    min-height: 420px;
    display: flex;
    flex-direction: column;
}

.p3d-stitch-shop-card__visual {
    position: relative;
    min-height: 210px;
    background:
        radial-gradient(circle at center, rgba(0, 85, 255, 0.08), transparent 40%),
        radial-gradient(circle, rgba(26, 28, 28, 0.08) 1px, transparent 1px);
    background-size: auto, 12px 12px;
    overflow: hidden;
}

.p3d-stitch-shop-card__visual img {
    display: block;
    height: 100%;
    min-height: 210px;
    object-fit: cover;
    position: relative;
    width: 100%;
    z-index: 2;
}

.p3d-stitch-shop-card__visual::before {
    content: "";
    position: absolute;
    inset: 18%;
    background:
        radial-gradient(circle at 44% 36%, rgba(255,255,255,0.7), transparent 20%),
        conic-gradient(from 32deg, #182024, #aeb7bb, #343c40, #f4f5f5, #151b1e);
    filter: drop-shadow(0 20px 20px rgba(26, 28, 28, 0.18));
}

.p3d-stitch-shop-card.has-product-image .p3d-stitch-shop-card__visual::before {
    display: none;
}

.p3d-stitch-shop-card--figure .p3d-stitch-shop-card__visual::before {
    clip-path: polygon(42% 4%, 62% 16%, 70% 42%, 92% 62%, 72% 92%, 30% 92%, 8% 62%, 30% 42%, 26% 16%);
}

.p3d-stitch-shop-card--mecha .p3d-stitch-shop-card__visual::before {
    clip-path: polygon(8% 22%, 38% 8%, 64% 16%, 92% 34%, 82% 72%, 50% 92%, 18% 76%);
}

.p3d-stitch-shop-card--base .p3d-stitch-shop-card__visual::before {
    clip-path: polygon(8% 70%, 50% 18%, 92% 70%, 72% 88%, 28% 88%);
}

.p3d-stitch-shop-card--gift .p3d-stitch-shop-card__visual::before {
    clip-path: polygon(14% 24%, 86% 24%, 86% 82%, 14% 82%);
}

.p3d-stitch-shop-card--bust .p3d-stitch-shop-card__visual::before {
    clip-path: polygon(42% 4%, 62% 10%, 72% 36%, 66% 58%, 84% 92%, 16% 92%, 34% 58%, 28% 36%);
}

.p3d-stitch-shop-card--arch .p3d-stitch-shop-card__visual::before {
    clip-path: polygon(10% 86%, 10% 34%, 46% 10%, 90% 32%, 90% 86%);
}

.p3d-stitch-shop-card--mask .p3d-stitch-shop-card__visual::before {
    clip-path: polygon(18% 18%, 82% 18%, 72% 78%, 50% 92%, 28% 78%);
}

.p3d-stitch-shop-card--gear .p3d-stitch-shop-card__visual::before {
    border-radius: 999px;
    clip-path: polygon(50% 0, 58% 12%, 72% 5%, 76% 20%, 92% 20%, 87% 36%, 100% 50%, 87% 64%, 92% 80%, 76% 80%, 72% 95%, 58% 88%, 50% 100%, 42% 88%, 28% 95%, 24% 80%, 8% 80%, 13% 64%, 0 50%, 13% 36%, 8% 20%, 24% 20%, 28% 5%, 42% 12%);
}

.p3d-stitch-shop-card--paint .p3d-stitch-shop-card__visual::before {
    clip-path: polygon(18% 72%, 34% 18%, 68% 10%, 86% 72%, 64% 92%, 36% 92%);
}

.p3d-stitch-shop-card--charm .p3d-stitch-shop-card__visual::before {
    clip-path: polygon(20% 20%, 42% 12%, 56% 28%, 78% 20%, 88% 52%, 66% 82%, 36% 86%, 12% 54%);
}

.p3d-stitch-shop-card--toy .p3d-stitch-shop-card__visual::before {
    clip-path: polygon(34% 8%, 66% 8%, 82% 38%, 72% 86%, 28% 86%, 18% 38%);
}

.p3d-stitch-shop-card--room .p3d-stitch-shop-card__visual::before {
    clip-path: polygon(12% 72%, 12% 28%, 48% 8%, 88% 28%, 88% 72%, 50% 92%);
}

.p3d-stitch-shop-card__body {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.p3d-stitch-shop-card__body > span {
    color: var(--stitch-primary);
    font-family: "Space Grotesk", sans-serif;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.14em;
}

.p3d-stitch-shop-card h3 {
    font-family: "Manrope", sans-serif;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.04em;
    margin: 8px 0 12px;
}

.p3d-stitch-shop-card p {
    color: var(--stitch-muted);
    font-family: "Space Grotesk", sans-serif;
    font-size: 10px;
    letter-spacing: 0.1em;
    line-height: 1.6;
}

.p3d-stitch-shop-card__body > div {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 28px;
}

.p3d-stitch-shop-card strong {
    font-family: "Manrope", sans-serif;
    font-size: 20px;
    font-weight: 800;
}

.p3d-stitch-shop-card strong span {
    color: inherit;
    font: inherit;
    letter-spacing: inherit;
}

.p3d-stitch-shop-card a {
    border-bottom: 1px solid var(--stitch-primary);
    color: var(--stitch-primary);
    padding-bottom: 4px;
}

.p3d-stitch-pricing {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
}

.p3d-stitch-pricing article {
    position: relative;
    border: 1px solid var(--stitch-line);
    background: #fff;
    display: flex;
    flex-direction: column;
}

.p3d-stitch-pricing article.is-featured {
    border: 1px solid var(--stitch-line);
}

.p3d-stitch-pricing em {
    position: absolute;
    top: -13px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border: 1px solid var(--stitch-primary);
    color: var(--stitch-primary);
    font-family: "Space Grotesk", sans-serif;
    font-size: 10px;
    font-style: normal;
    font-weight: 800;
    letter-spacing: 0.14em;
    padding: 4px 16px;
    text-transform: uppercase;
    white-space: nowrap;
}

.p3d-stitch-pricing header {
    border-bottom: 1px solid var(--stitch-line);
    background: var(--stitch-low);
    padding: 32px;
}

.p3d-stitch-pricing .is-featured header {
    background: var(--stitch-low);
    border-bottom-color: var(--stitch-line);
    color: var(--stitch-ink);
}

.p3d-stitch-pricing span {
    color: #737688;
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.p3d-stitch-pricing .is-featured span {
    color: #737688;
}

.p3d-stitch-pricing h3 {
    font-size: 26px;
    margin: 8px 0 20px;
}

.p3d-stitch-pricing strong {
    font-family: "Manrope", sans-serif;
    font-size: 38px;
    font-weight: 800;
}

.p3d-stitch-pricing p {
    margin: 0 32px;
    padding-top: 16px;
    color: var(--stitch-ink);
    font-size: 14px;
}

.p3d-stitch-pricing p::before {
    content: "✓";
    color: var(--stitch-primary);
    margin-right: 8px;
}

.p3d-stitch-pricing a {
    margin: 32px;
    margin-top: auto;
    border: 1px solid var(--stitch-primary);
    color: var(--stitch-primary);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.14em;
    padding: 12px;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
}

.p3d-stitch-pricing .is-featured a {
    background: transparent;
    box-shadow: none;
    color: var(--stitch-primary);
}

.p3d-stitch-ins-lead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    margin: -24px 0 32px;
}

.p3d-stitch-ins-lead p {
    color: var(--stitch-muted);
    font-size: 15px;
    line-height: 1.8;
    max-width: 640px;
}

.p3d-stitch-ins-lead a {
    color: var(--stitch-primary);
    font-family: "Space Grotesk", sans-serif;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-decoration: none;
    text-transform: uppercase;
}

.p3d-stitch-gallery {
    column-count: 6;
    column-gap: 2px;
}

.p3d-stitch-work {
    position: relative;
    break-inside: avoid;
    min-height: 260px;
    margin: 0 0 2px;
    overflow: hidden;
    background:
        radial-gradient(circle at 48% 42%, rgba(255,255,255,0.16), transparent 24%),
        #111;
    box-shadow: 0 1px 0 rgba(26, 28, 28, 0.08);
}

.p3d-stitch-work--xs {
    min-height: 250px;
}

.p3d-stitch-work--s {
    min-height: 285px;
}

.p3d-stitch-work--m {
    min-height: 335px;
}

.p3d-stitch-work--l {
    min-height: 400px;
}

.p3d-stitch-work--xl {
    min-height: 480px;
}

.p3d-stitch-work::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 48%, rgba(0, 0, 0, 0.64));
    z-index: 1;
}

.p3d-stitch-work__render {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 48% 38%, rgba(255,255,255,0.68), transparent 14%),
        conic-gradient(from 25deg, #151b1e, #d8dcdd, #384044, #f4f5f5, #151b1e);
    filter: saturate(0.9) contrast(1.06);
    transform: scale(1.04);
    transition: transform 260ms ease, filter 260ms ease;
}

.p3d-stitch-work.has-image .p3d-stitch-work__render {
    background: #111;
}

.p3d-stitch-work.has-image .p3d-stitch-work__render img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.p3d-stitch-work:hover .p3d-stitch-work__render {
    filter: saturate(1.08) contrast(1.12);
    transform: scale(1.1);
}

.p3d-stitch-work--figure .p3d-stitch-work__render {
    background: radial-gradient(circle at 50% 22%, #f4e7d9 0 11%, transparent 12%), radial-gradient(circle at 50% 45%, #c4a282 0 24%, transparent 25%), linear-gradient(145deg, #121417, #6d7379);
}

.p3d-stitch-work--mecha .p3d-stitch-work__render,
.p3d-stitch-work--gear .p3d-stitch-work__render {
    background: radial-gradient(circle at 50% 48%, transparent 0 18%, #cbd4d8 19% 22%, transparent 23%), repeating-conic-gradient(from 8deg, #1e282d 0 9deg, #cbd4d8 10deg 16deg);
}

.p3d-stitch-work--base .p3d-stitch-work__render,
.p3d-stitch-work--panel .p3d-stitch-work__render {
    background: linear-gradient(140deg, rgba(255,255,255,0.82) 0 24%, transparent 25%), linear-gradient(90deg, #111 0 14%, #cfc8b8 15% 44%, #4f5a5d 45% 100%);
}

.p3d-stitch-work--avatar .p3d-stitch-work__render {
    background: radial-gradient(circle at 52% 24%, #f7dfc7 0 13%, transparent 14%), radial-gradient(circle at 52% 46%, #edc7ad 0 24%, transparent 25%), linear-gradient(135deg, #273832, #8fb36e 58%, #142014);
}

.p3d-stitch-work--props .p3d-stitch-work__render {
    background: radial-gradient(circle at 42% 58%, #e9d8b8 0 12%, transparent 13%), radial-gradient(circle at 62% 38%, #708d9a 0 18%, transparent 19%), linear-gradient(135deg, #0f1214, #88745a 50%, #1b1a18);
}

.p3d-stitch-work--toy .p3d-stitch-work__render {
    background: radial-gradient(circle at 50% 35%, #f0e6d7 0 18%, transparent 19%), linear-gradient(160deg, #101418, #0055ff 52%, #0c2617);
}

.p3d-stitch-work--paint .p3d-stitch-work__render {
    background: radial-gradient(circle at 58% 34%, #ffddd2 0 16%, transparent 17%), linear-gradient(135deg, #1b1b1d, #c13301 48%, #ffe2d8);
}

.p3d-stitch-work--charm .p3d-stitch-work__render {
    background: radial-gradient(circle at 35% 40%, #f2eadf 0 10%, transparent 11%), radial-gradient(circle at 66% 55%, #9bc2ff 0 14%, transparent 15%), linear-gradient(135deg, #142034, #e2e2e2);
}

.p3d-stitch-work--mask .p3d-stitch-work__render {
    background: radial-gradient(circle at 50% 34%, #d8d8d0 0 22%, transparent 23%), linear-gradient(160deg, #08090b, #5e5e5e 45%, #151515);
}

.p3d-stitch-work--room .p3d-stitch-work__render {
    background: linear-gradient(135deg, #171819 0 28%, #c8b99d 29% 54%, #26333a 55% 100%);
}

.p3d-stitch-work > span {
    position: absolute;
    top: 4px;
    right: 4px;
    z-index: 2;
    background: rgba(0, 0, 0, 0.48);
    color: #fff;
    font-size: 7px;
    letter-spacing: 0.14em;
    padding: 3px 5px;
}

.p3d-stitch-work > div:last-child {
    position: absolute;
    z-index: 2;
    inset: auto 0 0;
    background: linear-gradient(180deg, transparent, rgba(0,0,0,0.86));
    border: 0;
    display: grid;
    gap: 4px;
    opacity: 1;
    padding: 34px 8px 8px;
}

.p3d-stitch-work b {
    color: rgba(255, 255, 255, 0.62);
    font-size: 8px;
    letter-spacing: 0.14em;
}

.p3d-stitch-work strong {
    font-family: "Manrope", sans-serif;
    font-size: 10px;
}

.p3d-stitch-work p {
    color: rgba(255, 255, 255, 0.72);
    font-size: 9px;
    line-height: 1.6;
    margin: 4px 0 0;
}

.p3d-stitch-footer {
    background: var(--stitch-primary);
    color: #fff;
}

.p3d-stitch-footer__grid {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(180px, max-content) minmax(220px, max-content);
    align-items: start;
    gap: 96px;
    padding: 64px 48px;
}

.p3d-stitch-footer__logo {
    font-family: "Manrope", sans-serif;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.05em;
    line-height: 1.2;
    margin: 0 0 18px;
}

.p3d-stitch-footer__brand {
    max-width: 520px;
}

.p3d-stitch-footer p,
.p3d-stitch-footer a,
.p3d-stitch-footer span,
.p3d-stitch-status {
    color: rgba(255, 255, 255, 0.78);
    display: block;
    font-size: 12px;
    letter-spacing: 0.06em;
    line-height: 1.8;
    text-decoration: none;
    text-transform: uppercase;
}

.p3d-stitch-footer__brand p {
    margin: 0;
    max-width: 500px;
    font-size: 13px;
    letter-spacing: 0.04em;
    line-height: 1.8;
    text-transform: none;
}

.p3d-stitch-footer__contact {
    display: grid;
    gap: 6px;
    margin-top: 18px;
}

.p3d-stitch-footer__contact span {
    font-size: 12px;
    letter-spacing: 0.06em;
    line-height: 1.7;
    text-transform: none;
}

.p3d-stitch-footer__brand,
.p3d-stitch-footer__col {
    align-self: start;
}

.p3d-stitch-footer h4 {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin: 0 0 18px;
    text-transform: uppercase;
}

.p3d-stitch-footer__col {
    justify-self: end;
    min-width: 180px;
}

.p3d-stitch-footer a {
    margin-bottom: 8px;
}

.p3d-stitch-status {
    margin-top: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.p3d-stitch-status i {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #4ade80;
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.8);
}

@media (max-width: 900px) {
    .p3d-stitch-header__inner {
        padding: 0 16px;
    }

    .p3d-stitch-nav {
        display: none;
    }

    .p3d-stitch-start {
        padding: 9px 12px;
    }

    .p3d-stitch-hero {
        min-height: auto;
    }

    .p3d-stitch-rail {
        display: none;
    }

    .p3d-stitch-canvas {
        padding: 5px 18px 72px;
        min-height: 760px;
    }

    .p3d-stitch-note {
        display: none;
    }

    .p3d-stitch-hero__head {
        display: block;
        margin-top: 24px;
    }

    .p3d-stitch-meter {
        text-align: left;
        margin-top: 24px;
    }

    .p3d-stitch-upload {
        width: 100%;
        min-height: 460px;
        margin: 0;
    }

    .p3d-stitch-upload__label strong {
        font-size: 22px;
        max-width: 280px;
    }

    .p3d-stitch-model {
        height: auto;
        inset: 0;
        width: auto;
    }

    .p3d-stitch-upload__meta {
        display: none;
    }

    .p3d-stitch-upload__decor {
        display: none;
    }

    .p3d-stitch-upload__actions {
        bottom: 18px;
        top: auto;
    }

    .p3d-stitch-quick {
        margin-top: 6px;
        justify-content: center;
        flex-wrap: wrap;
    }

    .p3d-stitch-demos {
        left: auto;
        right: 18px;
        bottom: auto;
        margin-top: 24px;
        max-width: none;
    }

    .p3d-stitch-section {
        padding: 72px 18px 0;
    }

    .p3d-stitch-section--last {
        padding-bottom: 72px;
    }

    .p3d-stitch-section__title,
    .p3d-stitch-section__title--split {
        display: block;
    }

    .p3d-stitch-section__title span {
        display: block;
        margin-top: 12px;
    }

    .p3d-stitch-specs,
    .p3d-stitch-shop__grid,
    .p3d-stitch-pricing,
    .p3d-stitch-gallery,
    .p3d-stitch-footer__grid {
        grid-template-columns: 1fr;
    }

    .p3d-stitch-footer__grid {
        gap: 40px;
        padding: 56px 24px;
    }

    .p3d-stitch-shop__lead {
        grid-template-columns: 1fr;
    }

    .p3d-stitch-ins-lead {
        display: block;
    }

    .p3d-stitch-gallery {
        column-count: 3;
        column-gap: 2px;
    }

    .p3d-stitch-work {
        margin-bottom: 2px;
    }
}

@media (max-width: 1200px) {
    .p3d-stitch-header__inner {
        gap: 20px;
        padding: 0 24px;
    }

    .p3d-stitch-nav {
        gap: 16px;
    }

    .p3d-stitch-canvas {
        padding: 5px 32px 88px;
    }

    .p3d-stitch-canvas::before {
        inset: 5px 32px 88px;
    }

    .p3d-stitch-upload {
        width: min(100%, calc(100vw - 120px));
    }

    .p3d-stitch-upload__overlay > strong {
        max-width: 680px;
    }

    .p3d-stitch-shop__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .p3d-stitch-gallery {
        column-count: 5;
    }

    .p3d-stitch-footer__grid {
        gap: 56px;
        grid-template-columns: minmax(0, 1fr) minmax(160px, max-content) minmax(190px, max-content);
    }
}

@media (max-width: 900px) {
    body:not(.home) .site-main {
        padding-top: 56px;
    }

    .p3d-stitch-header__inner {
        min-height: 56px;
    }

    .p3d-stitch-brand {
        font-size: 18px;
    }

    .p3d-stitch-actions {
        gap: 8px;
        margin-left: auto;
    }

    .p3d-stitch-header .p3d-stitch-start {
        font-size: 10px;
        letter-spacing: 0.08em;
        padding: 9px 12px;
    }

    .p3d-stitch-header .p3d-stitch-icon {
        height: 36px;
        width: 36px;
    }

    .home .p3d-stitch-home {
        padding-top: 5px;
    }

    .p3d-stitch-hero {
        min-height: auto;
    }

    .p3d-stitch-canvas {
        padding: 5px 18px 64px;
        min-height: auto;
    }

    .p3d-stitch-canvas::before {
        inset: 5px 18px 64px;
    }

    .p3d-stitch-upload {
        min-height: clamp(460px, 70vh, 640px);
    }

    .p3d-stitch-upload__overlay {
        top: 45%;
        width: min(100% - 40px, 620px);
    }

    .p3d-stitch-upload__overlay > strong {
        font-size: clamp(24px, 6vw, 42px);
        line-height: 1.35;
    }

    .p3d-stitch-hero-stats {
        left: 20px;
        min-width: 0;
        right: 20px;
        top: 20px;
        width: auto;
    }

    .p3d-stitch-demo-list {
        grid-template-columns: 1fr;
    }

    .p3d-stitch-demos {
        max-width: none;
    }

    .p3d-stitch-specs {
        grid-template-columns: 1fr;
    }

    .p3d-stitch-shop__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .p3d-stitch-pricing {
        grid-template-columns: 1fr;
    }

    .p3d-stitch-gallery {
        column-count: 3;
    }

    .p3d-stitch-footer__grid {
        grid-template-columns: 1fr 1fr;
        justify-items: start;
    }

    .p3d-stitch-footer__brand {
        grid-column: 1 / -1;
    }

    .p3d-stitch-footer__col {
        justify-self: start;
    }
}

@media (max-width: 640px) {
    .p3d-stitch-header__inner {
        gap: 10px;
        padding: 0 14px;
    }

    .p3d-stitch-brand {
        font-size: 17px;
    }

    .p3d-stitch-header .p3d-stitch-start {
        max-width: 132px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .p3d-stitch-header .p3d-stitch-icon {
        width: 32px;
    }

    .p3d-stitch-canvas {
        padding: 5px 10px 56px;
    }

    .p3d-stitch-canvas::before {
        inset: 5px 10px 56px;
    }

    .p3d-stitch-upload {
        min-height: 520px;
    }

    .p3d-stitch-upload::before {
        inset: 0 12px;
    }

    .p3d-stitch-upload::after {
        inset: 12px 0;
    }

    .p3d-stitch-upload__overlay {
        gap: 10px;
        top: 43%;
    }

    .p3d-stitch-upload__main-icon {
        font-size: 46px;
    }

    .p3d-stitch-upload__overlay > strong {
        font-size: clamp(25px, 9vw, 38px);
        max-width: 340px;
    }

    .p3d-stitch-upload__actions {
        bottom: 14px;
        min-width: 0;
        width: calc(100% - 40px);
    }

    .p3d-stitch-upload__button {
        gap: 6px;
    }

    .p3d-stitch-upload__button b {
        font-size: 11px;
        letter-spacing: 0.08em;
    }

    .p3d-stitch-quick {
        gap: 18px;
    }

    .p3d-stitch-quick a {
        font-size: 11px;
        letter-spacing: 0.08em;
    }

    .p3d-stitch-section {
        padding: 56px 14px 0;
    }

    .p3d-stitch-section--last {
        padding-bottom: 56px;
    }

    .p3d-stitch-section__title {
        margin-bottom: 28px;
    }

    .p3d-stitch-section h2 {
        font-size: clamp(30px, 12vw, 44px);
    }

    .p3d-stitch-specs article,
    .p3d-stitch-shop-card__body,
    .p3d-stitch-pricing header {
        padding: 22px;
    }

    .p3d-stitch-shop__grid {
        grid-template-columns: 1fr;
    }

    .p3d-stitch-shop-card {
        min-height: 0;
    }

    .p3d-stitch-gallery {
        column-count: 2;
        column-gap: 2px;
    }

    .p3d-stitch-work--xs {
        min-height: 230px;
    }

    .p3d-stitch-work--s {
        min-height: 265px;
    }

    .p3d-stitch-work--m {
        min-height: 310px;
    }

    .p3d-stitch-work--l {
        min-height: 360px;
    }

    .p3d-stitch-work--xl {
        min-height: 420px;
    }

    .p3d-stitch-footer__grid {
        grid-template-columns: 1fr;
        gap: 32px;
        padding: 44px 20px;
    }

    .p3d-stitch-footer__brand {
        grid-column: auto;
    }
}

@media (max-width: 420px) {
    .p3d-stitch-header .p3d-stitch-start {
        display: none;
    }

    .p3d-stitch-upload {
        min-height: 500px;
    }

    .p3d-stitch-upload__overlay > strong {
        font-size: clamp(24px, 10vw, 34px);
    }

    .p3d-stitch-gallery {
        column-count: 2;
    }
}

/* WooCommerce product detail: Stitch 3D style */
.single-product .site-main {
    background:
        radial-gradient(circle, #e2e2e2 1px, transparent 1px),
        var(--stitch-surface, #f9f9f9);
    background-size: 20px 20px;
}

.p3d-product-page {
    --stitch-primary: #0055ff;
    --stitch-primary-dark: #0039b3;
    --stitch-ink: #1a1c1c;
    --stitch-muted: #434656;
    --stitch-line: #c3c5d9;
    --stitch-surface: #f9f9f9;
    color: var(--stitch-ink);
    font-family: "Inter", "Noto Sans JP", sans-serif;
}

.p3d-product-hero {
    display: flex;
    min-height: calc(100vh - 64px);
    padding-top: 5px;
}

.p3d-product-rail {
    align-items: center;
    background: rgba(243, 243, 243, 0.72);
    border-right: 1px solid var(--stitch-line);
    display: flex;
    flex-direction: column;
    gap: 40px;
    padding: 28px 0;
    width: 56px;
}

.p3d-product-rail span {
    color: #5e5e5e;
    font-size: 26px;
}

.p3d-product-rail span:first-child {
    border-left: 5px solid var(--stitch-primary);
    color: var(--stitch-primary);
    padding: 12px;
}

.p3d-product-rail b {
    color: var(--stitch-muted);
    font-family: "Space Grotesk", sans-serif;
    font-size: 8px;
    letter-spacing: 0.18em;
    margin-top: auto;
    transform: rotate(-90deg);
    white-space: nowrap;
}

.p3d-product-canvas {
    flex: 1;
    padding: 5px 56px 72px;
}

.p3d-product-frame {
    background: rgba(255, 255, 255, 0.72);
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr);
    min-height: 620px;
    position: relative;
}

.p3d-product-frame::before,
.p3d-product-frame::after {
    content: "";
    pointer-events: none;
    position: absolute;
    z-index: 3;
}

.p3d-product-frame::before {
    border-bottom: 1px solid rgba(195, 197, 217, 0.7);
    border-top: 1px solid rgba(195, 197, 217, 0.7);
    inset: 0 18px;
}

.p3d-product-frame::after {
    border-left: 1px solid rgba(195, 197, 217, 0.7);
    border-right: 1px solid rgba(195, 197, 217, 0.7);
    inset: 18px 0;
}

.p3d-product-corner {
    display: block;
    height: 18px;
    position: absolute;
    width: 18px;
    z-index: 4;
}

.p3d-product-corner--tl {
    border-left: 2px solid var(--stitch-primary);
    border-top: 2px solid var(--stitch-primary);
    left: 0;
    top: 0;
}

.p3d-product-corner--br {
    border-bottom: 2px solid var(--stitch-primary);
    border-right: 2px solid var(--stitch-primary);
    bottom: 0;
    right: 0;
}

.p3d-product-gallery {
    display: grid;
    gap: 12px;
    padding: 48px;
    position: relative;
    z-index: 5;
}

.p3d-product-gallery__main {
    align-items: center;
    background:
        radial-gradient(circle at center, rgba(0, 85, 255, 0.08), transparent 40%),
        radial-gradient(circle, rgba(26, 28, 28, 0.08) 1px, transparent 1px);
    background-size: auto, 12px 12px;
    display: flex;
    justify-content: center;
    min-height: 460px;
    overflow: hidden;
}

.p3d-product-gallery__main img {
    display: block;
    height: 100%;
    max-height: 560px;
    object-fit: contain;
    width: 100%;
}

.p3d-product-gallery__placeholder {
    color: var(--stitch-primary);
    display: grid;
    place-items: center;
}

.p3d-product-gallery__placeholder span {
    font-size: 88px;
}

.p3d-product-gallery__thumbs {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.p3d-product-gallery__thumbs figure {
    background: #fff;
    border: 1px solid var(--stitch-line);
    margin: 0;
    aspect-ratio: 1;
    overflow: hidden;
}

.p3d-product-gallery__thumbs img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.p3d-product-summary {
    align-self: center;
    background: rgba(255, 255, 255, 0.92);
    border-left: 2px solid var(--stitch-primary);
    box-shadow: 0 20px 48px rgba(26, 28, 28, 0.1);
    margin: 48px 48px 48px 0;
    padding: 32px;
    position: relative;
    z-index: 5;
}

.p3d-product-kicker {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-content: space-between;
}

.p3d-product-kicker span,
.p3d-product-kicker b,
.p3d-product-category,
.p3d-product-spec-strip span,
.p3d-product-spec-strip b,
.p3d-product-section__title span,
.p3d-product-description h3,
.p3d-product-attributes h3,
.p3d-product-attributes dt,
.p3d-product-related-card span {
    font-family: "Space Grotesk", sans-serif;
}

.p3d-product-kicker span {
    color: var(--stitch-primary);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.14em;
}

.p3d-product-kicker b {
    color: #16a34a;
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.p3d-product-kicker b.is-out-stock {
    color: #dc2626;
}

.p3d-product-summary h1 {
    font-family: "Manrope", "Noto Sans JP", sans-serif;
    font-size: clamp(36px, 5vw, 72px);
    font-weight: 800;
    letter-spacing: -0.07em;
    line-height: 0.95;
    margin: 18px 0;
    text-transform: uppercase;
}

.p3d-product-category,
.p3d-product-category a {
    color: var(--stitch-muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-decoration: none;
    text-transform: uppercase;
}

.p3d-product-price {
    border-bottom: 1px solid var(--stitch-line);
    border-top: 1px solid var(--stitch-line);
    font-family: "Manrope", sans-serif;
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -0.05em;
    margin: 24px 0;
    padding: 18px 0;
}

.p3d-product-price del {
    color: #8a8d97;
    font-size: 20px;
    margin-right: 8px;
}

.p3d-product-price ins {
    text-decoration: none;
}

.p3d-product-short {
    color: var(--stitch-muted);
    font-size: 14px;
    line-height: 1.8;
}

.p3d-product-buy {
    margin-top: 28px;
}

.p3d-product-buy form.cart {
    display: grid;
    gap: 14px;
}

.p3d-product-buy .quantity {
    display: inline-flex;
}

.p3d-product-buy .qty {
    border: 1px solid var(--stitch-line);
    font-family: "Space Grotesk", sans-serif;
    font-weight: 800;
    min-height: 44px;
    padding: 8px;
    width: 84px;
}

.p3d-product-buy .single_add_to_cart_button,
.p3d-product-buy button.button {
    background: var(--stitch-primary) !important;
    border: 0 !important;
    box-shadow: 0 4px 0 var(--stitch-primary-dark);
    color: #fff !important;
    cursor: pointer;
    font-family: "Space Grotesk", sans-serif;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.14em;
    min-height: 48px;
    padding: 14px 22px;
    text-transform: uppercase;
}

.p3d-product-buy table.variations {
    border: 0;
    margin: 0 0 12px;
    width: 100%;
}

.p3d-product-buy table.variations th,
.p3d-product-buy table.variations td {
    display: block;
    padding: 0 0 8px;
    text-align: left;
}

.p3d-product-buy table.variations label {
    color: var(--stitch-primary);
    font-family: "Space Grotesk", sans-serif;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.p3d-product-buy select {
    border: 1px solid var(--stitch-line);
    min-height: 44px;
    padding: 8px 10px;
    width: 100%;
}

.p3d-product-spec-strip {
    border-left: 1px solid var(--stitch-line);
    border-top: 1px solid var(--stitch-line);
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 16px;
}

.p3d-product-spec-strip div {
    background: rgba(255, 255, 255, 0.82);
    border-bottom: 1px solid var(--stitch-line);
    border-right: 1px solid var(--stitch-line);
    padding: 18px;
}

.p3d-product-spec-strip span,
.p3d-product-spec-strip b {
    display: block;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.14em;
}

.p3d-product-spec-strip span {
    color: var(--stitch-primary);
    margin-bottom: 6px;
}

.p3d-product-spec-strip b {
    color: var(--stitch-muted);
}

.p3d-product-section {
    margin: 0 auto;
    max-width: 1280px;
    padding: 96px 32px 0;
}

.p3d-product-section:last-child {
    padding-bottom: 96px;
}

.p3d-product-section__title {
    align-items: end;
    border-bottom: 1px solid var(--stitch-line);
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 32px;
    padding-bottom: 16px;
}

.p3d-product-section__title h2 {
    font-family: "Manrope", "Noto Sans JP", sans-serif;
    font-size: clamp(34px, 4.5vw, 56px);
    font-weight: 800;
    letter-spacing: -0.06em;
    line-height: 0.95;
    margin: 0;
    text-transform: uppercase;
}

.p3d-product-section__title span {
    color: var(--stitch-primary);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.14em;
}

.p3d-product-details {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.42fr);
    gap: 32px;
}

.p3d-product-description,
.p3d-product-attributes {
    background: #fff;
    border: 1px solid var(--stitch-line);
    padding: 32px;
}

.p3d-product-description h3,
.p3d-product-attributes h3 {
    color: var(--stitch-primary);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.14em;
    margin: 0 0 18px;
}

.p3d-product-description {
    color: var(--stitch-muted);
    font-size: 15px;
    line-height: 1.9;
}

.p3d-product-attributes dl {
    display: grid;
    gap: 0;
    margin: 0;
}

.p3d-product-attributes dl div {
    border-top: 1px solid var(--stitch-line);
    display: grid;
    gap: 16px;
    grid-template-columns: 120px minmax(0, 1fr);
    padding: 14px 0;
}

.p3d-product-attributes dt,
.p3d-product-attributes dd {
    margin: 0;
}

.p3d-product-attributes dt {
    color: var(--stitch-primary);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.p3d-product-attributes dd {
    color: var(--stitch-ink);
    font-size: 13px;
    font-weight: 700;
}

.p3d-product-related__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-left: 1px solid var(--stitch-line);
    border-top: 1px solid var(--stitch-line);
}

.p3d-product-related-card {
    background: #fff;
    border-bottom: 1px solid var(--stitch-line);
    border-right: 1px solid var(--stitch-line);
    color: var(--stitch-ink);
    display: grid;
    gap: 12px;
    padding: 18px;
    text-decoration: none;
}

.p3d-product-related-card span {
    color: var(--stitch-primary);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.14em;
}

.p3d-product-related-card figure {
    align-items: center;
    aspect-ratio: 1;
    background:
        radial-gradient(circle at center, rgba(0, 85, 255, 0.08), transparent 40%),
        radial-gradient(circle, rgba(26, 28, 28, 0.08) 1px, transparent 1px);
    background-size: auto, 12px 12px;
    display: flex;
    justify-content: center;
    margin: 0;
    overflow: hidden;
}

.p3d-product-related-card img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.p3d-product-related-card i {
    color: var(--stitch-primary);
    font-style: normal;
    font-size: 48px;
}

.p3d-product-related-card b {
    font-family: "Manrope", "Noto Sans JP", sans-serif;
    font-size: 18px;
    letter-spacing: -0.04em;
}

.p3d-product-related-card strong {
    font-family: "Manrope", sans-serif;
    font-size: 20px;
}

.single-product .woocommerce-notices-wrapper,
.single-product .woocommerce-message,
.single-product .woocommerce-error,
.single-product .woocommerce-info {
    margin: 0;
}

@media (max-width: 1100px) {
    .p3d-product-canvas {
        padding: 5px 32px 64px;
    }

    .p3d-product-frame {
        grid-template-columns: 1fr;
    }

    .p3d-product-summary {
        margin: 0 48px 48px;
    }

    .p3d-product-spec-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .p3d-product-details {
        grid-template-columns: 1fr;
    }

    .p3d-product-related__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .p3d-product-rail {
        display: none;
    }

    .p3d-product-hero {
        min-height: auto;
    }

    .p3d-product-canvas {
        padding: 5px 14px 48px;
    }

    .p3d-product-frame {
        min-height: 0;
    }

    .p3d-product-gallery {
        padding: 28px 18px;
    }

    .p3d-product-gallery__main {
        min-height: 340px;
    }

    .p3d-product-summary {
        margin: 0 18px 28px;
        padding: 24px;
    }

    .p3d-product-summary h1 {
        font-size: clamp(34px, 11vw, 52px);
    }

    .p3d-product-price {
        font-size: 30px;
    }

    .p3d-product-spec-strip {
        grid-template-columns: 1fr;
    }

    .p3d-product-section {
        padding: 56px 14px 0;
    }

    .p3d-product-section:last-child {
        padding-bottom: 56px;
    }

    .p3d-product-section__title {
        align-items: start;
        display: grid;
    }

    .p3d-product-description,
    .p3d-product-attributes {
        padding: 22px;
    }

    .p3d-product-attributes dl div {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .p3d-product-related__grid {
        grid-template-columns: 1fr;
    }
}

/* WooCommerce product archive: Stitch 3D style */
.post-type-archive-product .site-main,
.tax-product_cat .site-main,
.tax-product_tag .site-main {
    background:
        radial-gradient(circle, #e2e2e2 1px, transparent 1px),
        var(--stitch-surface, #f9f9f9);
    background-size: 20px 20px;
}

.p3d-archive-hero,
.p3d-archive-section {
    --stitch-primary: #0055ff;
    --stitch-primary-dark: #0039b3;
    --stitch-ink: #1a1c1c;
    --stitch-muted: #434656;
    --stitch-line: #c3c5d9;
    --stitch-surface: #f9f9f9;
    color: var(--stitch-ink);
    font-family: "Inter", "Noto Sans JP", sans-serif;
}

.p3d-archive-hero {
    display: flex;
    min-height: 420px;
    padding-top: 5px;
}

.p3d-archive-rail {
    align-items: center;
    background: rgba(243, 243, 243, 0.72);
    border-right: 1px solid var(--stitch-line);
    display: flex;
    flex-direction: column;
    gap: 40px;
    padding: 28px 0;
    width: 56px;
}

.p3d-archive-rail span {
    color: #5e5e5e;
    font-size: 26px;
}

.p3d-archive-rail span:first-child {
    border-left: 5px solid var(--stitch-primary);
    color: var(--stitch-primary);
    padding: 12px;
}

.p3d-archive-rail b {
    color: var(--stitch-muted);
    font-family: "Space Grotesk", sans-serif;
    font-size: 8px;
    letter-spacing: 0.18em;
    margin-top: auto;
    transform: rotate(-90deg);
    white-space: nowrap;
}

.p3d-archive-canvas {
    flex: 1;
    padding: 5px 56px 48px;
}

.p3d-archive-head {
    align-items: center;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(195, 197, 217, 0.7);
    display: grid;
    min-height: 360px;
    padding: 48px;
    position: relative;
}

.p3d-archive-head::before,
.p3d-archive-head::after {
    content: "";
    height: 18px;
    position: absolute;
    width: 18px;
}

.p3d-archive-head::before {
    border-left: 2px solid var(--stitch-primary);
    border-top: 2px solid var(--stitch-primary);
    left: -1px;
    top: -1px;
}

.p3d-archive-head::after {
    border-bottom: 2px solid var(--stitch-primary);
    border-right: 2px solid var(--stitch-primary);
    bottom: -1px;
    right: -1px;
}

.p3d-archive-head > span {
    color: var(--stitch-primary);
    font-family: "Space Grotesk", sans-serif;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.p3d-archive-head h1 {
    font-family: "Manrope", "Noto Sans JP", sans-serif;
    font-size: clamp(48px, 8vw, 112px);
    font-weight: 800;
    letter-spacing: -0.08em;
    line-height: 0.9;
    margin: 18px 0;
    max-width: 980px;
    text-transform: uppercase;
}

.p3d-archive-head p,
.p3d-archive-head div {
    color: var(--stitch-muted);
    font-size: 15px;
    line-height: 1.8;
    max-width: 660px;
}

.p3d-archive-section {
    margin: 0 auto;
    max-width: 1280px;
    padding: 48px 32px 96px;
}

.p3d-archive-toolbar {
    align-items: center;
    border-bottom: 1px solid var(--stitch-line);
    display: flex;
    gap: 24px;
    justify-content: space-between;
    margin-bottom: 32px;
    padding-bottom: 16px;
}

.p3d-archive-count,
.p3d-archive-count p {
    color: var(--stitch-primary);
    font-family: "Space Grotesk", sans-serif;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.14em;
    margin: 0;
    text-transform: uppercase;
}

.p3d-archive-ordering select {
    background: #fff;
    border: 1px solid var(--stitch-line);
    color: var(--stitch-ink);
    font-family: "Space Grotesk", sans-serif;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    min-height: 40px;
    padding: 8px 12px;
    text-transform: uppercase;
}

.p3d-archive-section ul.products {
    border-left: 1px solid var(--stitch-line);
    border-top: 1px solid var(--stitch-line);
    display: grid;
    gap: 0;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    list-style: none;
    margin: 0;
    padding: 0;
}

.p3d-archive-section ul.products::before,
.p3d-archive-section ul.products::after {
    display: none;
}

.p3d-archive-section ul.products li.product {
    float: none;
    margin: 0;
    width: auto;
}

.p3d-archive-card {
    background: #fff;
    border-bottom: 1px solid var(--stitch-line);
    border-right: 1px solid var(--stitch-line);
    display: flex;
    flex-direction: column;
    min-height: 430px;
    position: relative;
}

.p3d-archive-card__visual {
    align-items: center;
    background:
        radial-gradient(circle at center, rgba(0, 85, 255, 0.08), transparent 40%),
        radial-gradient(circle, rgba(26, 28, 28, 0.08) 1px, transparent 1px);
    background-size: auto, 12px 12px;
    display: flex;
    justify-content: center;
    min-height: 230px;
    overflow: hidden;
}

.p3d-archive-card__visual img {
    display: block;
    height: 100%;
    min-height: 230px;
    object-fit: cover;
    transition: transform 240ms ease;
    width: 100%;
}

.p3d-archive-card:hover .p3d-archive-card__visual img {
    transform: scale(1.04);
}

.p3d-archive-card__visual > span {
    color: var(--stitch-primary);
    font-size: 64px;
}

.p3d-archive-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 24px;
}

.p3d-archive-card__body > span {
    color: var(--stitch-primary);
    font-family: "Space Grotesk", sans-serif;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.14em;
}

.p3d-archive-card h2 {
    font-family: "Manrope", "Noto Sans JP", sans-serif;
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.1;
    margin: 10px 0 12px;
}

.p3d-archive-card h2 a {
    color: var(--stitch-ink);
    text-decoration: none;
}

.p3d-archive-card p {
    color: var(--stitch-muted);
    font-size: 13px;
    line-height: 1.7;
    margin: 0;
}

.p3d-archive-card__meta {
    align-items: center;
    display: flex;
    gap: 14px;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 24px;
}

.p3d-archive-card__meta strong {
    font-family: "Manrope", sans-serif;
    font-size: 20px;
    font-weight: 800;
}

.p3d-archive-card__meta strong span {
    color: inherit;
    font: inherit;
}

.p3d-archive-card__meta .button,
.p3d-archive-card__meta a.button {
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--stitch-primary);
    border-radius: 0;
    color: var(--stitch-primary);
    font-family: "Space Grotesk", sans-serif;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
    padding: 0 0 4px;
    text-decoration: none;
    text-transform: uppercase;
}

.p3d-archive-pagination {
    margin-top: 40px;
}

.p3d-archive-pagination ul.page-numbers {
    display: flex;
    gap: 8px;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.p3d-archive-pagination .page-numbers {
    align-items: center;
    background: #fff;
    border: 1px solid var(--stitch-line);
    color: var(--stitch-ink);
    display: inline-flex;
    font-family: "Space Grotesk", sans-serif;
    font-size: 12px;
    font-weight: 800;
    height: 38px;
    justify-content: center;
    min-width: 38px;
    text-decoration: none;
}

.p3d-archive-pagination .page-numbers.current {
    background: var(--stitch-primary);
    border-color: var(--stitch-primary);
    color: #fff;
}

.p3d-archive-empty {
    background: #fff;
    border: 1px solid var(--stitch-line);
    display: grid;
    justify-items: center;
    padding: 72px 24px;
    text-align: center;
}

.p3d-archive-empty span {
    color: var(--stitch-primary);
    font-size: 72px;
}

.p3d-archive-empty h2 {
    font-family: "Manrope", "Noto Sans JP", sans-serif;
    font-size: 34px;
    letter-spacing: -0.05em;
    margin: 16px 0 8px;
}

.p3d-archive-empty p {
    color: var(--stitch-muted);
    margin: 0;
}

@media (max-width: 1180px) {
    .p3d-archive-canvas {
        padding: 5px 32px 44px;
    }

    .p3d-archive-section ul.products {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .p3d-archive-rail {
        display: none;
    }

    .p3d-archive-hero {
        min-height: auto;
    }

    .p3d-archive-canvas {
        padding: 5px 18px 32px;
    }

    .p3d-archive-head {
        min-height: 300px;
        padding: 36px 28px;
    }

    .p3d-archive-section {
        padding: 40px 18px 72px;
    }

    .p3d-archive-section ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .p3d-archive-canvas {
        padding: 5px 10px 28px;
    }

    .p3d-archive-head {
        min-height: 260px;
        padding: 28px 18px;
    }

    .p3d-archive-head h1 {
        font-size: clamp(42px, 15vw, 68px);
    }

    .p3d-archive-toolbar {
        align-items: start;
        display: grid;
    }

    .p3d-archive-section {
        padding: 32px 10px 56px;
    }

    .p3d-archive-section ul.products {
        grid-template-columns: 1fr;
    }

    .p3d-archive-card {
        min-height: 0;
    }
}

/* WooCommerce cart: Stitch 3D style */
.woocommerce-cart .site-main {
    background:
        radial-gradient(circle, #e2e2e2 1px, transparent 1px),
        var(--stitch-surface, #f9f9f9);
    background-size: 20px 20px;
}

.p3d-cart-page {
    --stitch-primary: #0055ff;
    --stitch-primary-dark: #0039b3;
    --stitch-ink: #1a1c1c;
    --stitch-muted: #434656;
    --stitch-line: #c3c5d9;
    --stitch-surface: #f9f9f9;
    color: var(--stitch-ink);
    display: flex;
    font-family: "Inter", "Noto Sans JP", sans-serif;
    min-height: calc(100vh - 64px);
    padding-top: 5px;
}

.p3d-cart-rail {
    align-items: center;
    background: rgba(243, 243, 243, 0.72);
    border-right: 1px solid var(--stitch-line);
    display: flex;
    flex-direction: column;
    gap: 40px;
    padding: 28px 0;
    width: 56px;
}

.p3d-cart-rail span {
    color: #5e5e5e;
    font-size: 26px;
}

.p3d-cart-rail span:first-child {
    border-left: 5px solid var(--stitch-primary);
    color: var(--stitch-primary);
    padding: 12px;
}

.p3d-cart-rail b {
    color: var(--stitch-muted);
    font-family: "Space Grotesk", sans-serif;
    font-size: 8px;
    letter-spacing: 0.18em;
    margin-top: auto;
    transform: rotate(-90deg);
    white-space: nowrap;
}

.p3d-cart-canvas {
    flex: 1;
    padding: 5px 56px 96px;
}

.p3d-cart-head {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(195, 197, 217, 0.7);
    margin-bottom: 32px;
    min-height: 300px;
    padding: 48px;
    position: relative;
}

.p3d-cart-head::before,
.p3d-cart-head::after,
.p3d-cart-empty-panel::before,
.p3d-cart-empty-panel::after {
    content: "";
    height: 18px;
    position: absolute;
    width: 18px;
}

.p3d-cart-head::before,
.p3d-cart-empty-panel::before {
    border-left: 2px solid var(--stitch-primary);
    border-top: 2px solid var(--stitch-primary);
    left: -1px;
    top: -1px;
}

.p3d-cart-head::after,
.p3d-cart-empty-panel::after {
    border-bottom: 2px solid var(--stitch-primary);
    border-right: 2px solid var(--stitch-primary);
    bottom: -1px;
    right: -1px;
}

.p3d-cart-head > span {
    color: var(--stitch-primary);
    font-family: "Space Grotesk", sans-serif;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.p3d-cart-head h1,
.p3d-cart-empty-panel h1 {
    font-family: "Manrope", "Noto Sans JP", sans-serif;
    font-size: clamp(54px, 9vw, 118px);
    font-weight: 800;
    letter-spacing: -0.08em;
    line-height: 0.9;
    margin: 18px 0;
    text-transform: uppercase;
}

.p3d-cart-head p,
.p3d-cart-empty-panel p {
    color: var(--stitch-muted);
    font-size: 15px;
    line-height: 1.8;
    margin: 0;
    max-width: 680px;
}

.p3d-cart-layout {
    align-items: start;
    display: grid;
    gap: 32px;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 0.36fr);
}

.p3d-cart-form,
.p3d-cart-summary__inner {
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid var(--stitch-line);
}

.p3d-cart-table__head {
    background: var(--stitch-low, #f3f3f3);
    border-bottom: 1px solid var(--stitch-line);
    display: grid;
    grid-template-columns: minmax(0, 1fr) 120px 150px 130px;
}

.p3d-cart-table__head span {
    color: var(--stitch-primary);
    font-family: "Space Grotesk", sans-serif;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.14em;
    padding: 16px;
    text-transform: uppercase;
}

.p3d-cart-items {
    display: grid;
}

.p3d-cart-item {
    border-bottom: 1px solid var(--stitch-line);
    display: grid;
    gap: 0;
    grid-template-columns: minmax(0, 1fr) 120px 150px 130px;
}

.p3d-cart-item > div {
    padding: 20px 16px;
}

.p3d-cart-item__product {
    display: grid;
    gap: 16px;
    grid-template-columns: 104px minmax(0, 1fr);
}

.p3d-cart-item__thumb {
    align-items: center;
    background:
        radial-gradient(circle at center, rgba(0, 85, 255, 0.08), transparent 40%),
        radial-gradient(circle, rgba(26, 28, 28, 0.08) 1px, transparent 1px);
    background-size: auto, 12px 12px;
    display: flex;
    height: 104px;
    justify-content: center;
    overflow: hidden;
    width: 104px;
}

.p3d-cart-item__thumb img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.p3d-cart-item__copy > span {
    color: var(--stitch-primary);
    display: block;
    font-family: "Space Grotesk", sans-serif;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.14em;
    margin-bottom: 8px;
}

.p3d-cart-item__copy h2 {
    font-family: "Manrope", "Noto Sans JP", sans-serif;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.1;
    margin: 0 0 10px;
}

.p3d-cart-item__copy h2 a {
    color: var(--stitch-ink);
    text-decoration: none;
}

.p3d-cart-item__copy dl.variation {
    color: var(--stitch-muted);
    display: grid;
    gap: 4px;
    margin: 0 0 12px;
}

.p3d-cart-item__copy dl.variation dt,
.p3d-cart-item__copy dl.variation dd {
    display: inline;
    font-size: 12px;
    margin: 0;
}

.p3d-cart-item__copy .backorder_notification {
    color: #dc2626;
    font-size: 12px;
    margin: 8px 0;
}

.p3d-cart-item__remove {
    border-bottom: 1px solid currentColor;
    color: var(--stitch-muted);
    display: inline-flex;
    font-family: "Space Grotesk", sans-serif;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
    padding-bottom: 3px;
    text-decoration: none;
    text-transform: uppercase;
}

.p3d-cart-item__price,
.p3d-cart-item__subtotal {
    font-family: "Manrope", sans-serif;
    font-size: 18px;
    font-weight: 800;
}

.p3d-cart-item__quantity .quantity {
    display: inline-flex;
}

.p3d-cart-item__quantity .qty {
    border: 1px solid var(--stitch-line);
    font-family: "Space Grotesk", sans-serif;
    font-weight: 800;
    min-height: 42px;
    padding: 8px;
    width: 76px;
}

.p3d-cart-actions {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    padding: 20px;
}

.p3d-cart-coupon {
    align-items: center;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.p3d-cart-coupon label {
    color: var(--stitch-primary);
    font-family: "Space Grotesk", sans-serif;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.p3d-cart-coupon input {
    border: 1px solid var(--stitch-line);
    min-height: 42px;
    padding: 8px 12px;
}

.p3d-cart-actions .button,
.p3d-cart-summary .button,
.p3d-cart-summary .checkout-button {
    background: transparent;
    border: 1px solid var(--stitch-primary);
    border-radius: 0;
    color: var(--stitch-primary);
    cursor: pointer;
    font-family: "Space Grotesk", sans-serif;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.14em;
    min-height: 42px;
    padding: 12px 18px;
    text-decoration: none;
    text-transform: uppercase;
}

.p3d-cart-summary .checkout-button,
.p3d-cart-update {
    background: var(--stitch-primary) !important;
    box-shadow: 0 4px 0 var(--stitch-primary-dark);
    color: #fff !important;
}

.p3d-cart-summary {
    position: sticky;
    top: 88px;
}

.p3d-cart-summary__inner {
    border-left: 2px solid var(--stitch-primary);
    box-shadow: 0 20px 48px rgba(26, 28, 28, 0.1);
    padding: 24px;
}

.p3d-cart-summary__inner > span {
    color: var(--stitch-primary);
    display: block;
    font-family: "Space Grotesk", sans-serif;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.14em;
    margin-bottom: 10px;
}

.p3d-cart-summary .cart_totals {
    float: none;
    width: 100%;
}

.p3d-cart-summary .cart_totals h2 {
    font-family: "Manrope", "Noto Sans JP", sans-serif;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.05em;
    margin: 0 0 18px;
    text-transform: uppercase;
}

.p3d-cart-summary table.shop_table {
    border: 0;
    border-collapse: collapse;
    margin: 0 0 18px;
    width: 100%;
}

.p3d-cart-summary table.shop_table th,
.p3d-cart-summary table.shop_table td {
    border-bottom: 1px solid var(--stitch-line);
    color: var(--stitch-ink);
    padding: 14px 0;
    text-align: left;
}

.p3d-cart-summary table.shop_table th {
    color: var(--stitch-muted);
    font-family: "Space Grotesk", sans-serif;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.p3d-cart-summary table.shop_table td {
    font-family: "Manrope", sans-serif;
    font-weight: 800;
    text-align: right;
}

.p3d-cart-summary .wc-proceed-to-checkout {
    padding: 16px 0 0;
}

.p3d-cart-summary .checkout-button {
    display: flex;
    justify-content: center;
    width: 100%;
}

.p3d-cart-empty-panel {
    align-items: center;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(195, 197, 217, 0.7);
    display: grid;
    justify-items: center;
    min-height: 560px;
    padding: 56px 24px;
    position: relative;
    text-align: center;
}

.p3d-cart-empty-panel > span {
    color: var(--stitch-primary);
    font-size: 82px;
}

.p3d-cart-empty-panel > b {
    color: var(--stitch-primary);
    font-family: "Space Grotesk", sans-serif;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.p3d-cart-empty-panel div {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 28px;
}

.p3d-cart-empty-panel a {
    background: var(--stitch-primary);
    box-shadow: 0 4px 0 var(--stitch-primary-dark);
    color: #fff;
    font-family: "Space Grotesk", sans-serif;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.14em;
    padding: 14px 22px;
    text-decoration: none;
    text-transform: uppercase;
}

.p3d-cart-empty-panel a + a {
    background: #fff;
    border: 1px solid var(--stitch-primary);
    box-shadow: none;
    color: var(--stitch-primary);
}

@media (max-width: 1100px) {
    .p3d-cart-canvas {
        padding: 5px 32px 80px;
    }

    .p3d-cart-layout {
        grid-template-columns: 1fr;
    }

    .p3d-cart-summary {
        position: static;
    }
}

@media (max-width: 820px) {
    .p3d-cart-rail {
        display: none;
    }

    .p3d-cart-page {
        min-height: auto;
    }

    .p3d-cart-canvas {
        padding: 5px 18px 64px;
    }

    .p3d-cart-head {
        min-height: 260px;
        padding: 36px 28px;
    }

    .p3d-cart-table__head {
        display: none;
    }

    .p3d-cart-item {
        grid-template-columns: 1fr;
    }

    .p3d-cart-item > div {
        padding: 12px 16px;
    }

    .p3d-cart-item__price::before,
    .p3d-cart-item__quantity::before,
    .p3d-cart-item__subtotal::before {
        color: var(--stitch-primary);
        content: attr(data-title);
        display: block;
        font-family: "Space Grotesk", sans-serif;
        font-size: 10px;
        font-weight: 800;
        letter-spacing: 0.14em;
        margin-bottom: 6px;
        text-transform: uppercase;
    }

    .p3d-cart-actions {
        align-items: stretch;
        display: grid;
    }
}

@media (max-width: 560px) {
    .p3d-cart-canvas {
        padding: 5px 10px 56px;
    }

    .p3d-cart-head {
        padding: 28px 18px;
    }

    .p3d-cart-head h1,
    .p3d-cart-empty-panel h1 {
        font-size: clamp(42px, 16vw, 68px);
    }

    .p3d-cart-item__product {
        grid-template-columns: 82px minmax(0, 1fr);
    }

    .p3d-cart-item__thumb {
        height: 82px;
        width: 82px;
    }

    .p3d-cart-coupon,
    .p3d-cart-coupon input,
    .p3d-cart-coupon button,
    .p3d-cart-update {
        width: 100%;
    }

    .p3d-cart-empty-panel {
        min-height: 460px;
        padding: 44px 18px;
    }
}
