* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    margin: 0;
    width: 100%;
    min-height: 100dvh;
    overflow: hidden;

    display: flex;
    justify-content: center;
    align-items: center;

    background: #fafafa;

    position: relative;
    isolation: isolate;
    touch-action: manipulation;
}

body::before {
    content: "";
    position: absolute;
    inset: -150px; /* extra area so no empty gaps while moving */

    background-image:
        radial-gradient(circle, #f7d3e7 24px, transparent 25px),
        radial-gradient(circle, #f7d3e7 24px, transparent 25px);

    background-size: 130px 130px;

    background-position:
        0 0,
        65px 65px;

    animation: moveDots 9s linear infinite;

    z-index: -1;
    opacity: 0;
    pointer-events: none;

    transition:
        opacity 0.5s ease,
        filter 0.5s ease;
}

@keyframes moveDots {
    from {
        transform: translate(0, 0);
    }

    to {
        transform: translate(-130px, -130px);
    }
}

body.menu-visible::before {
    opacity: 1;
    transition: opacity 1.4s ease;
}

.loading-screen {
     position: fixed;
    width: 100%;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    opacity: 1;
    transition: opacity 0.8s ease;
}

.loading-screen.fade-out {
    opacity: 0;
}

/* Loading Text */
.loading-text {
    font-family: "Riffic Free", sans-serif;

    display: flex;
    justify-content: center;
    align-items: center;

    font-size: 26px;
    color: #ffffff;
    font-weight: 800;
    letter-spacing: 6.5px;
    margin-bottom: 9px;

    -webkit-text-stroke: 5px #b26393;
    paint-order: stroke fill;
}

.loading-text span {
    display: inline-block;
    font-weight: 800;

    animation: ddlcBounce 2.3s infinite;
}

.loading-text span:nth-child(1) {
    animation-delay: 0s;
}

.loading-text span:nth-child(2) {
    animation-delay: 0.15s;
}

.loading-text span:nth-child(3) {
    animation-delay: 0.30s;
}

.loading-text span:nth-child(4) {
    animation-delay: 0.45s;
}

.loading-text span:nth-child(5) {
    animation-delay: 0.60s;
}

.loading-text span:nth-child(6) {
    animation-delay: 0.75s;
}

.loading-text span:nth-child(7) {
    animation-delay: 0.90s;
}

.loading-text span:nth-child(8) {
    animation-delay: 1.05s;
}

.loading-text span:nth-child(9) {
    animation-delay: 1.20s;
}

.loading-text span:nth-child(10) {
    animation-delay: 1.35s;
}

@keyframes ddlcBounce {
    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    8% {
        transform: translateY(-8px) scale(1.18);
    }

    16% {
        transform: translateY(0) scale(1);
    }
}
.loading-tip-box{
    position: absolute;
    left: 50%;
    bottom: -15px;
   
    transform: translateX(-50%) translateY(120px);
z-index: 5000;
    width: min(92dvw, 850px);
    height: 120px;

    opacity: 0;
    overflow: visible;

    border-radius: 16px;
    
    border: 3px solid #f7e7f0;

    background-color: #f9a8cef6;
    background-image:
        radial-gradient(circle, rgba(243, 117, 180, 0.52) 7px, transparent 8.8px),
        radial-gradient(circle, rgba(243, 117, 180, 0.52) 7px, transparent 8.8px);

    background-size: 56px 56px;
    background-position:
        0px 0px,
        28px 28px;

    box-shadow:
        inset 0 0 0 2px #d987b2,
        0 0 14px rgba(255, 192, 220, 0.25);

    transition:
        opacity 0.7s ease,
        transform 0.7s cubic-bezier(.22, 1, .36, 1);
}

.loading-tip-name{
     position: absolute;

    top: -34px;
    left: 28px;

    min-width: 110px;
    height: 33px;

    display: flex;
    justify-content: center;
    align-items: center;

    background: #e8dbe2;

    border: 2px solid #f7e7f0;
    border-bottom: none;

    border-radius: 12px 12px 0 0;

    font-family: "Riffic Free", sans-serif;
    font-size: 18px;
    color: white;

    -webkit-text-stroke: 3px #b26393;
    paint-order: stroke fill;

    opacity: 0.95;
}
.loading-tip-box::after {
    content: "";
    position: absolute;

    left: 0;
    right: 0;
    bottom: 0;

    height: 40px;

    background: linear-gradient(
        to top,
        rgba(255, 255, 255, 0.32) 0%,
        rgba(255, 255, 255, 0.12) 60%,
        transparent 100%
    );

    border-radius:
        0 0 16px 16px /
        0 0 100% 100%;

    opacity: 0.75;
}

.loading-tip-box.show {
    opacity: 0.85;
    transform: translateX(-50%) translateY(0);
}
#loading-tip-text{
   position: absolute;

    left: 32px;
    top: 20px;
    right: 38px;

    font-family: "Aller", sans-serif;
    font-size: 23px;
    color: white;

    -webkit-text-stroke: 1px #000000;
    font-weight: 650;
}

/* Loading Bar */
.progress-container {
    width: 80%;
    max-width: 340px;
    height: 30px;

    background: rgb(255, 255, 255);

    border: 2px solid #ffffff;

    outline: 3.4px solid #ffabd2;
    outline-offset: 0px;

    border-radius: 8px;
    overflow: hidden;

    box-shadow: 0 0 12px rgba(248, 184, 209, 0.35);
}

.progress-bar {
    position: relative;

    width: 0%;
    height: 100%;

    border-radius: 8px;
    overflow: hidden;

    background: linear-gradient(
        90deg,
        #fda1ca,
        #feb7d9,
        #ffb4cf
    );

    transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Gloss Highlight */
.progress-bar::before {
    content: "";

    position: absolute;
    top: 0px;
    left: 0px;
    right: 0px;

    height: 35%;

    border-radius: 999px;

    background: rgba(255, 255, 255, 0.4);
}

.progress-bar::after {
    content: "";
    position: absolute;
    inset: 0;

    background-image:
        radial-gradient(circle, rgba(255, 255, 255, 0.18) 2.8px, transparent 3.2px),
        radial-gradient(circle, rgba(255, 255, 255, 0.14) 2.8px, transparent 3.2px),
        radial-gradient(circle, rgba(255, 255, 255, 0.12) 2.8px, transparent 3.2px);

    background-size:
        24px 24px,
        24px 24px,
        24px 24px;

    /* offsets create staggered rows */
    background-position:
        0px 0px,
        12px 8px,
        6px 16px;

    animation: polkaMove 3.5s linear infinite;
    pointer-events: none;
}

@keyframes polkaMove {
    from {
        background-position:
            0px 0px,
            12px 8px,
            6px 16px;
    }

    to {
        background-position:
            24px 0px,
            36px 8px,
            30px 16px;
    }
}

.loading-text.hide,
.progress-container.hide {
    opacity: 0;
    transition: opacity 0.6s ease;
}

body.enter-scene::before {
    animation-play-state: paused;
    opacity: 0.5; /* controls fade */
    filter: brightness(1.03);
}

.enter-text {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);

    z-index: 10000;

    opacity: 0;
    pointer-events: none;

    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;

    padding: 25px;

    font-family: "Riffic Free", sans-serif;
    font-size: 28px;
    color: #ffffff;
    letter-spacing: 0px;

    -webkit-text-stroke: 4.5px #b26393;
    paint-order: stroke fill;

    background: linear-gradient(
        180deg,
        #ffe6f3 0%,
        #ffe6f3 50%,
        #ffe6f3 100%
    );

    border: 0px solid #ffffff;
    outline: 3.4px solid #f8c0e3;
    outline-offset: 0px;
    border-radius: 0px;

    width: 270px;
    height: 180px;

    cursor: pointer;

    box-shadow: 0 0 12px rgba(248, 184, 209, 0.35);

    overflow: hidden;
    transition: none;
}

.enter-text span {
    margin-top: auto;
    margin-bottom: 10px;

    display: inline-block;
    color: #ffffff;

    pointer-events: auto;
    cursor: pointer;

    -webkit-text-stroke: 4.5px #b26393;
    paint-order: stroke fill;

    transition: -webkit-text-stroke-color 0.14s ease-out;
}

.enter-text.show {
    opacity: 1;
    pointer-events: none;
}

.enter-text span:hover {
    -webkit-text-stroke-color: #ffaacc;
}

.enter-text:not(:hover) span {
    animation: none;
}

.enter-text span.selected {
    transform: scale(0.88);
    opacity: 0.55;
    -webkit-text-stroke-color: #ffb7d7;
}

.message {
    font-family: "Aller", sans-serif;
    font-size: 24px;
    color: #000;
    text-align: center;

    -webkit-text-stroke: 0px;
    margin-top: 7px;
}

/* Pink loading screen overlay */
.pink-screen {
    position: fixed;
    inset: 0;

    display: flex;
    justify-content: center;
    align-items: center;

    z-index: 999;
    opacity: 1;

    transition: opacity 1.4s ease;

    /* checkerboard background */
    background-color: #f8f8f8;
    background-image:
        linear-gradient(45deg, #d9dee5 25%, transparent 25%),
        linear-gradient(-45deg, #d9dee5 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #d9dee5 75%),
        linear-gradient(-45deg, transparent 75%, #d9dee5 75%);

    background-size: 46px 46px;

    background-position:
        0 0,
        0 23px,
        23px -23px,
        -23px 0px;
}

.pink-screen.fade-out {
    opacity: 0;
}

.sidebar-buttons {
    position: fixed;
    left: 100px;
   top: 355px;

    z-index: 5000;

    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;

    opacity: 0;
    pointer-events: none;

    transition: opacity 1.5s ease;
}

.sidebar-buttons.show {
    opacity: 1;
}

.menu-btn {
    display: block;
    margin: 0;
    padding: 0;

    background: none;
    border: none;

    font-family: "Riffic Free", sans-serif;
    font-size: 40px;
    font-weight: 490;
    letter-spacing: 1px;
    text-align: left;

    color: #ffffff;

    -webkit-text-stroke: 6px #b26393;
    paint-order: stroke fill;

    cursor: pointer;

    text-shadow: 0 2px 0 rgba(176, 74, 140, 0.35);

    transition: -webkit-text-stroke-color 0.14s ease-out;
}

.menu-btn:hover {
    -webkit-text-stroke-color: #ffaacc;
}

.menu-btn.selected {
    transform: scale(0.88);
    opacity: 0.55;
    -webkit-text-stroke-color: #ffb7d7;
}

.menu-title {
    position: relative;
     top: -230px;
    left: -38.5px;

    margin-bottom: 40px;
    margin-left: 0px;

    font-family: "Riffic Free", sans-serif;
    font-size: 52px;
    color: #ffffff;

    -webkit-text-stroke: 6px #b26393;
    paint-order: stroke fill;

    text-shadow: 0 3px 0 rgba(178, 99, 147, 0.25);
}

.sidebar-bg {
    position: fixed;
    top: 0;
    left: 0px;

    width: 120px;
    height: 100dvh;

    background: #ffe6f3;

    z-index: 100;

    transform: translateX(-140px);
    will-change: transform;

    transition: transform 0.8s cubic-bezier(.22, 1, .36, 1);
}

.sidebar-bg.show {
    transform: translateX(0);
}

.sidebar-curve {
    position: fixed;
    top: -200px;
    left: 120px;

    height: calc(100dvh + 400px);
    width: 194px;

    background: #ffe6f3;

    border: 24px solid #f7abd0;
    border-left: none;

    box-sizing: border-box;
    z-index: 102;

    transform: translateX(-494px);

    transition: transform 0.8s cubic-bezier(.22, 1, .36, 1);

    border-top-right-radius: 170px 50%;
    border-bottom-right-radius: 170px 50%;
}

.sidebar-curve.show {
    transform: translateX(0);
}

.sidebar-border {
    position: fixed;
    top: 0;
    left: 300px;

    width: 24px;
    height: 100dvh;

    background: #f7abd0;

    z-index: 101;

    transform: translateX(-340px);
    transition: transform 0.8s cubic-bezier(.22, 1, .36, 1);
}

.sidebar-border.show {
    transform: translateX(0);
}

.help-text {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);

    z-index: 10000;

    opacity: 0;
    pointer-events: none;

    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;

    padding: 25px;

    font-family: "Riffic Free", sans-serif;
    font-size: 28px;
    color: #ffffff;

    letter-spacing: 0px;
    -webkit-text-stroke: 4.5px #b26393;
    paint-order: stroke fill;

    background: linear-gradient(
        180deg,
        #ffe6f3 0%,
        #ffe6f3 50%,
        #ffe6f3 100%
    );

    outline: 3.4px solid #f8c0e3;

    width: 270px;
    height: 180px;

    box-shadow: 0 0 12px rgba(248, 184, 209, 0.35);
}

.help-text.show {
    opacity: 1;
    pointer-events: auto;
}

.help-text span {
    margin-top: auto;
    margin-bottom: 10px;

    display: inline-block;
    cursor: pointer;
    color: #ffffff;

    -webkit-text-stroke: 4.5px #b26393;
}

.help-text span:hover {
    -webkit-text-stroke-color: #ffaacc;
}

.help-text:not(:hover) span {
    animation: none;
}

.help-text span.selected {
    transform: scale(0.88);
    opacity: 0.55;
    -webkit-text-stroke-color: #ffb7d7;
}

.quit-text {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);

    z-index: 10000;

    opacity: 0;
    pointer-events: none;

    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;

    padding: 25px;
    width: 270px;
    height: 180px;

    background: #ffe6f3;
    outline: 3.4px solid #f8c0e3;

    box-shadow: 0 0 12px rgba(248, 184, 209, 0.35);
}

.quit-text.show {
    opacity: 1;
    pointer-events: auto;
}

.quit-buttons {
    display: flex;
    gap: 80px;
    margin-bottom: 10px;
}

.quit-buttons span {
    font-family: "Riffic Free", sans-serif;
    font-size: 25px;
    color: #fff;
    cursor: pointer;

    -webkit-text-stroke: 4.5px #b26393;
    paint-order: stroke fill;
}

.quit-buttons span:hover {
    -webkit-text-stroke-color: #ffaacc;
}

.quit-text:not(:hover) span {
    animation: none;
}

.quit-text span.selected {
    transform: scale(0.88);
    opacity: 0.55;
    -webkit-text-stroke-color: #ffb7d7;
}

.quit-final-text {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);

    z-index: 10001;

    opacity: 0;
    pointer-events: none;

    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;

    padding: 25px;
    width: 270px;
    height: 180px;

    background: #ffe6f3;
    outline: 3.4px solid #f8c0e3;

    box-shadow: 0 0 12px rgba(248, 184, 209, 0.35);

}

.quit-final-text.show {
    opacity: 1;
    pointer-events: auto;
}

.quit-final-text span {
    margin-top: auto;
    margin-bottom: 10px;

    display: inline-block;
    cursor: pointer;
    color: #ffffff;

    font-family: "Riffic Free", sans-serif;
    font-size: 25px;

    -webkit-text-stroke: 4.5px #b26393;
    paint-order: stroke fill;
}

.quit-final-text span:hover {
    -webkit-text-stroke-color: #ffaacc;
}

.quit-final-text span.selected {
    transform: scale(0.88);
    opacity: 0.55;
    -webkit-text-stroke-color: #ffb7d7;
}

.sidebar-buttons.disabled {
    pointer-events: none;
}

.sidebar-buttons:not(.disabled) {
    pointer-events: auto;
}

.black-transition {
    position: fixed;
    inset: 0;

    background: black;

    z-index: 999999;

    opacity: 0;
    pointer-events: none;

    transition: opacity 1.2s ease;
}

.black-transition.show {
    opacity: 1;
}

.webcard1 {
    position: fixed;
    inset: 0;

    z-index: 20000;

    background: none;

    opacity: 0;
    pointer-events: none;

    transition: opacity 1.2s ease;
}

.webcard1.active {
    opacity: 1;
    pointer-events: auto;
}
.webcard1-image {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;
z-index: 200;
    object-fit: cover;

    opacity: 0;

    transition: opacity 2s ease;
}

.webcard1-image.show {
    opacity: 1;
}
.character-image {
    position: absolute;
left:33%;
    transform: translateX(-50%);
    height: 100%;

    opacity: 0;
    object-fit: cover;
    z-index: 300;


    transition: opacity 1.8s ease;
}

.character-image.show {
    opacity: 1;
}

/* Dialog box */
.dialog-box {
    position: absolute;
    left: 50%;
    bottom: -15px;

    transform: translateX(-50%) translateY(120px);

    width: min(92dvw, 850px);
    height: 120px;

    opacity: 0;
    overflow: visible;

    border-radius: 16px;
    border: 3px solid #f7e7f0;

    background-color: #f9a8cef6;
    background-image:
       radial-gradient(circle, rgba(243, 117, 180, 0.52) 7px, transparent 8.8px),
        radial-gradient(circle, rgba(243, 117, 180, 0.52) 7px, transparent 8.8px);

    background-size: 56px 56px;
    background-position:
        0px 0px,
        28px 28px;

    box-shadow:
        inset 0 0 0 2px #d987b2,
        0 0 14px rgba(255, 192, 220, 0.25);
z-index: 900;
    transition:
        opacity 0.7s ease,
        transform 0.7s cubic-bezier(.22, 1, .36, 1);
}

.dialog-name {
    position: absolute;

    top: -34px;
    left: 28px;

    min-width: 110px;
    height: 33px;

    display: flex;
    justify-content: center;
    align-items: center;

    background: #e8dbe2;

    border: 2px solid #f7e7f0;
    border-bottom: none;

    border-radius: 12px 12px 0 0;

    font-family: "Riffic Free", sans-serif;
    font-size: 18px;
    color: white;

    -webkit-text-stroke: 3px #b26393;
    paint-order: stroke fill;

    opacity: 0.95;
    z-index: 1500;
}

.dialog-box::after {
    content: "";
    position: absolute;

    left: 0;
    right: 0;
    bottom: 0;

    height: 40px;

    background: linear-gradient(
        to top,
        rgba(255, 255, 255, 0.32) 0%,
        rgba(255, 255, 255, 0.12) 60%,
        transparent 100%
    );

    border-radius:
        0 0 16px 16px /
        0 0 100% 100%;

    opacity: 0.75;
}

.dialog-box.show {
    opacity: 0.85;
    transform: translateX(-50%) translateY(0);
}

#typewriter-text {
    position: absolute;

    left: 32px;
    top: 20px;
    right: 38px;

    font-family: "Aller", sans-serif;
    font-size: 23px;
    color: white;

    -webkit-text-stroke: 1px #000000;
    font-weight: 650;
    z-index: 1000;
}
.dialog-box-2 {
    position: absolute;
    left: 50%;
    bottom: -15px;
    transform: translateX(-50%) translateY(120px);

    width: min(92dvw, 850px);
    height: 120px;

    opacity: 0;
    overflow: visible;

    border-radius: 16px;
    border: 3px solid #f7e7f0;

    background-color: #f9a8cef6;
    background-image:
        radial-gradient(circle, rgba(243,117,180,0.52) 7px, transparent 8.8px),
        radial-gradient(circle, rgba(243,117,180,0.52) 7px, transparent 8.8px);

    background-size: 56px 56px;
    background-position: 0 0, 28px 28px;

    box-shadow:
        inset 0 0 0 2px #d987b2,
        0 0 14px rgba(255,192,220,0.25);

    z-index: 22000;

    transition:
        opacity 0.7s ease,
        transform 0.7s cubic-bezier(.22,1,.36,1);
}

