/* ===========================================
   HISTORICUM GLOBAL LAYOUT GUARD
   Loaded last. No page or component may create horizontal document overflow.
   Decorative full-bleed sections must clip on the X axis inside their own frame.
   =========================================== */

html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden !important;
}

body {
    position: relative;
}

#page,
.site,
.site-content,
#content,
.content-area,
.entry-content,
#main,
.site-main,
.content-wrapper,
.page-wrap,
.historicum-homepage,
.h-page-wrapper,
.h-static-page,
.h-ref-page,
.h-shop-page,
.h-product-page,
.woocommerce,
.woocommerce-page {
    max-width: 100% !important;
    overflow-x: hidden !important;
    overflow-y: visible;
}

img,
svg,
video,
canvas,
iframe {
    max-width: 100%;
}

.h-hero-diagonal-bands,
.diagonal-bands,
.diagonal-band-wrap {
    max-width: 100%;
    overflow: hidden !important;
}

@media (max-width: 1399px), (hover: none) and (pointer: coarse) {
    html,
    body {
        height: auto !important;
        min-height: 100% !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
        touch-action: auto !important;
    }

    #page,
    .site,
    .site-content,
    #content,
    .content-area,
    .entry-content,
    #main,
    .site-main,
    .content-wrapper,
    .page-wrap,
    .historicum-homepage,
    .h-page-wrapper,
    .h-static-page,
    .h-ref-page,
    .h-shop-page,
    .h-product-page,
    .woocommerce,
    .woocommerce-page,
    #historicum-home {
        overflow-x: hidden !important;
        overflow-y: visible !important;
    }

    .h-bs-carousel,
    .historicum-product-review-viewport,
    .h-testimonials-viewport,
    .carousel-container {
        touch-action: auto !important;
        -webkit-overflow-scrolling: touch;
        cursor: grab;
    }

    .h-ws-viewport,
    .h-ss-viewport {
        touch-action: pan-y !important;
        -webkit-overflow-scrolling: touch;
        cursor: grab;
    }

    .h-testimonials-track,
    .h-sponsors-track {
        touch-action: auto !important;
        -webkit-overflow-scrolling: touch;
        cursor: grab;
    }

    .h-blog-track {
        touch-action: auto !important;
        -webkit-overflow-scrolling: touch;
        cursor: grab;
    }

    .h-shop-fighter-carousel {
        touch-action: auto !important;
        -webkit-overflow-scrolling: touch;
        cursor: grab;
    }

    .h-bs-carousel.is-dragging,
    .h-shop-fighter-carousel.is-dragging,
    .h-ws-viewport.is-dragging,
    .h-ss-viewport.is-dragging,
    .h-blog-track.is-dragging,
    .historicum-product-review-viewport.is-dragging,
    .h-testimonials-carousel.is-dragging .h-testimonials-viewport,
    .h-testimonials-track.is-dragging,
    .h-sponsors-track.is-dragging,
    .carousel-track.is-dragging,
    .carousel-container.is-dragging {
        cursor: grabbing;
    }
}

