/*
 * The sale entry of the readings of the second version (sale-entry.js) and its window (sale-windows.js).
 *
 * It stands apart from the reading: one lit surface — the only one, with nothing boxed inside it — set on its centre as
 * a landing section is: the golden line, the title with its golden italic half, the gift book in rings of light with
 * the reader's numbers on either side, a few words, golden checks and the landings' golden action with the price and a
 * basket. The light fades inside the surface and never meets its edge. Motion is transform and opacity only, alive only
 * while the drawing is in sight, still when motion is reduced.
 */

.sale-entry {
    --sale-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
    position: relative;
    isolation: isolate;
    min-inline-size: 0;
    max-inline-size: 100%;
    margin-block: clamp(3rem, 6vw, 4.5rem) clamp(2.5rem, 5vw, 3.5rem);
    color: var(--home-text);
    font-family: var(--home-font);
    font-variant-numeric: lining-nums;
    text-align: center;
}

.sale-entry:has(+ .past-life-contents) { margin-block-end: 0; }

/* The reading's own star over its last line gives way: the block's golden line already marks where the reading pauses. */
.mdv2-bridge:has(+ .sale-entry) .mdv2-bridge__star { display: none; }

/* The one surface: lighter than the page, lit warm from its middle, a soft light along its top. */
.sale-entry__surface {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    container-type: inline-size;
    justify-items: center;
    gap: var(--home-space-8);
    padding: var(--home-space-10) var(--home-space-5);
    overflow: hidden;
    isolation: isolate;
    border-radius: 1.75rem;
    background:
        radial-gradient(ellipse 55% 34% at 50% 30%, rgb(241 185 109 / 0.1), rgb(241 185 109 / 0) 72%),
        radial-gradient(ellipse 70% 45% at 50% 100%, rgb(94 158 170 / 0.1), rgb(94 158 170 / 0) 70%),
        linear-gradient(170deg, rgb(32 41 62 / 0.78), rgb(18 23 36 / 0.82) 55%, rgb(13 17 27 / 0.86));
    box-shadow: inset 0 1px 0 rgb(241 185 109 / 0.22), 0 2.25rem 4.5rem -2rem rgb(0 0 0 / 0.75);
}

@media (min-width: 48rem) { .sale-entry__surface { padding: var(--home-space-12) var(--home-space-8); } }

/* The surface's own sky, as the blocks of the matrix's reading have (mdv2-lead): stars that come and go, a warm light
   that breathes behind the title and the book. Stars twinkle where the pointer is fine; a phone keeps the breathing. */
