/* Desktop preserved; mobile compatibility is a lower cascade layer. */
@layer legacy {
@media(min-width:761px) {
:root {
    --shipping-bg: #ebe5dd;
    --shipping-paper: rgba(255, 250, 244, 0.86);
    --shipping-paper-strong: #fffaf4;
    --shipping-text: #151210;
    --shipping-muted: #756b62;
    --shipping-line: rgba(132, 103, 80, 0.22);
    --shipping-red: #b10000;
    --shipping-red-dark: #890000;
    --shipping-gold: #bd8847;
    --shipping-shadow: 0 24px 56px rgba(58, 28, 16, 0.14);
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--shipping-text);
    font-family:system-ui,sans-serif;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(177, 0, 0, 0.08)),
        linear-gradient(145deg, var(--shipping-bg), #fff8ef);
}

a {
    color: inherit;
    text-decoration: none;
}

.shipping-page {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 48px;
}

.back-home {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    margin-bottom: 18px;
    padding: 0 14px;
    border: 1px solid var(--shipping-line);
    border-radius: 999px;
    color: var(--shipping-muted);
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 10px 24px rgba(58, 28, 16, 0.08);
}

.shipping-hero,
.region-panel,
.product-group,
.result-panel {
    border: 1px solid rgba(255, 255, 255, 0.78);
    background: var(--shipping-paper);
    box-shadow: var(--shipping-shadow);
    backdrop-filter: blur(14px);
}

.shipping-hero {
    padding: 34px;
    border-radius: 24px;
}

.shipping-kicker,
.section-kicker {
    margin: 0 0 8px;
    color: var(--shipping-red);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.18em;
}

.shipping-hero h1,
.region-panel h2,
.group-heading h2,
.result-panel h2 {
    margin: 0;
    line-height: 1.15;
}

.shipping-hero h1 {
    font-size: clamp(36px, 7vw, 72px);
}

.shipping-hero p:last-child {
    max-width: 620px;
    margin: 14px 0 0;
    color: var(--shipping-muted);
    font-size: 17px;
    line-height: 1.8;
}

.shipping-calculator {
    display: grid;
    gap: 18px;
    margin-top: 18px;
}

.region-panel,
.result-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 24px;
    border-radius: 22px;
}

.region-options,
.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.region-option,
.product-grid label {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--shipping-line);
    background: rgba(255, 255, 255, 0.72);
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.region-option {
    min-height: 46px;
    padding: 0 16px;
    border-radius: 999px;
    font-weight: 900;
}

.region-option:has(input:checked),
.product-grid label:has(input:checked) {
    border-color: rgba(177, 0, 0, 0.72);
    color: var(--shipping-red-dark);
    background: rgba(177, 0, 0, 0.08);
}

.region-option:hover,
.product-grid label:hover,
.group-heading a:hover,
.result-item a:hover,
.primary-action:hover,
.secondary-action:hover,
.back-home:hover {
    transform: translateY(-1px);
}

input {
    accent-color: var(--shipping-red);
}

.products-shell {
    display: grid;
    gap: 18px;
}

.product-group {
    padding: 24px;
    border-radius: 22px;
}

.group-heading {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 16px;
}

.group-heading a {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    flex: 0 0 auto;
    padding: 0 13px;
    border: 1px solid rgba(177, 0, 0, 0.28);
    border-radius: 999px;
    color: var(--shipping-red-dark);
    background: rgba(177, 0, 0, 0.06);
    font-size: 13px;
    font-weight: 900;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.product-grid label {
    min-height: 52px;
    padding: 13px 14px;
    border-radius: 14px;
    color: var(--shipping-text);
    font-size: 15px;
    font-weight: 800;
    line-height: 1.35;
}

.result-panel {
    position: sticky;
    bottom: 12px;
    z-index: 3;
}

.result-copy p:last-child {
    margin: 8px 0 0;
    color: var(--shipping-muted);
    line-height: 1.6;
}

.result-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
    grid-column: 1 / -1;
}

.result-list:empty {
    display: none;
}

.result-item {
    display: grid;
    gap: 8px;
    padding: 14px;
    border: 1px solid rgba(177, 0, 0, 0.18);
    border-radius: 16px;
    background: var(--shipping-paper-strong);
}

.result-group {
    color: var(--shipping-gold);
    font-size: 12px;
    font-weight: 900;
}

.result-item strong {
    font-size: 16px;
    line-height: 1.45;
}

.result-item p {
    margin: 0;
    color: var(--shipping-muted);
    font-size: 13px;
    line-height: 1.6;
}

.result-item a,
.primary-action,
.secondary-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 14px;
    font: inherit;
    font-size: 15px;
    font-weight: 900;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.result-item a,
