/* ------------------------------------------------------------------
   Luana's Magical 20th Birthday Portal
   ------------------------------------------------------------------ */

:root {
    --cream: #fff8f1;
    --paper: #fffaf3;
    --ink: #5b3f36;
    --ink-soft: #8a6b62;

    --rose: #f9c8d9;
    --rose-deep: #e79cb9;
    --lav: #d9ccf4;
    --lav-deep: #b79ae6;
    --mint: #c9ecd8;
    --mint-deep: #7fc9a8;
    --sky: #c7e3f7;
    --butter: #fde7b5;
    --gold: #d4a24c;

    --wood: #b9773e;
    --wood-dark: #7d4a20;

    --shadow: 0 18px 45px rgba(91, 63, 54, 0.14);
    --radius: 18px;

    --font-ui: 'Inter', system-ui, -apple-system, sans-serif;
    --font-script: 'Great Vibes', cursive;
    --font-hand: 'Caveat', cursive;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-ui);
    color: var(--ink);
    background: var(--cream);
    min-height: 100vh;
    overflow-x: hidden;
    text-transform: lowercase;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
}

/* ---------- backgrounds ---------- */

.bg-balloons {
    position: fixed;
    inset: 0;
    background: url('../assets/bg.png') center / cover no-repeat;
    opacity: 0.28;
    z-index: -2;
    pointer-events: none;
}

.bg-glow {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(60% 50% at 50% 42%, rgba(255, 255, 255, 0.75), transparent 70%),
        linear-gradient(180deg, rgba(255, 248, 241, 0.15), rgba(255, 248, 241, 0.85));
}

/* ---------- header ---------- */

.hero {
    text-align: center;
    padding: 2.5rem 1rem 1rem;
}

.eyebrow {
    font-size: 0.72rem;
    letter-spacing: 0.32em;
    color: var(--ink-soft);
    font-weight: 600;
    margin-bottom: 0.35rem;
}

h1 {
    font-family: var(--font-script);
    font-weight: 400;
    font-size: clamp(2.6rem, 6vw, 4.6rem);
    line-height: 1.1;
    padding: 0 0.3em;
    background: linear-gradient(90deg, #b8607f, #8b6bc9 50%, #5f9c8a);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 2px 0 rgba(255, 255, 255, 0.85));
}

.subtitle {
    color: var(--ink-soft);
    letter-spacing: 0.08em;
    font-size: 1rem;
    margin-top: 0.4rem;
}

/* ---------- stage layout ---------- */

.stage {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr) 320px;
    gap: 2rem;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2.5rem 2rem;
}

/* ---------- parchment scroll ---------- */

.scroll {
    position: relative;
    padding: 14px 0;
}

.scroll__rod {
    position: absolute;
    left: -14px;
    right: -14px;
    height: 22px;
    border-radius: 11px;
    background: linear-gradient(180deg, #d99a5c, #a5652c 55%, var(--wood-dark));
    box-shadow: 0 4px 10px rgba(91, 63, 54, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.35);
    z-index: 2;
}

.scroll__rod--top {
    top: 0;
}

.scroll__rod--bottom {
    bottom: 0;
}

.scroll__rod::before,
.scroll__rod::after {
    content: '';
    position: absolute;
    top: -5px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #e6ad72, var(--wood-dark) 72%);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.25);
}

.scroll__rod::before {
    left: -12px;
}

.scroll__rod::after {
    right: -12px;
}

.scroll__paper {
    position: relative;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0) 35%),
        var(--paper);
    border: 1px solid #efdfca;
    border-radius: 6px;
    padding: 1.6rem 1.25rem 1.2rem;
    box-shadow: var(--shadow), inset 0 0 40px rgba(212, 162, 76, 0.08);
    outline: 1px dashed rgba(212, 162, 76, 0.35);
    outline-offset: -9px;
}

.scroll__title {
    font-family: var(--font-hand);
    font-size: 1.55rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
}

.scroll__progress {
    text-align: center;
    font-size: 0.7rem;
    letter-spacing: 0.16em;
    color: var(--ink-soft);
    font-weight: 600;
    margin: 0.2rem 0 0.6rem;
}