.dialog-box-2.show {
    opacity: 0.85;
    transform: translateX(-50%) translateY(0);
}
#typewriter-text-2 {
    position: absolute;
    left: 32px;
    top: 20px;
    right: 38px;

    font-family: "Aller", sans-serif;
    font-size: 23px;
    color: white;
    -webkit-text-stroke: 1px #000;
    font-weight: 650;
}
/* Navigation arrows */
.nav-left,
.nav-right {
    position: absolute;
    bottom: 17.5px;

    width: 0;
    height: 0;

    opacity: 0;
    pointer-events: none;
    cursor: pointer;

    transition:
        transform 0.18s ease,
        opacity 0.3s ease;
}

.nav-left {
    left: 18px;

    border-top: 9px solid transparent;
    border-bottom: 9px solid transparent;
    border-right: 14px solid #fff5fb;
}

.nav-right {
    right: 18px;

    border-top: 9px solid transparent;
    border-bottom: 9px solid transparent;
    border-left: 14px solid #fff5fb;
}

.nav-left.show{
    opacity: 1;
    pointer-events: auto;
    animation: navBreathLeft 1.6s ease-in-out infinite;
}
.nav-right.show {
    opacity: 1;
    pointer-events: auto;
    animation: navBreathRight 1.6s ease-in-out infinite;
}