/* Shop mobile guard baseline; final overrides live at the end of this file. */
@media (max-width: 1399px), (hover: none) and (pointer: coarse) {
    body.historicum-shop-page,
    body.historicum-shop-page #page,
    body.historicum-shop-page .site,
    body.historicum-shop-page .site-content,
    body.historicum-shop-page #content,
    body.historicum-shop-page .content-area,
    body.historicum-shop-page #main,
    body.historicum-shop-page .site-main,
    body.historicum-shop-page .woocommerce,
    body.historicum-shop-page .woocommerce-page,
    body.historicum-shop-page .h-shop-page,
    body.historicum-shop-page .h-shop-paper-stack,
    body.historicum-shop-page .h-shop-paper-layout,
    body.historicum-shop-page .h-shop-sections-column,
    body.historicum-shop-page .h-paper-section,
    body.historicum-shop-page .h-paper-content,
    body.historicum-shop-page .h-shop-section-main,
    body.historicum-shop-page .h-shop-section-body,
    body.historicum-shop-page .h-shop-grid-col,
    body.historicum-shop-page .h-shop-section-carousel {
        max-width: 100% !important;
        overflow-x: hidden !important;
    }

    @supports (overflow: clip) {
        body.historicum-shop-page,
        body.historicum-shop-page #page,
        body.historicum-shop-page .site,
        body.historicum-shop-page .site-content,
        body.historicum-shop-page #content,
        body.historicum-shop-page .content-area,
        body.historicum-shop-page #main,
        body.historicum-shop-page .site-main,
        body.historicum-shop-page .woocommerce,
        body.historicum-shop-page .woocommerce-page,
        body.historicum-shop-page .h-shop-page,
        body.historicum-shop-page .h-shop-paper-stack,
        body.historicum-shop-page .h-shop-paper-layout,
        body.historicum-shop-page .h-shop-sections-column,
        body.historicum-shop-page .h-paper-section,
        body.historicum-shop-page .h-paper-content,
        body.historicum-shop-page .h-shop-section-main,
        body.historicum-shop-page .h-shop-section-body,
        body.historicum-shop-page .h-shop-grid-col,
        body.historicum-shop-page .h-shop-section-carousel {
            overflow-x: clip !important;
        }
    }

    body.historicum-shop-page .h-shop-mobile-widgets {
        --h-shop-mobile-widget-surface: var(--h-paper-flat, var(--h-paper, #f5f0e6));
        width: 100% !important;
        max-width: 100% !important;
        margin-right: 0 !important;
        margin-left: 0 !important;
        background: var(--h-shop-mobile-widget-surface) !important;
        background-color: var(--h-shop-mobile-widget-surface) !important;
        background-image: none !important;
    }

    body.historicum-shop-page .h-shop-mobile-widget-content,
    body.historicum-shop-page .h-shop-mobile-widget-paper,
    body.historicum-shop-page .h-shop-mobile-widgets > .h-torn-bottom::after {
        background: var(--h-shop-mobile-widget-surface) !important;
        background-color: var(--h-shop-mobile-widget-surface) !important;
        background-image: none !important;
    }

    body.historicum-shop-page .h-shop-fighter-carousel,
    body.historicum-shop-page .h-shop-hero-carousel .h-bs-carousel,
    body.historicum-shop-page .h-shop-section-carousel,
    body.historicum-shop-page .h-ss-viewport {
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
    }

    body.historicum-shop-page .h-shop-fighter-carousel::-webkit-scrollbar,
    body.historicum-shop-page .h-shop-hero-carousel .h-bs-carousel::-webkit-scrollbar,
    body.historicum-shop-page .h-shop-section-carousel::-webkit-scrollbar,
    body.historicum-shop-page .h-ss-viewport::-webkit-scrollbar {
        display: none !important;
        width: 0 !important;
        height: 0 !important;
    }
}

/* Shop mobile final guard: no sideways scrollbar, widget/rip use the same flat paper. */
@media (max-width: 1399px), (hover: none) and (pointer: coarse) {
    body.historicum-shop-page,
    body.historicum-shop-page #page,
    body.historicum-shop-page .site,
    body.historicum-shop-page .site-content,
    body.historicum-shop-page #content,
    body.historicum-shop-page .content-area,
    body.historicum-shop-page #main,
    body.historicum-shop-page .site-main,
    body.historicum-shop-page .woocommerce,
    body.historicum-shop-page .woocommerce-page,
    body.historicum-shop-page .h-shop-page,
    body.historicum-shop-page .h-shop-paper-stack,
    body.historicum-shop-page .h-shop-paper-layout,
    body.historicum-shop-page .h-shop-sections-column,
    body.historicum-shop-page .h-paper-section,
    body.historicum-shop-page .h-paper-content,
    body.historicum-shop-page .h-shop-section-main,
    body.historicum-shop-page .h-shop-section-body,
    body.historicum-shop-page .h-shop-grid-col,
    body.historicum-shop-page .h-shop-section-carousel {
        max-width: 100% !important;
        overflow-x: hidden !important;
    }

    @supports (overflow: clip) {
        body.historicum-shop-page,
        body.historicum-shop-page #page,
        body.historicum-shop-page .site,
        body.historicum-shop-page .site-content,
        body.historicum-shop-page #content,
        body.historicum-shop-page .content-area,
        body.historicum-shop-page #main,
        body.historicum-shop-page .site-main,
        body.historicum-shop-page .woocommerce,
        body.historicum-shop-page .woocommerce-page,
        body.historicum-shop-page .h-shop-page,
        body.historicum-shop-page .h-shop-paper-stack,
        body.historicum-shop-page .h-shop-paper-layout,
        body.historicum-shop-page .h-shop-sections-column,
        body.historicum-shop-page .h-paper-section,
        body.historicum-shop-page .h-paper-content,
        body.historicum-shop-page .h-shop-section-main,
        body.historicum-shop-page .h-shop-section-body,
        body.historicum-shop-page .h-shop-grid-col,
        body.historicum-shop-page .h-shop-section-carousel {
            overflow-x: clip !important;
        }
    }

    body.historicum-shop-page .h-shop-mobile-widgets {
        --h-shop-mobile-widget-surface: var(--h-paper-flat, var(--h-paper, #f5f0e6));
        width: 100% !important;
        max-width: 100% !important;
        margin-right: 0 !important;
        margin-left: 0 !important;
        background: var(--h-shop-mobile-widget-surface) !important;
        background-color: var(--h-shop-mobile-widget-surface) !important;
        background-image: none !important;
    }

    body.historicum-shop-page .h-shop-mobile-widget-content,
    body.historicum-shop-page .h-shop-mobile-widget-paper,
    body.historicum-shop-page .h-shop-mobile-widgets > .h-torn-bottom::after {
        background: var(--h-shop-mobile-widget-surface) !important;
        background-color: var(--h-shop-mobile-widget-surface) !important;
        background-image: none !important;
    }

    body.historicum-shop-page .h-shop-fighter-carousel,
    body.historicum-shop-page .h-shop-hero-carousel .h-bs-carousel {
        scrollbar-width: none !important;
    }

    body.historicum-shop-page .h-shop-fighter-carousel::-webkit-scrollbar,
    body.historicum-shop-page .h-shop-hero-carousel .h-bs-carousel::-webkit-scrollbar {
        display: none !important;
        width: 0 !important;
        height: 0 !important;
    }
}

@media (max-width: 1399px), (hover: none) and (pointer: coarse) {
    .h-sponsors-track {
        touch-action: auto !important;
        -webkit-overflow-scrolling: touch;
        cursor: grab;
    }

    /* Mobile torn-paper contract: wider rip artwork prevents the paper edge from looking squeezed on narrow screens. */
    .h-torn-edge-top,
    .h-torn-edge-bottom {
        background-size: 273% 100% !important;
        background-position: center center !important;
        -webkit-mask-size: 230% 100% !important;
        mask-size: 230% 100% !important;
    }

    .h-torn-top::after,
    .h-torn-bottom::after,
    body.historicum-shop-page .h-torn-top::after,
    body.historicum-shop-page .h-torn-bottom::after,
    body.historicum-shop-page .h-shop-mobile-widgets .h-torn-bottom::after,
    .h-commerce-paper-section > .h-torn-top::after,
    .h-commerce-paper-section > .h-torn-bottom::after,
    .h-ref-page .h-torn-top::after,
    .h-ref-page .h-torn-bottom::after,
    body.historicum-training-page .h-ref-page .h-ref-paper-section .h-torn-top::after,
    body.historicum-training-page .h-ref-page .h-ref-paper-section .h-torn-bottom::after,
    body.historicum-community-page .h-ref-page .h-ref-paper-section .h-torn-top::after,
    body.historicum-community-page .h-ref-page .h-ref-paper-section .h-torn-bottom::after,
    body.single-product .historicum-product-shell::before,
    body.single-product .historicum-product-shell::after {
        -webkit-mask-size: 323% 100% !important;
        mask-size: 323% 100% !important;
    }
}

@media (min-width: 1400px) and (hover: hover) and (pointer: fine) {
    @supports (overflow: clip) {
        html,
        body,
        #page,
        .site,
        .site-content,
        #content,
        .content-area,
        .entry-content,
        #main,
        .site-main,
        .content-wrapper,
        .page-wrap,
        .historicum-homepage,
        .h-page-wrapper,
        .h-static-page,
        .h-ref-page,
        .h-shop-page,
        .h-product-page,
        .woocommerce,
        .woocommerce-page {
            overflow-x: clip !important;
        }
    }
}

/* Global light-paper edge shading.
   Keep the cream center intact, darken only the outer edges, and paint rip masks with the same surface. */
:root {
    --h-paper-edge-shade: linear-gradient(
        90deg,
        rgba(150, 120, 80, 0.052) 0%,
        rgba(150, 120, 80, 0.026) 8%,
        rgba(150, 120, 80, 0.010) 18%,
        rgba(150, 120, 80, 0) 30%,
        rgba(150, 120, 80, 0) 70%,
        rgba(150, 120, 80, 0.010) 82%,
        rgba(150, 120, 80, 0.026) 92%,
        rgba(150, 120, 80, 0.052) 100%
    );
    --h-paper-side-gradient: var(--h-paper-edge-shade);
    --h-unified-paper-surface:
        var(--h-paper-edge-shade),
        var(--h-paper-flat, var(--h-paper, #f5f0e6));
}

#historicum-home .h-section-paper,
.h-paper-content,
.h-paper-content.h-commerce-paper,
.h-ref-page .h-rip-paper-inner,
.h-ref-page .paper-section,
.h-ref-page .policy-paper,
.h-ref-page .account-paper,
body.historicum-checkout-page .h-checkout-policy-paper,
body.historicum-checkout-page .h-checkout-flow-paper,
body.historicum-contact-page .h-contact-modern-paper,
body.historicum-contact-page .h-contact-modern-section .h-paper-content,
body.historicum-collaborations-page .h-contact-modern-paper,
body.historicum-collaborations-page .h-contact-modern-section .h-paper-content,
body.single-product .historicum-product-shell,
body.single-product .historicum-product-paper {
    background-color: var(--h-paper, var(--hp-paper, #f5f0e6)) !important;
    background-image: var(--h-paper-edge-shade) !important;
    background-repeat: no-repeat !important;
    background-size: 100% 100% !important;
    background-position: center center !important;
    background-blend-mode: multiply !important;
}

#historicum-home .h-torn-edge-top,
#historicum-home .h-torn-edge-bottom {
    background-color: var(--h-paper, #f5f0e6) !important;
    background-image: var(--h-paper-edge-shade) !important;
    background-repeat: no-repeat !important;
    background-size: 100% 100% !important;
    background-position: center center !important;
    background-blend-mode: multiply !important;
}

.h-torn-top::before,
.h-torn-top::after,
.h-torn-bottom::before,
.h-torn-bottom::after,
.h-ref-page .h-torn-top::before,
.h-ref-page .h-torn-top::after,
.h-ref-page .h-torn-bottom::before,
.h-ref-page .h-torn-bottom::after,
.h-commerce-paper-section > .h-torn-top::before,
.h-commerce-paper-section > .h-torn-top::after,
.h-commerce-paper-section > .h-torn-bottom::before,
.h-commerce-paper-section > .h-torn-bottom::after,
.h-paper-content.h-commerce-paper > .h-torn-top::before,
.h-paper-content.h-commerce-paper > .h-torn-top::after,
.h-paper-content.h-commerce-paper > .h-torn-bottom::before,
.h-paper-content.h-commerce-paper > .h-torn-bottom::after,
body.historicum-contact-page .h-contact-modern-section .h-torn-top::before,
body.historicum-contact-page .h-contact-modern-section .h-torn-top::after,
body.historicum-contact-page .h-contact-modern-section .h-torn-bottom::before,
body.historicum-contact-page .h-contact-modern-section .h-torn-bottom::after {
    background-color: var(--h-paper, #f5f0e6) !important;
    background-image: var(--h-paper-edge-shade) !important;
    background-repeat: no-repeat !important;
    background-size: 100% 100% !important;
    background-position: center center !important;
    background-blend-mode: multiply !important;
}

body.single-product .historicum-product-shell::before,
body.single-product .historicum-product-shell::after {
    background-color: var(--hp-paper, #f5f0e6) !important;
    background-image: var(--h-paper-edge-shade) !important;
    background-repeat: no-repeat !important;
    background-size: 100% 100% !important;
    background-position: center center !important;
    background-blend-mode: multiply !important;
}

/* Contact paper seam fix: overlap the bottom torn strip with the paper body by 2px.
   Without this, the masked rip's transparent pixels can reveal the black page background. */
body.historicum-contact-page .h-contact-modern-section .h-torn-bottom {
    margin-top: -2px !important;
}

/* Final popup form color: Fluent Forms ships blue button defaults, so lock the
   mailing-list popup back to the original Historicum accent button. */
.h-newsletter-popup .fluentform .ff-btn,
.h-newsletter-popup .fluentform .ff-btn-submit,
.h-newsletter-popup .fluentform .ff-btn-primary,
.h-newsletter-popup .fluentform button[type="submit"],
.h-newsletter-popup .fluentform input[type="submit"],
.h-newsletter-popup .frm-fluent-form .ff-btn,
.h-newsletter-popup .frm-fluent-form .ff-btn-submit,
.h-newsletter-popup .frm-fluent-form .ff-btn-primary,
.h-newsletter-popup .frm-fluent-form button[type="submit"],
.h-newsletter-popup .frm-fluent-form input[type="submit"] {
    border-color: var(--h-accent, #ebbc00) !important;
    background: var(--h-accent, #ebbc00) !important;
    background-color: var(--h-accent, #ebbc00) !important;
    color: #070705 !important;
    box-shadow: none !important;
}

.h-newsletter-popup .fluentform .ff-btn:hover,
.h-newsletter-popup .fluentform .ff-btn-submit:hover,
.h-newsletter-popup .fluentform .ff-btn-primary:hover,
.h-newsletter-popup .fluentform button[type="submit"]:hover,
.h-newsletter-popup .fluentform input[type="submit"]:hover,
.h-newsletter-popup .frm-fluent-form .ff-btn:hover,
.h-newsletter-popup .frm-fluent-form .ff-btn-submit:hover,
.h-newsletter-popup .frm-fluent-form .ff-btn-primary:hover,
.h-newsletter-popup .frm-fluent-form button[type="submit"]:hover,
.h-newsletter-popup .frm-fluent-form input[type="submit"]:hover {
    border-color: #111111 !important;
    background: #111111 !important;
    background-color: #111111 !important;
    color: #ffffff !important;
}

/* Social and Collaborations use one paper surface across the body and both rips.
   This opts them out of older page-specific rip gradients that split top/body/bottom. */
body.historicum-social-page {
    --h-social-paper-surface: var(--h-unified-paper-surface);
}

body.historicum-social-page .h-ref-page .h-rip-paper-inner,
body.historicum-social-page .h-ref-page .platforms-section {
    background: var(--h-social-paper-surface) !important;
    background-blend-mode: normal !important;
}

body.historicum-social-page .h-ref-page .h-torn-top,
body.historicum-social-page .h-ref-page .h-torn-bottom {
    background: var(--h-social-paper-surface) !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    background-size: 100% 100% !important;
    background-blend-mode: normal !important;
    clip-path: polygon(0 68%, 6% 62%, 12% 70%, 18% 64%, 24% 72%, 30% 66%, 36% 74%, 42% 68%, 48% 76%, 54% 70%, 60% 78%, 66% 71%, 72% 77%, 78% 69%, 84% 75%, 90% 67%, 96% 73%, 100% 70%, 100% 100%, 0 100%) !important;
    -webkit-mask-image: url("https://historicum.pl/wp-content/uploads/2026/04/torn-edge.svg") !important;
    -webkit-mask-repeat: no-repeat !important;
    -webkit-mask-size: 118% 100% !important;
    mask-image: url("https://historicum.pl/wp-content/uploads/2026/04/torn-edge.svg") !important;
    mask-repeat: no-repeat !important;
    mask-size: 118% 100% !important;
}

body.historicum-social-page .h-ref-page .h-torn-top {
    transform: none !important;
    -webkit-mask-position: 48% bottom !important;
    mask-position: 48% bottom !important;
}

body.historicum-social-page .h-ref-page .h-torn-bottom {
    transform: scaleY(-1) !important;
    transform-origin: center !important;
    -webkit-mask-position: 52% top !important;
    mask-position: 52% top !important;
}

body.historicum-social-page .h-ref-page .h-torn-top::before,
body.historicum-social-page .h-ref-page .h-torn-top::after,
body.historicum-social-page .h-ref-page .h-torn-bottom::before,
body.historicum-social-page .h-ref-page .h-torn-bottom::after {
    content: none !important;
    display: none !important;
    background: none !important;
}

body.historicum-collaborations-page {
    --h-collaboration-paper-surface: var(--h-unified-paper-surface);
}

body.historicum-collaborations-page .h-contact-modern-paper,
body.historicum-collaborations-page .h-contact-modern-section .h-paper-content {
    background: var(--h-collaboration-paper-surface) !important;
    background-blend-mode: normal !important;
}

body.historicum-collaborations-page .h-contact-modern-section .h-torn-top,
body.historicum-collaborations-page .h-contact-modern-section .h-torn-bottom {
    background: var(--h-collaboration-paper-surface) !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    background-size: 100% 100% !important;
    background-blend-mode: normal !important;
    clip-path: polygon(0 68%, 6% 62%, 12% 70%, 18% 64%, 24% 72%, 30% 66%, 36% 74%, 42% 68%, 48% 76%, 54% 70%, 60% 78%, 66% 71%, 72% 77%, 78% 69%, 84% 75%, 90% 67%, 96% 73%, 100% 70%, 100% 100%, 0 100%) !important;
    -webkit-mask-image: url("https://historicum.pl/wp-content/uploads/2026/04/torn-edge.svg") !important;
    -webkit-mask-repeat: no-repeat !important;
    -webkit-mask-size: 118% 100% !important;
    mask-image: url("https://historicum.pl/wp-content/uploads/2026/04/torn-edge.svg") !important;
    mask-repeat: no-repeat !important;
    mask-size: 118% 100% !important;
}

body.historicum-collaborations-page .h-contact-modern-section .h-torn-top {
    transform: none !important;
    -webkit-mask-position: 48% bottom !important;
    mask-position: 48% bottom !important;
}

body.historicum-collaborations-page .h-contact-modern-section .h-torn-bottom {
    transform: scaleY(-1) !important;
    transform-origin: center !important;
    -webkit-mask-position: 52% top !important;
    mask-position: 52% top !important;
}

body.historicum-collaborations-page .h-contact-modern-section .h-torn-top::before,
body.historicum-collaborations-page .h-contact-modern-section .h-torn-top::after,
body.historicum-collaborations-page .h-contact-modern-section .h-torn-bottom::before,
body.historicum-collaborations-page .h-contact-modern-section .h-torn-bottom::after {
    content: none !important;
    display: none !important;
    background: none !important;
}

/* Optional second paper-rip variety: direct masked strip.
   This is the strong graphic edge accidentally created during the Social rip pass.
   Add h-rip-variety-cut-strip to a paper section when that sharper style is wanted. */
.h-rip-variety-cut-strip {
    --h-rip-variety-surface:
        var(
            --h-paper-edge-shade,
            linear-gradient(90deg, rgba(0, 0, 0, 0.10), rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, 0) 65%, rgba(0, 0, 0, 0.10))
        ),
        var(--h-paper, #f5f0e6);
}

body.historicum-shop-page .h-rip-variety-cut-strip {
    --h-rip-variety-surface: var(--h-shop-paper-surface);
}

.h-rip-variety-cut-strip > .h-torn-top,
.h-rip-variety-cut-strip > .h-torn-bottom,
#historicum-home .h-rip-variety-cut-strip > .h-torn-edge-top,
#historicum-home .h-rip-variety-cut-strip > .h-torn-edge-bottom,
body.historicum-shop-page .h-rip-variety-cut-strip > .h-torn-top,
body.historicum-shop-page .h-rip-variety-cut-strip > .h-torn-bottom,
body.historicum-shop-page .h-shop-mobile-widgets.h-rip-variety-cut-strip > .h-torn-bottom {
    background:
        var(
            --h-rip-variety-surface,
            var(--h-social-paper-surface, var(--h-collaboration-paper-surface, var(--h-paper, #f5f0e6)))
        ) !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    background-size: 100% 100% !important;
    background-blend-mode: normal !important;
    clip-path: polygon(0 68%, 6% 62%, 12% 70%, 18% 64%, 24% 72%, 30% 66%, 36% 74%, 42% 68%, 48% 76%, 54% 70%, 60% 78%, 66% 71%, 72% 77%, 78% 69%, 84% 75%, 90% 67%, 96% 73%, 100% 70%, 100% 100%, 0 100%) !important;
    -webkit-mask-image: url("https://historicum.pl/wp-content/uploads/2026/04/torn-edge.svg") !important;
    -webkit-mask-repeat: no-repeat !important;
    -webkit-mask-size: 118% 100% !important;
    mask-image: url("https://historicum.pl/wp-content/uploads/2026/04/torn-edge.svg") !important;
    mask-repeat: no-repeat !important;
    mask-size: 118% 100% !important;
}

.h-rip-variety-cut-strip > .h-torn-top,
#historicum-home .h-rip-variety-cut-strip > .h-torn-edge-top,
body.historicum-shop-page .h-rip-variety-cut-strip > .h-torn-top {
    transform: none !important;
    -webkit-mask-position: var(--h-rip-top-offset, var(--h-rip-offset, 48%)) bottom !important;
    mask-position: var(--h-rip-top-offset, var(--h-rip-offset, 48%)) bottom !important;
}

.h-rip-variety-cut-strip > .h-torn-bottom,
#historicum-home .h-rip-variety-cut-strip > .h-torn-edge-bottom,
body.historicum-shop-page .h-rip-variety-cut-strip > .h-torn-bottom,
body.historicum-shop-page .h-shop-mobile-widgets.h-rip-variety-cut-strip > .h-torn-bottom {
    transform: scaleY(-1) !important;
    transform-origin: center !important;
    -webkit-mask-position: var(--h-rip-bottom-offset, var(--h-rip-offset, 52%)) top !important;
    mask-position: var(--h-rip-bottom-offset, var(--h-rip-offset, 52%)) top !important;
}

.h-rip-variety-cut-strip > .h-torn-top::before,
.h-rip-variety-cut-strip > .h-torn-top::after,
.h-rip-variety-cut-strip > .h-torn-bottom::before,
.h-rip-variety-cut-strip > .h-torn-bottom::after,
#historicum-home .h-rip-variety-cut-strip > .h-torn-edge-top::before,
#historicum-home .h-rip-variety-cut-strip > .h-torn-edge-top::after,
#historicum-home .h-rip-variety-cut-strip > .h-torn-edge-bottom::before,
#historicum-home .h-rip-variety-cut-strip > .h-torn-edge-bottom::after,
body.historicum-shop-page .h-rip-variety-cut-strip > .h-torn-top::before,
body.historicum-shop-page .h-rip-variety-cut-strip > .h-torn-top::after,
body.historicum-shop-page .h-rip-variety-cut-strip > .h-torn-bottom::before,
body.historicum-shop-page .h-rip-variety-cut-strip > .h-torn-bottom::after,
body.historicum-shop-page .h-shop-mobile-widgets.h-rip-variety-cut-strip > .h-torn-bottom::before,
body.historicum-shop-page .h-shop-mobile-widgets.h-rip-variety-cut-strip > .h-torn-bottom::after {
    content: none !important;
    display: none !important;
}

body.historicum-cart-page,
body.historicum-checkout-page,
body.woocommerce-cart,
body.woocommerce-checkout {
    --h-commerce-paper-surface: var(--h-unified-paper-surface);
    --h-commerce-rip-height: 62px;
    --h-commerce-rip-overlap: 2px;
}

body.historicum-shop-page {
    --h-shop-paper-surface:
        var(--h-paper-edge-shade),
        var(--h-paper-flat, var(--h-paper, #f5f0e6));
}

body.historicum-shop-page .h-paper-content,
body.historicum-shop-page .h-shop-section-main,
body.historicum-shop-page .h-shop-widget,
body.historicum-shop-page .h-shop-mobile-widget-content {
    background: var(--h-shop-paper-surface) !important;
    background-color: var(--h-paper-flat, var(--h-paper, #f5f0e6)) !important;
    background-repeat: no-repeat !important;
    background-size: 100% 100% !important;
    background-position: center center !important;
    background-blend-mode: multiply !important;
}

body.historicum-cart-page .h-paper-content.h-commerce-paper,
body.historicum-checkout-page .h-paper-content.h-commerce-paper,
body.historicum-checkout-page .h-checkout-policy-paper,
body.historicum-checkout-page .h-checkout-flow-paper,
body.woocommerce-cart .h-paper-content.h-commerce-paper,
body.woocommerce-checkout .h-paper-content.h-commerce-paper {
    background: var(--h-commerce-paper-surface) !important;
    background-color: var(--h-paper, #f5f0e6) !important;
    background-repeat: no-repeat !important;
    background-size: 100% 100% !important;
    background-position: center center !important;
    background-blend-mode: normal !important;
}

body.historicum-cart-page .h-paper-section > .h-torn-top,
body.historicum-cart-page .h-paper-section > .h-torn-bottom,
body.historicum-checkout-page .h-commerce-paper-section > .h-torn-top,
body.historicum-checkout-page .h-commerce-paper-section > .h-torn-bottom,
body.historicum-checkout-page .h-paper-content.h-commerce-paper > .h-torn-top,
body.historicum-checkout-page .h-paper-content.h-commerce-paper > .h-torn-bottom,
body.woocommerce-cart .h-paper-section > .h-torn-top,
body.woocommerce-cart .h-paper-section > .h-torn-bottom,
body.woocommerce-checkout .h-commerce-paper-section > .h-torn-top,
body.woocommerce-checkout .h-commerce-paper-section > .h-torn-bottom,
body.woocommerce-checkout .h-paper-content.h-commerce-paper > .h-torn-top,
body.woocommerce-checkout .h-paper-content.h-commerce-paper > .h-torn-bottom {
    background: var(--h-commerce-paper-surface) !important;
    background-color: var(--h-paper, #f5f0e6) !important;
    background-repeat: no-repeat !important;
    background-size: 100% 100% !important;
    background-position: center center !important;
    background-blend-mode: normal !important;
    clip-path: polygon(0 68%, 6% 62%, 12% 70%, 18% 64%, 24% 72%, 30% 66%, 36% 74%, 42% 68%, 48% 76%, 54% 70%, 60% 78%, 66% 71%, 72% 77%, 78% 69%, 84% 75%, 90% 67%, 96% 73%, 100% 70%, 100% 100%, 0 100%) !important;
    -webkit-mask-image: url("https://historicum.pl/wp-content/uploads/2026/04/torn-edge.svg") !important;
    -webkit-mask-repeat: no-repeat !important;
    -webkit-mask-size: 118% 100% !important;
    mask-image: url("https://historicum.pl/wp-content/uploads/2026/04/torn-edge.svg") !important;
    mask-repeat: no-repeat !important;
    mask-size: 118% 100% !important;
}

body.historicum-cart-page .h-paper-section > .h-torn-top,
body.historicum-checkout-page .h-commerce-paper-section > .h-torn-top,
body.historicum-checkout-page .h-paper-content.h-commerce-paper > .h-torn-top,
body.woocommerce-cart .h-paper-section > .h-torn-top,
body.woocommerce-checkout .h-commerce-paper-section > .h-torn-top,
body.woocommerce-checkout .h-paper-content.h-commerce-paper > .h-torn-top {
    transform: none !important;
    -webkit-mask-position: 48% bottom !important;
    mask-position: 48% bottom !important;
}

body.historicum-cart-page .h-paper-section > .h-torn-bottom,
body.historicum-checkout-page .h-commerce-paper-section > .h-torn-bottom,
body.historicum-checkout-page .h-paper-content.h-commerce-paper > .h-torn-bottom,
body.woocommerce-cart .h-paper-section > .h-torn-bottom,
body.woocommerce-checkout .h-commerce-paper-section > .h-torn-bottom,
body.woocommerce-checkout .h-paper-content.h-commerce-paper > .h-torn-bottom {
    transform: scaleY(-1) !important;
    transform-origin: center !important;
    -webkit-mask-position: 52% top !important;
    mask-position: 52% top !important;
}

body.historicum-cart-page .h-paper-section > .h-torn-top::before,
body.historicum-cart-page .h-paper-section > .h-torn-top::after,
body.historicum-cart-page .h-paper-section > .h-torn-bottom::before,
body.historicum-cart-page .h-paper-section > .h-torn-bottom::after,
body.historicum-checkout-page .h-commerce-paper-section > .h-torn-top::before,
body.historicum-checkout-page .h-commerce-paper-section > .h-torn-top::after,
body.historicum-checkout-page .h-commerce-paper-section > .h-torn-bottom::before,
body.historicum-checkout-page .h-commerce-paper-section > .h-torn-bottom::after,
body.historicum-checkout-page .h-paper-content.h-commerce-paper > .h-torn-top::before,
body.historicum-checkout-page .h-paper-content.h-commerce-paper > .h-torn-top::after,
body.historicum-checkout-page .h-paper-content.h-commerce-paper > .h-torn-bottom::before,
body.historicum-checkout-page .h-paper-content.h-commerce-paper > .h-torn-bottom::after,
body.woocommerce-cart .h-paper-section > .h-torn-top::before,
body.woocommerce-cart .h-paper-section > .h-torn-top::after,
body.woocommerce-cart .h-paper-section > .h-torn-bottom::before,
body.woocommerce-cart .h-paper-section > .h-torn-bottom::after,
body.woocommerce-checkout .h-commerce-paper-section > .h-torn-top::before,
body.woocommerce-checkout .h-commerce-paper-section > .h-torn-top::after,
body.woocommerce-checkout .h-commerce-paper-section > .h-torn-bottom::before,
body.woocommerce-checkout .h-commerce-paper-section > .h-torn-bottom::after,
body.woocommerce-checkout .h-paper-content.h-commerce-paper > .h-torn-top::before,
body.woocommerce-checkout .h-paper-content.h-commerce-paper > .h-torn-top::after,
body.woocommerce-checkout .h-paper-content.h-commerce-paper > .h-torn-bottom::before,
body.woocommerce-checkout .h-paper-content.h-commerce-paper > .h-torn-bottom::after {
    content: none !important;
    display: none !important;
    background: none !important;
}

body.historicum-cart-page .h-commerce-paper-section > .h-torn-top,
body.historicum-cart-page .h-commerce-paper-section > .h-torn-bottom,
body.historicum-checkout-page .h-commerce-paper-section > .h-torn-top,
body.historicum-checkout-page .h-commerce-paper-section > .h-torn-bottom,
body.historicum-checkout-page .h-paper-content.h-commerce-paper > .h-torn-top,
body.historicum-checkout-page .h-paper-content.h-commerce-paper > .h-torn-bottom,
body.woocommerce-cart .h-commerce-paper-section > .h-torn-top,
body.woocommerce-cart .h-commerce-paper-section > .h-torn-bottom,
body.woocommerce-checkout .h-commerce-paper-section > .h-torn-top,
body.woocommerce-checkout .h-commerce-paper-section > .h-torn-bottom,
body.woocommerce-checkout .h-paper-content.h-commerce-paper > .h-torn-top,
body.woocommerce-checkout .h-paper-content.h-commerce-paper > .h-torn-bottom {
    height: var(--h-commerce-rip-height) !important;
}

body.historicum-cart-page .h-commerce-paper-section > .h-torn-top,
body.historicum-checkout-page .h-commerce-paper-section > .h-torn-top,
body.historicum-checkout-page .h-paper-content.h-commerce-paper > .h-torn-top,
body.woocommerce-cart .h-commerce-paper-section > .h-torn-top,
body.woocommerce-checkout .h-commerce-paper-section > .h-torn-top,
body.woocommerce-checkout .h-paper-content.h-commerce-paper > .h-torn-top {
    top: calc((var(--h-commerce-rip-height) - var(--h-commerce-rip-overlap)) * -1) !important;
}

body.historicum-cart-page .h-commerce-paper-section > .h-torn-bottom,
body.historicum-checkout-page .h-commerce-paper-section > .h-torn-bottom,
body.historicum-checkout-page .h-paper-content.h-commerce-paper > .h-torn-bottom,
body.woocommerce-cart .h-commerce-paper-section > .h-torn-bottom,
body.woocommerce-checkout .h-commerce-paper-section > .h-torn-bottom,
body.woocommerce-checkout .h-paper-content.h-commerce-paper > .h-torn-bottom {
    bottom: calc((var(--h-commerce-rip-height) - var(--h-commerce-rip-overlap)) * -1) !important;
}

body.historicum-cart-page .h-commerce-recommendations > .h-torn-bottom,
body.woocommerce-cart .h-commerce-recommendations > .h-torn-bottom {
    margin-top: calc(var(--h-commerce-rip-overlap) * -1) !important;
}

@media (max-width: 1399px), (hover: none) and (pointer: coarse) {
    body.historicum-cart-page,
    body.historicum-checkout-page,
    body.woocommerce-cart,
    body.woocommerce-checkout {
        --h-commerce-rip-height: 48px;
    }

    body.historicum-checkout-page .h-checkout-paper-section,
    body.woocommerce-checkout .h-checkout-paper-section {
        box-sizing: border-box !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-right: 0 !important;
        margin-left: 0 !important;
        padding-right: 0 !important;
        padding-left: 0 !important;
        overflow: visible !important;
    }

    body.historicum-checkout-page .h-checkout-policy-paper,
    body.historicum-checkout-page .h-checkout-flow-paper,
    body.woocommerce-checkout .h-checkout-policy-paper,
    body.woocommerce-checkout .h-checkout-flow-paper {
        box-sizing: border-box !important;
        width: 100% !important;
        max-width: none !important;
        margin-right: 0 !important;
        margin-left: 0 !important;
        border-right: 0 !important;
        border-left: 0 !important;
    }

    body.historicum-checkout-page .h-checkout-policy-paper > .h-torn-top,
    body.historicum-checkout-page .h-checkout-policy-paper > .h-torn-bottom,
    body.historicum-checkout-page .h-checkout-flow-paper > .h-torn-top,
    body.historicum-checkout-page .h-checkout-flow-paper > .h-torn-bottom,
    body.woocommerce-checkout .h-checkout-policy-paper > .h-torn-top,
    body.woocommerce-checkout .h-checkout-policy-paper > .h-torn-bottom,
    body.woocommerce-checkout .h-checkout-flow-paper > .h-torn-top,
    body.woocommerce-checkout .h-checkout-flow-paper > .h-torn-bottom {
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: none !important;
        margin-right: 0 !important;
        margin-left: 0 !important;
    }
}

/* Shop rip alignment: vertical overlap seals the join without shifting the strip sideways. */
body.historicum-shop-page .h-rip-variety-cut-strip > .h-torn-top,
body.historicum-shop-page .h-rip-variety-cut-strip > .h-torn-bottom,
body.historicum-shop-page .h-shop-mobile-widgets.h-rip-variety-cut-strip > .h-torn-bottom {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

body.historicum-shop-page .h-rip-variety-cut-strip > .h-torn-top {
    margin-bottom: -1px !important;
}

body.historicum-shop-page .h-rip-variety-cut-strip > .h-torn-bottom,
body.historicum-shop-page .h-shop-mobile-widgets.h-rip-variety-cut-strip > .h-torn-bottom {
    margin-top: -1px !important;
}

@media (max-width: 1399px), (hover: none) and (pointer: coarse) {
    body.historicum-shop-page .h-shop-mobile-widgets.h-rip-variety-cut-strip > .h-torn-bottom {
        display: block !important;
        position: relative !important;
        height: var(--h-shop-shared-rip-height, 60px) !important;
        margin: 0 !important;
        overflow: hidden !important;
        background: transparent !important;
        background-image: none !important;
        clip-path: none !important;
        -webkit-mask-image: none !important;
        mask-image: none !important;
        transform: none !important;
    }

    body.historicum-shop-page .h-shop-mobile-widgets.h-rip-variety-cut-strip > .h-torn-bottom::before {
        content: none !important;
        display: none !important;
        opacity: 0 !important;
    }

    body.historicum-shop-page .h-shop-mobile-widgets.h-rip-variety-cut-strip > .h-torn-bottom::after {
        content: "" !important;
        display: block !important;
        position: absolute !important;
        inset: 0 !important;
        opacity: 1 !important;
        background: var(--h-paper-flat, var(--h-paper, #f5f0e6)) !important;
        background-color: var(--h-paper-flat, var(--h-paper, #f5f0e6)) !important;
        background-image: none !important;
        -webkit-mask-image: url("https://historicum.pl/wp-content/uploads/2026/04/torn-edge.svg") !important;
        -webkit-mask-size: 112% 100% !important;
        -webkit-mask-repeat: no-repeat !important;
        -webkit-mask-position: var(--h-rip-offset, 62%) top !important;
        mask-image: url("https://historicum.pl/wp-content/uploads/2026/04/torn-edge.svg") !important;
        mask-size: 112% 100% !important;
        mask-repeat: no-repeat !important;
        mask-position: var(--h-rip-offset, 62%) top !important;
        transform: scaleY(-1) !important;
        transform-origin: center !important;
    }
}

/* Final purchase-flow vertical contract: cart and checkout start at the same paper height. */
body.historicum-cart-page,
body.historicum-checkout-page,
body.woocommerce-cart,
body.woocommerce-checkout {
    --h-purchase-paper-top-offset: clamp(120px, 14vh, 180px);
}

body.historicum-cart-page.historicum-cart-filled-page .h-med-cart-form > .h-commerce-paper-section,
body.historicum-cart-page.historicum-cart-empty-page .h-cart-empty-section,
body.historicum-checkout-page .h-checkout-paper-section,
body.woocommerce-checkout .h-checkout-paper-section {
    margin-top: var(--h-purchase-paper-top-offset) !important;
    padding-top: 0 !important;
}

@media (max-width: 768px) {
    body.historicum-cart-page,
    body.historicum-checkout-page,
    body.woocommerce-cart,
    body.woocommerce-checkout {
        --h-purchase-paper-top-offset: clamp(120px, 14vh, 180px);
    }
}

/* Final order-received endpoint contract: same paper geometry as cart/checkout. */
body.woocommerce-order-received {
    --h-commerce-paper-surface: var(--h-unified-paper-surface);
    --h-commerce-rip-height: 62px;
    --h-commerce-rip-overlap: 2px;
    --h-purchase-paper-top-offset: clamp(120px, 14vh, 180px);
    --h-purchase-flow-top-padding: clamp(34px, 4.8vw, 72px);
}

body.woocommerce-order-received .h-checkout-paper-section {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-top: var(--h-purchase-paper-top-offset) !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
    padding-top: 0 !important;
    overflow: visible !important;
    background: transparent !important;
}

body.woocommerce-order-received .h-checkout-policy-paper,
body.woocommerce-order-received .h-checkout-flow-paper,
body.woocommerce-order-received .h-paper-content.h-commerce-paper {
    box-sizing: border-box !important;
    position: relative !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding-top: var(--h-purchase-flow-top-padding) !important;
    border-right: 0 !important;
    border-left: 0 !important;
    overflow: visible !important;
    background: var(--h-commerce-paper-surface) !important;
    background-color: var(--h-paper, #f5f0e6) !important;
    background-repeat: no-repeat !important;
    background-size: 100% 100% !important;
    background-position: center center !important;
    background-blend-mode: normal !important;
}

body.woocommerce-order-received .h-checkout-flow-paper > .h-torn-top,
body.woocommerce-order-received .h-checkout-flow-paper > .h-torn-bottom,
body.woocommerce-order-received .h-paper-content.h-commerce-paper > .h-torn-top,
body.woocommerce-order-received .h-paper-content.h-commerce-paper > .h-torn-bottom {
    display: block !important;
    position: absolute !important;
    right: 0 !important;
    left: 0 !important;
    z-index: 4 !important;
    width: 100% !important;
    height: var(--h-commerce-rip-height) !important;
    margin: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    background: var(--h-commerce-paper-surface) !important;
    background-color: var(--h-paper, #f5f0e6) !important;
    background-repeat: no-repeat !important;
    background-size: 100% 100% !important;
    background-position: center center !important;
    background-blend-mode: normal !important;
    clip-path: polygon(0 68%, 6% 62%, 12% 70%, 18% 64%, 24% 72%, 30% 66%, 36% 74%, 42% 68%, 48% 76%, 54% 70%, 60% 78%, 66% 71%, 72% 77%, 78% 69%, 84% 75%, 90% 67%, 96% 73%, 100% 70%, 100% 100%, 0 100%) !important;
    -webkit-mask-image: url("https://historicum.pl/wp-content/uploads/2026/04/torn-edge.svg") !important;
    -webkit-mask-repeat: no-repeat !important;
    -webkit-mask-size: 118% 100% !important;
    mask-image: url("https://historicum.pl/wp-content/uploads/2026/04/torn-edge.svg") !important;
    mask-repeat: no-repeat !important;
    mask-size: 118% 100% !important;
}

body.woocommerce-order-received .h-checkout-flow-paper > .h-torn-top,
body.woocommerce-order-received .h-paper-content.h-commerce-paper > .h-torn-top {
    top: calc((var(--h-commerce-rip-height) - var(--h-commerce-rip-overlap)) * -1) !important;
    transform: none !important;
    -webkit-mask-position: 48% bottom !important;
    mask-position: 48% bottom !important;
}

body.woocommerce-order-received .h-checkout-flow-paper > .h-torn-bottom,
body.woocommerce-order-received .h-paper-content.h-commerce-paper > .h-torn-bottom {
    bottom: calc((var(--h-commerce-rip-height) - var(--h-commerce-rip-overlap)) * -1) !important;
    transform: scaleY(-1) !important;
    transform-origin: center !important;
    -webkit-mask-position: 52% top !important;
    mask-position: 52% top !important;
}

body.woocommerce-order-received .h-checkout-flow-paper > .h-torn-top::before,
body.woocommerce-order-received .h-checkout-flow-paper > .h-torn-top::after,
body.woocommerce-order-received .h-checkout-flow-paper > .h-torn-bottom::before,
body.woocommerce-order-received .h-checkout-flow-paper > .h-torn-bottom::after,
body.woocommerce-order-received .h-paper-content.h-commerce-paper > .h-torn-top::before,
body.woocommerce-order-received .h-paper-content.h-commerce-paper > .h-torn-top::after,
body.woocommerce-order-received .h-paper-content.h-commerce-paper > .h-torn-bottom::before,
body.woocommerce-order-received .h-paper-content.h-commerce-paper > .h-torn-bottom::after {
    content: none !important;
    display: none !important;
    background: none !important;
}

@media (max-width: 1399px), (hover: none) and (pointer: coarse) {
    body.woocommerce-order-received {
        --h-commerce-rip-height: 48px;
    }
}

@media (max-width: 768px) {
    body.woocommerce-order-received {
        --h-purchase-paper-top-offset: clamp(120px, 14vh, 180px);
        --h-purchase-flow-top-padding: 22px;
    }
}

/* Mobile received endpoint: keep the top rip attached to the paper body. */
@media (max-width: 768px) {
    body.historicum-order-received-page,
    body.woocommerce-order-received {
        --h-commerce-rip-height: 48px;
        --h-commerce-rip-overlap: 2px;
        --h-purchase-paper-top-offset: clamp(120px, 14vh, 180px);
        --h-purchase-flow-top-padding: 22px;
    }

    body.historicum-order-received-page .h-checkout-paper-section,
    body.woocommerce-order-received .h-checkout-paper-section {
        margin-top: var(--h-purchase-paper-top-offset) !important;
        padding-top: 0 !important;
        overflow: visible !important;
    }

    body.historicum-order-received-page .h-checkout-flow-paper,
    body.woocommerce-order-received .h-checkout-flow-paper {
        position: relative !important;
        overflow: visible !important;
        padding-top: var(--h-purchase-flow-top-padding) !important;
    }

    body.historicum-order-received-page .h-checkout-flow-paper > .h-torn-top,
    body.woocommerce-order-received .h-checkout-flow-paper > .h-torn-top {
        position: relative !important;
        top: auto !important;
        bottom: auto !important;
        left: 0 !important;
        right: auto !important;
        display: block !important;
        width: 100% !important;
        height: var(--h-commerce-rip-height) !important;
        margin-top: calc((var(--h-commerce-rip-height) + var(--h-purchase-flow-top-padding) - var(--h-commerce-rip-overlap)) * -1) !important;
        margin-right: 0 !important;
        margin-bottom: calc((var(--h-commerce-rip-height) - var(--h-commerce-rip-overlap)) * -1) !important;
        margin-left: 0 !important;
        transform: none !important;
    }

    body.historicum-order-received-page:not(.historicum-order-failed-page) .h-commerce-progress .h-progress-step-payment,
    body.woocommerce-order-received:not(.historicum-order-failed-page) .h-commerce-progress .h-progress-step-payment {
        color: #4b453b !important;
        opacity: 0.62 !important;
    }

    body.historicum-order-received-page:not(.historicum-order-failed-page) .h-commerce-progress .h-progress-step-payment::before,
    body.woocommerce-order-received:not(.historicum-order-failed-page) .h-commerce-progress .h-progress-step-payment::before {
        border-color: rgba(17, 17, 17, 0.34) !important;
        background: transparent !important;
        color: currentColor !important;
    }

    body.historicum-order-received-page:not(.historicum-order-failed-page) .h-commerce-progress .h-progress-step-received,
    body.woocommerce-order-received:not(.historicum-order-failed-page) .h-commerce-progress .h-progress-step-received {
        color: #0a0a0a !important;
        opacity: 1 !important;
    }

    body.historicum-order-received-page:not(.historicum-order-failed-page) .h-commerce-progress .h-progress-step-received::before,
    body.woocommerce-order-received:not(.historicum-order-failed-page) .h-commerce-progress .h-progress-step-received::before {
        border-color: var(--h-accent, #ebbc00) !important;
        background: var(--h-accent, #ebbc00) !important;
        color: #0a0a0a !important;
    }
}

/* Cart secondary action and mobile recommendations carousel. */
body.historicum-cart-page .h-cart-continue-shopping,
body.historicum-cart-page .h-cart-summary-continue,
body.historicum-cart-page .h-cart-after-recs-actions .h-btn[href*="shop"] {
    border-color: rgba(17, 17, 17, 0.36) !important;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    color: #5b5245 !important;
}

body.historicum-cart-page .h-cart-continue-shopping:hover,
body.historicum-cart-page .h-cart-continue-shopping:focus-visible,
body.historicum-cart-page .h-cart-summary-continue:hover,
body.historicum-cart-page .h-cart-summary-continue:focus-visible,
body.historicum-cart-page .h-cart-after-recs-actions .h-btn[href*="shop"]:hover,
body.historicum-cart-page .h-cart-after-recs-actions .h-btn[href*="shop"]:focus-visible {
    border-color: rgba(17, 17, 17, 0.58) !important;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    color: #111111 !important;
}

body.historicum-cart-page .h-commerce-recommendations,
body.historicum-cart-page .h-commerce-recommendations .h-commerce-paper,
body.historicum-cart-page .h-commerce-rec-grid,
body.historicum-cart-page .h-commerce-rec-grid .h-bs-slide {
    overflow: visible !important;
}

body.historicum-cart-page .h-commerce-recommendations .h-commerce-rec-grid {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
}

@media (max-width: 768px) {
    body.historicum-cart-page .h-commerce-rec-grid {
        display: grid !important;
        grid-auto-flow: row !important;
        grid-auto-columns: auto !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 14px !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        padding: 2px 0 8px !important;
        overflow-x: visible !important;
        overflow-y: visible !important;
        overscroll-behavior-x: auto !important;
        scroll-padding-left: 0 !important;
        scroll-snap-type: none !important;
        scrollbar-width: auto !important;
        -ms-overflow-style: auto !important;
        -webkit-overflow-scrolling: auto !important;
        touch-action: pan-x pan-y !important;
    }

    body.historicum-cart-page .h-commerce-rec-grid::-webkit-scrollbar {
        display: none !important;
        width: 0 !important;
        height: 0 !important;
    }

    body.historicum-cart-page .h-commerce-rec-grid .h-bs-slide {
        min-width: 0 !important;
        max-width: 100% !important;
        scroll-snap-align: none !important;
        scroll-snap-stop: normal !important;
    }

    body.historicum-cart-page .h-commerce-rec-grid .h-bs-card {
        height: 100% !important;
        max-width: 100% !important;
        box-shadow: none !important;
        filter: none !important;
    }
}

/* Final purchase-flow notices: real Woo notices and the custom cart status are
   viewport toasts, never paper children that can slide under a torn edge. */
body.historicum-cart-page .h-commerce-notices,
body.historicum-cart-page .woocommerce-notices-wrapper,
body.historicum-checkout-page .h-commerce-notices {
    position: fixed !important;
    top: calc(var(--wp-admin--admin-bar--height, 0px) + 104px) !important;
    right: max(16px, env(safe-area-inset-right)) !important;
    left: auto !important;
    z-index: 2147483000 !important;
    display: grid !important;
    gap: 8px !important;
    width: min(330px, calc(100vw - 32px)) !important;
    max-width: min(330px, calc(100vw - 32px)) !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    isolation: isolate !important;
    pointer-events: none !important;
    transform: translateZ(0) !important;
}

body.historicum-cart-page .h-commerce-notices:empty,
body.historicum-cart-page .woocommerce-notices-wrapper:empty,
body.historicum-checkout-page .h-commerce-notices:empty,
body.historicum-cart-page .h-commerce-notices .woocommerce-notices-wrapper:empty,
body.historicum-checkout-page .h-commerce-notices .woocommerce-notices-wrapper:empty {
    display: none !important;
}

body.historicum-cart-page .h-commerce-notices :is(.woocommerce-error, .woocommerce-message, .woocommerce-info),
body.historicum-cart-page .woocommerce-notices-wrapper :is(.woocommerce-error, .woocommerce-message, .woocommerce-info),
body.historicum-cart-page .woocommerce-notices-wrapper > :is(.woocommerce-error, .woocommerce-message, .woocommerce-info),
body.historicum-checkout-page .h-commerce-notices :is(.woocommerce-error, .woocommerce-message, .woocommerce-info),
body.historicum-cart-page .h-commerce-notices > :is(.woocommerce-error, .woocommerce-message, .woocommerce-info),
body.historicum-checkout-page .h-commerce-notices > :is(.woocommerce-error, .woocommerce-message, .woocommerce-info) {
    position: relative !important;
    z-index: 1 !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 10px 13px !important;
    border: 1px solid rgba(17, 17, 17, 0.24) !important;
    border-left: 3px solid #2f7d3d !important;
    border-radius: 7px !important;
    background: rgba(245, 240, 230, 0.98) !important;
    background-color: rgba(245, 240, 230, 0.98) !important;
    background-image: none !important;
    color: #201b14 !important;
    font-family: var(--h-commerce-data-font, var(--h-font-instrument, Arial, sans-serif)) !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    letter-spacing: 0 !important;
    line-height: 1.35 !important;
    text-transform: none !important;
    list-style: none !important;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2) !important;
    pointer-events: auto !important;
    clip-path: none !important;
    transform: none !important;
}

body.historicum-cart-page .h-commerce-notices :is(.woocommerce-error),
body.historicum-cart-page .woocommerce-notices-wrapper :is(.woocommerce-error),
body.historicum-checkout-page .h-commerce-notices :is(.woocommerce-error) {
    border-left-color: #b8322a !important;
}

body.historicum-cart-page .h-commerce-notices :is(.woocommerce-info),
body.historicum-cart-page .woocommerce-notices-wrapper :is(.woocommerce-info),
body.historicum-checkout-page .h-commerce-notices :is(.woocommerce-info) {
    border-left-color: #8a6d1d !important;
}

body.historicum-cart-page .h-commerce-notices :is(.woocommerce-error, .woocommerce-message, .woocommerce-info)::before,
body.historicum-cart-page .woocommerce-notices-wrapper :is(.woocommerce-error, .woocommerce-message, .woocommerce-info)::before,
body.historicum-checkout-page .h-commerce-notices :is(.woocommerce-error, .woocommerce-message, .woocommerce-info)::before {
    display: none !important;
    content: none !important;
}

body.historicum-cart-page .h-commerce-notices :is(.button, a),
body.historicum-cart-page .woocommerce-notices-wrapper :is(.button, a),
body.historicum-checkout-page .h-commerce-notices :is(.button, a) {
    display: inline !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: #111111 !important;
    font: inherit !important;
    font-weight: 500 !important;
    text-decoration: underline !important;
    text-underline-offset: 3px !important;
    box-shadow: none !important;
}

body.historicum-cart-page .h-cart-status[hidden] {
    display: none !important;
}

body.historicum-cart-page .h-cart-status.hp-cart-toast {
    position: fixed !important;
    top: var(--hp-cart-toast-top, 92px) !important;
    right: var(--hp-cart-toast-right, 28px) !important;
    left: auto !important;
    z-index: 2147483000 !important;
    display: grid !important;
    width: min(340px, calc(100vw - 32px)) !important;
    max-width: min(340px, calc(100vw - 32px)) !important;
    gap: 7px !important;
    margin: 0 !important;
    padding: 15px 18px 16px !important;
    border: 1px solid rgba(235, 188, 0, 0.52) !important;
    border-radius: 12px !important;
    background: rgba(5, 6, 4, 0.94) !important;
    background-color: rgba(5, 6, 4, 0.94) !important;
    background-image: none !important;
    color: #f5f0e6 !important;
    cursor: default !important;
    text-decoration: none !important;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.42) !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateY(-8px) scale(0.98) !important;
    transform-origin: top right !important;
    transition: opacity 0.22s ease, transform 0.22s ease !important;
    clip-path: none !important;
    isolation: isolate !important;
}

body.historicum-cart-page .h-cart-status.hp-cart-toast.is-visible {
    opacity: 1 !important;
    transform: translateY(0) scale(1) !important;
}

body.historicum-cart-page .h-cart-status.hp-cart-toast::before {
    content: "" !important;
    position: absolute !important;
    top: -7px !important;
    right: 22px !important;
    width: 12px !important;
    height: 12px !important;
    border-top: 1px solid rgba(235, 188, 0, 0.52) !important;
    border-left: 1px solid rgba(235, 188, 0, 0.52) !important;
    background: rgba(5, 6, 4, 0.94) !important;
    transform: rotate(45deg) !important;
}

body.historicum-cart-page .h-cart-status.hp-cart-toast strong {
    color: var(--hp-accent, var(--h-accent, #ebbc00)) !important;
    font-family: var(--h-font-cinzel) !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    letter-spacing: 0.08em !important;
    line-height: 1.2 !important;
    text-transform: uppercase !important;
}

body.historicum-cart-page .h-cart-status.hp-cart-toast span {
    color: #f5f0e6 !important;
    font-family: var(--h-font-cormorant) !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    letter-spacing: 0 !important;
    line-height: 1.35 !important;
    text-transform: none !important;
}

@media (max-width: 768px) {
    body.historicum-cart-page .h-commerce-notices,
    body.historicum-cart-page .woocommerce-notices-wrapper,
    body.historicum-checkout-page .h-commerce-notices {
        top: calc(var(--wp-admin--admin-bar--height, 0px) + 86px) !important;
        right: max(12px, env(safe-area-inset-right)) !important;
        width: min(300px, calc(100vw - 24px)) !important;
        max-width: min(300px, calc(100vw - 24px)) !important;
    }

    body.historicum-cart-page .h-cart-status.hp-cart-toast {
        top: var(--hp-cart-toast-top, 82px) !important;
        right: max(12px, env(safe-area-inset-right)) !important;
        width: min(300px, calc(100vw - 24px)) !important;
        max-width: min(300px, calc(100vw - 24px)) !important;
    }
}

@media (max-width: 1399px), (hover: none) and (pointer: coarse) {
    body.historicum-shop-page .h-shop-mobile-widgets > .h-torn-bottom {
        display: block !important;
        position: relative !important;
        height: var(--h-shop-shared-rip-height, 60px) !important;
        margin: 0 !important;
        overflow: hidden !important;
        background: transparent !important;
        background-image: none !important;
        clip-path: none !important;
        -webkit-mask-image: none !important;
        mask-image: none !important;
        transform: none !important;
    }

    body.historicum-shop-page .h-shop-mobile-widgets > .h-torn-bottom::before {
        content: none !important;
        display: none !important;
        opacity: 0 !important;
    }

    body.historicum-shop-page .h-shop-mobile-widgets > .h-torn-bottom::after {
        content: "" !important;
        display: block !important;
        position: absolute !important;
        inset: 0 !important;
        opacity: 1 !important;
        background: var(--h-paper-flat, var(--h-paper, #f5f0e6)) !important;
        background-color: var(--h-paper-flat, var(--h-paper, #f5f0e6)) !important;
        background-image: none !important;
        -webkit-mask-image: url("https://historicum.pl/wp-content/uploads/2026/04/torn-edge.svg") !important;
        -webkit-mask-size: 112% 100% !important;
        -webkit-mask-repeat: no-repeat !important;
        -webkit-mask-position: var(--h-rip-offset, 62%) top !important;
        mask-image: url("https://historicum.pl/wp-content/uploads/2026/04/torn-edge.svg") !important;
        mask-size: 112% 100% !important;
        mask-repeat: no-repeat !important;
        mask-position: var(--h-rip-offset, 62%) top !important;
        transform: scaleY(-1) !important;
        transform-origin: center !important;
    }

    body.historicum-shop-page .h-shop-fighter-carousel,
    body.historicum-shop-page .h-shop-hero-carousel .h-bs-carousel,
    body.historicum-shop-page .h-shop-section-carousel,
    body.historicum-shop-page .h-ss-viewport {
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
    }

    body.historicum-shop-page .h-shop-fighter-carousel::-webkit-scrollbar,
    body.historicum-shop-page .h-shop-hero-carousel .h-bs-carousel::-webkit-scrollbar,
    body.historicum-shop-page .h-shop-section-carousel::-webkit-scrollbar,
    body.historicum-shop-page .h-ss-viewport::-webkit-scrollbar {
        display: none !important;
        width: 0 !important;
        height: 0 !important;
    }
}

@media (max-width: 1399px), (hover: none) and (pointer: coarse) {
    body.historicum-shop-page,
    body.historicum-shop-page #page,
    body.historicum-shop-page .site,
    body.historicum-shop-page .site-content,
    body.historicum-shop-page #content,
    body.historicum-shop-page .content-area,
    body.historicum-shop-page #main,
    body.historicum-shop-page .site-main,
    body.historicum-shop-page .woocommerce,
    body.historicum-shop-page .woocommerce-page,
    body.historicum-shop-page .h-shop-page,
    body.historicum-shop-page .h-shop-paper-stack,
    body.historicum-shop-page .h-shop-paper-layout,
    body.historicum-shop-page .h-shop-sections-column,
    body.historicum-shop-page .h-paper-section,
    body.historicum-shop-page .h-paper-content,
    body.historicum-shop-page .h-shop-section-main,
    body.historicum-shop-page .h-shop-section-body,
    body.historicum-shop-page .h-shop-grid-col,
    body.historicum-shop-page .h-shop-section-carousel {
        max-width: 100% !important;
        overflow-x: hidden !important;
    }

    @supports (overflow: clip) {
        body.historicum-shop-page,
        body.historicum-shop-page #page,
        body.historicum-shop-page .site,
        body.historicum-shop-page .site-content,
        body.historicum-shop-page #content,
        body.historicum-shop-page .content-area,
        body.historicum-shop-page #main,
        body.historicum-shop-page .site-main,
        body.historicum-shop-page .woocommerce,
        body.historicum-shop-page .woocommerce-page,
        body.historicum-shop-page .h-shop-page,
        body.historicum-shop-page .h-shop-paper-stack,
        body.historicum-shop-page .h-shop-paper-layout,
        body.historicum-shop-page .h-shop-sections-column,
        body.historicum-shop-page .h-paper-section,
        body.historicum-shop-page .h-paper-content,
        body.historicum-shop-page .h-shop-section-main,
        body.historicum-shop-page .h-shop-section-body,
        body.historicum-shop-page .h-shop-grid-col,
        body.historicum-shop-page .h-shop-section-carousel {
            overflow-x: clip !important;
        }
    }

    body.historicum-shop-page .h-shop-mobile-widgets {
        --h-shop-mobile-widget-surface: var(--h-paper-flat, var(--h-paper, #f5f0e6));
        display: block !important;
        position: relative !important;
        overflow: visible !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 0 var(--h-shop-shared-rip-height, 60px) !important;
        padding: 0 !important;
        background: var(--h-shop-mobile-widget-surface) !important;
        background-color: var(--h-shop-mobile-widget-surface) !important;
        background-image: none !important;
    }

    body.historicum-shop-page .h-shop-mobile-widget-content,
    body.historicum-shop-page .h-shop-mobile-widget-paper {
        background: var(--h-shop-mobile-widget-surface) !important;
        background-color: var(--h-shop-mobile-widget-surface) !important;
        background-image: none !important;
    }

    body.historicum-shop-page .h-shop-mobile-widgets > .h-torn-bottom {
        display: block !important;
        position: absolute !important;
        right: 0 !important;
        bottom: calc(var(--h-shop-shared-rip-height, 60px) * -1 + 1px) !important;
        left: 0 !important;
        z-index: 10 !important;
        width: 100% !important;
        height: var(--h-shop-shared-rip-height, 60px) !important;
        margin: 0 !important;
        overflow: hidden !important;
        pointer-events: none !important;
        background: transparent !important;
        background-image: none !important;
        clip-path: none !important;
        -webkit-mask-image: none !important;
        mask-image: none !important;
        transform: none !important;
    }

    body.historicum-shop-page .h-shop-mobile-widgets > .h-torn-bottom::before {
        content: none !important;
        display: none !important;
        opacity: 0 !important;
    }

    body.historicum-shop-page .h-shop-mobile-widgets > .h-torn-bottom::after {
        content: "" !important;
        display: block !important;
        position: absolute !important;
        inset: 0 !important;
        opacity: 1 !important;
        background: var(--h-shop-mobile-widget-surface) !important;
        background-color: var(--h-shop-mobile-widget-surface) !important;
        background-image: none !important;
        -webkit-mask-image: url("https://historicum.pl/wp-content/uploads/2026/04/torn-edge.svg") !important;
        -webkit-mask-size: 112% 100% !important;
        -webkit-mask-repeat: no-repeat !important;
        -webkit-mask-position: var(--h-rip-offset, 62%) top !important;
        mask-image: url("https://historicum.pl/wp-content/uploads/2026/04/torn-edge.svg") !important;
        mask-size: 112% 100% !important;
        mask-repeat: no-repeat !important;
        mask-position: var(--h-rip-offset, 62%) top !important;
        transform: scaleY(-1) !important;
        transform-origin: center !important;
    }
}

/* Final mobile shop paper contract: flat cream through the widget. */
@media (max-width: 1399px), (hover: none) and (pointer: coarse) {
    body.historicum-shop-page {
        --h-shop-mobile-paper-surface: var(--h-paper-flat, var(--h-paper, #f5f0e6));
        --h-shop-paper-surface: var(--h-shop-mobile-paper-surface);
    }

    body.historicum-shop-page .h-paper-content,
    body.historicum-shop-page .h-shop-section-main,
    body.historicum-shop-page .h-shop-page.h-level-1 .h-paper-content,
    body.historicum-shop-page .h-shop-page.h-level-1 .h-shop-section-main,
    body.historicum-shop-page .h-shop-page:not(.h-level-1) .h-paper-content,
    body.historicum-shop-page .h-shop-page:not(.h-level-1) .h-shop-section-main {
        background: var(--h-shop-mobile-paper-surface) !important;
        background-color: var(--h-paper-flat, var(--h-paper, #f5f0e6)) !important;
        background-image: none !important;
        background-blend-mode: normal !important;
    }

    body.historicum-shop-page .h-shop-mobile-widgets,
    body.historicum-shop-page .h-shop-page.h-level-1 .h-shop-mobile-widgets,
    body.historicum-shop-page .h-shop-page:not(.h-level-1) .h-shop-mobile-widgets {
        --h-shop-mobile-widget-surface: var(--h-paper-flat, var(--h-paper, #f5f0e6));
        display: block !important;
        position: relative !important;
        z-index: 2 !important;
        overflow: visible !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 0 var(--h-shop-shared-rip-height, 60px) !important;
        padding: 0 !important;
        background: var(--h-shop-mobile-widget-surface) !important;
        background-color: var(--h-shop-mobile-widget-surface) !important;
        background-image: none !important;
        background-blend-mode: normal !important;
    }

    body.historicum-shop-page .h-shop-mobile-widget-content,
    body.historicum-shop-page .h-shop-mobile-widget-paper,
    body.historicum-shop-page .h-shop-page.h-level-1 .h-shop-mobile-widget-content,
    body.historicum-shop-page .h-shop-page.h-level-1 .h-shop-mobile-widget-paper,
    body.historicum-shop-page .h-shop-page:not(.h-level-1) .h-shop-mobile-widget-content,
    body.historicum-shop-page .h-shop-page:not(.h-level-1) .h-shop-mobile-widget-paper {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        background: var(--h-shop-mobile-widget-surface) !important;
        background-color: var(--h-shop-mobile-widget-surface) !important;
        background-image: none !important;
        background-blend-mode: normal !important;
    }

    body.historicum-shop-page .h-shop-mobile-widgets > .h-torn-bottom,
    body.historicum-shop-page .h-shop-mobile-widgets .h-torn-bottom,
    body.historicum-shop-page .h-shop-page.h-level-1 .h-shop-mobile-widgets > .h-torn-bottom,
    body.historicum-shop-page .h-shop-page.h-level-1 .h-shop-mobile-widgets .h-torn-bottom,
    body.historicum-shop-page .h-shop-page:not(.h-level-1) .h-shop-mobile-widgets > .h-torn-bottom,
    body.historicum-shop-page .h-shop-page:not(.h-level-1) .h-shop-mobile-widgets .h-torn-bottom {
        display: block !important;
        position: absolute !important;
        right: 0 !important;
        bottom: calc(var(--h-shop-shared-rip-height, 60px) * -1 + 1px) !important;
        left: 0 !important;
        z-index: 10 !important;
        width: 100% !important;
        height: var(--h-shop-shared-rip-height, 60px) !important;
        margin: 0 !important;
        overflow: hidden !important;
        pointer-events: none !important;
        background: transparent !important;
        background-image: none !important;
        clip-path: none !important;
        -webkit-mask-image: none !important;
        mask-image: none !important;
        transform: none !important;
    }

    body.historicum-shop-page .h-shop-mobile-widgets > .h-torn-bottom::before,
    body.historicum-shop-page .h-shop-mobile-widgets .h-torn-bottom::before,
    body.historicum-shop-page .h-shop-page.h-level-1 .h-shop-mobile-widgets > .h-torn-bottom::before,
    body.historicum-shop-page .h-shop-page.h-level-1 .h-shop-mobile-widgets .h-torn-bottom::before,
    body.historicum-shop-page .h-shop-page:not(.h-level-1) .h-shop-mobile-widgets > .h-torn-bottom::before,
    body.historicum-shop-page .h-shop-page:not(.h-level-1) .h-shop-mobile-widgets .h-torn-bottom::before {
        content: none !important;
        display: none !important;
        opacity: 0 !important;
    }

    body.historicum-shop-page .h-shop-mobile-widgets > .h-torn-bottom::after,
    body.historicum-shop-page .h-shop-mobile-widgets .h-torn-bottom::after,
    body.historicum-shop-page .h-shop-page.h-level-1 .h-shop-mobile-widgets > .h-torn-bottom::after,
    body.historicum-shop-page .h-shop-page.h-level-1 .h-shop-mobile-widgets .h-torn-bottom::after,
    body.historicum-shop-page .h-shop-page:not(.h-level-1) .h-shop-mobile-widgets > .h-torn-bottom::after,
    body.historicum-shop-page .h-shop-page:not(.h-level-1) .h-shop-mobile-widgets .h-torn-bottom::after {
        content: "" !important;
        display: block !important;
        position: absolute !important;
        inset: 0 !important;
        opacity: 1 !important;
        background: var(--h-shop-mobile-widget-surface) !important;
        background-color: var(--h-shop-mobile-widget-surface) !important;
        background-image: none !important;
        -webkit-mask-image: url("https://historicum.pl/wp-content/uploads/2026/04/torn-edge.svg") !important;
        -webkit-mask-size: 112% 100% !important;
        -webkit-mask-repeat: no-repeat !important;
        -webkit-mask-position: var(--h-rip-offset, 62%) top !important;
        mask-image: url("https://historicum.pl/wp-content/uploads/2026/04/torn-edge.svg") !important;
        mask-size: 112% 100% !important;
        mask-repeat: no-repeat !important;
        mask-position: var(--h-rip-offset, 62%) top !important;
        transform: scaleY(-1) !important;
        transform-origin: center !important;
    }
}

/* Final mobile paper contract: every light paper section is flat cream. */
@media (max-width: 768px), (hover: none) and (pointer: coarse) {
    body {
        --h-paper-edge-vignette: rgba(150, 120, 80, 0);
        --h-shop-mobile-paper-surface: var(--h-paper-flat, var(--h-paper, #f5f0e6));
        --h-shop-paper-surface: var(--h-paper-flat, var(--h-paper, #f5f0e6));
        --h-shop-widget-paper-surface: var(--h-paper-flat, var(--h-paper, #f5f0e6));
    }

    :where(
        .h-section-paper,
        .h-paper-content,
        .h-paper-content.h-commerce-paper,
        .h-commerce-paper,
        .h-contact-modern-paper,
        .h-contact-modern-section .h-paper-content,
        .h-measurement-paper,
        .h-contact-form,
        .h-measurement-warning,
        .h-faq-item,
        .h-blog-card,
        .h-contact-card,
        .h-value-card,
        .h-feature-card,
        .historicum-product-paper,
        .h-shop-paper-stack,
        .h-shop-paper-layout,
        .h-shop-section-main,
        .h-shop-side-widgets,
        .h-shop-mobile-widgets,
        .h-shop-mobile-widget-content,
        .h-shop-mobile-widget-paper
    ) {
        background: var(--h-paper-flat, var(--h-paper, #f5f0e6)) !important;
        background-color: var(--h-paper-flat, var(--h-paper, #f5f0e6)) !important;
        background-image: none !important;
        background-blend-mode: normal !important;
    }

    :where(
        .h-section-paper,
        .h-paper-content,
        .h-paper-content.h-commerce-paper,
        .h-commerce-paper,
        .h-contact-modern-paper,
        .h-contact-modern-section .h-paper-content,
        .h-measurement-paper,
        .h-contact-form,
        .h-measurement-warning,
        .h-faq-item,
        .h-blog-card,
        .h-contact-card,
        .h-value-card,
        .h-feature-card,
        .h-shop-paper-stack,
        .h-shop-paper-layout,
        .h-shop-section-main,
        .h-shop-mobile-widget-paper
    )::after {
        content: none !important;
        display: none !important;
        background: none !important;
        background-image: none !important;
        opacity: 0 !important;
    }
}