.progress-bar {
    height: 6px;
    border-radius: 3px;
    background: #f1e4d6;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-bar__fill {
    height: 100%;
    width: 0;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--rose-deep), var(--lav-deep), var(--mint-deep));
    transition: width 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ---------- tokens ---------- */

.token-list {
    list-style: none;
    display: grid;
    gap: 0.5rem;
}

.token {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.45rem 0.8rem 0.45rem 0.45rem;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.65);
    font: inherit;
    color: inherit;
    text-align: left;
    text-transform: lowercase;
    cursor: grab;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.25s, background 0.25s, opacity 0.3s;
}

.token:hover,
.token:focus-visible {
    transform: translateX(6px);
    background: #fff;
    box-shadow: 0 8px 20px rgba(91, 63, 54, 0.12);
    outline: none;
}

.token:focus-visible {
    box-shadow: 0 0 0 3px var(--lav), 0 8px 20px rgba(91, 63, 54, 0.12);
}

.token:active {
    cursor: grabbing;
}

.token__icon {
    flex: none;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: center / 125% no-repeat;
    box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--ring, var(--lav)), 0 6px 12px rgba(91, 63, 54, 0.18);
    transition: filter 0.3s;
}

.token__text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.token__name {
    font-size: 0.86rem;
    font-weight: 600;
    line-height: 1.25;
}

.token__meta {
    font-size: 0.7rem;
    color: var(--ink-soft);
    letter-spacing: 0.05em;
}

.token__check {
    margin-left: auto;
    flex: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--mint-deep);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    display: grid;
    place-items: center;
    opacity: 0;
    transform: scale(0.4);
    transition: opacity 0.3s, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.token.is-dragging {
    opacity: 0.35;
}

.token.is-used {
    cursor: default;
    opacity: 0.55;
    transform: none !important;
    background: rgba(255, 255, 255, 0.4);
    box-shadow: none !important;
}

.token.is-used .token__icon {
    filter: grayscale(0.5);
}

.token.is-used .token__check {
    opacity: 1;
    transform: scale(1);
}

.scroll__hint {
    margin-top: 1rem;
    text-align: center;
    font-family: var(--font-hand);
    font-size: 1.05rem;
    color: var(--ink-soft);
}

/* ---------- drag ghost ---------- */

.drag-ghost {
    position: fixed;
    left: 0;
    top: 0;
    width: 74px;
    height: 74px;
    border-radius: 50%;
    background: center / 125% no-repeat;
    box-shadow: 0 0 0 4px #fff, 0 0 0 6px var(--ring, var(--lav)), 0 14px 30px rgba(91, 63, 54, 0.3);
    pointer-events: none;
    z-index: 2000;
    will-change: transform;
    transition: box-shadow 0.2s;
}

.drag-ghost.is-over {
    box-shadow: 0 0 0 4px #fff, 0 0 0 6px var(--gold), 0 0 44px 6px rgba(255, 224, 160, 0.9);
}

.drag-ghost.is-flying {
    transition: transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.55s, box-shadow 0.2s;
}

/* ---------- portal ---------- */

.portal-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.portal {
    position: relative;
    width: min(560px, 100%);
    aspect-ratio: 1;
}

.portal__halo {
    position: absolute;
    inset: 10%;
    border-radius: 50%;
    background: conic-gradient(from 0deg, var(--rose), var(--lav), var(--sky), var(--mint), var(--butter), var(--rose));
    filter: blur(38px);
    opacity: 0.6;
    animation: spin 18s linear infinite;
    transition: opacity 0.4s;
}

.portal.is-over .portal__halo,
.portal.is-pulse .portal__halo {
    opacity: 0.95;
}