.nav-left:active,
.nav-right:active {
    transform: scale(0.88);
}
.nav-left-2,
.nav-right-2 {
    position: absolute;
    bottom: 17.5px;

    width: 0;
    height: 0;

    opacity: 0;
    pointer-events: none;
    cursor: pointer;

    transition:
        transform 0.18s ease,
        opacity 0.3s ease;
}

.nav-left-2 {
    left: 18px;

    border-top: 9px solid transparent;
    border-bottom: 9px solid transparent;
    border-right: 14px solid #fff5fb;
}

.nav-right-2 {
    right: 18px;

    border-top: 9px solid transparent;
    border-bottom: 9px solid transparent;
    border-left: 14px solid #fff5fb;
}

.nav-left-2.show{
    opacity: 1;
    pointer-events: auto;
    animation: navBreathLeft 1.6s ease-in-out infinite;
}
.nav-right-2.show {
    opacity: 1;
    pointer-events: auto;
    animation: navBreathRight 1.6s ease-in-out infinite;
}

.nav-left-2:active,
.nav-right-2:active {
    transform: scale(0.88);
}
@keyframes navBreathLeft {
    0%,100% { transform: translateX(0); }
    50% { transform: translateX(-4px); }
}
@keyframes navBreathRight {
    0%,100% { transform: translateX(0); }
    50% { transform: translateX(4px); }
}
/* ================= WEBCARD 2 ================= */