.sale-entry__sky { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.sale-entry__sky::before {
    content: "";
    position: absolute;
    inset-block-start: 4%;
    inset-inline-start: 50%;
    inline-size: 76%;
    block-size: 62%;
    border-radius: 50%;
    background: var(--home-reading-haze);
    transform: translateX(-50%);
}

.sale-entry__star { position: absolute; inline-size: 2px; block-size: 2px; border-radius: 50%; background: #e8eef8; opacity: 0.4; }
.sale-entry__star.is-bright { inline-size: 3px; block-size: 3px; background: #ffe2b5; box-shadow: 0 0 6px rgb(255 226 181 / 0.8); }

@media (prefers-reduced-motion: no-preference) {
    .sale-entry.is-in-sight .sale-entry__sky::before { animation: sale-glow 5s ease-in-out infinite alternate; }
}

@media (prefers-reduced-motion: no-preference) and (hover: hover) and (pointer: fine) {
    .sale-entry.is-in-sight .sale-entry__star { animation: sale-star 4.5s ease-in-out infinite alternate; }
}

@keyframes sale-glow { from { opacity: 0.6; } to { opacity: 1; } }
@keyframes sale-star { from { opacity: 0.1; } to { opacity: 0.8; } }

/* ── The title and the gift ────────────────────────────────────── */

.sale-entry__showcase { display: grid; justify-items: center; inline-size: 100%; min-inline-size: 0; }
.sale-entry__head { display: grid; justify-items: center; }

.sale-entry .home-overline.sale-entry__overline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--home-space-3);
    max-width: none;
    margin: 0 0 var(--home-space-3);
    color: var(--home-amber);
}

.sale-entry .home-overline.sale-entry__overline::before,
.sale-entry .home-overline.sale-entry__overline::after {
    content: "";
    flex: none;
    inline-size: 1.5rem;
    block-size: 1px;
    background: currentColor;
    opacity: 0.55;
}

.sale-entry__overline-star { order: -1; flex: none; inline-size: 0.85rem; block-size: 0.85rem; margin-inline-end: -0.25rem; fill: #ffe2b5; filter: drop-shadow(0 0 0.35rem rgb(241 185 109 / 0.9)); }
.sale-entry .home-overline.sale-entry__overline::before { order: -2; }

/* A quiet way straight to the purchase, as the contents of a reading have one. */
.sale-entry__quick {
    display: inline-flex;
    align-items: center;
    gap: var(--home-space-2);
    min-block-size: 2.75rem;
    max-inline-size: 100%;
    margin-block-start: var(--home-space-4);
    padding: 0.5rem 1.1rem 0.5rem 0.95rem;
    border: 0;
    border-radius: 99rem;
    background: rgb(241 185 109 / 0.1);
    color: var(--home-amber);
    font: inherit;
    font-size: 0.9375rem;
    font-variant-numeric: lining-nums;
    cursor: pointer;
    transition: background-color 180ms ease, color 180ms ease;
}

.sale-entry__quick:is(:hover, :focus-visible) { background: rgb(241 185 109 / 0.18); color: #fbe3b8; }
.sale-entry__quick:focus-visible { outline: 2px solid var(--home-focus); outline-offset: 0.2rem; }
.sale-entry__quick-lock { flex: none; inline-size: 1.15rem; block-size: 1.15rem; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.sale-entry__quick-sign { flex: none; inline-size: 0.95rem; block-size: 0.95rem; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform 200ms ease-out; }
.sale-entry__quick:hover .sale-entry__quick-sign { transform: translateX(2px); }

.sale-entry .home-section-title.sale-entry__title { margin: 0; font-size: clamp(2.2rem, 3.6vw, 3.1rem); line-height: 1.12; letter-spacing: -0.02em; text-align: center; text-wrap: balance; }
.sale-entry .home-section-title.sale-entry__title em { color: var(--home-amber); }
.sale-entry__title:focus { outline: none; }
.sale-entry__title:focus-visible { outline: 2px solid var(--home-focus); outline-offset: 0.4rem; }
.sale-entry__subject { margin: var(--home-space-2) 0 0; color: var(--home-text-faint); font-size: var(--home-type-label); }

/* The gift book in rings of light, the numbers on either side. */
.sale-entry__scene {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "book book" "left right" "left right";
    justify-items: center;
    align-items: center;
    gap: var(--home-space-5) clamp(var(--home-space-3), 8cqi, var(--home-space-6));
    inline-size: 100%;
    margin: var(--home-space-6) 0 0;
}

.sale-entry__glow {
    position: absolute;
    inset-block-start: -1rem;
    inset-inline-start: 50%;
    z-index: -1;
    inline-size: 24rem;
    block-size: 24rem;
    margin-inline-start: -12rem;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgb(241 185 109 / 0.22), rgb(241 185 109 / 0.06) 50%, rgb(241 185 109 / 0) 100%);
    pointer-events: none;
}

.sale-entry__orbits {
    position: absolute;
    inset-block-start: 0;
    inset-inline-start: 50%;
    z-index: -1;
    inline-size: 18.5rem;
    block-size: 18.5rem;
    margin-inline-start: -9.25rem;
    overflow: visible;
    pointer-events: none;
}

.sale-entry__orbit { fill: none; stroke: rgb(241 185 109 / 0.42); stroke-width: 1.1; }
.sale-entry__orbit--near { stroke: rgb(241 185 109 / 0.55); }
.sale-entry__orbit--dotted { stroke: rgb(241 185 109 / 0.6); stroke-width: 1.4; stroke-dasharray: 1.5 6; stroke-linecap: round; transform-origin: 0 0; }

@media (prefers-reduced-motion: no-preference) {
    .sale-entry.is-in-sight .sale-entry__orbit--far { animation: sale-kindle 4.8s ease-in-out infinite alternate; }
    .sale-entry.is-in-sight .sale-entry__orbit--near { animation: sale-kindle 4.8s ease-in-out -2.4s infinite alternate; }
}

@keyframes sale-kindle { from { opacity: 0.45; } to { opacity: 1; } }
.sale-entry__node { fill: var(--home-amber); filter: drop-shadow(0 0 5px rgb(241 185 109 / 0.9)); }

.sale-entry__book {
    grid-area: book;
    position: relative;
    inline-size: min(9rem, 70%);
    aspect-ratio: 420 / 594;
    margin-block-start: 3.1rem;
    margin-block-end: var(--home-space-5);
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}

.sale-entry__sheet {
    position: absolute;
    inset: 0;
    inline-size: 100%;
    block-size: 100%;
    border-radius: 0.3rem;
    box-shadow: 0 1.2rem 2.4rem rgb(0 0 0 / 0.6);
    object-fit: cover;
    transition: transform 560ms var(--sale-ease);
}

.sale-entry__sheet[data-slot="0"] { z-index: 3; }
.sale-entry__sheet[data-slot="1"] { z-index: 2; transform: translateX(-24%) rotate(-10deg); }
.sale-entry__sheet[data-slot="2"] { z-index: 1; transform: translateX(23%) rotate(9deg); }
.sale-entry__book:is(:hover, :focus-visible) .sale-entry__sheet[data-slot="0"] { transform: translateY(-0.4rem) scale(1.03); }
.sale-entry__book:is(:hover, :focus-visible) .sale-entry__sheet[data-slot="1"] { transform: translateX(-32%) rotate(-13deg); }
.sale-entry__book:is(:hover, :focus-visible) .sale-entry__sheet[data-slot="2"] { transform: translateX(31%) rotate(12deg); }
.sale-entry__book:focus-visible { outline: 2px solid var(--home-focus); outline-offset: 1.25rem; border-radius: 0.5rem; }
/* A dealt deck is moved by GSAP alone: no transition of its own, no spread on hover. */
.sale-entry__book.is-dealt .sale-entry__sheet { transform: none; transition: none; }

.sale-entry__ribbon {
    position: absolute;
    z-index: 4;
    inset-block-end: -0.7rem;
    inset-inline-start: 50%;
    display: inline-flex;
    align-items: center;
    inline-size: max-content;
    max-inline-size: 100cqi;
    gap: 0.3rem;
    padding: 0.3rem 0.7rem 0.3rem 0.5rem;
    border-radius: 99rem;
    background: linear-gradient(135deg, #f9dcaa, var(--home-amber) 55%, #df9f57);
    box-shadow: 0 0.6rem 1.4rem rgb(241 185 109 / 0.35);
    color: #1b1307;
    font-size: 0.75rem;
    font-weight: 700;
    transform: translateX(-50%);
}

.sale-entry__ribbon-star { inline-size: 0.65rem; block-size: 0.65rem; fill: currentColor; }

.sale-entry__sparks { position: absolute; inset-block-start: 9.25rem; inset-inline-start: 50%; inline-size: 0; block-size: 0; pointer-events: none; }
.sale-entry__sparks i { position: absolute; inline-size: 3px; block-size: 3px; border-radius: 50%; background: #fbe3b8; box-shadow: 0 0 6px rgb(241 185 109 / 0.95); opacity: 0.25; }
.sale-entry__sparks i:nth-child(1) { left: -8rem; top: -3.6rem; --t: 4.6s; --d: 0s; }
.sale-entry__sparks i:nth-child(2) { left: 7.25rem; top: -5.1rem; --t: 5.4s; --d: 1.2s; }
.sale-entry__sparks i:nth-child(3) { left: -6rem; top: 4.5rem; --t: 6.2s; --d: 2.1s; }
.sale-entry__sparks i:nth-child(4) { left: 8.1rem; top: 3rem; --t: 4.9s; --d: 0.7s; }
.sale-entry__sparks i:nth-child(5) { left: -1.8rem; top: -7.2rem; --t: 5.8s; --d: 3s; }
.sale-entry__sparks i:nth-child(6) { left: 3.3rem; top: 7.8rem; --t: 6.6s; --d: 1.7s; }
.sale-entry__sparks i:nth-child(7) { left: -9.3rem; top: 0.6rem; --t: 5.1s; --d: 2.6s; }
.sale-entry__sparks i:nth-child(8) { left: 9.3rem; top: -0.9rem; --t: 6s; --d: 3.6s; }

@media (prefers-reduced-motion: no-preference) {
    .sale-entry.is-in-sight .sale-entry__sparks i { animation: sale-twinkle var(--t) ease-in-out var(--d) infinite; }
    .sale-entry.is-in-sight .sale-entry__glow { animation: sale-breathe 7s ease-in-out infinite; }
}

@keyframes sale-twinkle {
    0%, 100% { opacity: 0.2; transform: scale(0.7); }
    50% { opacity: 1; transform: scale(1.35); }
}

@keyframes sale-breathe {
    0%, 100% { opacity: 0.75; transform: scale(0.96); }
    50% { opacity: 1; transform: scale(1.04); }
}

/* The reader's own numbers: gold over quiet words. */
.sale-entry__facts { display: grid; grid-template-rows: subgrid; row-gap: inherit; min-inline-size: 0; max-inline-size: 100%; margin: 0; align-self: stretch; }
.sale-entry__facts--left { grid-area: left; }
.sale-entry__facts--right { grid-area: right; }
.sale-entry__fact { display: grid; justify-items: center; align-self: start; }
.sale-entry__figure { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 0.15rem 0.4rem; max-inline-size: 100%; margin: 0; }

.sale-entry__value {
    color: var(--home-amber);
    font-size: clamp(1.375rem, 12cqi, 2.5rem);
    line-height: 1;
    white-space: nowrap;
    letter-spacing: -0.02em;
    text-shadow: 0 0 1.5rem rgb(241 185 109 / 0.45);
}

.sale-entry__unit { color: var(--home-text); font-size: 1rem; font-style: italic; white-space: nowrap; }
.sale-entry__note { max-inline-size: 11rem; margin: 0.3rem 0 0; color: var(--home-text-muted); font-size: 0.8125rem; line-height: 1.35; }

@media (prefers-reduced-motion: no-preference) {
    .sale-entry.is-watching:not(.is-seen) .sale-entry__fact { opacity: 0; transform: translateY(0.6rem); }
    .sale-entry__fact {
        transition: opacity 600ms ease-out, transform 600ms var(--sale-ease);
        transition-delay: calc(var(--order, 0) * 110ms + 180ms);
    }
}

/* «Полистать пример»: a quiet golden link with the book's sign, as the block's other links. */
.sale-entry__leaf {
    display: inline-flex;
    align-items: center;
    gap: var(--home-space-2);
    padding: var(--home-space-1) 0;
    border: 0;
    background: none;
    color: var(--home-amber);
    font: inherit;
    font-size: 0.9375rem;
    cursor: pointer;
    text-decoration: underline;
    text-decoration-color: rgb(241 185 109 / 0.4);
    text-underline-offset: 0.3em;
    transition: text-decoration-color 180ms ease, color 180ms ease;
}

.sale-entry__leaf { margin-block-start: var(--home-space-8); }
.sale-entry__leaf:hover { color: #f9dcaa; text-decoration-color: currentColor; }
.sale-entry__leaf:focus-visible { outline: 2px solid var(--home-focus); outline-offset: 0.2rem; border-radius: 0.25rem; }
.sale-entry__leaf .sale-glyph { inline-size: 1.05rem; block-size: 1.05rem; }

/* ── The purchase ──────────────────────────────────────────────── */

.sale-entry__offer { display: grid; justify-items: center; gap: var(--home-space-6); inline-size: 100%; max-inline-size: 36rem; min-inline-size: 0; container-type: inline-size; }

.sale-entry__lead {
    margin: 0;
    color: var(--home-text-soft);
    font-size: 1.0625rem;
    line-height: 1.6;
    text-wrap: pretty;
}

.sale-entry__checks { display: grid; gap: var(--home-space-3); margin: 0; padding: 0; list-style: none; text-align: start; }
.sale-entry__checks li { display: flex; align-items: flex-start; gap: var(--home-space-3); color: var(--home-text); font-size: 1rem; line-height: 1.45; }

.sale-entry__check {
    flex: none;
    inline-size: 1.3rem;
    block-size: 1.3rem;
    margin-block-start: 0.1rem;
    fill: rgb(241 185 109 / 0.12);
    stroke: var(--home-amber);
    stroke-width: 1.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sale-entry__price { display: grid; justify-items: center; gap: var(--home-space-3); margin-block-start: var(--home-space-2); }

.sale-entry__deadline { margin: 0; color: var(--home-text-muted); font-size: var(--home-type-label); text-align: center; text-wrap: balance; }
.sale-entry__clock { color: #f3cf9b; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sale-entry__clock::before { content: '— '; }

/* The landings' golden action: its words, then a dark capsule of the basket and the price. */
.sale-entry .numerology-intro__action.sale-entry__action {
    inline-size: auto;
    max-inline-size: 100%;
    min-block-size: 3.75rem;
    margin: 0;
    padding: 0.375rem 0.375rem 0.375rem 1.9rem;
    justify-content: space-between;
    gap: var(--home-space-5);
    border: 0;
    background: linear-gradient(135deg, #f9dcaa, var(--home-amber) 55%, #df9f57);
    box-shadow: 0 0.75rem 2.5rem rgb(241 185 109 / 0.35);
    color: #1b1307;
    font-size: 1.125rem;
    font-weight: 700;
    cursor: pointer;
    filter: none;
}

.sale-entry .numerology-intro__action.sale-entry__action:disabled { background: var(--color-surface-raised); color: var(--home-text-faint); box-shadow: none; cursor: default; }
.sale-entry__action-words { text-align: start; }
.sale-entry__action--discounted .sale-entry__action-words { overflow-wrap: normal; text-wrap: balance; }

.sale-entry__tag {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    flex: none;
    min-block-size: 3rem;
    padding: 0 1.15rem 0 1rem;
    border-radius: 99rem;
    background: #1b1307;
    color: #fbe3b8;
    font-weight: 400;
    white-space: nowrap;
    transition: transform 300ms ease-out;
}

.sale-entry__tag .sale-glyph { inline-size: 1.25rem; block-size: 1.25rem; color: var(--home-amber); stroke-width: 1.7; }
.sale-entry .sale-entry__tag-price.numerology-offer__amount { color: inherit; font: inherit; letter-spacing: 0.01em; }
.sale-entry__previous { display: grid; justify-items: center; gap: 0.08rem; line-height: 1.15; }
.sale-entry__regular { color: #e0c49d; font-size: 0.75rem; text-decoration-color: currentColor; }
.sale-entry__save { padding: 0.05rem 0.24rem; border-radius: 0.28rem; background: #a73441; color: #fff4ec; font-size: 0.65rem; font-weight: 700; white-space: nowrap; }
.sale-entry__action--discounted .sale-entry__tag-price { font-weight: 700; }
/* The phone's line of the old price over the action; wider screens keep it in the capsule. */
.sale-entry__was { display: none; }
.sale-entry__action:hover .sale-entry__tag { transform: translateX(2px); }
.sale-entry__status { margin: 0; color: var(--home-text-muted); font-size: var(--home-type-label); }

@container (max-width: 11.5rem) {
    .sale-entry__scene { grid-template-columns: minmax(0, 1fr); grid-template-areas: "book" "left" "left" "right" "right"; }
}

@container (11.5rem < width < 25rem) {
    .sale-entry__figure { column-gap: 0.25rem; }
    .sale-entry__value { font-size: clamp(1.125rem, 9cqi, 2.5rem); }
    .sale-entry__unit { font-size: clamp(0.7rem, 5.75cqi, 1rem); }
}

/* The facts flank the book when the surface has room for both columns. */
@container (min-width: 45rem) {
    .sale-entry__scene { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); grid-template-areas: "left book right" "left book right"; align-content: center; gap: var(--home-space-6) clamp(4.5rem, 12cqi, 7.5rem); min-block-size: 23rem; }
    .sale-entry__glow { inset-block-start: 50%; inline-size: 31rem; block-size: 31rem; margin: -15.5rem 0 0 -15.5rem; }
    .sale-entry__orbits { inset-block-start: 50%; inline-size: 23rem; block-size: 23rem; margin: -11.5rem 0 0 -11.5rem; }
    .sale-entry__book { inline-size: 11.5rem; margin: 0; }
    .sale-entry__sparks { inset-block-start: 50%; }
    .sale-entry__facts--left { justify-self: end; }
    .sale-entry__facts--left .sale-entry__fact { justify-items: end; text-align: end; }
    .sale-entry__facts--left .sale-entry__figure { justify-content: flex-end; }
    .sale-entry__facts--right { justify-self: start; }
    .sale-entry__facts--right .sale-entry__fact { justify-items: start; text-align: start; }
    .sale-entry__facts--right .sale-entry__figure { justify-content: flex-start; }
}

@media (min-width: 64rem) and (prefers-reduced-motion: no-preference) {
    .sale-entry.is-in-sight .sale-entry__orbit--dotted { animation: sale-turn 90s linear infinite; }
}

@keyframes sale-turn {
    to { transform: rotate(360deg); }
}

@media (max-width: 29.999rem) {
    .sale-entry .numerology-intro__action.sale-entry__action { inline-size: 100%; gap: var(--home-space-2); padding-inline-start: 1.1rem; font-size: 0.9375rem; line-height: 1.2; }
    .sale-entry__action-words { white-space: nowrap; }
    .sale-entry__tag { gap: 0.35rem; min-block-size: 2.8rem; padding-inline: 0.7rem 0.8rem; font-size: 0.9375rem; }
    .sale-entry__previous { display: none; }
    .sale-entry__was:not([hidden]) { display: flex; align-items: center; justify-content: center; gap: 0.5rem; margin: 0 0 calc(var(--home-space-1) - var(--home-space-3)); padding-block: 0.1rem; line-height: 1.25; }
    .sale-entry__clock { display: block; margin-block-start: 0.15rem; }
    .sale-entry__clock::before { content: none; }
    .sale-entry__was .sale-entry__save { padding: 0.12rem 0.4rem; font-size: 0.8125rem; }
    .sale-entry__was .sale-entry__regular { color: var(--home-text-muted); font-size: 1rem; }
    .sale-entry__tag .sale-glyph { inline-size: 1.05rem; block-size: 1.05rem; }
    .sale-entry__quick { min-block-size: 2.75rem; padding: 0.45rem 0.75rem; font-size: 0.875rem; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
    .sale-entry__sheet, .sale-entry__quick-sign, .sale-entry__tag { transition: none; }
    .sale-entry__quick:hover .sale-entry__quick-sign, .sale-entry__action:hover .sale-entry__tag { transform: none; }
}

@container (max-width: 17.5rem) {
    .sale-entry .numerology-intro__action.sale-entry__action {
        display: grid;
        justify-items: center;
        justify-content: center;
        gap: 0.35rem;
        padding: 0.6rem 0.65rem 0.45rem;
        border-radius: 1.4rem;
    }
    .sale-entry__action-words { text-align: center; white-space: normal; }
    .sale-entry__action .sale-entry__tag { min-block-size: 1.95rem; padding-inline: 0.7rem; }
    .sale-entry__action .sale-entry__tag .sale-glyph { inline-size: 1rem; block-size: 1rem; }
    .sale-entry__action:hover .sale-entry__tag { transform: none; }
    .sale-entry__clock { display: block; margin-block-start: 0.15rem; }
    .sale-entry__clock::before { content: none; }
}

/* A narrow window with a mouse keeps a few breaths of light. On touch the decorated picture stays still. */
@media (prefers-reduced-motion: no-preference) and (max-width: 63.999rem) and (hover: hover) and (pointer: fine) {
    .sale-entry.is-in-sight .sale-entry__sparks i { animation-iteration-count: 2; }
    .sale-entry.is-in-sight .sale-entry__glow { animation-iteration-count: 2; }
    .sale-entry.is-in-sight .sale-entry__sky::before,
    .sale-entry.is-in-sight .sale-entry__orbit--far,
    .sale-entry.is-in-sight .sale-entry__orbit--near { animation-iteration-count: 4; }
}

@media (hover: none), (pointer: coarse) {
    .sale-entry.is-in-sight :is(.sale-entry__sparks i, .sale-entry__glow, .sale-entry__orbit--far, .sale-entry__orbit--near, .sale-entry__orbit--dotted),
    .sale-entry.is-in-sight .sale-entry__sky::before { animation: none; }
}

/* ── The example book in a small window ────────────────────────── */

.sale-glyph { inline-size: 1.05rem; block-size: 1.05rem; flex: none; }

.sale-glance-veil {
    position: fixed;
    inset: 0;
    z-index: 120;
    background: rgb(6 9 16 / 0.28);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 280ms ease, visibility 0s linear 280ms;
}

.sale-glance-veil.is-shown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 280ms ease;
}

/* A touch screen keeps the plain haze: blurring the page again on every scrolled frame is too heavy for a phone. */
@media (hover: hover) and (pointer: fine) {
    .sale-glance-veil {
        -webkit-backdrop-filter: blur(2px);
        backdrop-filter: blur(2px);
    }
}

.sale-glance {
    position: fixed;
    z-index: 121;
    inset: auto;
    inset-block-start: var(--glance-y, 10vh);
    inset-inline-start: var(--glance-x, 10vw);
    max-inline-size: none;
    max-block-size: none;
    margin: 0;
    padding: 0;
    overflow: visible;
    border: 0;
    background: transparent;
    color: var(--home-text);
    font-family: var(--home-font);
    font-variant-numeric: lining-nums;
}


.sale-glance__surface {
    position: relative;
    inline-size: min(88vw, 20rem);
    padding: 0.5rem 0.75rem 0.85rem;
    border-radius: 1.4rem;
    background:
        radial-gradient(ellipse 80% 40% at 50% 0%, rgb(241 185 109 / 0.14), rgb(241 185 109 / 0) 70%),
        linear-gradient(180deg, rgb(30 39 60), rgb(14 18 28));
    box-shadow: 0 2rem 4rem rgb(0 0 0 / 0.65), 0 0 3rem rgb(241 185 109 / 0.14);
    transition: opacity 220ms ease-out, transform 260ms cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 220ms ease;
}

.sale-glance__surface:focus { outline: none; }
@media (hover: none), (pointer: coarse) {
    /* Keep the moving page, its veil and the fixed preview in separate composited layers. */
    .sale-glance-veil.is-shown { will-change: opacity; }
    .sale-glance[open] .sale-glance__surface { will-change: transform; }
}
.sale-glance.is-carried .sale-glance__surface { box-shadow: 0 2.6rem 5rem rgb(0 0 0 / 0.7), 0 0 3.5rem rgb(241 185 109 / 0.22); }

@starting-style {
    .sale-glance[open] .sale-glance__surface { opacity: 0; transform: translateY(0.5rem) scale(0.97); }
}

@media (min-width: 64rem) {
    .sale-glance__surface { inline-size: 20rem; }
}

.sale-glance__head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 -0.25rem;
    padding: 0.2rem 0.1rem 0.2rem 0.45rem;
    border-radius: 0.9rem;
    cursor: grab;
    touch-action: none;
    user-select: none;
}

.sale-glance.is-carried .sale-glance__head { cursor: grabbing; }
.sale-glance__grip { inline-size: 1rem; block-size: 1rem; color: var(--home-text-faint); }
.sale-glance__title { flex: 1; margin: 0; color: var(--home-text-soft); font-size: 0.95rem; font-weight: 400; line-height: 1.3; text-align: start; }

.sale-glance__cross,
.sale-glance__turn {
    display: grid;
    place-items: center;
    inline-size: 2.25rem;
    block-size: 2.25rem;
    flex: none;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgb(248 245 239 / 0.07);
    color: var(--home-silver-strong);
    cursor: pointer;
    transition: background-color 180ms ease, opacity 180ms ease;
}

.sale-glance__cross:hover,
.sale-glance__turn:hover:not(:disabled) { background: rgb(248 245 239 / 0.14); }
.sale-glance__turn:disabled { opacity: 0.3; cursor: default; }
.sale-glance__cross:focus-visible,
.sale-glance__turn:focus-visible { outline: 2px solid var(--home-focus); outline-offset: 2px; }

.sale-glance__bars { display: flex; gap: 3px; margin-block: 0.45rem 0.65rem; }
.sale-glance__bars span { flex: 1; block-size: 2px; overflow: hidden; border-radius: 2px; background: rgb(248 245 239 / 0.22); }
.sale-glance__bars i { display: block; block-size: 100%; background: var(--home-amber); transform: scaleX(0); transform-origin: left center; }

.sale-glance__stage {
    position: relative;
    max-block-size: 60vh;
    overflow: hidden;
    border-radius: 0.6rem;
    background: #0b0f16;
    box-shadow: 0 0.75rem 1.5rem rgb(0 0 0 / 0.5);
    cursor: pointer;
    touch-action: pan-y;
    user-select: none;
}

.sale-glance__sheet {
    position: absolute;
    inset: 0;
    inline-size: 100%;
    block-size: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 280ms ease;
    -webkit-user-drag: none;
}

.sale-glance__sheet.is-shown { opacity: 1; }
.sale-glance__turns { display: flex; align-items: center; justify-content: space-between; margin-block: 0.65rem; }
.sale-glance__foot { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }

.sale-glance__cart {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-block-size: 2.5rem;
    padding: 0 1.05rem 0 0.9rem;
    border: 0;
    border-radius: 99rem;
    background: linear-gradient(135deg, #f9dcaa, var(--home-amber) 55%, #df9f57);
    box-shadow: 0 0.4rem 1.1rem rgb(241 185 109 / 0.26);
    color: #1b1307;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: transform 200ms ease, filter 200ms ease;
}

.sale-glance__cart .sale-glyph { inline-size: 1.1rem; block-size: 1.1rem; }
.sale-glance__cart-price { white-space: nowrap; font-variant-numeric: lining-nums; }
.sale-glance__cart:hover { transform: translateY(-1px); filter: brightness(1.05); }
.sale-glance__cart:focus-visible { outline: 2px solid var(--home-focus); outline-offset: 2px; }
.sale-glance__position { margin: 0; color: var(--home-text-muted); font-size: var(--home-type-label); }

.sale-glance__close {
    flex: none;
    min-block-size: 2.5rem;
    padding-inline: 1.1rem;
    border: 0;
    border-radius: 99rem;
    background: rgb(248 245 239 / 0.07);
    color: var(--home-silver-strong);
    font: inherit;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background-color 180ms ease;
}

.sale-glance__close:hover { background: rgb(241 185 109 / 0.16); color: var(--home-text); }
.sale-glance__close:focus-visible { outline: 2px solid var(--home-focus); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
    .sale-glance-veil,
    .sale-glance-veil.is-shown,
    .sale-glance__surface,
    .sale-glance__sheet { transition: none; }
}