.portal__img {
    position: relative;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    -webkit-mask-image: radial-gradient(ellipse 46% 46% at 50% 44%, #000 82%, rgba(0, 0, 0, 0.5) 92%, transparent 100%);
    mask-image: radial-gradient(ellipse 46% 46% at 50% 44%, #000 82%, rgba(0, 0, 0, 0.5) 92%, transparent 100%);
    filter: saturate(1.05);
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.35s;
    pointer-events: none;
}

.portal.is-over .portal__img {
    transform: scale(1.03);
    filter: saturate(1.25) brightness(1.06);
}

.portal.is-pulse .portal__img {
    animation: portalPulse 0.7s ease-out;
}

.portal__dropzone {
    position: absolute;
    left: 50%;
    top: 47%;
    width: 44%;
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    pointer-events: none;
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    transition: box-shadow 0.3s;
}

.portal.is-over .portal__dropzone {
    box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.75), 0 0 70px 24px rgba(255, 255, 255, 0.75);
}

.twinkle {
    position: absolute;
    left: var(--tx);
    top: var(--ty);
    width: 10px;
    height: 10px;
    background: #fff;
    clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.9));
    animation: twinkle 3.2s ease-in-out infinite;
    animation-delay: var(--td, 0s);
    pointer-events: none;
}

.portal__tokens {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.placed {
    position: absolute;
    width: 68px;
    height: 68px;
    margin: -34px 0 0 -34px;
    border-radius: 50%;
    background: center / 125% no-repeat;
    box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--ring, var(--lav)), 0 10px 24px rgba(60, 40, 90, 0.35);
    pointer-events: auto;
    cursor: pointer;
    rotate: var(--rot, 0deg);
    scale: 1;
    animation: bob 4s ease-in-out infinite;
    animation-delay: var(--delay, 0s);
    transition: scale 0.55s cubic-bezier(0.34, 1.56, 0.64, 1), rotate 0.3s, box-shadow 0.3s;
}

.placed.is-hidden {
    scale: 0;
}

.placed:hover {
    scale: 1.14;
    rotate: 0deg;
    box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--gold), 0 14px 30px rgba(60, 40, 90, 0.4);
    z-index: 5;
}

.portal__caption {
    font-family: var(--font-hand);
    font-size: 1.3rem;
    color: var(--ink-soft);
    min-height: 1.6em;
    text-align: center;
    transition: opacity 0.3s;
}

/* ---------- memories ---------- */

.memories {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}

.polaroid-stack {
    position: relative;
    width: 260px;
    height: 320px;
}

.polaroid {
    position: absolute;
    left: 10px;
    top: 4px;
    width: 240px;
    background: #fff;
    padding: 12px 12px 12px;
    border-radius: 3px;
    box-shadow: 0 12px 30px rgba(91, 63, 54, 0.16);
    transform: rotate(var(--rot)) translate(var(--dx, 0), var(--dy, 0));
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s;
    cursor: pointer;
    will-change: transform;
}

.polaroid__img {
    aspect-ratio: 1;
    background: center / cover no-repeat;
    border: 1px solid #f1e8e0;
}

.polaroid__caption {
    font-family: var(--font-hand);
    font-size: 1.15rem;
    color: var(--ink);
    text-align: center;
    padding-top: 0.55rem;
    height: 3.9em;
    line-height: 1.2;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
}

.polaroid:hover {
    transform: rotate(0deg) translate(var(--dx, 0), var(--dy, 0)) scale(1.05);
    box-shadow: 0 22px 44px rgba(91, 63, 54, 0.22);
    z-index: 60 !important;
}

.polaroid.is-front {
    animation: lift 0.75s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.memory-card {
    width: 100%;
    max-width: 300px;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid #fff;
    border-radius: var(--radius);
    padding: 0.9rem 1.2rem 1rem;
    box-shadow: var(--shadow);
    text-align: center;
}

.memory-card__label {
    font-size: 0.66rem;
    letter-spacing: 0.26em;
    font-weight: 700;
    color: var(--rose-deep);
}

.memory-card__text {
    font-family: var(--font-hand);
    font-size: 1.3rem;
    line-height: 1.2;
    margin-top: 0.3rem;
}

.memory-card.is-flash {
    animation: flash 0.7s ease-out;
}

/* ---------- footer ---------- */

.foot {
    text-align: center;
    font-family: var(--font-hand);
    font-size: 1.1rem;
    color: var(--ink-soft);
    padding: 0.5rem 1rem 2rem;
}

/* ---------- effects layer ---------- */

.fx {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1700;
    overflow: hidden;
}

.spark {
    position: absolute;
    left: 0;
    top: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--c);
    box-shadow: 0 0 8px var(--c);
    transform: translate(-50%, -50%) scale(0.4);
    animation: burst var(--d, 1.2s) cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
}