.webcard2 {
    position: fixed;
    inset: 0;
    z-index: 21000;

    opacity: 0;
    pointer-events: none;

    transition: opacity 1.2s ease;
}

.webcard2.active {
    opacity: 1;
    pointer-events: auto;
}

/* static faded polkadot background */
    .webcard2::before {
    content: "";
    position: absolute;
    inset: -150px;
    z-index: -1;
    pointer-events: none;

    background-color: #ffffff;

    background-image:
        radial-gradient(circle, rgba(247, 211, 231, 0.42) 24px, transparent 25px),
        radial-gradient(circle, rgba(247, 211, 231, 0.42) 24px, transparent 25px);

    background-size: 130px 130px; /* slightly larger spacing */

    background-position:
        0 0,
        65px 65px;

    animation: moveDots 9s linear infinite;
}


/* photo frame base */
.photo-frame {
    width: 300px;
    height: 180px;
     border: 3.2px solid #fdc4e0; /* thin pink border */
    border-radius: 0px;
    position: relative;
    box-shadow:
        0 0 12px rgba(247, 171, 208, 0.35),
        0 8px 22px rgba(178, 99, 147, 0.22)
}
.photo-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.timestamp {

left:50%;
 position: absolute;   /* ADD THIS */
    top: calc(100% + 3.5px); /* places below frame */
transform: translateX(-50%);
white-space: nowrap;
    font-family: "Aller", sans-serif;
    font-size: 14px;
    color: #da80ae;


}
/* six frame positions */
.photo-grid {
    position: absolute;
    left: 50%;
    top: 44%; /* was probably ~50%, lower = moves upward */

    transform: translate(-50%, -50%);

    display: grid;
    grid-template-columns: repeat(3, auto);

    column-gap: 48px; /* reduce horizontal gap */
    row-gap: 85px;    /* reduce vertical gap */
}
#photo-slot-1 {
    object-position: center 29%;
}
#photo-slot-3 {
    object-position: center 33%;
}
#photo-slot-4 {
    object-position: center 32%;
}

#photo-slot-6 {
    object-position: center 27.5%;
}
@media (orientation: portrait) {
    .photo-grid {
        grid-template-columns: repeat(2, auto); /* 2 columns instead of 3 */
        column-gap: 48px;
        row-gap: 85px;

        left: 50%;
        top: 44%; /* tweak if needed */
        transform: translate(-50%, -50%);
    }
}
.page-selector {
    position: absolute;
    left: 50%;
    bottom: 147px; /* adjust if too close to dialog box */
    transform: translateX(-25%);

    display: flex;
    align-items: center;
    gap: 32px;

    z-index: 25000;
}

.page-number {
    font-family: "Aller", sans-serif;
    font-size: 24px;
    color: #908c8e;

    -webkit-text-stroke: 1.8px #fff7fb;
    paint-order: stroke fill;

    cursor: pointer;
    user-select: none;

    transition:
        transform 0.25s ease,
        color 0.25s ease;
}

.page-number.active {
    color: #b26393;
    transform: scale(1.28);
}

.page-title {
    position: absolute;
    top: 35px;          /* distance from top */
    left: 50%;
    transform: translateX(-50%);

    z-index: 25000;

    font-family:"Aller", sans-serif;
    font-size: 32px;
    color: black;
letter-spacing: 1.2px;

    user-select: none;
    pointer-events: none;
}
.webcard3 {
    position: fixed;
    inset: 0;
    z-index: 22000;
    overflow: hidden;

    background: url("memory-bg.png") center/cover no-repeat;

    opacity: 0;
    pointer-events: none;
    transition: opacity 1.2s ease;
}

.webcard3.active {
    opacity: 1;
    pointer-events: auto;
}
.webcard3::before {
    content: "";
    position: absolute;
    inset: 0;

    background: url("static.gif") center/cover repeat;

    opacity: 0.25;
    mix-blend-mode: screen;

    pointer-events: none;
}
.memory-glitch {
    position: absolute;
    inset: 0;
    z-index: 500;
    pointer-events: none;
    opacity: 0;
}

.memory-glitch.active {
    opacity: 1;
}
.glitch-layer {
    position: absolute;
    inset: 0;
    opacity: 0;
}