.primary-action {
    border: 1px solid rgba(177, 0, 0, 0.78);
    color: #fff;
    background: linear-gradient(180deg, #c70000, var(--shipping-red-dark));
    box-shadow: 0 10px 22px rgba(177, 0, 0, 0.18);
}

.secondary-action {
    border: 1px solid var(--shipping-line);
    color: var(--shipping-text);
    background: rgba(255, 255, 255, 0.72);
}

@media (max-width: 820px) {
    .shipping-page {
        width: min(100% - 20px, 680px);
        padding-top: 14px;
    }

    .shipping-hero,
    .region-panel,
    .product-group,
    .result-panel {
        border-radius: 18px;
    }

    .shipping-hero {
        padding: 24px 20px;
    }

    .region-panel,
    .result-panel,
    .group-heading {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .region-options,
    .action-row {
        justify-content: stretch;
    }

    .region-option,
    .primary-action,
    .secondary-action {
        flex: 1 1 160px;
    }

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

    .group-heading {
        display: grid;
    }

    .group-heading a {
        justify-content: center;
    }

    .result-panel {
        position: static;
    }
}

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

}
@media(max-width:760px) {
:root {
    
    
    
    
    
    
    
    
    
    
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--dream-ink);
    font-family:system-ui,sans-serif;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(177, 0, 0, 0.08)),
        linear-gradient(145deg, var(--dream-bg), #fff8ef);
}

a {
    color: inherit;
    text-decoration: none;
}

.shipping-page {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 48px;
}

.back-home {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    margin-bottom: 18px;
    padding: 0 14px;
    border: 1px solid var(--dream-border);
    border-radius: 999px;
    color: var(--dream-muted);
    background: rgba(255, 255, 255, 0.72);
    box-shadow:var(--dream-shadow-sm);
}

.shipping-hero,
.region-panel,
.product-group,
.result-panel {
    border: 1px solid rgba(255, 255, 255, 0.78);
    background: var(--dream-paper);
    box-shadow:var(--dream-shadow-sm);
    backdrop-filter: blur(14px);
}

.shipping-hero {
    padding: 34px;
    border-radius: 24px;
}

.shipping-kicker,
.section-kicker {
    margin: 0 0 8px;
    color: var(--dream-accent-ink);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.18em;
}

.shipping-hero h1,
.region-panel h2,
.group-heading h2,
.result-panel h2 {
    margin: 0;
    line-height: 1.15;
}

.shipping-hero h1 {
    font-size: clamp(36px, 7vw, 72px);
}

.shipping-hero p:last-child {
    max-width: 620px;
    margin: 14px 0 0;
    color: var(--dream-muted);
    font-size: 17px;
    line-height: 1.8;
}

.shipping-calculator {
    display: grid;
    gap: 18px;
    margin-top: 18px;
}

.region-panel,
.result-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 24px;
    border-radius: 22px;
}

.region-options,
.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.region-option,
.product-grid label {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--dream-border);
    background: rgba(255, 255, 255, 0.72);
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.region-option {
    min-height: 46px;
    padding: 0 16px;
    border-radius: 999px;
    font-weight: 900;
}

.region-option:has(input:checked),
.product-grid label:has(input:checked) {
    border-color: rgba(177, 0, 0, 0.72);
    color: var(--dream-accent-ink);
    background: rgba(177, 0, 0, 0.08);
}

.region-option:hover,
.product-grid label:hover,
.group-heading a:hover,
.result-item a:hover,
.primary-action:hover,
.secondary-action:hover,
.back-home:hover {
    transform: translateY(-1px);
}

input {
    accent-color: var(--dream-accent-ink);
}

.products-shell {
    display: grid;
    gap: 18px;
}

.product-group {
    padding: 24px;
    border-radius: 22px;
}

.group-heading {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 16px;
}

.group-heading a {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    flex: 0 0 auto;
    padding: 0 13px;
    border: 1px solid rgba(177, 0, 0, 0.28);
    border-radius: 999px;
    color: var(--dream-accent-ink);
    background: rgba(177, 0, 0, 0.06);
    font-size: 13px;
    font-weight: 900;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.product-grid label {
    min-height: 52px;
    padding: 13px 14px;
    border-radius: 14px;
    color: var(--dream-ink);
    font-size: 15px;
    font-weight: 800;
    line-height: 1.35;
}

.result-panel {
    position: sticky;
    bottom: 12px;
    z-index: 3;
}

.result-copy p:last-child {
    margin: 8px 0 0;
    color: var(--dream-muted);
    line-height: 1.6;
}

.result-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
    grid-column: 1 / -1;
}

.result-list:empty {
    display: none;
}

.result-item {
    display: grid;
    gap: 8px;
    padding: 14px;
    border: 1px solid rgba(177, 0, 0, 0.18);
    border-radius: 16px;
    background: var(--dream-paper);
}

.result-group {
    color: var(--dream-sketch);
    font-size: 12px;
    font-weight: 900;
}

.result-item strong {
    font-size: 16px;
    line-height: 1.45;
}

.result-item p {
    margin: 0;
    color: var(--dream-muted);
    font-size: 13px;
    line-height: 1.6;
}

.result-item a,
.primary-action,
.secondary-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 14px;
    font: inherit;
    font-size: 15px;
    font-weight: 900;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.result-item a,
.primary-action {
    border: 1px solid rgba(177, 0, 0, 0.78);
    color: #fff;
    background: linear-gradient(180deg, #c70000, var(--dream-accent-ink));
    box-shadow:var(--dream-shadow-sm);
}

.secondary-action {
    border: 1px solid var(--dream-border);
    color: var(--dream-ink);
    background: rgba(255, 255, 255, 0.72);
}

@media (max-width: 820px) {
    .shipping-page {
        width: min(100% - 20px, 680px);
        padding-top: 14px;
    }

    .shipping-hero,
    .region-panel,
    .product-group,
    .result-panel {
        border-radius: 18px;
    }

    .shipping-hero {
        padding: 24px 20px;
    }

    .region-panel,
    .result-panel,
    .group-heading {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .region-options,
    .action-row {
        justify-content: stretch;
    }

    .region-option,
    .primary-action,
    .secondary-action {
        flex: 1 1 160px;
    }

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

    .group-heading {
        display: grid;
    }

    .group-heading a {
        justify-content: center;
    }

    .result-panel {
        position: static;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto ;
        transition: none ;
    }
}

}
}