.spark--star {
    border-radius: 0;
    width: 14px;
    height: 14px;
    clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
    box-shadow: none;
}

.confetti {
    position: absolute;
    top: -24px;
    left: var(--x);
    width: 10px;
    height: 16px;
    border-radius: 2px;
    background: var(--c);
    animation: fall var(--d, 3.5s) linear var(--delay, 0s) both;
}

.confetti--round {
    border-radius: 50%;
    width: 11px;
    height: 11px;
}

/* ---------- finale ---------- */

.finale {
    position: fixed;
    inset: 0;
    z-index: 1600;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(91, 63, 54, 0.35);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: fadeIn 0.4s ease-out;
}

.finale[hidden] {
    display: none;
}

.finale__card {
    background: var(--paper);
    border-radius: 26px;
    padding: 2.4rem 2rem 2.2rem;
    max-width: 540px;
    text-align: center;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
    border: 1px solid #fff;
    animation: popCard 0.65s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.finale__eyebrow {
    font-size: 0.72rem;
    letter-spacing: 0.3em;
    font-weight: 700;
    color: var(--ink-soft);
}

.finale__title {
    font-family: var(--font-script);
    font-size: clamp(2.4rem, 7vw, 3.6rem);
    font-weight: 400;
    color: #b8607f;
    line-height: 1.1;
    margin: 0.4rem 0 0.8rem;
}

.finale__text {
    font-family: var(--font-hand);
    font-size: 1.35rem;
    line-height: 1.3;
    color: var(--ink);
}

.finale__btn {
    margin-top: 1.4rem;
    font: inherit;
    font-weight: 600;
    text-transform: lowercase;
    padding: 0.7rem 1.5rem;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--rose-deep), var(--lav-deep));
    color: #fff;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(183, 154, 230, 0.45);
    transition: transform 0.2s, box-shadow 0.2s;
}

.finale__btn:hover,
.finale__btn:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(183, 154, 230, 0.55);
    outline: none;
}


/* ---------- password gate ---------- */

body.is-locked {
    overflow: hidden;
}

.gate {
    position: fixed;
    inset: 0;
    z-index: 1800;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(255, 248, 241, 0.7);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    transition: opacity 0.5s ease;
}

.gate.is-open {
    opacity: 0;
    pointer-events: none;
}

.gate[hidden] {
    display: none;
}

.gate__card {
    width: min(420px, 100%);
    background: var(--paper);
    border: 1px solid #fff;
    border-radius: 26px;
    padding: 2.2rem 1.8rem 1.8rem;
    text-align: center;
    box-shadow: 0 30px 80px rgba(91, 63, 54, 0.22);
    animation: popCard 0.65s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gate__card.is-shaking {
    animation: shake 0.45s ease;
}

.gate__eyebrow {
    font-size: 0.72rem;
    letter-spacing: 0.3em;
    font-weight: 700;
    color: var(--ink-soft);
}

.gate__title {
    font-family: var(--font-script);
    font-size: clamp(2.2rem, 6vw, 3rem);
    font-weight: 400;
    color: #8b6bc9;
    line-height: 1.1;
    margin: 0.3rem 0 0.4rem;
}

.gate__text {
    font-family: var(--font-hand);
    font-size: 1.25rem;
    color: var(--ink);
    margin-bottom: 1.1rem;
}

.gate__input {
    width: 100%;
    font: inherit;
    font-size: 1.05rem;
    text-align: center;
    letter-spacing: 0.2em;
    padding: 0.75rem 1rem;
    border: 2px solid var(--lav);
    border-radius: 999px;
    background: #fff;
    color: var(--ink);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.gate__input::placeholder {
    letter-spacing: 0.05em;
    color: #b9a59d;
}

.gate__input:focus {
    border-color: var(--lav-deep);
    box-shadow: 0 0 0 4px rgba(183, 154, 230, 0.25);
}

.gate__btn {
    margin-top: 0.9rem;
    width: 100%;
    font: inherit;
    font-weight: 600;
    text-transform: lowercase;
    padding: 0.75rem 1.5rem;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--rose-deep), var(--lav-deep));
    color: #fff;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(183, 154, 230, 0.45);
    transition: transform 0.2s, box-shadow 0.2s;
}