.memory-glitch.active .glitch-layer {
    animation: glitchFlash 120ms steps(1) infinite;
}
.glitch-1 {
    background:
        linear-gradient(#ff00ff 0 0) 12% 18% / 180px 8px no-repeat,
        linear-gradient(#00ffff 0 0) 67% 35% / 240px 6px no-repeat,
        linear-gradient(#ffffff 0 0) 44% 56% / 160px 10px no-repeat,
        linear-gradient(#000000 0 0) 25% 72% / 220px 7px no-repeat;
}
.glitch-2 {
    background:
        linear-gradient(#ff44aa 0 0) 75% 20% / 130px 14px no-repeat,
        linear-gradient(#44ccff 0 0) 18% 44% / 210px 5px no-repeat,
        linear-gradient(#ffffff 0 0) 53% 78% / 170px 11px no-repeat;
}
.glitch-3 {
    background:
        repeating-linear-gradient(
            90deg,
            white 0 4px,
            transparent 4px 8px
        );

    background-size: 70px 16px;
    mix-blend-mode: screen;
}
@keyframes glitchFlash {
    0% {
        opacity: 0;
        transform: translate(0,0);
    }

    20% {
        opacity: 1;
        transform: translate(-12px, 4px);
    }

    40% {
        opacity: 0.7;
        transform: translate(8px,-3px);
    }

    60% {
        opacity: 1;
        transform: translate(-6px,2px);
    }

    100% {
        opacity: 0;
        transform: translate(0,0);
    }
}
.memory-box {
    width: 524.3px;
    height: 55px;

    display: flex;
    justify-content: center;
    align-items: center;

    background: #ffe6f3;   /* same soft pink */
    border: 3px solid #f8c0e3;

    font-family: "Aller", sans-serif;
    font-size: 26px;
    color: black;
box-shadow: 0 0 12px rgba(248, 184, 209, 0.35);
    user-select: none;
    visibility: hidden;
}
.memory-boxes {
    position: absolute;
    top: 45%;
    left: 50.4%;
    transform: translate(-50%, -50%);

    display: flex;
    flex-direction: column;
    gap: 36px;
}
.memory-box.show {
    visibility: visible;
}
.dialog-box-3 {
    position: absolute;
    left: 50%;
    bottom: -15px;
    transform: translateX(-50%) translateY(120px);

    width: min(92dvw, 850px);
    height: 120px;

    opacity: 0;
    overflow: visible;

    border-radius: 16px;
    border: 3px solid #f7e7f0;

    background-color: #f9a8cef6;
    background-image:
        radial-gradient(circle, rgba(243,117,180,0.52) 7px, transparent 8.8px),
        radial-gradient(circle, rgba(243,117,180,0.52) 7px, transparent 8.8px);

    background-size: 56px 56px;
    background-position: 0 0, 28px 28px;

    box-shadow:
        inset 0 0 0 2px #d987b2,
        0 0 14px rgba(255,192,220,0.25);

    z-index: 22000;

    transition:
        opacity 0.7s ease,
        transform 0.7s cubic-bezier(.22,1,.36,1);
}

.dialog-box-3.show {
    opacity: 0.85;
    transform: translateX(-50%) translateY(0);
}
#typewriter-text-3 {
    position: absolute;
    left: 32px;
    top: 20px;
    right: 38px;

    font-family: "Aller", sans-serif;
    font-size: 23px;
    color: white;
    -webkit-text-stroke: 1px #000;
    font-weight: 650;
}
/* Navigation arrows */
.nav-left-3,
.nav-right-3 {
    position: absolute;
    bottom: 17.5px;

    width: 0;
    height: 0;

    opacity: 0;
    pointer-events: none;
    cursor: pointer;

    transition:
        transform 0.18s ease,
        opacity 0.3s ease;
}

.nav-left-3 {
    left: 18px;

    border-top: 9px solid transparent;
    border-bottom: 9px solid transparent;
    border-right: 14px solid #fff5fb;
}

.nav-right-3 {
    right: 18px;

    border-top: 9px solid transparent;
    border-bottom: 9px solid transparent;
    border-left: 14px solid #fff5fb;
}

.nav-left-3.show{
    opacity: 1;
    pointer-events: auto;
    animation: navBreathLeft 1.6s ease-in-out infinite;
}
.nav-right-3.show {
    opacity: 1;
    pointer-events: auto;
    animation: navBreathRight 1.6s ease-in-out infinite;
}

.nav-left-3:active,
.nav-right-3:active {
    transform: scale(0.88);
}
.webcard4 {
    position: fixed;
    inset: 0;
    z-index: 23000;

    opacity: 0;
    pointer-events: none;

    transition: opacity 1.2s ease;
}

.webcard4.active {
    opacity: 1;
    pointer-events: auto;
}

.webcard4::before {
    content: "";
    position: absolute;
    inset: -150px;
    z-index: -1;
    pointer-events: none;

    background-color: #ffffff;

    background-image:
        radial-gradient(circle, rgba(247, 211, 231, 0.42) 24px, transparent 25px),
        radial-gradient(circle, rgba(247, 211, 231, 0.42) 24px, transparent 25px);

    background-size: 130px 130px;
    background-position:
        0 0,
        65px 65px;

    animation: moveDots 9s linear infinite;
}

/* ================= WEBCARD 4 DIALOG ================= */

.dialog-box-4 {
    position: absolute;
    left: 50%;
    bottom: -15px;
    transform: translateX(-50%) translateY(120px);

    width: min(92dvw, 850px);
    height: 120px;

    opacity: 0;
    overflow: visible;

    border-radius: 16px;
    border: 3px solid #f7e7f0;

    background-color: #f9a8cef6;
    background-image:
        radial-gradient(circle, rgba(243,117,180,0.52) 7px, transparent 8.8px),
        radial-gradient(circle, rgba(243,117,180,0.52) 7px, transparent 8.8px);

    background-size: 56px 56px;
    background-position: 0 0, 28px 28px;

    box-shadow:
        inset 0 0 0 2px #d987b2,
        0 0 14px rgba(255,192,220,0.25);

    z-index: 24000;

    transition:
        opacity 0.7s ease,
        transform 0.7s cubic-bezier(.22,1,.36,1);
}

.dialog-box-4.show {
    opacity: 0.85;
    transform: translateX(-50%) translateY(0);
}

#typewriter-text-4 {
    position: absolute;
    left: 32px;
    top: 20px;
    right: 38px;

    font-family: "Aller", sans-serif;
    font-size: 23px;
    color: white;

    -webkit-text-stroke: 1px #000;
    font-weight: 650;
}

.nav-left-4,
.nav-right-4 {
    position: absolute;
    bottom: 17.5px;

    width: 0;
    height: 0;

    opacity: 0;
    pointer-events: none;
    cursor: pointer;

    transition:
        transform 0.18s ease,
        opacity 0.3s ease;
}

.nav-left-4 {
    left: 18px;

    border-top: 9px solid transparent;
    border-bottom: 9px solid transparent;
    border-right: 14px solid #fff5fb;
}

.nav-right-4 {
    right: 18px;

    border-top: 9px solid transparent;
    border-bottom: 9px solid transparent;
    border-left: 14px solid #fff5fb;
}

.nav-left-4.show {
    opacity: 1;
    pointer-events: auto;
    animation: navBreathLeft 1.6s ease-in-out infinite;
}

.nav-right-4.show {
    opacity: 1;
    pointer-events: auto;
    animation: navBreathRight 1.6s ease-in-out infinite;
}

.nav-left-4:active,
.nav-right-4:active {
    transform: scale(0.88);
}

.album-art {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    object-fit: cover;      /* fills box, crops excess */
    object-position: center; /* keeps center visible */

    transition: transform 0.55s ease;
}
.album-container {
    position: relative;
    overflow: hidden;

    width: 320px;
    height: 320px;

    left: 50%;
    top: 90px;
    transform: translateX(-50%);

    border-radius: 28px;
    padding: 4px;

    border: 3.2px solid #f5b2d3;

    box-shadow:
        0 0 0 2px rgba(255,255,255,0.7),
        0 0 22px rgba(245,159,200,0.35);
}
.current-art {
    transform: translateX(0%);
    z-index: 2;
}

.next-art {
    transform: translateX(100%);
    z-index: 1;
}
.music-info {
    position: absolute;
    top: 430px;
    left: 50%;
    transform: translateX(-50%);

    width: 320px;
}
.song-title {
    font-family: "Aller", sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #000;
    text-align: left;
}
.artist-name {
    margin-top: 6px;

    font-family: "Aller", sans-serif;
    font-size: 16.6px;
    color: #9f91a0;

    text-align: left;
}
.music-progress-wrapper {
    position: absolute;
    top: 508px;
    left: 50%;
    transform: translateX(-50%);

    width: 320px;

    display: flex;
    align-items: center;
    gap: 12px;
}
.current-time,
.duration {
    font-family: "Aller", sans-serif;
    font-size: 14px;
    color: #7d7d7d;
}
.music-progress {
    position: relative;
    flex: 1;
    height: 22px;          /* bigger touch area */
    display: flex;
    align-items: center;
    touch-action: none;    /* IMPORTANT for phones */
    cursor: pointer;
    background: transparent;
}
.music-progress::before {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 3.5px;
    background: #d6d6d6;
    border-radius: 999px;
}
.music-progress-fill {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 3.5px;
    width: 0%;
    background: #f59fc8;
    border-radius: 999px;
}
.music-progress-knob {
    position: absolute;
    top: 50%;
    left: 0%;

    width: 14px;
    height: 14px;

    border-radius: 50%;
    background: white;
    box-shadow: 0 0 8px rgba(0,0,0,0.15);

    transform: translate(-50%, -50%);
    z-index: 20;
    cursor: grab;
    touch-action: none;
}
.music-controls {
    position: absolute;
    top: 536px;
    left: 50%;
    transform: translateX(-50%);

    display: flex;
    align-items: center;
    gap: 28px;
}
/* PREV + NEXT bigger */
#prev-btn,
#next-btn {
    width: 58px;
    height: 58px;
}

#prev-btn .control-icon,
#next-btn .control-icon {
    font-size: 46px;
}

/* SHUFFLE + REPEAT smaller */
#shuffle-btn,
#repeat-btn {
    width: 28px;
    height: 28px;
    font-size: 24px;
}
.control-btn {
    width: 46px;
    height: 46px;
    border: none;
    background: transparent;
    cursor: pointer;
position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;

    padding: 0;
}

.control-icon {
    font-size: 34px;
    color: #7d7d7d;
    line-height: 1;

    display: flex;
    align-items: center;
    justify-content: center;
}

.play-btn {
    width: 72px;
    height: 72px;

    border: none;
    border-radius: 50%;
    background: #f9a8ce;

    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow:
        0 4px 12px rgba(0,0,0,0.14),
        0 0 10px rgba(245,159,200,0.18);
    cursor: pointer;
}

.play-icon {
    width: 0;
    height: 0;

    border-top: 11px solid transparent;
    border-bottom: 11px solid transparent;
    border-left: 18px solid white;

    display: block;
    transform: translateX(3px);
}
.pause-icon {
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: center;
}

.pause-icon span {
    width: 6px;
    height: 24px;
    background: white;
    border-radius: 2px;
    display: block;
}
.control-btn.active::before {
    content: "";
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    background: rgba(255,255,255,0.18);
}
.control-btn.active .control-icon {
    color: #f59fc8;
}

.play-btn:active {
    transform: scale(0.92);
}
.material-symbols-rounded {
    font-size: 32px;
    color: #7a7a7a;

    display: flex;
    align-items: center;
    justify-content: center;

    line-height: 1;
    user-select: none;
}
.control-btn.active {
    background: rgba(245, 159, 200, 0.16);
    border-radius: 50%;

    box-shadow:
        0 0 14px rgba(245,159,200,0.5),
        inset 0 2px 5px rgba(255,255,255,0.5);

    transform: scale(1.08);
}

/* click animation */
.control-btn,
.play-btn {
    transition:
        transform 0.14s ease,
        box-shadow 0.14s ease;
}

.control-btn.pressed,
.play-btn.pressed {
    transform: scale(0.84);
}

.control-btn:disabled,
.play-btn:disabled {
    pointer-events: none;
    opacity: 0.5;
}
.music-progress-knob:active {
    cursor: grabbing;
}
/* ================= WEBCARD 5 ================= */

.webcard5 {
    position: fixed;
    inset: 0;
    z-index: 24000;

    opacity: 0;
    pointer-events: none;

    transition: opacity 1.2s ease;
}

.webcard5.active {
    opacity: 1;
    pointer-events: auto;
}

.webcard5-bg {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;
    object-fit: cover;
}
.webcard5::before {
    content: "";
    position: absolute;
    inset: 0;

    background: url("static.gif") center/cover repeat;

    opacity: 0;
    mix-blend-mode: screen;

    pointer-events: none;
    z-index: 24500;

    transition: opacity 0.15s ease;
}
.webcard5.static-on::before {
    opacity: 0.35;
}
.memory-choice-container {
    position: absolute;
    top: 45%;
    left: 50.4%;
    transform: translate(-50%, -50%);

    display: flex;
    flex-direction: column;
    gap: 30px;
    z-index: 5;
    opacity: 0;
pointer-events: none;
transition: none;
}
.memory-choice-container.show {
    opacity: 1;
    pointer-events: auto;
}
.memory-choice {
    width: 520px;
    height: 61.5px;
display: flex;
    justify-content: center;
    align-items: center;
    border: 3px solid #f6bfd7;
    background: #fbe6ef;

    font-family: 'Aller', sans-serif;
    font-size: 28px;
    color: black;

    cursor: pointer;
    outline: none;

    transition:
        background 0.18s ease,
        color 0.18s ease,
        transform 0.12s ease;
}
.memory-choice:hover {
    background: #fff9fc;
    color: #f59fc8;
}
.memory-choice.selected {
    background: white;
    color: black;
}
.memory-choice:active {
    transform: scale(0.985);
}
@media (orientation: portrait) {
    .memory-choice {
        width: 524.3px;
        height: 64px;
        font-size: 28px;
    }

    .memory-choice-container {
        gap: 30px;
        top: 45%;
    }
}
.dialog-box-5 {
    position: absolute;
    left: 50%;
    bottom: -15px;
    transform: translateX(-50%) translateY(120px);

    width: min(92dvw, 850px);
    height: 120px;

    opacity: 0;
    overflow: visible;

    border-radius: 16px;
    border: 3px solid #f7e7f0;

    background-color: #f9a8cef6;
    background-image:
        radial-gradient(circle, rgba(243,117,180,0.52) 7px, transparent 8.8px),
        radial-gradient(circle, rgba(243,117,180,0.52) 7px, transparent 8.8px);

    background-size: 56px 56px;
    background-position: 0 0, 28px 28px;

    box-shadow:
        inset 0 0 0 2px #d987b2,
        0 0 14px rgba(255,192,220,0.25);

    z-index: 25000;

    transition:
        opacity 0.7s ease,
        transform 0.7s cubic-bezier(.22,1,.36,1);
}

.dialog-box-5.show {
    opacity: 0.85;
    transform: translateX(-50%) translateY(0);
}

#typewriter-text-5 {
    position: absolute;
    left: 32px;
    top: 20px;
    right: 38px;

    font-family: "Aller", sans-serif;
    font-size: 23px;
    color: white;
    -webkit-text-stroke: 1px #000;
    font-weight: 650;
}
.nav-left-5,
.nav-right-5 {
    position: absolute;
    bottom: 17.5px;

    width: 0;
    height: 0;

    opacity: 0;
    pointer-events: none;
    cursor: pointer;

    transition:
        transform 0.18s ease,
        opacity 0.3s ease;
}

.nav-left-5 {
    left: 18px;
    border-top: 9px solid transparent;
    border-bottom: 9px solid transparent;
    border-right: 14px solid #fff5fb;
}

.nav-right-5 {
    right: 18px;
    border-top: 9px solid transparent;
    border-bottom: 9px solid transparent;
    border-left: 14px solid #fff5fb;
}

.nav-left-5.show {
    opacity: 1;
    pointer-events: auto;
    animation: navBreathLeft 1.6s ease-in-out infinite;
}

.nav-right-5.show {
    opacity: 1;
    pointer-events: auto;
    animation: navBreathRight 1.6s ease-in-out infinite;
}

/* ================= LETTER OVERLAY ================= */

/* ===== LETTER OVERLAY ===== */
.letter-overlay {
    position: fixed;
    inset: 0;
    z-index: 50000;

    display: flex;
    justify-content: center;
    align-items: center;

    background: rgba(0, 0, 0, 0.18);

    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.letter-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

/* ===== PAPER ===== */
.letter-paper {
    position: relative;

    width: 70%;
    height: 100%;

    background: #fff;

    box-shadow:
        0 0 20px rgba(0,0,0,0.12),
        0 0 2px rgba(0,0,0,0.08);

    overflow: hidden;
}
/* scrollable text area */
.letter-content {
    width: 100%;
    height: 100%;

    overflow-y: auto;
    overflow-x: hidden;

    padding: 58px 72px 42px 72px;

    box-sizing: border-box;

    scrollbar-width: none;
}

.letter-content::-webkit-scrollbar {
    display: none;
}

.letter-inner {
    min-height: 100%;
    position: relative;
}

.letter-body {
    font-family: "Segoe Print", "Comic Sans MS", cursive;
    font-style: italic;
    font-size: 24px;
    line-height: 1.8;
    color: #111;

    padding-bottom: 100px; /* room for return button */
}

.letter-body h2 {
    font-family: "Segoe Print", "Comic Sans MS", cursive;
    font-style: italic;
    font-size: 34px;
    margin: 0 0 12px 0;
}

.letter-body p {
    margin: 0;
    white-space: pre-line;
}

.scroll-rail {
    position: absolute;
    right: 40px;
    top: 64px;
    bottom: 64px;
    width: 18px;
    pointer-events: auto;
      cursor: grab;
    display: none;
}

.scroll-rail::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;

    width: 2px;
    transform: translateX(-50%);

    background: #111;

    box-shadow:
        1px 0 0 rgba(0,0,0,0.3),
        -1px 0 0 rgba(0,0,0,0.15);
}

.scroll-handle {
    position: absolute;
    left: -1px;
align-items: center;
justify-content: center;
    width: 16px;
    min-height: 32px;
display:flex;
    background: #fff;
}
.scroll-handle.dragging {
    cursor: grabbing;
}
.scroll-handle::before {
    content: "";
    position: absolute;
    inset: 0;

    border: 2px solid #111;

    box-shadow:
        1px 1px 0 rgba(0,0,0,0.35),
        -1px 0 0 rgba(0,0,0,0.2);

    transform: rotate(-0.35deg);
}

.scroll-rail,
.scroll-handle {
    filter: blur(0.22px);
}

.return-letter {
    position: absolute;
    right: 22px;
    bottom: -8px;

    font-family: "Segoe Print", "Comic Sans MS", cursive;
    font-style: italic;
    font-size: 24px;

    cursor: pointer;
    user-select: none;
    color: #111;

    transition:
        color 0.25s ease,
        transform 0.14s ease;
}

.return-letter:hover {
    color: #ff7eb6;
}

.return-letter.pressed {
    transform: scale(0.9);
    color: #ff7eb6;
}

/* =======================================================
                    FINAL POEM OVERLAY
======================================================= */

.poem-overlay {
    position: fixed;
    inset: 0;

    z-index: 70000;

    display: flex;
    justify-content: center;
    align-items: center;

    background: rgba(0,0,0,.18);

    opacity: 0;
    pointer-events: none;

    transition: opacity .35s ease;
}

.poem-overlay.show {
    opacity: 1;
    pointer-events: auto;
}


/* ================= PAPER ================= */

.poem-paper {

    position: relative;

    width: 70%;
    height: 100%;

    background: #ffffff;

    overflow: hidden;

    box-shadow:
        0 0 20px rgba(0,0,0,.12),
        0 0 2px rgba(0,0,0,.08);
}


/* ================= CONTENT ================= */

.poem-content {

    width: 100%;
    height: 100%;

    overflow-y: auto;
    overflow-x: hidden;

    padding: 58px 72px 42px 72px;

    box-sizing: border-box;

    scrollbar-width: none;

}

.poem-content::-webkit-scrollbar{

    display:none;

}


.poem-inner{

    min-height:100%;
    position:relative;

}


/* ================= BODY ================= */

.poem-body{

    font-family:"Segoe Print","Comic Sans MS",cursive;
    font-style:italic;

    font-size:24px;

    line-height:1.8;

    color:#111;

    padding-bottom:100px;

}

.poem-body h1{

    font-family:"Segoe Print","Comic Sans MS",cursive;
    font-style:italic;

    font-size:40px;

    text-align:center;

    margin-bottom:24px;

}

.poem-body h2{

    font-family:"Segoe Print","Comic Sans MS",cursive;
    font-style:italic;

    font-size:34px;

    margin:0 0 18px;

}

.poem-body p{

    margin:0;

    white-space:pre-line;

}


/* ================= SCROLLBAR ================= */

.poem-scroll-rail{

    position:absolute;

    right:40px;

    top:64px;

    bottom:64px;

    width:18px;

    display:none;

    cursor:grab;

}

.poem-scroll-rail::before{

    content:"";

    position:absolute;

    left:50%;

    top:0;

    bottom:0;

    width:2px;

    transform:translateX(-50%);

    background:#111;

    box-shadow:
        1px 0 0 rgba(0,0,0,.3),
       -1px 0 0 rgba(0,0,0,.15);

}

.poem-scroll-handle{

    position:absolute;

    left:-1px;

    width:16px;

    min-height:32px;

    display:flex;

    justify-content:center;

    align-items:center;

    background:white;

}

.poem-scroll-handle::before{

    content:"";

    position:absolute;

    inset:0;

    border:2px solid #111;

    box-shadow:
        1px 1px 0 rgba(0,0,0,.35),
       -1px 0 0 rgba(0,0,0,.2);

    transform:rotate(-0.35deg);

}

.poem-scroll-handle.dragging{

    cursor:grabbing;

}

.poem-scroll-rail,
.poem-scroll-handle{

    filter:blur(.22px);

}
.poem-body p{
    white-space: pre-line;
}

/* ================= RETURN ================= */

.return-poem{

    position:absolute;

    right:18px;

    bottom:12px;

    font-family:"Segoe Print","Comic Sans MS",cursive;

    font-style:italic;

    font-size:24px;

    color:#111;

    cursor:pointer;

    user-select:none;

    transition:
        color .25s ease,
        transform .14s ease;

}

.return-poem:hover{

    color:#ff7eb6;

}

.return-poem.pressed{

    transform:scale(.9);

    color:#ff7eb6;

}

.webcard6 {
    position: fixed;
    inset: 0;
    z-index: 26000;

    opacity: 0;
    pointer-events: none;
    transition: opacity 1.2s ease;

    display: flex;
    justify-content: center;
    align-items: center;

    /* EXACT pink-screen background */
    background-color: #f8f8f8;
    background-image:
        linear-gradient(45deg, #d9dee5 25%, transparent 25%),
        linear-gradient(-45deg, #d9dee5 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #d9dee5 75%),
        linear-gradient(-45deg, transparent 75%, #d9dee5 75%);

    background-size: 46px 46px;

    background-position:
        0 0,
        0 23px,
        23px -23px,
        -23px 0px;
}

.webcard6.active {
    opacity: 1;
    pointer-events: auto;
}
.dialog-box-6 {
    position: absolute;
    left: 50%;
    bottom: -15px;
    transform: translateX(-50%) translateY(120px);

    width: min(92vw, 850px);
    height: 120px;

    opacity: 0;
    overflow: visible;

    border-radius: 16px;
    border: 3px solid #f7e7f0;

    background-color: #f9a8cef6;
    background-image:
        radial-gradient(circle, rgba(243,117,180,0.52) 7px, transparent 8.8px),
        radial-gradient(circle, rgba(243,117,180,0.52) 7px, transparent 8.8px);

    background-size: 56px 56px;
    background-position: 0 0, 28px 28px;

    box-shadow:
        inset 0 0 0 2px #d987b2,
        0 0 14px rgba(255,192,220,0.25);

    z-index: 27000;

    transition:
        opacity 0.7s ease,
        transform 0.7s cubic-bezier(.22,1,.36,1);
}

.dialog-box-6.show {
    opacity: 0.85;
    transform: translateX(-50%) translateY(0);
}
#typewriter-text-6 {
    position: absolute;
    left: 32px;
    top: 20px;
    right: 38px;

    font-family: "Aller", sans-serif;
    font-size: 23px;
    color: white;

    -webkit-text-stroke: 1px #000;
    font-weight: 650;
}

.message-popup {
     position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);

    z-index: 999999999999;

    opacity: 0;
    pointer-events: none;

    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;

    padding: 25px;

    letter-spacing: 0px;

    background: linear-gradient(
        180deg,
        #ffe6f3 0%,
        #ffe6f3 50%,
        #ffe6f3 100%
    );

    outline: 3.4px solid #f8c0e3;

    width: 270px;
    height: 180px;

    box-shadow: 0 0 12px rgba(248, 184, 209, 0.35);
}

.message-popup.show {
    opacity: 1;
    pointer-events: auto;
}

.message-popup span {
    margin-top: auto;
    margin-bottom: 10px;

    display: inline-block;
    cursor: pointer;
    color: #ffffff;

    -webkit-text-stroke: 4.5px #b26393;
}

.message-popup span:hover {
    -webkit-text-stroke-color: #ffaacc;
}

.message-popup:not(:hover) span {
    animation: none;
}

.popup-message {
    font-family: "Aller", sans-serif;
    font-size: 25px;
    color: #000000;
    font-weight: 300;
    letter-spacing: 0.5px;

    margin-top: 18px;
}

.popup-ok {
    margin-top: auto;
    margin-bottom: 10px;

    display: inline-block;
    cursor: pointer;
    color: #ffffff;

    font-family: "Riffic Free", sans-serif;
    font-size: 25px;

    -webkit-text-stroke: 4.5px #b26393;
    paint-order: stroke fill;
}

.popup-ok:hover {
    -webkit-text-stroke-color: #ffaacc;
}

.nav-left-6 {
    position: absolute;
    bottom: 17.5px;
    left: 18px;

    width: 0;
    height: 0;

    opacity: 0;
    pointer-events: none;
    cursor: pointer;

    border-top: 9px solid transparent;
    border-bottom: 9px solid transparent;
    border-right: 14px solid #fff5fb;

    transition:
        transform 0.18s ease,
        opacity 0.3s ease;
}

.nav-left-6.show {
    opacity: 1;
    pointer-events: auto;
    animation: navBreathLeft 1.6s ease-in-out infinite;
}

.nav-left-6:active {
    transform: scale(0.88);
}
img,
button,
span,
div {
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}
html,
body{

overflow:hidden;
overscroll-behavior:none;
touch-action:none;

}