:root {
    color-scheme: dark;
    --page-bg: #000;
    --gold: #e8c56a;
    --debug: #ff2bd6;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
    background: var(--page-bg);
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    height: 100%;
    margin: 0;
    overflow: hidden;
    overscroll-behavior: none;
    background: var(--page-bg);
    -webkit-tap-highlight-color: transparent;
}

/* ── Page loading overlay ── */

.lp-loading {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a1a1a;
    transition: opacity .4s ease;
}

.lp-loading.hidden {
    opacity: 0;
    pointer-events: none;
}

.lp-loading-logo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    position: absolute;
}

.lp-loading-ring {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, .08);
    border-top-color: #b8860b;
    animation: lpSpin .8s linear infinite;
    position: absolute;
}

@keyframes lpSpin {
    to { transform: rotate(360deg); }
}

/* ── Fixed, non-scrolling poster stage ── */

.stage {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    padding:
        env(safe-area-inset-top, 0px)
        env(safe-area-inset-right, 0px)
        env(safe-area-inset-bottom, 0px)
        env(safe-area-inset-left, 0px);
    overflow: hidden;
    background: var(--page-bg);
}

.poster {
    position: relative;
    width: min(100%, calc((100vh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) * 3384 / 6250));
    width: min(100%, calc((100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) * 3384 / 6250));
    aspect-ratio: 3384 / 6250;
    background: var(--page-bg);
}

.poster__picture {
    display: block;
    width: 100%;
    height: 100%;
}

.poster__layout {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
}

/* ── Invisible package hotspots ──
 * Reference frame: 3384 × 6250.
 * Each hit area covers the full card: photo plus its black name/price label.
 * Card row: y 1679–2855.
 */

.slot {
    position: absolute;
    z-index: 1;
    display: block;
    appearance: none;
    padding: 0;
    border: 0;
    margin: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.slot--nikah {
    left: 11.3771%;
    top: 26.864%;
    width: 24.409%;
    height: 18.816%;
}

.slot--sanding {
    left: 37.2931%;
    top: 26.864%;
    width: 25.3251%;
    height: 18.816%;
}

.slot--nikah-sanding {
    left: 64.1548%;
    top: 26.864%;
    width: 24.409%;
    height: 18.816%;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* ── Debug view: /?boxes=1 ── */

.debug .slot {
    outline: 2px solid var(--debug);
    outline-offset: -2px;
    background: rgba(255, 43, 214, .08);
}

.debug .slot::before {
    content: attr(data-label);
    position: absolute;
    top: 0;
    left: 0;
    padding: 2px 4px;
    background: var(--debug);
    color: #000;
    font: 600 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
    letter-spacing: .02em;
    white-space: nowrap;
}

.debug-readout {
    position: fixed;
    right: 8px;
    bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    left: 8px;
    z-index: 999;
    display: block;
    padding: 8px 10px;
    border: 1px solid var(--debug);
    border-radius: 4px;
    background: rgba(0, 0, 0, .92);
    color: var(--debug);
    font: 10px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
    text-align: center;
    pointer-events: none;
}

/* Keyboard focus stays visible even though the buttons are transparent. */
.slot:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    .lp-loading {
        transition: none;
    }

    .lp-loading-ring {
        animation: none;
    }
}