.gate__btn:hover,
.gate__btn:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(183, 154, 230, 0.55);
    outline: none;
}

.gate__error {
    min-height: 1.4em;
    margin-top: 0.7rem;
    font-family: var(--font-hand);
    font-size: 1.1rem;
    color: #c95d7c;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-10px); }
    40% { transform: translateX(10px); }
    60% { transform: translateX(-6px); }
    80% { transform: translateX(6px); }
}

/* ---------- keyframes ---------- */

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes portalPulse {
    0% {
        transform: scale(1);
        filter: saturate(1.05) brightness(1);
    }

    30% {
        transform: scale(1.05);
        filter: saturate(1.5) brightness(1.18);
    }

    100% {
        transform: scale(1);
        filter: saturate(1.05) brightness(1);
    }
}

@keyframes twinkle {

    0%,
    100% {
        opacity: 0.15;
        transform: scale(0.6) rotate(0deg);
    }

    50% {
        opacity: 1;
        transform: scale(1.2) rotate(45deg);
    }
}

@keyframes bob {

    0%,
    100% {
        translate: 0 0;
    }

    50% {
        translate: 0 -8px;
    }
}

@keyframes burst {
    0% {
        transform: translate(-50%, -50%) scale(0.4);
        opacity: 1;
    }

    100% {
        transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) scale(0) rotate(200deg);
        opacity: 0;
    }
}

@keyframes fall {
    0% {
        transform: translateY(0) rotate(0deg);
    }

    100% {
        transform: translateY(115vh) rotate(720deg);
    }
}

@keyframes lift {
    0% {
        transform: rotate(var(--rot)) translate(var(--dx, 0), var(--dy, 0)) scale(1);
    }

    45% {
        transform: rotate(0deg) translate(0, -26px) scale(1.12);
    }

    100% {
        transform: rotate(var(--rot)) translate(var(--dx, 0), var(--dy, 0)) scale(1);
    }
}

@keyframes flash {
    0% {
        background: rgba(253, 231, 181, 0.95);
    }

    100% {
        background: rgba(255, 255, 255, 0.78);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
}

@keyframes popCard {
    from {
        transform: translateY(30px) scale(0.9);
        opacity: 0;
    }
}

/* ---------- responsive ---------- */

@media (max-width: 1100px) {
    .stage {
        grid-template-columns: 1fr;
        grid-template-areas:
            "portal"
            "tokens"
            "memories";
        padding: 0 1.25rem 2rem;
        gap: 1.75rem;
    }

    .portal-stage {
        grid-area: portal;
    }

    .scroll {
        grid-area: tokens;
        width: 100%;
        max-width: 620px;
        margin: 0 auto;
    }

    .memories {
        grid-area: memories;
    }

    .token-list {
        grid-template-columns: 1fr 1fr;
    }

    .polaroid-stack {
        margin-top: 0.5rem;
    }
}

@media (max-width: 600px) {
    .stage {
        padding: 0 16px 2rem;
    }

    .hero {
        padding-top: 1.75rem;
    }

    .token-list {
        grid-template-columns: 1fr;
    }

    .portal {
        width: min(420px, 100%);
    }

    .scroll__rod {
        left: 0;
        right: 0;
    }

    .scroll__rod::before {
        left: -4px;
    }

    .scroll__rod::after {
        right: -4px;
    }

    .scroll__paper {
        padding: 1.4rem 1rem 1rem;
    }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {

    .portal__halo,
    .twinkle,
    .placed {
        animation: none;
    }

    .polaroid,
    .token,
    .placed,
    .drag-ghost.is-flying,
    .progress-bar__fill {
        transition-duration: 0.01ms;
    }

    .polaroid.is-front,
    .memory-card.is-flash,
    .portal.is-pulse .portal__img,
    .finale,
    .finale__card {
        animation: none;
    }
}
