@font-face {
    font-family: "Anniversary Segoe Print";
    src: url("../fonts/segoe-print.ttf") format("truetype");
    font-weight: 400 699;
    font-style: normal;
    font-display: block;
}

@font-face {
    font-family: "Anniversary Segoe Print";
    src: url("../fonts/segoe-print-bold.ttf") format("truetype");
    font-weight: 700 900;
    font-style: normal;
    font-display: block;
}

:root {
    --bg: #fffaf6;
    --paper: #fffdf9;
    --paper-soft: #fff7ef;
    --line: rgba(116, 79, 75, 0.16);
    --line-strong: rgba(227, 92, 113, 0.34);
    --coral: #f16b7c;
    --coral-strong: #de4d66;
    --rose: #ffdce0;
    --sage: #a8bd93;
    --sky: #b9d9e2;
    --honey: #f3c76c;
    --berry: #743149;
    --ink: #33202b;
    --text: #67515b;
    --muted: #9a7a83;
    --shadow: 0 18px 40px rgba(116, 79, 75, 0.13);
    --shadow-soft: 0 9px 22px rgba(116, 79, 75, 0.11);
    --radius: 14px;
    --radius-sm: 9px;
    --max-width: 1080px;
    --script: "Anniversary Segoe Print", "Segoe Print", "Comic Sans MS", "Bradley Hand ITC", "Lucida Handwriting", cursive;
    --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    letter-spacing: 0;
}

*::before,
*::after {
    -webkit-tap-highlight-color: transparent;
}

html {
    min-height: 100%;
    color-scheme: light;
    scroll-behavior: smooth;
    scrollbar-color: rgba(116, 49, 73, 0.24) transparent;
    scrollbar-width: thin;
    background: var(--bg);
}

* {
    scrollbar-color: rgba(116, 49, 73, 0.24) transparent;
    scrollbar-width: thin;
}

*::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

*::-webkit-scrollbar-track {
    background: transparent;
}

*::-webkit-scrollbar-thumb {
    border: 1px solid transparent;
    border-radius: 999px;
    background: rgba(116, 49, 73, 0.28);
    background-clip: content-box;
}

*::-webkit-scrollbar-thumb:hover {
    background: rgba(222, 77, 102, 0.46);
    background-clip: content-box;
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    overflow-x: hidden;
    position: relative;
    isolation: isolate;
    color: var(--text);
    background: var(--bg);
    font-family: var(--sans);
    line-height: 1.5;
    text-rendering: optimizeLegibility;
}

body::before {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    pointer-events: none;
    content: "";
    background: url("../img/warm-bg.png") center center / 100% 100% no-repeat;
    filter: blur(3px);
    transform: scale(1.04);
    transform-origin: center;
}

body::after {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    content: "";
    background:
        linear-gradient(180deg, rgba(255, 251, 247, 0.38), rgba(255, 250, 246, 0.58)),
        repeating-linear-gradient(0deg, rgba(101, 54, 65, 0.025) 0, rgba(101, 54, 65, 0.025) 1px, transparent 1px, transparent 8px),
        radial-gradient(circle at 12% 20%, rgba(255, 255, 255, 0.5), transparent 30%),
        radial-gradient(circle at 88% 12%, rgba(255, 214, 219, 0.32), transparent 32%);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

button,
input {
    font: inherit;
}

[hidden],
.is-hidden {
    display: none !important;
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 100;
    padding: 9px 12px;
    border-radius: 10px;
    color: #fff;
    background: var(--berry);
    transform: translateY(-160%);
    transition: transform 180ms ease;
}

.skip-link:focus {
    transform: translateY(0);
}

.site-shell {
    position: relative;
    z-index: 1;
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
    flex-direction: column;
}

.site-main {
    width: min(100% - 32px, var(--max-width));
    margin: 0 auto;
    padding: clamp(28px, 4vw, 42px) 0 54px;
    flex: 1;
}

.site-footer {
    width: min(100% - 32px, var(--max-width));
    margin: 0 auto;
    padding: 22px 0 32px;
    color: var(--muted);
    font-size: 0.82rem;
    text-align: center;
}

.page-home .site-main {
    width: 100%;
    max-width: none;
    padding: 0 0 48px;
}

.page-home .site-footer {
    display: none;
}

.glass-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(255, 248, 243, 0.88)),
        var(--paper);
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
}

.access-hero {
    position: relative;
    display: grid;
    min-height: 100svh;
    align-content: center;
    justify-items: center;
    gap: clamp(16px, 2.5vw, 24px);
    padding: clamp(28px, 5vw, 58px) 20px;
    overflow: hidden;
    text-align: center;
}

.access-hero::before {
    position: absolute;
    inset: 0;
    z-index: -1;
    content: "";
    background: linear-gradient(180deg, rgba(255, 197, 202, 0.08), rgba(255, 245, 239, 0.18));
}

.floating-sticker {
    position: absolute;
    pointer-events: none;
    opacity: 0.72;
}

.access-hero > .sticker-sparkle {
    top: 70px;
    right: 22%;
    width: 54px;
    height: 54px;
}

.access-hero > .sticker-heart-small {
    top: 62px;
    left: 26%;
    width: 46px;
    height: 46px;
}

.hero-copy {
    display: grid;
    justify-items: center;
    max-width: 780px;
}

.hero-copy h1,
.page-intro h1 {
    margin: 0;
    color: var(--ink);
    font-family: var(--script);
    font-size: clamp(2.7rem, 5.2vw, 4.2rem);
    font-weight: 650;
    line-height: 0.98;
}

.hero-subtitle {
    margin: 10px 0 0;
    color: var(--ink);
    font-family: var(--script);
    font-size: clamp(1rem, 1.8vw, 1.18rem);
}

.memory-stats,
.intro-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.page-home .memory-stats {
    visibility: hidden;
    pointer-events: none;
}

.memory-stats span,
.intro-stats span {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    gap: 7px;
    padding: 4px 10px;
    border: 1px solid rgba(227, 92, 113, 0.13);
    border-radius: 99px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.68);
    box-shadow: var(--shadow-soft);
    font-size: 0.82rem;
}

.memory-stats strong,
.intro-stats strong {
    color: var(--berry);
    font-size: 0.98rem;
}

.memory-stats em {
    font-style: normal;
}

.access-layout {
    display: grid;
    width: min(100%, 660px);
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 22px;
}

.access-card,
.countdown-panel {
    position: relative;
    width: 100%;
    min-height: 164px;
    padding: 26px 24px 18px;
}

.access-card {
    display: grid;
    align-content: center;
    text-align: center;
}

.lock-sticker {
    position: absolute;
    top: -18px;
    left: 50%;
    display: block;
    width: 44px;
    height: 44px;
    border: 8px solid rgba(255, 253, 249, 0.9);
    border-radius: 50%;
    background: url("../img/icons/lock.svg") center / 28px 28px no-repeat, #f8efe9;
    box-shadow: var(--shadow-soft);
    transform: translateX(-50%);
}

.access-card label,
.panel-label {
    color: var(--ink);
    font-family: var(--script);
    font-weight: 700;
}

.access-card label {
    display: block;
    margin-bottom: 12px;
    font-size: 0.96rem;
}

.input-row {
    display: grid;
    gap: 12px;
}

.date-field {
    position: relative;
}

.date-field input {
    width: 100%;
    min-height: 46px;
    padding: 0 44px 0 16px;
    border: 1px solid rgba(116, 79, 75, 0.18);
    border-radius: 10px;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.82);
    font-size: 0.92rem;
    outline: none;
    transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.date-field input::placeholder {
    color: rgba(103, 81, 91, 0.5);
}

.date-field input:focus {
    border-color: rgba(227, 92, 113, 0.64);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 0 0 4px rgba(227, 92, 113, 0.12);
}

.input-calendar {
    position: absolute;
    top: 50%;
    right: 12px;
    width: 24px;
    height: 24px;
    background: url("../img/icons/calendar.svg") center / contain no-repeat;
    transform: translateY(-50%);
}

.input-row button,
.soft-button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    border: 1px solid rgba(227, 92, 113, 0.22);
    border-radius: 9px;
    color: #fff;
    background: linear-gradient(135deg, var(--coral), var(--coral-strong));
    box-shadow: 0 14px 26px rgba(227, 92, 113, 0.24);
    font-size: 0.9rem;
    font-weight: 820;
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.input-row button:not(:disabled):hover,
.input-row button:not(:disabled):focus-visible,
.soft-button:hover,
.soft-button:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 18px 32px rgba(227, 92, 113, 0.3);
    outline: none;
}

.input-row button:disabled {
    color: rgba(255, 255, 255, 0.82);
    background: linear-gradient(135deg, rgba(227, 92, 113, 0.42), rgba(204, 75, 94, 0.42));
    box-shadow: none;
    cursor: not-allowed;
    filter: saturate(0.7);
}

.input-hint,
.form-error,
.countdown-note {
    margin: 10px 0 0;
    font-size: 0.78rem;
}

.input-hint,
.countdown-note {
    color: var(--muted);
}

.form-error {
    color: #b73857;
    font-weight: 760;
}

.countdown-panel {
    display: grid;
    align-content: center;
    justify-items: center;
    justify-self: stretch;
    gap: 12px;
    text-align: center;
}

.calendar-sticker {
    position: absolute;
    top: 18px;
    right: 22px;
    width: 34px;
    height: 34px;
    background: url("../img/icons/calendar.svg") center / contain no-repeat;
    filter: drop-shadow(0 7px 8px rgba(116, 79, 75, 0.15));
    transform: rotate(8deg);
}

.countdown-panel .panel-label {
    margin: 0;
    padding-right: 40px;
    font-size: 0.98rem;
}

.countdown-grid {
    display: grid;
    width: min(100%, 246px);
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    font-family: var(--script);
}

.countdown-grid span {
    display: grid;
    min-width: 0;
    min-height: 54px;
    place-items: center;
    padding: 7px 4px;
    overflow: hidden;
    border: 1px solid rgba(116, 79, 75, 0.1);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.66);
    box-shadow: inset 0 -8px 16px rgba(255, 219, 221, 0.28);
}

.countdown-grid strong {
    display: block;
    max-width: 100%;
    color: var(--berry);
    font-family: inherit;
    font-size: clamp(1.08rem, 1.75vw, 1.28rem);
    font-weight: 700;
    line-height: 0.98;
    white-space: nowrap;
}

.countdown-grid em {
    color: var(--ink);
    font-family: inherit;
    font-size: 0.68rem;
    font-style: normal;
    font-weight: 700;
    line-height: 1;
}

.countdown-note {
    font-family: var(--script);
    font-size: 0.78rem;
    line-height: 1.24;
}

.chapter-sticker,
.future-sticker,
.closing-sticker {
    position: absolute;
    z-index: 2;
    pointer-events: none;
}

.page-intro {
    max-width: 850px;
    margin: 0 auto clamp(18px, 3.2vw, 28px);
    text-align: center;
}

.page-intro h1 {
    position: relative;
    display: inline-block;
    font-size: clamp(2rem, 3.8vw, 3rem);
    white-space: nowrap;
}

.page-intro h1::after {
    position: absolute;
    right: 8%;
    bottom: -8px;
    left: 9%;
    height: 2px;
    content: "";
    border-radius: 99px;
    background: var(--coral);
}

.page-timeline .site-main {
    width: min(100% - 30px, 820px);
    padding-top: 0;
}

.page-timeline .page-intro {
    position: relative;
    display: grid;
    min-height: 100vh;
    min-height: 100svh;
    align-content: center;
    justify-items: center;
    margin-bottom: 0;
    padding: clamp(48px, 8vh, 82px) 0 clamp(92px, 13vh, 132px);
}

.page-timeline .page-intro h1::after {
    display: none;
}

.timeline-landing-copy {
    display: grid;
    justify-items: center;
    gap: 12px;
    text-align: center;
}

.timeline-scroll-cue {
    position: absolute;
    bottom: clamp(34px, 8vh, 68px);
    left: 50%;
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    color: var(--coral-strong);
    transform: translateX(-50%);
    animation: timeline-cue-bounce 1500ms var(--ease) infinite;
}

.timeline-scroll-cue span {
    display: block;
    width: 18px;
    height: 18px;
    border-right: 3px solid currentColor;
    border-bottom: 3px solid currentColor;
    filter: drop-shadow(0 7px 10px rgba(227, 92, 113, 0.24));
    transform: rotate(45deg);
}

.timeline-scroll-cue:focus-visible {
    border-radius: 50%;
    outline: 3px solid rgba(227, 92, 113, 0.28);
    outline-offset: 3px;
}

@keyframes timeline-cue-bounce {
    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(8px);
    }
}

.timeline {
    position: relative;
    display: grid;
    gap: 8px;
    max-width: 720px;
    margin: 0 auto;
    padding: 0 0 6px;
}

.timeline::before {
    position: absolute;
    top: 18px;
    bottom: 22px;
    left: 50%;
    width: 2px;
    content: "";
    border-radius: 99px;
    background: repeating-linear-gradient(180deg, var(--coral) 0 13px, transparent 13px 21px);
    transform: translateX(-50%);
}

.timeline-chapter {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 52px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
}

.timeline-node {
    z-index: 3;
    display: grid;
    grid-column: 2;
    width: 30px;
    height: 30px;
    place-self: center;
    place-items: center;
    border: 3px solid rgba(255, 255, 255, 0.86);
    border-radius: 50%;
    background: var(--coral);
    box-shadow: var(--shadow-soft);
}

.timeline-node span {
    color: #fff;
    font-size: 0.72rem;
    font-weight: 860;
}

.chapter-card {
    position: relative;
    min-height: 76px;
    padding: 11px 86px 10px 14px;
    overflow: hidden;
}

.timeline-chapter:nth-child(odd) .chapter-card {
    grid-column: 1;
    justify-self: stretch;
}

.timeline-chapter:nth-child(even) .chapter-card {
    grid-column: 3;
    justify-self: stretch;
}

.timeline-chapter:nth-child(odd) .chapter-card::after,
.timeline-chapter:nth-child(even) .chapter-card::after {
    position: absolute;
    top: 50%;
    width: 16px;
    height: 1px;
    content: "";
    border-top: 1px dashed rgba(227, 92, 113, 0.28);
}

.timeline-chapter:nth-child(odd) .chapter-card::after {
    right: -16px;
}

.timeline-chapter:nth-child(even) .chapter-card::after {
    left: -16px;
}

.chapter-heading h2 {
    margin: 0 0 2px;
    color: var(--ink);
    font-family: var(--script);
    font-size: clamp(0.88rem, 1.45vw, 1.08rem);
    line-height: 1.15;
}

.chapter-period,
.moments-count {
    margin: 0;
    color: var(--text);
    font-size: 0.6rem;
}

.chapter-card > p:not(.moments-count) {
    margin: 4px 0 0;
    color: var(--ink);
    font-family: var(--script);
    font-size: 0.67rem;
}

.moments-count {
    position: absolute;
    right: 11px;
    bottom: 8px;
    font-size: 0.56rem;
}

.chapter-photo-strip {
    position: absolute;
    top: 14px;
    right: 14px;
    display: flex;
    align-items: center;
}

.chapter-photo-strip img {
    width: 34px;
    height: 42px;
    border: 3px solid #fffdf9;
    border-radius: 5px;
    object-fit: cover;
    box-shadow: var(--shadow-soft);
}

.chapter-photo-strip img + img {
    margin-left: -18px;
    transform: rotate(7deg);
}

.chapter-sticker {
    right: 18px;
    bottom: 17px;
    width: 40px;
    height: 40px;
    opacity: 0.9;
}

.future-grid {
    display: grid;
    max-width: 720px;
    margin: 0 auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.future-card {
    position: relative;
    min-height: 96px;
    padding: 12px 64px 12px 15px;
    overflow: hidden;
}

.type-pill,
.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 3px 8px;
    border-radius: 99px;
    font-size: 0.54rem;
    font-weight: 840;
    text-transform: uppercase;
}

.type-pill {
    margin-bottom: 7px;
    color: var(--berry);
    background: rgba(227, 92, 113, 0.12);
}

.type-prediction .type-pill,
.type-prediction .status-pill {
    color: #4f6d3e;
    background: rgba(168, 189, 147, 0.22);
}

.type-promise .type-pill,
.type-promise .status-pill {
    color: #356f8d;
    background: rgba(185, 217, 226, 0.32);
}

.type-dream .type-pill,
.type-dream .status-pill {
    color: #8a641b;
    background: rgba(243, 199, 108, 0.24);
}

.future-card h2 {
    margin: 0 0 4px;
    color: var(--ink);
    font-family: var(--script);
    font-size: 0.92rem;
    line-height: 1.18;
}

.future-card p {
    margin: 0 0 8px;
    color: var(--text);
    font-size: 0.64rem;
    line-height: 1.45;
}

.future-sticker {
    right: 18px;
    bottom: 22px;
    width: 42px;
    height: 42px;
}

.closing-line {
    position: relative;
    display: flex;
    max-width: 560px;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin: 12px auto 0;
    padding: 15px 64px 15px 22px;
    text-align: center;
}

.closing-line p {
    margin: 0 0 3px;
    color: var(--ink);
    font-family: var(--script);
    font-size: 1.12rem;
    font-weight: 700;
}

.closing-line small {
    color: var(--text);
    font-size: 0.78rem;
}

.closing-sticker {
    right: 22px;
    bottom: 16px;
}

.sticker-sun,
.sticker-cassette,
.sticker-envelope,
.sticker-heart-small,
.sticker-sparkle,
.sticker-flower,
.sticker-bubu-dudu-cuddle,
.sticker-bubu-dudu-hearts,
.sticker-bubu-dudu-sit,
.sticker-bubu-dudu-stand,
.sticker-bubu-dudu-cooking,
.sticker-bubu-face,
.sticker-bubu-dudu-bed,
.sticker-bubu-dudu-travel,
.sticker-dudu,
.sticker-ginger,
.sticker-mug,
.sticker-camera,
.sticker-bandage,
.sticker-heart,
.sticker-sprout,
.sticker-plane,
.sticker-house,
.sticker-gift,
.sticker-photo {
    display: block;
    border: 0;
    background: center / contain no-repeat;
    filter: drop-shadow(0 7px 8px rgba(116, 79, 75, 0.15));
}

.sticker-sun { width: 54px; height: 54px; background-image: url("../img/icons/sun.svg"); }
.sticker-cassette { width: 54px; height: 40px; background-image: url("../img/icons/cassette.svg"); }
.sticker-envelope { width: 52px; height: 38px; background-image: url("../img/icons/envelope.svg"); }
.sticker-heart-small,
.sticker-heart { width: 48px; height: 48px; background-image: url("../img/icons/heart-sticker.svg"); }
.sticker-sparkle { width: 46px; height: 46px; background-image: url("../img/icons/sparkle.svg"); }
.sticker-flower { background-image: url("../img/icons/flower.svg"); }
.sticker-bubu-dudu-cuddle { width: 58px; height: auto; aspect-ratio: 320 / 276; background-image: url("../img/icons/bubu-dudu-cuddle.png"); }
.sticker-bubu-dudu-hearts { width: 58px; height: auto; aspect-ratio: 530 / 445; background-image: url("../img/icons/bubu-dudu-hearts.png"); }
.sticker-bubu-dudu-sit { width: 62px; height: auto; aspect-ratio: 452 / 340; background-image: url("../img/icons/bubu-dudu-sit.png"); }
.sticker-bubu-dudu-stand { width: 62px; height: auto; aspect-ratio: 636 / 495; background-image: url("../img/icons/bubu-dudu-stand.png"); }
.sticker-bubu-dudu-cooking { width: 62px; height: auto; aspect-ratio: 557 / 556; background-image: url("../img/icons/bubu-dudu-cooking.png"); }
.sticker-bubu-face { width: 50px; height: auto; aspect-ratio: 234 / 235; background-image: url("../img/icons/bubu-face.png"); }
.sticker-bubu-dudu-bed { width: 62px; height: auto; aspect-ratio: 352 / 329; background-image: url("../img/icons/bubu-dudu-bed.png"); }
.sticker-bubu-dudu-travel { width: 62px; height: auto; aspect-ratio: 531 / 455; background-image: url("../img/icons/bubu-dudu-travel.png"); }
.sticker-dudu { background-image: url("../img/icons/dudu.svg"); }
.sticker-ginger { background-image: url("../img/icons/ginger.svg"); }
.sticker-mug { background-image: url("../img/icons/mug.svg"); }
.sticker-camera { background-image: url("../img/icons/camera.svg"); }
.sticker-bandage { background-image: url("../img/icons/bandage.svg"); }
.sticker-sprout { background-image: url("../img/icons/sprout.svg"); }
.sticker-plane { background-image: url("../img/icons/plane.svg"); }
.sticker-house { background-image: url("../img/icons/house.svg"); }
.sticker-gift { background-image: url("../img/icons/envelope.svg"); }
.sticker-photo { background-image: url("../img/icons/camera.svg"); }

.empty-state {
    max-width: 620px;
    margin: 0 auto;
    padding: 28px;
    text-align: center;
}

.empty-state h2 {
    margin: 0 0 8px;
    color: var(--ink);
    font-family: var(--script);
}

.empty-state p {
    margin: 0;
}

.reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

[data-float] {
    transform: perspective(900px) rotateX(var(--tilt-y, 0deg)) rotateY(var(--tilt-x, 0deg)) translateY(var(--lift, 0));
    transform-style: preserve-3d;
    transition: transform 180ms ease, border-color 180ms ease;
}

[data-float]:hover {
    --lift: -2px;
    border-color: var(--line-strong);
}

@media (max-width: 760px) {
    .access-hero {
        min-height: 100svh;
        padding: 30px 14px;
        gap: 18px;
    }

    .access-hero > .floating-sticker {
        display: none;
    }

    .hero-copy h1 {
        font-size: clamp(2.15rem, 10vw, 2.85rem);
        white-space: nowrap;
    }

    .hero-subtitle {
        max-width: 300px;
        font-size: 0.9rem;
        line-height: 1.35;
    }

    .memory-stats {
        min-height: 25px;
    }

    .access-layout {
        width: min(100%, 360px);
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .access-card,
    .countdown-panel {
        min-height: 0;
        padding: 28px 14px 16px;
        border-radius: 12px;
    }

    .countdown-panel {
        width: 100%;
        padding-top: 16px;
    }

    .lock-sticker {
        width: 40px;
        height: 40px;
    }

    .date-field input {
        min-height: 42px;
        font-size: 0.86rem;
    }

    .input-row button {
        min-height: 40px;
        font-size: 0.84rem;
    }

    .calendar-sticker {
        position: static;
        width: 31px;
        height: 31px;
    }

    .countdown-panel .panel-label {
        padding-right: 0;
        font-size: 0.9rem;
    }

    .countdown-grid {
        width: min(100%, 246px);
        gap: 6px;
    }

    .countdown-grid span {
        min-height: 50px;
        padding: 7px 3px;
    }

    .countdown-grid strong {
        font-size: 1.18rem;
    }

    .countdown-grid em {
        font-size: 0.58rem;
    }

    .site-main {
        width: min(100% - 22px, var(--max-width));
        padding-top: 24px;
    }

    .page-intro {
        margin-bottom: 22px;
    }

    .page-intro h1 {
        font-size: clamp(1.9rem, 9vw, 2.55rem);
        line-height: 1.05;
        white-space: normal;
    }

    .intro-stats {
        gap: 7px;
    }

    .intro-stats span {
        min-height: 25px;
        font-size: 0.72rem;
    }

    .page-timeline .page-intro {
        min-height: 100vh;
        min-height: 100dvh;
        padding: 42px 0 86px;
    }

    .page-timeline .page-intro h1 {
        max-width: 330px;
        font-size: clamp(2.15rem, 10vw, 2.85rem);
        line-height: 1.08;
    }

    .timeline-scroll-cue {
        bottom: 28px;
        width: 42px;
        height: 42px;
    }

    .timeline-scroll-cue span {
        width: 16px;
        height: 16px;
        border-width: 2px;
    }

    .timeline {
        max-width: 380px;
        gap: 10px;
        padding-left: 36px;
    }

    .timeline::before {
        left: 17px;
        transform: none;
    }

    .timeline-chapter {
        display: grid;
        grid-template-columns: 0 minmax(0, 1fr);
        gap: 0;
    }

    .timeline-node {
        position: absolute;
        top: 16px;
        left: -34px;
        width: 30px;
        height: 30px;
    }

    .timeline-node span {
        font-size: 0.66rem;
    }

    .timeline-chapter:nth-child(odd) .chapter-card,
    .timeline-chapter:nth-child(even) .chapter-card {
        grid-column: 2;
    }

    .timeline-chapter .chapter-card::after {
        display: none;
    }

    .chapter-card {
        min-height: 94px;
        padding: 13px 74px 13px 14px;
    }

    .chapter-heading h2 {
        font-size: 0.98rem;
    }

    .chapter-card > p:not(.moments-count) {
        font-size: 0.72rem;
    }

    .chapter-period,
    .moments-count {
        font-size: 0.62rem;
    }

    .chapter-sticker {
        right: 14px;
        bottom: 20px;
        width: 44px;
        height: 44px;
    }

    .chapter-photo-strip {
        display: none;
    }

    .future-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .future-card {
        min-height: 88px;
        padding: 10px 62px 10px 14px;
    }

    .future-card h2 {
        font-size: 0.9rem;
    }

    .future-card p {
        margin-bottom: 6px;
        font-size: 0.64rem;
        line-height: 1.34;
    }

    .future-sticker {
        width: 40px;
        height: 40px;
    }

    .closing-line {
        max-width: 360px;
        margin-top: 10px;
        padding: 12px 54px 12px 16px;
    }
}

/* Timeline v2 */
.page-timeline .site-main {
    width: 100%;
    max-width: none;
    padding: 0 0 68px;
}

.page-timeline .site-footer {
    display: none;
}

.timeline-hero {
    position: relative;
    display: grid;
    min-height: 100vh;
    min-height: 100svh;
    place-items: center;
    overflow: hidden;
    padding: 72px 18px 112px;
    text-align: center;
}

.timeline-hero::before {
    position: absolute;
    inset: 9% 0 auto;
    height: 52%;
    pointer-events: none;
    content: "";
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 245, 240, 0)),
        repeating-linear-gradient(90deg, rgba(227, 92, 113, 0.045) 0 1px, transparent 1px 36px);
    mask-image: radial-gradient(ellipse at center, #000 0 60%, transparent 74%);
}

.timeline-hero-copy {
    position: relative;
    z-index: 2;
    display: grid;
    justify-items: center;
    animation: timeline-title-float 5200ms var(--ease) infinite;
}

.timeline-hero h1 {
    max-width: 1040px;
    margin: 0;
    color: rgba(56, 39, 50, 0.9);
    font-family: var(--script);
    font-size: 4rem;
    font-weight: 700;
    line-height: 1.04;
    text-shadow: 0 14px 28px rgba(116, 79, 75, 0.12);
}

.timeline-petal {
    position: absolute;
    z-index: 1;
    display: block;
    width: 13px;
    height: 22px;
    border-radius: 70% 12% 70% 12%;
    background: linear-gradient(145deg, rgba(241, 107, 124, 0.7), rgba(255, 220, 224, 0.5));
    box-shadow: 0 9px 16px rgba(227, 92, 113, 0.12);
    opacity: 0.68;
}

.petal-one {
    top: 20%;
    left: 18%;
    animation: timeline-petal-drift 8200ms ease-in-out infinite;
}

.petal-two {
    top: 32%;
    right: 20%;
    width: 10px;
    height: 18px;
    animation: timeline-petal-drift 9200ms ease-in-out 700ms infinite reverse;
}

.petal-three {
    right: 36%;
    bottom: 24%;
    width: 9px;
    height: 15px;
    animation: timeline-petal-drift 7600ms ease-in-out 240ms infinite;
}

.timeline-scroll-cue {
    position: absolute;
    bottom: 54px;
    left: 50%;
    z-index: 4;
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    color: var(--coral-strong);
    opacity: var(--timeline-cue-opacity, 1);
    transform: translateX(-50%);
    animation: timeline-cue-bounce 1500ms var(--ease) infinite;
    transition: opacity 260ms ease;
}

.timeline-scroll-cue span {
    display: block;
    width: 18px;
    height: 18px;
    border-right: 3px solid currentColor;
    border-bottom: 3px solid currentColor;
    filter: drop-shadow(0 7px 10px rgba(227, 92, 113, 0.24));
    transform: rotate(45deg);
}

.timeline-experience {
    --timeline-progress: 0;
    position: relative;
    width: min(100% - 36px, 1060px);
    margin: 0 auto;
    padding: 16px 0 24px;
}

.timeline-progress-bar {
    position: sticky;
    top: 0;
    z-index: 8;
    width: min(100%, 760px);
    height: 3px;
    margin: 0 auto 18px;
    overflow: hidden;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.48);
    box-shadow: 0 8px 18px rgba(116, 79, 75, 0.08);
}

.timeline-progress-bar span {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--coral), var(--berry));
    transform: scaleX(var(--timeline-progress));
    transform-origin: left center;
}

.timeline-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.82fr);
    align-items: start;
    gap: 28px;
}

.storyline {
    position: relative;
    display: grid;
    gap: 14px;
    margin: 0;
    padding: 10px 0 56px 70px;
    list-style: none;
}

.storyline::before,
.storyline::after {
    position: absolute;
    top: 20px;
    bottom: 64px;
    left: 31px;
    width: 2px;
    content: "";
    border-radius: 99px;
}

.storyline::before {
    background: repeating-linear-gradient(180deg, rgba(241, 107, 124, 0.52) 0 13px, transparent 13px 22px);
}

.storyline::after {
    background: linear-gradient(180deg, var(--coral), var(--berry));
    transform: scaleY(var(--timeline-progress));
    transform-origin: top center;
    transition: transform 120ms linear;
}

.storyline-item {
    position: relative;
}

.storyline-item:nth-child(even) {
    margin-left: 36px;
}

.story-card {
    --card-accent: var(--coral);
    --card-wash: rgba(255, 220, 224, 0.22);
    position: relative;
    display: grid;
    width: min(100%, 470px);
    min-height: 122px;
    padding: 14px 82px 13px 16px;
    overflow: hidden;
    border-color: rgba(116, 79, 75, 0.13);
    color: var(--text);
    text-align: left;
    appearance: none;
    cursor: pointer;
    isolation: isolate;
    transition: transform 260ms var(--ease), border-color 260ms ease, box-shadow 260ms ease, background 260ms ease;
}

.story-card::before {
    position: absolute;
    inset: 0;
    z-index: -1;
    content: "";
    background:
        linear-gradient(90deg, var(--card-wash), transparent 54%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(255, 249, 245, 0.84));
    opacity: 0.78;
}

.story-card::after {
    position: absolute;
    top: 12px;
    bottom: 12px;
    left: 0;
    width: 3px;
    content: "";
    border-radius: 0 99px 99px 0;
    background: var(--card-accent);
    transform: scaleY(0.42);
    transform-origin: center;
    transition: transform 240ms var(--ease);
}

.story-node {
    position: absolute;
    top: 18px;
    left: -56px;
    z-index: 3;
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border: 4px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    color: #fff;
    background: var(--card-accent);
    box-shadow: 0 14px 25px rgba(227, 92, 113, 0.18);
    font-size: 0.78rem;
    font-weight: 860;
}

.story-card-period {
    color: var(--berry);
    font-size: 0.64rem;
    font-weight: 820;
    text-transform: uppercase;
}

.story-card strong {
    display: block;
    margin-top: 2px;
    color: var(--ink);
    font-family: var(--script);
    font-size: 1.08rem;
    line-height: 1.15;
}

.story-card-text {
    display: -webkit-box;
    margin-top: 5px;
    overflow: hidden;
    color: var(--text);
    font-size: 0.72rem;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.story-card-meta {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
    color: var(--muted);
    font-size: 0.62rem;
    font-weight: 780;
}

.story-sticker {
    position: absolute;
    right: 18px;
    bottom: 22px;
    width: 48px;
    height: 48px;
    opacity: 0.88;
}

.story-card:hover,
.story-card:focus-visible,
.storyline-item.is-active .story-card {
    border-color: color-mix(in srgb, var(--card-accent) 46%, white);
    box-shadow: 0 18px 35px rgba(116, 79, 75, 0.14);
    transform: translateX(8px) translateY(-2px);
    outline: none;
}

.story-card:hover::after,
.story-card:focus-visible::after,
.storyline-item.is-active .story-card::after {
    transform: scaleY(1);
}

.storyline-item.is-active .story-node {
    animation: timeline-node-pulse 1300ms ease-in-out infinite;
}

.accent-rose { --card-accent: #f16b7c; --card-wash: rgba(241, 107, 124, 0.18); }
.accent-sky { --card-accent: #82b8c8; --card-wash: rgba(185, 217, 226, 0.24); }
.accent-honey { --card-accent: #e7b64f; --card-wash: rgba(243, 199, 108, 0.24); }
.accent-sage { --card-accent: #94ad7d; --card-wash: rgba(168, 189, 147, 0.22); }
.accent-coral { --card-accent: #de4d66; --card-wash: rgba(222, 77, 102, 0.15); }
.accent-berry { --card-accent: #743149; --card-wash: rgba(116, 49, 73, 0.12); }
.accent-peach { --card-accent: #efa56e; --card-wash: rgba(239, 165, 110, 0.2); }
.accent-mint { --card-accent: #86b99a; --card-wash: rgba(134, 185, 154, 0.18); }

.timeline-detail {
    --detail-accent: var(--coral);
    position: sticky;
    top: 20px;
    display: grid;
    gap: 14px;
    padding: 14px;
    overflow: hidden;
}

.timeline-detail::before {
    position: absolute;
    inset: 0;
    pointer-events: none;
    content: "";
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(255, 250, 247, 0.26)),
        repeating-linear-gradient(0deg, rgba(116, 79, 75, 0.026) 0 1px, transparent 1px 10px);
}

.timeline-detail > * {
    position: relative;
    z-index: 1;
}

.timeline-detail.is-swapping {
    animation: timeline-detail-pop 260ms var(--ease);
}

.timeline-detail .detail-heading,
.timeline-detail .moments-panel,
.timeline-detail .book-pages,
.timeline-detail .timeline-final-line,
.timeline-detail .chapter-gate {
    transition:
        opacity 260ms ease,
        filter 260ms ease,
        transform 320ms var(--ease);
    will-change: opacity, filter, transform;
    transform: translate3d(0, 0, 0) scale(1);
}

.timeline-detail.is-chapter-changing .detail-heading,
.timeline-detail.is-chapter-changing .moments-panel,
.timeline-detail.is-chapter-changing .book-pages,
.timeline-detail.is-chapter-changing .timeline-final-line,
.timeline-detail.is-chapter-changing .chapter-gate {
    pointer-events: none;
}

.timeline-detail.is-chapter-leaving .detail-heading,
.timeline-detail.is-chapter-leaving .moments-panel,
.timeline-detail.is-chapter-leaving .book-pages,
.timeline-detail.is-chapter-leaving .timeline-final-line,
.timeline-detail.is-chapter-leaving .chapter-gate {
    opacity: 0;
    filter: blur(5px);
    transform:
        translate3d(calc(var(--chapter-shift-dir, 1) * -22px), 8px, 0)
        scale(0.985);
}

.timeline-detail.is-chapter-entering .detail-heading,
.timeline-detail.is-chapter-entering .moments-panel,
.timeline-detail.is-chapter-entering .book-pages,
.timeline-detail.is-chapter-entering .timeline-final-line,
.timeline-detail.is-chapter-entering .chapter-gate {
    opacity: 1;
    filter: blur(0);
    transform: translate3d(0, 0, 0) scale(1);
}

.timeline-detail.is-chapter-pre-enter .detail-heading,
.timeline-detail.is-chapter-pre-enter .moments-panel,
.timeline-detail.is-chapter-pre-enter .book-pages,
.timeline-detail.is-chapter-pre-enter .timeline-final-line,
.timeline-detail.is-chapter-pre-enter .chapter-gate {
    opacity: 0;
    filter: blur(5px);
    transform:
        translate3d(calc(var(--chapter-shift-dir, 1) * 24px), 8px, 0)
        scale(0.985);
}

.timeline-detail-media {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(116, 79, 75, 0.14);
    border-radius: 14px;
    aspect-ratio: 1.28 / 0.82;
    background: var(--paper-soft);
    box-shadow: inset 0 -22px 45px rgba(255, 219, 221, 0.24);
}

.timeline-detail-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 700ms var(--ease), filter 300ms ease;
}

.timeline-detail:hover .timeline-detail-media img {
    transform: scale(1.04);
}

.detail-sticker {
    position: absolute;
    right: 14px;
    bottom: 10px;
    width: 58px;
    height: 58px;
}

.timeline-detail-body {
    display: grid;
    gap: 8px;
}

.detail-number,
.detail-period {
    margin: 0;
}

.detail-number {
    width: max-content;
    min-width: 40px;
    padding: 5px 10px;
    border-radius: 99px;
    color: #fff;
    background: var(--detail-accent);
    box-shadow: 0 10px 20px rgba(227, 92, 113, 0.22);
    font-size: 0.7rem;
    font-weight: 850;
}

.detail-period {
    color: var(--berry);
    font-size: 0.7rem;
    font-weight: 820;
    text-transform: uppercase;
}

.timeline-detail h2 {
    margin: 0;
    color: var(--ink);
    font-family: var(--script);
    font-size: 1.58rem;
    line-height: 1.1;
}

.timeline-detail blockquote {
    margin: 2px 0 0;
    padding: 10px 12px;
    border: 1px solid rgba(227, 92, 113, 0.18);
    border-radius: 12px;
    color: var(--berry);
    background: rgba(255, 255, 255, 0.58);
    font-family: var(--script);
    font-size: 0.88rem;
    line-height: 1.35;
}

.timeline-detail p[data-detail-description] {
    margin: 0;
    color: var(--text);
    font-size: 0.82rem;
    line-height: 1.48;
}

.moment-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 2px;
}

.moment-chip {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    gap: 6px;
    padding: 5px 9px;
    border: 1px solid rgba(116, 79, 75, 0.12);
    border-radius: 9px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.68);
    box-shadow: none;
    font-size: 0.66rem;
    font-weight: 780;
    cursor: pointer;
}

.moment-chip.is-active,
.moment-chip:hover,
.moment-chip:focus-visible {
    border-color: rgba(227, 92, 113, 0.36);
    color: var(--berry);
    background: rgba(255, 220, 224, 0.34);
    outline: none;
}

.moment-preview {
    display: grid;
    gap: 3px;
    min-height: 74px;
    padding: 10px 12px;
    border: 1px dashed rgba(227, 92, 113, 0.24);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.46);
}

.moment-preview strong {
    color: var(--ink);
    font-family: var(--script);
    font-size: 0.96rem;
    line-height: 1.2;
}

.moment-preview span {
    color: var(--berry);
    font-size: 0.62rem;
    font-weight: 820;
    text-transform: uppercase;
}

.moment-preview p {
    margin: 0;
    color: var(--text);
    font-size: 0.72rem;
    line-height: 1.34;
}

.timeline-detail-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.timeline-icon-button {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid rgba(227, 92, 113, 0.18);
    border-radius: 50%;
    color: var(--berry);
    background: rgba(255, 255, 255, 0.66);
    cursor: pointer;
    transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.timeline-icon-button svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.4;
}

.timeline-icon-button:hover,
.timeline-icon-button:focus-visible {
    border-color: rgba(227, 92, 113, 0.42);
    background: rgba(255, 220, 224, 0.3);
    outline: none;
    transform: translateY(-1px);
}

@keyframes timeline-title-float {
    0%,
    100% {
        transform: translateY(0) rotate(-0.2deg);
    }

    50% {
        transform: translateY(-8px) rotate(0.2deg);
    }
}

@keyframes timeline-petal-drift {
    0%,
    100% {
        transform: translate3d(0, 0, 0) rotate(16deg);
    }

    50% {
        transform: translate3d(18px, 24px, 0) rotate(52deg);
    }
}

@keyframes timeline-node-pulse {
    0%,
    100% {
        box-shadow: 0 14px 25px rgba(227, 92, 113, 0.18), 0 0 0 0 rgba(241, 107, 124, 0.24);
    }

    50% {
        box-shadow: 0 14px 25px rgba(227, 92, 113, 0.18), 0 0 0 10px rgba(241, 107, 124, 0);
    }
}

@keyframes timeline-detail-pop {
    0% {
        transform: translateY(5px) scale(0.992);
        opacity: 0.72;
    }

    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes timeline-chapter-content-in {
    0% {
        opacity: 0;
        filter: blur(5px);
        transform:
            translate3d(calc(var(--chapter-shift-dir, 1) * 24px), 8px, 0)
            scale(0.985);
    }

    100% {
        opacity: 1;
        filter: blur(0);
        transform: translate3d(0, 0, 0) scale(1);
    }
}

@media (max-width: 860px) {
    .timeline-hero {
        padding: 54px 18px 96px;
    }

    .timeline-hero h1 {
        max-width: 360px;
        font-size: 2.65rem;
        line-height: 1.08;
    }

    .timeline-experience {
        width: min(100% - 22px, 430px);
        padding-top: 6px;
    }

    .timeline-grid {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .timeline-detail {
        position: relative;
        top: auto;
        order: -1;
        padding: 12px;
    }

    .timeline-detail-media {
        aspect-ratio: 1.55 / 0.88;
    }

    .timeline-detail h2 {
        font-size: 1.26rem;
    }

    .timeline-detail blockquote {
        font-size: 0.78rem;
    }

    .timeline-detail p[data-detail-description] {
        font-size: 0.76rem;
    }

    .storyline {
        gap: 12px;
        padding: 2px 0 30px 48px;
    }

    .storyline::before,
    .storyline::after {
        left: 18px;
    }

    .storyline-item:nth-child(even) {
        margin-left: 0;
    }

    .story-card {
        width: 100%;
        min-height: 120px;
        padding: 13px 68px 12px 13px;
    }

    .story-node {
        top: 18px;
        left: -44px;
        width: 34px;
        height: 34px;
        border-width: 3px;
        font-size: 0.7rem;
    }

    .story-card strong {
        font-size: 1rem;
    }

    .story-card-text {
        font-size: 0.7rem;
        line-height: 1.34;
    }

    .story-sticker {
        right: 13px;
        bottom: 25px;
        width: 42px;
        height: 42px;
    }

    .story-card:hover,
    .story-card:focus-visible,
    .storyline-item.is-active .story-card {
        transform: translateY(-1px);
    }

    .timeline-progress-bar {
        margin-bottom: 12px;
    }

    .moment-chip {
        font-size: 0.62rem;
    }
}

/* Timeline mockup faithful pass */
.page-timeline .site-main {
    width: 100%;
    max-width: none;
    min-height: 100vh;
    min-height: 100svh;
    padding: 0;
}

.timeline-mockup-stage {
    --timeline-progress: 0.08;
    position: relative;
    display: grid;
    min-height: 100vh;
    min-height: 100svh;
    grid-template-columns: minmax(390px, 0.96fr) minmax(360px, 0.72fr) minmax(430px, 1fr);
    align-items: center;
    gap: clamp(18px, 2.4vw, 42px);
    width: min(100% - 38px, 1500px);
    margin: 0 auto;
    padding: clamp(24px, 3.2vh, 42px) 0;
    overflow: visible;
}

.timeline-mockup-stage::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    content: "";
    background:
        radial-gradient(circle at 22% 58%, rgba(255, 219, 155, 0.34), transparent 20%),
        linear-gradient(90deg, rgba(255, 246, 236, 0.42), rgba(255, 235, 231, 0.28) 54%, rgba(255, 250, 247, 0.58));
}

.timeline-bg-sticker {
    position: absolute;
    z-index: 3;
    pointer-events: none;
    opacity: 0.9;
}

.sticker-calendar {
    display: block;
    background: url("../img/icons/calendar.svg") center / contain no-repeat;
    filter: drop-shadow(0 7px 8px rgba(116, 79, 75, 0.15));
}

.mock-heart {
    top: 47%;
    left: 31.5%;
    width: 58px;
    height: 58px;
}

.mock-calendar {
    top: 56%;
    left: 17%;
    width: 54px;
    height: 54px;
    transform: rotate(-8deg);
}

.mock-cassette {
    top: 68%;
    left: 29%;
    width: 64px;
    height: 48px;
    transform: rotate(-16deg);
}

.timeline-showcase {
    position: relative;
    display: grid;
    min-height: min(820px, 92vh);
    align-content: stretch;
}

.timeline-title-block {
    align-self: start;
    padding: clamp(112px, 15vh, 150px) 0 0 clamp(8px, 2.4vw, 38px);
}

.timeline-title-block h1 {
    margin: 0;
    color: #4c2334;
    font-family: var(--script);
    font-size: clamp(3.25rem, 3.9vw, 4.35rem);
    font-weight: 540;
    line-height: 0.92;
    white-space: nowrap;
    text-shadow: 0 16px 34px rgba(116, 79, 75, 0.15);
}

.timeline-title-block h1 span {
    color: var(--coral);
    font-size: 0.78em;
}

.timeline-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: clamp(18px, 3vh, 28px);
    padding-left: clamp(24px, 4vw, 72px);
}

.timeline-pills span {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    gap: 7px;
    padding: 7px 18px;
    border: 1px solid rgba(116, 79, 75, 0.1);
    border-radius: 999px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 12px 24px rgba(116, 79, 75, 0.1);
    font-size: 0.94rem;
}

.timeline-pills i {
    color: var(--coral);
    font-style: normal;
}

.timeline-pills strong {
    color: var(--berry);
    font-size: 1.1rem;
}

.phone-preview {
    position: absolute;
    bottom: 0;
    left: 0;
    width: clamp(160px, 16vw, 230px);
    aspect-ratio: 0.55 / 1;
    padding: 8px;
    border: 5px solid rgba(46, 45, 48, 0.92);
    border-radius: 30px;
    background: #fbf7f2;
    box-shadow: 0 18px 35px rgba(59, 45, 50, 0.28), inset 0 0 0 2px rgba(255, 255, 255, 0.74);
}

.phone-shell {
    position: relative;
    height: 100%;
    overflow: hidden;
    border: 1px solid rgba(116, 79, 75, 0.12);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255, 252, 247, 0.95), rgba(255, 244, 239, 0.9));
    padding: 14px 10px 18px;
}

.phone-shell::before {
    position: absolute;
    top: 4px;
    left: 50%;
    width: 48px;
    height: 12px;
    content: "";
    border-radius: 999px;
    background: #2c2a2d;
    transform: translateX(-50%);
}

.phone-status {
    color: var(--ink);
    font-size: 0.48rem;
    font-weight: 800;
}

.phone-shell h2 {
    margin: 10px 0 6px;
    color: var(--ink);
    font-family: var(--script);
    font-size: clamp(0.92rem, 1.35vw, 1.25rem);
    line-height: 1.06;
    text-align: center;
}

.phone-shell h2 span {
    color: var(--coral);
}

.phone-pills {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-bottom: 10px;
}

.phone-pills span {
    padding: 3px 6px;
    border-radius: 999px;
    color: var(--berry);
    background: rgba(255, 220, 224, 0.35);
    font-size: 0.42rem;
    font-weight: 760;
}

.phone-shell ol {
    position: relative;
    display: grid;
    gap: 6px;
    margin: 0;
    padding: 0 0 0 18px;
    list-style: none;
}

.phone-shell ol::before {
    position: absolute;
    top: 8px;
    bottom: 8px;
    left: 8px;
    width: 2px;
    content: "";
    background: repeating-linear-gradient(180deg, var(--coral) 0 11px, transparent 11px 16px);
}

.phone-shell li {
    position: relative;
    display: grid;
    min-height: 35px;
    padding: 5px 6px;
    border: 1px solid rgba(116, 79, 75, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 5px 10px rgba(116, 79, 75, 0.08);
}

.phone-shell li span {
    position: absolute;
    top: 8px;
    left: -22px;
    display: grid;
    width: 18px;
    height: 18px;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: var(--coral);
    font-size: 0.46rem;
    font-weight: 850;
}

.phone-shell li strong {
    overflow: hidden;
    color: var(--ink);
    font-family: var(--script);
    font-size: 0.5rem;
    line-height: 1.1;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.phone-shell li small {
    color: var(--muted);
    font-size: 0.4rem;
}

.phone-shell b {
    position: absolute;
    right: 50%;
    bottom: 10px;
    width: 12px;
    height: 12px;
    border-right: 2px solid var(--coral);
    border-bottom: 2px solid var(--coral);
    transform: translateX(50%) rotate(45deg);
}

.mock-scroll-note {
    position: absolute;
    right: 8%;
    bottom: 6%;
    display: grid;
    justify-items: center;
    gap: 10px;
    color: #6d384b;
    font-family: var(--script);
    font-size: 0.95rem;
    line-height: 1.25;
    transform: rotate(-7deg);
}

.timeline-mockup-stage .timeline-scroll-cue {
    position: relative;
    bottom: auto;
    left: auto;
    width: 62px;
    height: 62px;
    border: 1px solid rgba(116, 79, 75, 0.12);
    border-radius: 50%;
    color: var(--coral);
    background: rgba(255, 255, 255, 0.74);
    box-shadow: 0 16px 28px rgba(116, 79, 75, 0.14);
    opacity: 1;
    transform: none;
}

.timeline-mockup-stage .timeline-scroll-cue span {
    width: 16px;
    height: 16px;
    border-width: 3px;
}

.timeline-mockup-stage .storyline {
    --storyline-indent: 76px;
    --story-node-left: -76px;
    --story-node-size: 42px;
    --story-node-radius: 21px;
    --story-card-border: 1px;
    --story-line-width: 3px;
    --story-line-half: 1.5px;
    --story-line-left: calc(var(--storyline-indent) + var(--story-node-left) + var(--story-node-radius) + var(--story-card-border) - var(--story-line-half));
    position: relative;
    display: grid;
    align-self: center;
    gap: clamp(8px, 1.25vh, 14px);
    margin: 0;
    padding: 0 0 0 var(--storyline-indent);
    list-style: none;
}

.timeline-mockup-stage .storyline::before,
.timeline-mockup-stage .storyline::after {
    position: absolute;
    top: 42px;
    bottom: 42px;
    left: var(--story-line-left);
    width: var(--story-line-width);
    content: "";
    border-radius: 999px;
}

.timeline-mockup-stage .storyline::before {
    background: linear-gradient(180deg, rgba(241, 107, 124, 0.65), rgba(241, 107, 124, 0.44));
}

.timeline-mockup-stage .storyline::after {
    background: linear-gradient(180deg, var(--coral), var(--coral-strong));
    transform: scaleY(var(--timeline-progress));
    transform-origin: top center;
}

.timeline-mockup-stage .storyline-item {
    position: relative;
    margin-left: 0;
}

.timeline-mockup-stage .storyline-item:nth-child(even) {
    margin-left: 0;
}

.timeline-mockup-stage .story-card {
    --card-accent: var(--coral);
    position: relative;
    display: grid;
    width: min(100%, 318px);
    min-height: clamp(64px, 8.7vh, 86px);
    grid-template-columns: 24px minmax(0, 1fr) 48px;
    grid-template-areas:
        "mini period sticker"
        "mini title sticker"
        "mini meta sticker";
    align-items: center;
    column-gap: 10px;
    padding: 10px 10px 10px 12px;
    overflow: visible;
    border: 1px solid rgba(116, 79, 75, 0.13);
    border-radius: 12px;
    color: var(--text);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(255, 249, 244, 0.76)),
        var(--paper);
    box-shadow: 0 9px 18px rgba(116, 79, 75, 0.13);
    text-align: left;
}

.timeline-mockup-stage .story-card::before,
.timeline-mockup-stage .story-card::after {
    display: none;
}

.timeline-mockup-stage .story-card::before {
    position: absolute;
    top: 50%;
    left: -24px;
    display: block;
    width: 28px;
    height: 2px;
    border: 0;
    border-top: 2px solid rgba(241, 107, 124, 0.32);
    border-radius: 999px;
    content: "";
    background: transparent;
    transform: translateY(-50%);
}

.timeline-mockup-stage .story-node {
    position: absolute;
    top: 50%;
    left: var(--story-node-left);
    z-index: 3;
    display: grid;
    width: var(--story-node-size);
    height: var(--story-node-size);
    place-items: center;
    border: 5px solid rgba(255, 232, 232, 0.95);
    border-radius: 50%;
    color: #fff;
    background: var(--coral);
    box-shadow: 0 9px 16px rgba(227, 92, 113, 0.22);
    font-size: 1.05rem;
    font-weight: 850;
    transform: translateY(-50%);
}

.story-mini-icon {
    grid-area: mini;
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: inset 0 0 0 1px rgba(227, 92, 113, 0.12);
}

.story-mini-icon::before {
    width: 7px;
    height: 7px;
    content: "";
    border: 2px solid var(--card-accent);
    border-radius: 50%;
}

.timeline-mockup-stage .story-card-period {
    grid-area: period;
    overflow: hidden;
    color: var(--text);
    font-family: var(--script);
    font-size: 0.68rem;
    line-height: 1.05;
    text-transform: none;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.timeline-mockup-stage .story-card strong {
    grid-area: title;
    overflow: hidden;
    margin: 0;
    color: var(--ink);
    font-family: var(--script);
    font-size: clamp(0.9rem, 1.08vw, 1.12rem);
    font-weight: 700;
    line-height: 1.08;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.timeline-mockup-stage .story-card-meta {
    grid-area: meta;
    display: block;
    margin: 0;
    color: var(--muted);
    font-size: 0.58rem;
    font-weight: 760;
}

.timeline-mockup-stage .story-sticker {
    position: static;
    grid-area: sticker;
    width: 44px;
    height: 44px;
    place-self: center;
}

.timeline-mockup-stage .story-card:hover,
.timeline-mockup-stage .story-card:focus-visible,
.timeline-mockup-stage .storyline-item.is-active .story-card {
    border-color: rgba(241, 107, 124, 0.55);
    box-shadow: 0 0 0 2px rgba(241, 107, 124, 0.12), 0 13px 26px rgba(116, 79, 75, 0.16);
    transform: translateY(-1px);
    outline: none;
}

.timeline-mockup-stage .timeline-detail {
    --detail-accent: var(--coral);
    position: relative;
    top: auto;
    display: grid;
    align-self: center;
    min-height: min(760px, 87vh);
    max-height: min(820px, 91vh);
    padding: clamp(22px, 2.55vw, 36px);
    overflow: hidden;
    border: 1px solid rgba(116, 79, 75, 0.13);
    border-radius: 26px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(255, 248, 244, 0.82)),
        var(--paper);
    box-shadow: 0 22px 48px rgba(116, 79, 75, 0.16);
    backdrop-filter: blur(14px);
}

.timeline-mockup-stage .timeline-detail::before {
    display: none;
}

.detail-close {
    position: absolute;
    top: 22px;
    right: 22px;
    z-index: 3;
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid rgba(116, 79, 75, 0.13);
    border-radius: 50%;
    color: var(--berry);
    background: rgba(255, 255, 255, 0.62);
}

.detail-close svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 2;
}

.detail-heading {
    position: relative;
    display: grid;
    gap: 8px;
    padding-right: 86px;
}

.timeline-mockup-stage .detail-number {
    width: max-content;
    min-width: 0;
    padding: 8px 18px;
    border-radius: 999px;
    color: var(--coral-strong);
    background: rgba(255, 220, 224, 0.82);
    box-shadow: none;
    font-size: 0.9rem;
    font-weight: 850;
}

.timeline-mockup-stage .timeline-detail h2 {
    margin: 8px 0 0;
    color: #4c2334;
    font-family: var(--script);
    font-size: clamp(2.05rem, 2.3vw, 2.7rem);
    font-weight: 580;
    line-height: 1.06;
}

.timeline-mockup-stage .timeline-detail h2 span {
    color: var(--coral);
}

.timeline-mockup-stage .detail-period {
    color: var(--text);
    font-family: var(--script);
    font-size: 1.05rem;
    font-weight: 650;
    text-transform: none;
}

.timeline-mockup-stage .timeline-detail p[data-detail-description] {
    max-width: 440px;
    color: var(--text);
    font-size: 0.9rem;
    line-height: 1.58;
}

.timeline-mockup-stage .detail-sticker {
    position: absolute;
    top: 54px;
    right: 10px;
    width: 64px;
    height: 64px;
    transform: rotate(6deg);
}

.moments-panel {
    display: grid;
    gap: 12px;
    margin-top: clamp(14px, 2vh, 24px);
    padding: 16px;
    border: 1px solid rgba(116, 79, 75, 0.12);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.34);
}

.moments-panel-head {
    display: grid;
    grid-template-columns: 40px 1fr 40px;
    align-items: center;
    gap: 12px;
}

.moments-panel-head p {
    margin: 0;
    color: var(--ink);
    font-family: var(--script);
    font-size: 1.08rem;
    font-weight: 700;
    text-align: center;
}

.timeline-mockup-stage .timeline-icon-button {
    width: 38px;
    height: 38px;
    border: 1px solid rgba(116, 79, 75, 0.13);
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 8px 18px rgba(116, 79, 75, 0.08);
}

.timeline-mockup-stage .moment-selector {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 0;
}

.timeline-mockup-stage .moment-chip {
    position: relative;
    display: grid;
    width: 58px;
    height: 58px;
    min-height: 0;
    padding: 3px;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 8px 16px rgba(116, 79, 75, 0.1);
}

.timeline-mockup-stage .moment-chip img {
    width: 100%;
    height: 100%;
    border-radius: 9px;
    object-fit: cover;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.timeline-mockup-stage .moment-chip.is-active {
    border-color: var(--coral);
}

.moment-add {
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    border: 1px dashed rgba(116, 79, 75, 0.16);
    border-radius: 12px;
    color: var(--berry);
    background: rgba(255, 255, 255, 0.35);
    font-size: 2rem;
    line-height: 1;
}

.moment-cards {
    display: grid;
    gap: 12px;
}

.moment-card {
    position: relative;
    display: grid;
    min-height: 90px;
    grid-template-columns: minmax(0, 1fr) minmax(120px, 38%);
    gap: 16px;
    align-items: center;
    padding: 12px;
    border: 1px solid rgba(116, 79, 75, 0.12);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 8px 18px rgba(116, 79, 75, 0.07);
    cursor: pointer;
}

.moment-card.is-active {
    border-color: rgba(241, 107, 124, 0.42);
}

.moment-card-copy {
    display: grid;
    gap: 6px;
}

.moment-card-kicker {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--coral);
    font-size: 0.82rem;
    font-weight: 850;
}

.moment-card-kicker b {
    display: grid;
    width: 26px;
    height: 26px;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: var(--coral);
}

.moment-card strong {
    color: var(--ink);
    font-family: var(--script);
    font-size: 1.06rem;
    line-height: 1.15;
}

.moment-card p {
    margin: 0;
    display: -webkit-box;
    overflow: hidden;
    color: var(--text);
    font-size: 0.76rem;
    line-height: 1.32;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.moment-card img {
    width: 100%;
    height: 64px;
    border-radius: 12px;
    object-fit: cover;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.timeline-final-line {
    margin: 8px 0 0;
    color: var(--coral-strong);
    font-family: var(--script);
    font-size: clamp(0.95rem, 1.25vw, 1.18rem);
    line-height: 1.18;
    font-weight: 700;
    text-align: center;
}

@media (max-width: 1100px) {
    .timeline-mockup-stage {
        grid-template-columns: minmax(0, 1fr) minmax(320px, 0.92fr);
        gap: 22px;
        padding: 24px 0 42px;
    }

    .timeline-showcase {
        display: none;
    }
}

@media (max-width: 760px) {
    .timeline-mockup-stage {
        width: min(100% - 24px, 420px);
        min-height: auto;
        grid-template-columns: 1fr;
        padding: 18px 0 34px;
    }

    .timeline-bg-sticker {
        display: none;
    }

    .timeline-mockup-stage .timeline-detail {
        order: -1;
        min-height: 0;
        max-height: none;
        padding: 16px 14px 18px;
        border-radius: 18px;
    }

    .detail-close {
        top: 14px;
        right: 14px;
        width: 32px;
        height: 32px;
    }

    .detail-heading {
        padding-right: 46px;
    }

    .timeline-mockup-stage .detail-number {
        padding: 6px 12px;
        font-size: 0.72rem;
    }

    .timeline-mockup-stage .timeline-detail h2 {
        font-size: 1.58rem;
    }

    .timeline-mockup-stage .detail-period {
        font-size: 0.76rem;
    }

    .timeline-mockup-stage .timeline-detail p[data-detail-description] {
        font-size: 0.76rem;
        line-height: 1.5;
    }

    .timeline-mockup-stage .detail-sticker {
        top: 48px;
        width: 42px;
        height: 42px;
    }

    .moments-panel {
        gap: 10px;
        margin-top: 12px;
        padding: 12px;
        border-radius: 15px;
    }

    .moments-panel-head {
        grid-template-columns: 34px 1fr 34px;
    }

    .moments-panel-head p {
        font-size: 0.88rem;
    }

    .timeline-mockup-stage .timeline-icon-button {
        width: 34px;
        height: 34px;
    }

    .timeline-mockup-stage .moment-chip,
    .moment-add {
        width: 45px;
        height: 45px;
        border-radius: 10px;
    }

    .moment-card {
        min-height: 0;
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 10px;
    }

    .moment-card img {
        height: 76px;
    }

    .moment-card strong {
        font-size: 0.98rem;
    }

    .moment-card p {
        font-size: 0.72rem;
    }

    .timeline-final-line {
        display: none;
    }

    .timeline-mockup-stage .storyline {
        --storyline-indent: 50px;
        --story-node-left: -48px;
        --story-node-size: 36px;
        --story-node-radius: 18px;
        gap: 12px;
        padding-left: var(--storyline-indent);
    }

    .timeline-mockup-stage .storyline-item:nth-child(even) {
        margin-left: 0;
    }

    .timeline-mockup-stage .story-card {
        width: 100%;
        min-height: 92px;
        grid-template-columns: minmax(0, 1fr) 46px;
        grid-template-areas:
            "period sticker"
            "title sticker"
            "meta sticker";
        padding: 12px 12px 12px 14px;
    }

    .story-mini-icon {
        display: none;
    }

    .timeline-mockup-stage .story-node {
        border-width: 4px;
        font-size: 0.86rem;
    }

    .timeline-mockup-stage .story-card strong {
        font-size: 1rem;
    }

    .timeline-mockup-stage .story-sticker {
        width: 42px;
        height: 42px;
    }
}

/* Timeline horizontal parallax redesign */
.timeline-horizontal-stage {
    --timeline-scroll: 0;
    --timeline-reveal: 0;
    --timeline-title-opacity: 1;
    --timeline-progress: 0;
    position: relative;
    isolation: isolate;
    display: block;
    width: 100%;
    min-height: 190vh;
    min-height: 190svh;
    padding: 0;
    overflow: visible;
}

.timeline-horizontal-stage::before {
    background:
        radial-gradient(circle at calc(18% + var(--timeline-scroll) * 10%) 22%, rgba(255, 255, 255, 0.72), transparent 24%),
        radial-gradient(circle at 78% calc(22% + var(--timeline-scroll) * 12%), rgba(255, 199, 207, 0.42), transparent 28%),
        linear-gradient(180deg, rgba(255, 246, 242, 0.38), rgba(255, 250, 246, 0.68));
}

.timeline-horizontal-stage .timeline-pin {
    position: sticky;
    top: 0;
    display: grid;
    width: min(100% - 36px, 1240px);
    min-height: 100vh;
    min-height: 100svh;
    margin: 0 auto;
    align-items: center;
    overflow: hidden;
}

.timeline-horizontal-stage .timeline-showcase {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    min-height: 0;
    place-items: center;
    pointer-events: none;
}

.timeline-horizontal-stage .timeline-title-block {
    align-self: center;
    padding: 0;
    text-align: center;
    opacity: var(--timeline-title-opacity);
    filter: blur(calc(var(--timeline-reveal) * 2.5px));
    transform:
        translate3d(0, calc(var(--timeline-scroll) * -112vh), 0)
        scale(calc(1 - var(--timeline-scroll) * 0.12));
    transition: opacity 90ms linear, filter 90ms linear, transform 90ms linear;
    will-change: opacity, filter, transform;
}

.timeline-horizontal-stage .timeline-title-block h1 {
    margin: 0;
    color: #4a2435;
    font-family: var(--script);
    font-size: clamp(4.3rem, 10vw, 10.4rem);
    font-weight: 560;
    line-height: 0.84;
    white-space: normal;
    text-align: center;
    text-shadow: 0 26px 54px rgba(116, 79, 75, 0.2);
}

.timeline-horizontal-stage .timeline-title-block h1 span {
    color: var(--coral);
    font-size: 0.46em;
    vertical-align: 0.22em;
}

.timeline-horizontal-stage .mock-scroll-note {
    right: auto;
    bottom: clamp(28px, 8vh, 72px);
    left: 50%;
    gap: 12px;
    opacity: calc(1 - var(--timeline-reveal));
    pointer-events: auto;
    text-align: center;
    transform:
        translateX(-50%)
        translateY(calc(var(--timeline-scroll) * 34px))
        rotate(-3deg);
    transition: opacity 140ms linear;
}

.timeline-horizontal-stage .timeline-scroll-cue {
    animation: timeline-cue-pulse 1.55s var(--ease) infinite;
}

.timeline-horizontal-stage .timeline-experience {
    --timeline-progress: inherit;
    position: relative;
    z-index: 8;
    display: grid;
    width: min(100%, 1120px);
    align-self: center;
    gap: clamp(28px, 4.4vh, 46px);
    padding-top: clamp(92px, 11vh, 128px);
    opacity: var(--timeline-reveal);
    pointer-events: none;
    transform:
        translate3d(0, calc((1 - var(--timeline-reveal)) * 96px), 0)
        scale(calc(0.96 + var(--timeline-reveal) * 0.04));
    transition: opacity 160ms linear, transform 160ms linear;
}

.timeline-horizontal-stage .timeline-experience::before {
    position: absolute;
    top: clamp(70px, 9vh, 98px);
    left: 50%;
    z-index: -1;
    width: min(78vw, 960px);
    height: 160px;
    content: "";
    border-radius: 999px;
    background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.74), transparent 68%);
    filter: blur(14px);
    opacity: 0.9;
    transform: translateX(-50%);
}

.timeline-horizontal-stage .timeline-experience:is(:hover, :focus-within),
.timeline-horizontal-stage.is-ready .timeline-experience {
    pointer-events: auto;
}

.timeline-horizontal-stage .timeline-bg-sticker {
    z-index: 1;
    max-width: 86px;
    max-height: 86px;
    transition: transform 180ms linear, opacity 180ms linear;
}

.timeline-horizontal-stage .mock-heart {
    top: clamp(120px, 24vh, 220px);
    left: min(78%, calc(100% - 132px));
    opacity: calc(0.16 + var(--timeline-reveal) * 0.22);
    transform:
        translate3d(calc(var(--timeline-scroll) * -28px), calc(var(--timeline-scroll) * 36px), 0)
        rotate(calc(-10deg + var(--timeline-scroll) * 9deg))
        scale(calc(0.82 + var(--timeline-reveal) * 0.1));
}

.timeline-horizontal-stage .mock-calendar {
    top: clamp(112px, 21vh, 190px);
    left: max(28px, 8%);
    opacity: calc(0.14 + var(--timeline-reveal) * 0.2);
    transform:
        translate3d(calc(var(--timeline-scroll) * 28px), calc(var(--timeline-scroll) * 34px), 0)
        rotate(calc(-14deg + var(--timeline-scroll) * 8deg));
}

.timeline-horizontal-stage .mock-cassette {
    display: none;
}

.timeline-horizontal-stage .storyline {
    --node-size: clamp(42px, 4.4vw, 56px);
    --timeline-line-inset: 6.25%;
    --timeline-dash: repeating-linear-gradient(
        90deg,
        rgba(241, 107, 124, 0.5) 0 10px,
        transparent 10px 18px
    );
    --timeline-solid: linear-gradient(90deg, var(--coral), var(--coral-strong));
    position: relative;
    z-index: 12;
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    align-items: center;
    gap: 0;
    width: min(100%, 940px);
    margin: 0 auto;
    padding: 0;
    isolation: isolate;
    list-style: none;
}

.timeline-horizontal-stage .storyline::before,
.timeline-horizontal-stage .storyline::after {
    position: absolute;
    z-index: 1;
    top: 50%;
    right: var(--timeline-line-inset);
    left: var(--timeline-line-inset);
    width: auto;
    height: 2px;
    content: "";
    border-radius: 999px;
    pointer-events: none;
    transform: translateY(-50%);
}

.timeline-horizontal-stage .storyline::before {
    background: var(--timeline-dash);
    box-shadow: none;
}

.timeline-horizontal-stage .storyline::after {
    background: var(--timeline-solid);
    transform: translateY(-50%) scaleX(var(--timeline-progress));
    transform-origin: left center;
}

.timeline-horizontal-stage .storyline-item {
    position: relative;
    z-index: 3;
    display: grid;
    justify-items: center;
    margin: 0;
}

.timeline-horizontal-stage .storyline-item:nth-child(even) {
    margin: 0;
}

.timeline-horizontal-stage .story-card {
    --card-accent: var(--coral);
    position: relative;
    z-index: 4;
    display: grid;
    width: var(--node-size);
    height: var(--node-size);
    min-height: 0;
    grid-template: 1fr / 1fr;
    grid-template-areas: none;
    place-items: center;
    gap: 0;
    padding: 0;
    overflow: visible;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: transparent;
    box-shadow: none;
    text-align: center;
    cursor: pointer;
}

.timeline-horizontal-stage .story-card::before,
.timeline-horizontal-stage .story-card::after {
    display: none;
}

.timeline-horizontal-stage .story-node {
    position: relative;
    inset: auto;
    z-index: 5;
    display: grid;
    width: var(--node-size);
    height: var(--node-size);
    place-items: center;
    border: 2px solid #ffadbd;
    border-radius: 50%;
    color: var(--coral-strong);
    background: #fffdfb;
    box-shadow: none;
    font-size: clamp(1rem, 1.4vw, 1.25rem);
    font-weight: 880;
    line-height: 1;
    overflow: hidden;
    transform: none;
    transition: transform 220ms var(--ease), box-shadow 220ms var(--ease), background 220ms var(--ease);
}

.timeline-horizontal-stage .story-popover {
    display: none;
    position: absolute;
    bottom: calc(100% + 20px);
    left: 50%;
    z-index: 20;
    width: min(210px, 38vw);
    min-height: 96px;
    grid-template-columns: minmax(0, 1fr) 42px;
    grid-template-areas:
        "period sticker"
        "title sticker"
        "meta sticker";
    align-items: center;
    gap: 4px 10px;
    padding: 12px;
    border: 1px solid rgba(116, 79, 75, 0.14);
    border-radius: 14px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 16px 34px rgba(116, 79, 75, 0.16);
    backdrop-filter: blur(12px);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 12px) scale(0.94);
    transition: opacity 180ms var(--ease), transform 180ms var(--ease);
}

.timeline-horizontal-stage .story-popover::after {
    display: none;
    position: absolute;
    bottom: -7px;
    left: 50%;
    width: 14px;
    height: 14px;
    content: "";
    border-right: 1px solid rgba(116, 79, 75, 0.12);
    border-bottom: 1px solid rgba(116, 79, 75, 0.12);
    background: rgba(255, 255, 255, 0.88);
    transform: translateX(-50%) rotate(45deg);
}

.timeline-horizontal-stage .story-card:hover::before,
.timeline-horizontal-stage .story-card:focus-visible::before,
.timeline-horizontal-stage .storyline-item.is-active .story-card::before,
.timeline-horizontal-stage .story-card:hover::after,
.timeline-horizontal-stage .story-card:focus-visible::after,
.timeline-horizontal-stage .storyline-item.is-active .story-card::after {
    display: none;
}

.timeline-horizontal-stage .story-card:hover,
.timeline-horizontal-stage .story-card:focus-visible,
.timeline-horizontal-stage .storyline-item.is-active .story-card {
    border-color: transparent;
    box-shadow: none;
    transform: none;
    outline: none;
}

.timeline-horizontal-stage .story-card:hover .story-node,
.timeline-horizontal-stage .story-card:focus-visible .story-node,
.timeline-horizontal-stage .storyline-item.is-active .story-node {
    border-color: rgba(255, 232, 232, 0.96);
    color: #fff;
    background: var(--card-accent);
    box-shadow: none;
    transform: none;
    animation: none;
}

.timeline-horizontal-stage .story-card:hover .story-popover,
.timeline-horizontal-stage .story-card:focus-visible .story-popover {
    opacity: 0;
    transform: translate(-50%, 12px) scale(0.94);
}

.timeline-horizontal-stage .story-card:focus-visible {
    outline: none;
}

.timeline-horizontal-stage .story-card-period {
    grid-area: period;
    color: var(--muted);
    font-family: var(--script);
    font-size: 0.78rem;
    font-weight: 650;
    line-height: 1.05;
    text-align: left;
}

.timeline-horizontal-stage .story-popover strong {
    grid-area: title;
    overflow: hidden;
    color: var(--ink);
    font-family: var(--script);
    font-size: 1.04rem;
    font-weight: 720;
    line-height: 1.05;
    text-align: left;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.timeline-horizontal-stage .story-card-meta {
    grid-area: meta;
    color: var(--muted);
    font-size: 0.66rem;
    font-weight: 780;
    line-height: 1.1;
    text-align: left;
}

.timeline-horizontal-stage .story-sticker {
    position: static;
    grid-area: sticker;
    width: 40px;
    height: 40px;
    place-self: center;
}

.timeline-horizontal-stage .story-sticker.sticker-bubu-dudu-cuddle,
.timeline-horizontal-stage .story-sticker.sticker-bubu-dudu-hearts,
.timeline-horizontal-stage .story-sticker.sticker-bubu-dudu-sit,
.timeline-horizontal-stage .story-sticker.sticker-bubu-dudu-stand,
.timeline-horizontal-stage .story-sticker.sticker-bubu-dudu-cooking,
.timeline-horizontal-stage .story-sticker.sticker-bubu-face,
.timeline-horizontal-stage .story-sticker.sticker-bubu-dudu-bed,
.timeline-horizontal-stage .story-sticker.sticker-bubu-dudu-travel {
    height: auto;
}

.timeline-horizontal-stage .story-sticker.sticker-bubu-dudu-cuddle {
    width: 52px;
    aspect-ratio: 320 / 276;
}

.timeline-horizontal-stage .story-sticker.sticker-bubu-dudu-hearts {
    width: 52px;
    aspect-ratio: 530 / 445;
}

.timeline-horizontal-stage .story-sticker.sticker-bubu-dudu-sit {
    width: 58px;
    aspect-ratio: 452 / 340;
}

.timeline-horizontal-stage .story-sticker.sticker-bubu-dudu-stand {
    width: 58px;
    aspect-ratio: 636 / 495;
}

.timeline-horizontal-stage .story-sticker.sticker-bubu-dudu-cooking {
    width: 56px;
    aspect-ratio: 557 / 556;
}

.timeline-horizontal-stage .story-sticker.sticker-bubu-face {
    width: 46px;
    aspect-ratio: 234 / 235;
}

.timeline-horizontal-stage .story-sticker.sticker-bubu-dudu-bed {
    width: 56px;
    aspect-ratio: 352 / 329;
}

.timeline-horizontal-stage .story-sticker.sticker-bubu-dudu-travel {
    width: 58px;
    aspect-ratio: 531 / 455;
}

.timeline-horizontal-stage .timeline-detail {
    --detail-accent: var(--coral);
    position: relative;
    z-index: 4;
    isolation: isolate;
    top: auto;
    display: grid;
    height: clamp(480px, 54vh, 580px);
    min-height: 480px;
    max-height: none;
    grid-template-columns: minmax(0, 0.86fr) minmax(360px, 1fr);
    gap: clamp(22px, 3.2vw, 42px);
    align-items: stretch;
    padding: clamp(20px, 2.4vw, 32px);
    overflow: hidden;
    border: 1px solid rgba(116, 79, 75, 0.13);
    border-radius: 26px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 248, 244, 0.78)),
        var(--paper);
    box-shadow: 0 24px 56px rgba(116, 79, 75, 0.18);
    backdrop-filter: blur(16px);
    transform:
        perspective(1200px)
        rotateX(calc(var(--tilt-y, 0deg) * 0.7))
        rotateY(calc(var(--tilt-x, 0deg) * 0.7))
        translateY(var(--lift, 0));
}

.timeline-horizontal-stage .timeline-detail::before {
    position: absolute;
    inset: -40% auto auto -22%;
    display: block;
    width: 52%;
    height: 82%;
    content: "";
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 220, 224, 0.42), transparent 68%);
    opacity: 0.75;
    pointer-events: none;
}

.timeline-horizontal-stage .timeline-detail::after {
    position: absolute;
    inset: -2px;
    content: "";
    pointer-events: none;
    background:
        linear-gradient(110deg, transparent 0 24%, rgba(255, 255, 255, 0.48) 35%, transparent 48% 100%);
    opacity: calc(var(--timeline-reveal) * 0.38);
    transform: translateX(calc(-42% + var(--timeline-scroll) * 80%));
}

.timeline-horizontal-stage .timeline-detail.is-locked .detail-heading,
.timeline-horizontal-stage .timeline-detail.is-locked .moments-panel,
.timeline-horizontal-stage .timeline-detail.is-locked .timeline-final-line {
    opacity: 0.14;
    filter: blur(4px);
    pointer-events: none;
    user-select: none;
}

.chapter-gate {
    position: absolute;
    inset: 0;
    z-index: 7;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(14px, 2vw, 24px);
    overflow-y: auto;
    background:
        radial-gradient(circle at 18% 20%, rgba(255, 220, 224, 0.54), transparent 36%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.84), rgba(255, 247, 244, 0.68));
    backdrop-filter: blur(9px);
    overscroll-behavior-y: auto;
    scrollbar-width: thin;
    touch-action: pan-y;
}

.chapter-gate[hidden] {
    display: none;
}

.chapter-gate-card {
    display: grid;
    width: min(100%, 480px);
    max-height: 100%;
    gap: 10px;
    justify-items: center;
    padding: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    text-align: center;
    overscroll-behavior-y: auto;
    scrollbar-width: none;
    touch-action: pan-y;
}

.chapter-gate-card::-webkit-scrollbar {
    display: none;
}

.chapter-gate-kicker,
.chapter-gate-status {
    margin: 0;
    color: var(--coral-strong);
    font-size: 0.86rem;
    font-weight: 850;
    line-height: 1.2;
    letter-spacing: 0;
}

.chapter-gate-kicker {
    display: none;
}

.chapter-gate-card h3 {
    margin: 0;
    color: #4c2334;
    font-family: var(--script);
    font-size: clamp(1.68rem, 3vw, 2.5rem);
    font-weight: 620;
    line-height: 1;
}

.chapter-gate-card p[data-chapter-gate-copy] {
    max-width: 310px;
    margin: 0;
    color: var(--text);
    font-size: 0.8rem;
    line-height: 1.3;
}

.chapter-gate-sequence {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 0;
}

.chapter-gate-sequence[hidden],
.chapter-gate-sequence:empty,
.chapter-gate-status:empty {
    display: none;
}

.chapter-gate-step,
.chapter-gate-tile {
    display: grid;
    place-items: center;
    border-radius: 16px;
}

.chapter-gate-step {
    width: 64px;
    height: 58px;
    border: 1px solid rgba(241, 107, 124, 0.18);
    background: rgba(255, 255, 255, 0.58);
    opacity: 0.68;
    transition: opacity 180ms ease, transform 180ms var(--ease), border-color 180ms ease;
}

.chapter-gate-step.is-current,
.chapter-gate-step.is-done {
    border-color: rgba(241, 107, 124, 0.48);
    opacity: 1;
    transform: translateY(-1px);
}

.chapter-gate-grid {
    display: block;
    width: min(100%, 430px);
}

.chapter-gate-tile {
    min-height: 76px;
    padding: 10px;
    border: 1px solid rgba(116, 79, 75, 0.13);
    color: var(--text);
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 8px 18px rgba(116, 79, 75, 0.08);
    cursor: pointer;
    transition: transform 180ms var(--ease), border-color 180ms ease, box-shadow 180ms ease;
}

.chapter-gate-tile:hover,
.chapter-gate-tile:focus-visible {
    border-color: rgba(241, 107, 124, 0.44);
    box-shadow: 0 12px 24px rgba(116, 79, 75, 0.13);
    outline: none;
    transform: translateY(-2px);
}

.chapter-gate-icon {
    width: 32px;
    height: 32px;
}

.chapter-gate-icon.sticker-cassette {
    height: 26px;
}

.chapter-gate-label {
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 820;
}

.chapter-gate-game-badge {
    display: inline-grid;
    place-items: center;
    min-height: 28px;
    padding: 5px 12px;
    border: 1px solid rgba(241, 107, 124, 0.22);
    border-radius: 999px;
    color: var(--coral-strong);
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 8px 18px rgba(116, 79, 75, 0.08);
    font-size: 0.72rem;
    font-weight: 900;
}

.chapter-game-launcher {
    --game-accent: #f25f79;
    --game-accent-deep: #b53b58;
    --game-wash: rgba(242, 95, 121, 0.13);
    --game-border: rgba(242, 95, 121, 0.26);
    --game-shadow: rgba(232, 77, 111, 0.22);
    display: grid;
    gap: 12px;
    justify-items: center;
    width: 100%;
}

.chapter-game-launcher.is-racing {
    --game-accent: #77a8b4;
    --game-accent-deep: #487381;
    --game-wash: rgba(119, 168, 180, 0.18);
    --game-border: rgba(119, 168, 180, 0.34);
    --game-shadow: rgba(72, 115, 129, 0.2);
}

.chapter-game-launcher.is-snake {
    --game-accent: #8aa66d;
    --game-accent-deep: #5f7b43;
    --game-wash: rgba(138, 166, 109, 0.17);
    --game-border: rgba(138, 166, 109, 0.34);
    --game-shadow: rgba(95, 123, 67, 0.2);
}

.chapter-game-launcher.is-math {
    --game-accent: #c9914c;
    --game-accent-deep: #9d6431;
    --game-wash: rgba(201, 145, 76, 0.16);
    --game-border: rgba(201, 145, 76, 0.32);
    --game-shadow: rgba(157, 100, 49, 0.18);
}

.chapter-game-launcher.is-memory {
    --game-accent: #cf7489;
    --game-accent-deep: #9c4960;
    --game-wash: rgba(207, 116, 137, 0.15);
    --game-border: rgba(207, 116, 137, 0.32);
    --game-shadow: rgba(156, 73, 96, 0.19);
}

.chapter-game-launcher.is-puzzle {
    --game-accent: #9c7db4;
    --game-accent-deep: #6e5486;
    --game-wash: rgba(156, 125, 180, 0.16);
    --game-border: rgba(156, 125, 180, 0.32);
    --game-shadow: rgba(110, 84, 134, 0.18);
}

.chapter-game-launcher.is-dino {
    --game-accent: #d18b5f;
    --game-accent-deep: #9f5f38;
    --game-wash: rgba(209, 139, 95, 0.16);
    --game-border: rgba(209, 139, 95, 0.32);
    --game-shadow: rgba(159, 95, 56, 0.18);
}

.chapter-game-launcher.is-flappy {
    --game-accent: #e56f83;
    --game-accent-deep: #aa4054;
    --game-wash: rgba(229, 111, 131, 0.15);
    --game-border: rgba(229, 111, 131, 0.32);
    --game-shadow: rgba(170, 64, 84, 0.2);
}

.chapter-game-launcher-preview {
    position: relative;
    isolation: isolate;
    display: block;
    width: min(100%, 304px);
    aspect-ratio: 16 / 7;
    margin: 0;
    overflow: hidden;
    border: 0;
    border-radius: 18px;
    background:
        radial-gradient(circle at 18% 16%, rgba(255, 255, 255, 0.82), transparent 28%),
        linear-gradient(135deg, var(--game-wash), rgba(255, 255, 255, 0.84));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78), 0 16px 30px var(--game-shadow);
}

.chapter-game-launcher-preview::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(76, 35, 52, 0.1)),
        radial-gradient(circle at 84% 18%, rgba(255, 255, 255, 0.52), transparent 22%);
    pointer-events: none;
}

.chapter-game-launcher-preview::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 3;
    border-radius: inherit;
    box-shadow: inset 0 0 0 1.35px var(--game-border);
    pointer-events: none;
}

.chapter-game-preview-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    backface-visibility: hidden;
    transform: scale(1.001);
    transition: transform 280ms var(--ease);
    will-change: transform;
}

.chapter-game-launcher:hover .chapter-game-preview-image {
    transform: scale(1.025);
}

.chapter-game-launcher.is-locked-by-date .chapter-game-preview-image {
    filter: saturate(0.74) brightness(1.04);
    transform: scale(1.001);
}

.chapter-game-launcher.is-locked-by-date .chapter-game-launcher-preview {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78), 0 12px 24px rgba(116, 79, 75, 0.12);
}

.chapter-game-preview-caption {
    position: absolute;
    left: 10px;
    bottom: 10px;
    z-index: 2;
    max-width: calc(100% - 20px);
    padding: 5px 9px 6px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 999px;
    color: #4c2334;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 8px 18px rgba(116, 79, 75, 0.12);
    font-size: 0.66rem;
    font-weight: 880;
    line-height: 1;
    white-space: nowrap;
    backdrop-filter: blur(8px);
}

.chapter-game-launcher-glow,
.chapter-game-launcher-hero,
.chapter-game-launcher-trail {
    position: absolute;
    display: block;
    pointer-events: none;
}

.chapter-game-launcher-glow {
    top: 30%;
    left: 50%;
    width: 132px;
    height: 132px;
    border-radius: 999px;
    background: rgba(242, 95, 121, 0.22);
    filter: blur(18px);
    transform: translate(-50%, -50%);
    animation: launcher-pulse 2.5s ease-in-out infinite;
}

.chapter-game-launcher-hero {
    top: 44%;
    left: 50%;
    width: 66px;
    height: 50px;
    border-radius: 22px 22px 14px 14px;
    background: linear-gradient(145deg, #f25f79, #ad314e);
    box-shadow: inset 0 -8px 0 rgba(76, 35, 52, 0.16), 0 18px 28px rgba(232, 77, 111, 0.25);
    transform: translate(-50%, -50%);
    animation: launcher-float 2.1s var(--ease) infinite;
}

.chapter-game-launcher-trail {
    right: 18%;
    bottom: 22%;
    width: 62px;
    height: 14px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(255, 241, 166, 0), rgba(255, 241, 166, 0.82));
    animation: launcher-trail 1.6s ease-in-out infinite;
}

.chapter-game-launcher p {
    max-width: 300px;
    margin: 0;
    color: var(--text);
    font-size: 0.8rem;
    line-height: 1.34;
}

.chapter-game-launcher-copy {
    display: grid;
    gap: 4px;
    justify-items: center;
    max-width: 322px;
    color: var(--text);
    text-align: center;
}

.chapter-game-launcher-copy strong {
    color: #4c2334;
    font-family: var(--script);
    font-size: 1.08rem;
    font-weight: 720;
    line-height: 1;
}

.chapter-game-launcher-copy p {
    max-width: 100%;
}

.chapter-game-launcher-note {
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 780;
    line-height: 1.25;
}

.chapter-game-launcher-button {
    min-height: 42px;
    padding: 8px 22px;
    border: 0;
    border-radius: 15px;
    color: #fff;
    background: linear-gradient(135deg, var(--game-accent), var(--game-accent-deep));
    box-shadow: 0 14px 26px var(--game-shadow);
    font-family: var(--script);
    font-size: 1.06rem;
    font-weight: 760;
    cursor: pointer;
    transition: transform 180ms var(--ease), box-shadow 180ms var(--ease), filter 180ms ease;
}

.chapter-game-launcher-button:hover,
.chapter-game-launcher-button:focus-visible {
    filter: brightness(1.02);
    outline: none;
    transform: translateY(-2px);
    box-shadow: 0 18px 32px var(--game-shadow);
}

.chapter-game-launcher-button:disabled,
.chapter-game-launcher-button[aria-disabled="true"] {
    color: rgba(76, 35, 52, 0.58);
    background: rgba(255, 255, 255, 0.76);
    box-shadow: none;
    cursor: default;
    transform: none;
    filter: none;
}

.chapter-game-launcher-button:disabled:hover,
.chapter-game-launcher-button:disabled:focus-visible,
.chapter-game-launcher-button[aria-disabled="true"]:hover,
.chapter-game-launcher-button[aria-disabled="true"]:focus-visible {
    box-shadow: none;
    outline: none;
    transform: none;
}

@keyframes launcher-pulse {
    0%,
    100% {
        opacity: 0.75;
        transform: translate(-50%, -50%) scale(0.92);
    }

    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.08);
    }
}

@keyframes launcher-float {
    0%,
    100% {
        transform: translate(-50%, -50%) translateY(0) rotate(-2deg);
    }

    50% {
        transform: translate(-50%, -50%) translateY(-10px) rotate(2deg);
    }
}

@keyframes launcher-trail {
    0%,
    100% {
        opacity: 0.25;
        transform: translateX(12px);
    }

    50% {
        opacity: 0.9;
        transform: translateX(-10px);
    }
}

body.has-fullscreen-game {
    overflow: hidden;
}

.fullscreen-game-shell {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: clamp(12px, 2vw, 26px);
    background:
        radial-gradient(circle at 16% 18%, rgba(255, 220, 224, 0.34), transparent 32%),
        radial-gradient(circle at 82% 20%, rgba(187, 213, 223, 0.28), transparent 30%),
        linear-gradient(135deg, rgba(41, 24, 38, 0.96), rgba(91, 47, 68, 0.95));
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 240ms ease, transform 300ms var(--ease);
}

.fullscreen-game-shell.is-open {
    opacity: 1;
    transform: scale(1);
}

.fullscreen-game-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(circle at center, black, transparent 78%);
    pointer-events: none;
}

.fullscreen-game-chrome {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: clamp(22px, 3vh, 34px);
    width: min(100%, 1220px);
    height: min(100%, 780px);
    min-height: 0;
    padding: clamp(12px, 1.6vw, 18px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 28px;
    background: rgba(255, 252, 249, 0.12);
    box-shadow: 0 32px 80px rgba(24, 12, 22, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(24px);
}

.fullscreen-game-topbar,
.fullscreen-game-footer {
    display: grid;
    align-items: center;
    gap: 12px;
}

.fullscreen-game-topbar {
    grid-template-columns: 1fr auto auto;
}

.fullscreen-game-heading {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.fullscreen-game-heading span,
.fullscreen-game-stats span {
    margin: 0;
    color: rgba(255, 245, 243, 0.78);
    font-size: 0.78rem;
    font-weight: 800;
}

.fullscreen-game-footer p {
    margin: 0;
    color: rgba(255, 245, 243, 0.78);
    font-size: 0.78rem;
    font-weight: 600;
}

.fullscreen-game-heading strong {
    color: #fffaf7;
    font-family: var(--script);
    font-size: clamp(1.9rem, 4vw, 3.3rem);
    font-weight: 650;
    line-height: 0.95;
}

.fullscreen-game-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: end;
    gap: 8px;
}

.fullscreen-game-stats span {
    min-height: 32px;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.11);
}

.fullscreen-game-close {
    display: grid;
    min-width: max-content;
    height: 40px;
    min-height: 40px;
    place-items: center;
    padding: 0 16px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    color: #fffaf7;
    background: rgba(255, 255, 255, 0.1);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 180ms var(--ease), background 180ms ease;
}

.fullscreen-game-close:hover,
.fullscreen-game-close:focus-visible {
    outline: none;
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
}

.fullscreen-game-stage {
    position: relative;
    min-height: 0;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.fullscreen-game-canvas {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 360px;
    cursor: crosshair;
}

.fullscreen-game-footer {
    grid-template-columns: minmax(0, 1fr) auto;
}

.fullscreen-game-shell.is-math .fullscreen-game-footer {
    grid-template-columns: 1fr;
}

.fullscreen-game-shell.is-math .fullscreen-game-canvas {
    cursor: pointer;
}

.fullscreen-game-shell.is-puzzle .fullscreen-game-footer {
    grid-template-columns: 1fr;
}

.fullscreen-game-shell.is-puzzle .fullscreen-game-canvas {
    cursor: grab;
    touch-action: none;
}

.fullscreen-game-shell.is-dino .fullscreen-game-footer {
    grid-template-columns: 1fr;
}

.fullscreen-game-shell.is-dino .fullscreen-game-canvas {
    cursor: pointer;
    touch-action: manipulation;
}

.fullscreen-game-shell.is-flappy .fullscreen-game-footer {
    grid-template-columns: 1fr;
}

.fullscreen-game-shell.is-flappy .fullscreen-game-canvas {
    cursor: pointer;
    touch-action: manipulation;
}

.fullscreen-game-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: end;
    gap: 8px;
}

.fullscreen-game-controls[hidden],
.fullscreen-game-shell.is-math .fullscreen-game-controls,
.fullscreen-game-shell.is-puzzle .fullscreen-game-controls,
.fullscreen-game-shell.is-dino .fullscreen-game-controls,
.fullscreen-game-shell.is-flappy .fullscreen-game-controls {
    display: none !important;
}

.fullscreen-game-controls.is-keypad {
    display: grid;
    grid-template-columns: repeat(3, 54px);
}

.fullscreen-game-controls.is-choice-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(54px, 68px));
}

.fullscreen-game-controls button {
    min-width: 78px;
    min-height: 42px;
    border: 0;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, #f25f79, #e84d6f);
    box-shadow: 0 12px 24px rgba(22, 9, 20, 0.24);
    font-family: var(--script);
    font-size: 1.05rem;
    font-weight: 760;
    cursor: pointer;
    touch-action: manipulation;
    user-select: none;
    transition: transform 160ms var(--ease), filter 160ms ease;
}

.fullscreen-game-controls.is-keypad button {
    min-width: 54px;
}

.fullscreen-game-controls.is-choice-grid button {
    min-width: 54px;
    border-radius: 18px;
    background: linear-gradient(135deg, #c9914c, #9d6431);
}

.fullscreen-game-controls button:hover,
.fullscreen-game-controls button:focus-visible,
.fullscreen-game-controls button:active {
    outline: none;
    filter: brightness(1.04);
    transform: translateY(-1px) scale(0.99);
}

.fullscreen-game-shell.is-complete .fullscreen-game-chrome {
    animation: fullscreen-complete 720ms var(--ease);
}

@keyframes fullscreen-complete {
    0% {
        transform: scale(1);
    }

    45% {
        transform: scale(1.018);
    }

    100% {
        transform: scale(1);
    }
}

.chapter-game {
    display: grid;
    width: 100%;
    gap: 10px;
}

.game-score,
.math-timer {
    margin: 0;
    color: #6b3446;
    font-size: 0.78rem;
    font-weight: 850;
    text-align: center;
}

.chapter-game-submit,
.game-controls button,
.snake-controls button {
    min-height: 38px;
    border: 0;
    border-radius: 13px;
    color: #fff;
    background: linear-gradient(135deg, #f25f79, #e84d6f);
    box-shadow: 0 10px 18px rgba(232, 77, 111, 0.22);
    font-family: var(--script);
    font-size: 1.03rem;
    font-weight: 760;
    cursor: pointer;
    transition: transform 180ms var(--ease), box-shadow 180ms var(--ease), filter 180ms ease;
}

.chapter-game-submit:hover,
.chapter-game-submit:focus-visible,
.game-controls button:hover,
.game-controls button:focus-visible,
.snake-controls button:hover,
.snake-controls button:focus-visible {
    filter: brightness(1.02);
    outline: none;
    transform: translateY(-1px);
    box-shadow: 0 13px 24px rgba(232, 77, 111, 0.28);
}

.game-controls {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.arcade-stage {
    position: relative;
    height: 172px;
    overflow: hidden;
    border: 1px solid rgba(116, 79, 75, 0.13);
    border-radius: 18px;
    background:
        radial-gradient(circle at 16% 22%, rgba(255, 255, 255, 0.72), transparent 28%),
        linear-gradient(180deg, rgba(241, 248, 250, 0.92), rgba(255, 247, 241, 0.88));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 10px 22px rgba(116, 79, 75, 0.08);
}

.space-stage {
    background:
        radial-gradient(circle at 18% 24%, rgba(255, 222, 229, 0.82), transparent 18%),
        radial-gradient(circle at 72% 32%, rgba(187, 213, 223, 0.55), transparent 24%),
        linear-gradient(180deg, #463044, #744b61);
}

.space-enemy,
.space-player,
.space-laser {
    position: absolute;
    transform: translateX(-50%);
}

.space-enemy {
    width: 30px;
    height: 24px;
    border-radius: 12px 12px 8px 8px;
    background: #b8cfac;
    box-shadow: inset 0 -5px 0 rgba(76, 35, 52, 0.16), 0 8px 14px rgba(76, 35, 52, 0.22);
    transition: opacity 180ms ease, transform 180ms var(--ease);
}

.space-enemy::before,
.space-enemy::after {
    content: "";
    position: absolute;
    top: 9px;
    width: 4px;
    height: 4px;
    border-radius: 999px;
    background: #4c2334;
}

.space-enemy::before {
    left: 8px;
}

.space-enemy::after {
    right: 8px;
}

.space-enemy.is-defeated {
    opacity: 0;
    transform: translateX(-50%) scale(0.35) rotate(16deg);
}

.space-player {
    bottom: 15px;
    width: 36px;
    height: 25px;
    border-radius: 16px 16px 8px 8px;
    background: #f25f79;
    box-shadow: inset 0 -5px 0 rgba(76, 35, 52, 0.15);
    transition: left 160ms var(--ease);
}

.space-laser {
    bottom: 39px;
    width: 4px;
    height: 0;
    border-radius: 999px;
    background: rgba(255, 243, 158, 0.94);
    opacity: 0;
}

.space-laser.is-firing {
    animation: laser-fire 260ms ease;
}

@keyframes laser-fire {
    0% {
        height: 0;
        opacity: 0;
    }

    20%,
    70% {
        height: 112px;
        opacity: 1;
    }

    100% {
        height: 112px;
        opacity: 0;
    }
}

.racing-stage {
    background: #e9e2dc;
}

.racing-road {
    position: absolute;
    inset: 0 12%;
    border-inline: 2px solid rgba(255, 255, 255, 0.82);
    background:
        linear-gradient(90deg, transparent 32%, rgba(255, 255, 255, 0.52) 32% 34%, transparent 34% 66%, rgba(255, 255, 255, 0.52) 66% 68%, transparent 68%),
        repeating-linear-gradient(180deg, rgba(116, 79, 75, 0.1) 0 18px, transparent 18px 36px),
        linear-gradient(180deg, #c9d8de, #f7e2de);
}

.race-car,
.race-object {
    position: absolute;
    z-index: 2;
    transform: translateX(-50%);
    transition: left 170ms var(--ease), top 170ms var(--ease), transform 170ms var(--ease);
}

.race-car {
    bottom: 16px;
    width: 32px;
    height: 42px;
    border-radius: 16px 16px 9px 9px;
    background: linear-gradient(180deg, #f25f79, #af314f);
    box-shadow: inset 0 -7px 0 rgba(76, 35, 52, 0.16), 0 10px 18px rgba(76, 35, 52, 0.16);
}

.race-car::before,
.race-car::after {
    content: "";
    position: absolute;
    bottom: 5px;
    width: 5px;
    height: 10px;
    border-radius: 999px;
    background: #4c2334;
}

.race-car::before {
    left: 4px;
}

.race-car::after {
    right: 4px;
}

.race-object {
    width: 26px;
    height: 26px;
}

.race-object.is-cone {
    clip-path: polygon(50% 0, 100% 100%, 0 100%);
    background: #f0b15f;
    box-shadow: 0 8px 14px rgba(116, 79, 75, 0.14);
}

.race-object.is-barrier {
    width: 34px;
    height: 18px;
    border-radius: 7px;
    background: repeating-linear-gradient(135deg, #fff1a6 0 8px, #f25f79 8px 15px);
    box-shadow: 0 8px 14px rgba(116, 79, 75, 0.14);
}

.race-object.is-oil {
    width: 34px;
    height: 18px;
    border-radius: 999px;
    background: radial-gradient(circle at 35% 32%, rgba(255, 255, 255, 0.34), transparent 0 28%), rgba(45, 35, 52, 0.74);
    box-shadow: 0 8px 14px rgba(116, 79, 75, 0.12);
}

.snake-board {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 4px;
    width: min(100%, 246px);
    margin: 0 auto;
    padding: 8px;
    border: 1px solid rgba(116, 79, 75, 0.12);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.56);
}

.snake-cell {
    aspect-ratio: 1;
    border-radius: 9px;
    background: rgba(255, 238, 234, 0.72);
}

.snake-cell.is-snake {
    background: linear-gradient(135deg, #b8cfac, #7f9b73);
    box-shadow: inset 0 -4px 0 rgba(76, 35, 52, 0.1);
}

.snake-cell.is-food {
    position: relative;
    background: rgba(255, 220, 224, 0.86);
}

.snake-cell.is-food::after {
    content: "";
    position: absolute;
    inset: 28%;
    border-radius: 999px;
    background: #f25f79;
}

.snake-controls {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.snake-controls button:first-child,
.snake-controls button:last-child {
    grid-column: 2;
}

.math-timer {
    justify-self: center;
    min-width: 116px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 220, 224, 0.54);
}

.math-row {
    display: grid;
    grid-template-columns: 1fr 86px;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid rgba(116, 79, 75, 0.12);
    border-radius: 14px;
    color: #4c2334;
    background: rgba(255, 255, 255, 0.64);
    font-weight: 850;
}

.math-row input {
    width: 100%;
    min-height: 34px;
    border: 1px solid rgba(116, 79, 75, 0.15);
    border-radius: 11px;
    color: #4c2334;
    background: rgba(255, 255, 255, 0.82);
    font: 850 0.95rem/1 var(--sans);
    text-align: center;
}

.math-row input.is-wrong {
    border-color: rgba(232, 77, 111, 0.6);
    background: rgba(255, 220, 224, 0.42);
}

.math-choice-game {
    gap: 10px;
}

.math-question-panel {
    display: grid;
    gap: 5px;
    padding: 12px;
    border: 1px solid rgba(201, 145, 76, 0.18);
    border-radius: 16px;
    color: #4c2334;
    background: rgba(255, 255, 255, 0.68);
    text-align: center;
}

.math-question-meta {
    color: #9d6431;
    font-size: 0.68rem;
    font-weight: 900;
}

.math-question-text {
    font-size: clamp(1.28rem, 4.6vw, 1.86rem);
    font-weight: 950;
    line-height: 1;
}

.math-choice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.math-choice {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    align-items: center;
    min-height: 54px;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid rgba(201, 145, 76, 0.24);
    border-radius: 15px;
    color: #4c2334;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 8px 18px rgba(116, 79, 75, 0.08);
    cursor: pointer;
    transition: transform 160ms var(--ease), border-color 160ms ease, box-shadow 160ms ease;
}

.math-choice span {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 11px;
    color: #fff;
    background: #c9914c;
    font-size: 0.76rem;
    font-weight: 950;
}

.math-choice strong {
    font-size: 1.04rem;
    font-weight: 950;
}

.math-choice:hover,
.math-choice:focus-visible {
    border-color: rgba(201, 145, 76, 0.52);
    outline: none;
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(116, 79, 75, 0.13);
}

.math-choice.is-correct {
    border-color: rgba(134, 185, 154, 0.68);
    background: rgba(235, 244, 231, 0.88);
}

.math-choice.is-wrong {
    border-color: rgba(232, 77, 111, 0.68);
    background: rgba(255, 220, 224, 0.72);
}

.math-score {
    margin: 0;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 860;
    text-align: center;
}

.memory-game {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.memory-card {
    display: grid;
    place-items: center;
    min-height: 76px;
    padding: 8px;
    border: 1px solid rgba(116, 79, 75, 0.13);
    border-radius: 15px;
    color: #4c2334;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(255, 238, 234, 0.76));
    box-shadow: 0 9px 18px rgba(116, 79, 75, 0.08);
    font-size: 1.25rem;
    font-weight: 900;
    cursor: pointer;
    transition: transform 180ms var(--ease), border-color 180ms ease, box-shadow 180ms ease;
}

.memory-card:hover,
.memory-card:focus-visible,
.memory-card.is-open,
.memory-card.is-matched {
    border-color: rgba(241, 107, 124, 0.42);
    box-shadow: 0 13px 24px rgba(116, 79, 75, 0.13);
    outline: none;
    transform: translateY(-2px);
}

.memory-card.is-matched {
    background: rgba(235, 244, 231, 0.88);
}

.dino-stage {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(245, 232, 222, 0.88)),
        repeating-linear-gradient(90deg, rgba(116, 79, 75, 0.05) 0 18px, transparent 18px 36px);
}

.dino-stage::before {
    content: "";
    position: absolute;
    right: 0;
    bottom: 24px;
    left: 0;
    height: 2px;
    background: rgba(116, 79, 75, 0.18);
}

.dino-player,
.dino-cactus {
    position: absolute;
    bottom: 25px;
}

.dino-player {
    left: 16%;
    z-index: 2;
    width: 34px;
    height: 42px;
    border-radius: 15px 15px 10px 10px;
    background: linear-gradient(180deg, #b8cfac, #78966e);
    box-shadow: inset 0 -6px 0 rgba(76, 35, 52, 0.12), 0 9px 16px rgba(116, 79, 75, 0.12);
    transition: transform 210ms var(--ease);
}

.dino-player::after {
    content: "";
    position: absolute;
    top: 10px;
    right: 8px;
    width: 5px;
    height: 5px;
    border-radius: 999px;
    background: #4c2334;
}

.dino-player.is-jumping {
    transform: translateY(-58px);
}

.dino-cactus {
    width: 20px;
    height: 42px;
    border-radius: 9px 9px 4px 4px;
    background: #7f9b73;
    box-shadow: inset 0 -5px 0 rgba(76, 35, 52, 0.1);
}

.dino-cactus::before,
.dino-cactus::after {
    content: "";
    position: absolute;
    top: 15px;
    width: 10px;
    height: 16px;
    border-radius: 8px;
    background: #7f9b73;
}

.dino-cactus::before {
    left: -7px;
}

.dino-cactus::after {
    right: -7px;
}

.timeline-horizontal-stage .timeline-detail.is-gate-wrong .chapter-gate-card {
    animation: gate-shake 340ms ease;
}

.timeline-horizontal-stage .timeline-detail.is-gate-correct .chapter-gate-card {
    animation: gate-pop 220ms var(--ease);
}

@keyframes gate-shake {
    0%,
    100% {
        transform: translateX(0);
    }

    35% {
        transform: translateX(-6px);
    }

    70% {
        transform: translateX(6px);
    }
}

@keyframes gate-pop {
    0% {
        transform: scale(1);
    }

    60% {
        transform: scale(1.018);
    }

    100% {
        transform: scale(1);
    }
}

.timeline-horizontal-stage .detail-close {
    display: none;
}

.timeline-horizontal-stage .detail-heading {
    position: relative;
    z-index: 2;
    align-content: center;
    gap: 10px;
    padding-right: clamp(54px, 8vw, 92px);
}

.timeline-horizontal-stage .detail-heading > :not(.detail-sticker) {
    position: relative;
    z-index: 2;
}

.timeline-horizontal-stage .detail-number {
    width: max-content;
    min-width: 0;
    padding: 8px 16px;
    border-radius: 999px;
    color: var(--coral-strong);
    background: rgba(255, 220, 224, 0.78);
    font-size: 0.88rem;
    font-weight: 850;
}

.timeline-horizontal-stage .timeline-detail h2 {
    margin: 8px 0 0;
    color: #4c2334;
    font-family: var(--script);
    font-size: clamp(2.35rem, 4.2vw, 4rem);
    font-weight: 590;
    line-height: 0.98;
}

.timeline-horizontal-stage .timeline-detail h2 span {
    color: var(--coral);
    font-size: 0.7em;
}

.timeline-horizontal-stage .detail-period {
    color: var(--text);
    font-family: var(--script);
    font-size: 1.1rem;
    font-weight: 700;
}

.timeline-horizontal-stage .timeline-detail p[data-detail-description] {
    max-width: 470px;
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.62;
}

.detail-replay-game {
    width: max-content;
    min-height: 38px;
    padding: 8px 16px;
    border: 1px solid rgba(241, 107, 124, 0.24);
    border-radius: 14px;
    color: var(--coral-strong);
    background: rgba(255, 255, 255, 0.72);
    font-family: var(--script);
    font-size: 1.02rem;
    font-weight: 760;
    cursor: pointer;
    transition: transform 180ms var(--ease), border-color 180ms ease;
}

.detail-replay-game:hover,
.detail-replay-game:focus-visible {
    border-color: rgba(241, 107, 124, 0.44);
    outline: none;
    transform: translateY(-1px);
}

.detail-replay-game[hidden] {
    display: none;
}

.timeline-horizontal-stage .detail-sticker {
    top: 52%;
    right: clamp(10px, 3vw, 34px);
    z-index: 0;
    width: clamp(62px, 7vw, 86px);
    height: clamp(62px, 7vw, 86px);
    opacity: 0.32;
    pointer-events: none;
    transform: translateY(-50%) rotate(7deg);
}

.timeline-horizontal-stage .moments-panel {
    align-content: start;
    margin: 0;
    padding: clamp(14px, 1.7vw, 20px);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.42);
}

.timeline-horizontal-stage .moments-panel-head p {
    font-size: 1.22rem;
}

.timeline-horizontal-stage .moment-cards {
    grid-template-columns: 1fr;
    gap: 10px;
}

.timeline-horizontal-stage .moment-card {
    height: 112px;
    min-height: 112px;
    border-radius: 16px;
    transition: transform 180ms var(--ease), border-color 180ms var(--ease), box-shadow 180ms var(--ease);
}

.timeline-horizontal-stage .moment-card:hover,
.timeline-horizontal-stage .moment-card:focus-visible,
.timeline-horizontal-stage .moment-card.is-active {
    border-color: rgba(241, 107, 124, 0.42);
    box-shadow: 0 12px 26px rgba(116, 79, 75, 0.12);
    transform: translateY(-2px);
    outline: none;
}

.timeline-horizontal-stage .timeline-final-line {
    grid-column: 1 / -1;
    margin-top: 0;
}

@keyframes timeline-cue-pulse {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(8px);
    }
}

@media (max-width: 1100px) {
    .timeline-horizontal-stage {
        min-height: auto;
        padding: 0 0 36px;
    }

    .timeline-horizontal-stage .timeline-bg-sticker {
        display: none;
    }

    .timeline-horizontal-stage .timeline-pin {
        position: relative;
        display: grid;
        width: min(100% - 24px, 760px);
        min-height: auto;
        padding: 42px 0 0;
        overflow: visible;
    }

    .timeline-horizontal-stage .timeline-showcase {
        position: relative;
        min-height: 42vh;
    }

    .timeline-horizontal-stage .timeline-title-block {
        opacity: 1;
        filter: none;
        transform: none;
    }

    .timeline-horizontal-stage .timeline-title-block h1 {
        font-size: clamp(3.25rem, 13vw, 6.5rem);
    }

    .timeline-horizontal-stage .mock-scroll-note {
        display: none;
    }

    .timeline-horizontal-stage .timeline-experience {
        position: relative;
        z-index: 8;
        width: 100%;
        padding-top: 8px;
        opacity: 1;
        pointer-events: auto;
        transform: none;
    }

    .timeline-horizontal-stage .storyline {
        --node-size: 46px;
        position: relative;
        z-index: 12;
        width: 100%;
    }

    .timeline-horizontal-stage .timeline-detail {
        position: relative;
        z-index: 4;
        order: 0;
        grid-template-columns: 1fr;
    }
}

@media (min-width: 761px) and (max-width: 900px) {
    .timeline-horizontal-stage .timeline-pin {
        width: min(100% - 26px, 760px);
        padding-top: 28px;
    }

    .timeline-horizontal-stage .timeline-showcase {
        min-height: clamp(260px, 34vh, 320px);
    }

    .timeline-horizontal-stage .timeline-title-block h1 {
        font-size: clamp(3.2rem, 11.5vw, 5.45rem);
        line-height: 0.9;
    }

    .timeline-horizontal-stage .timeline-experience {
        gap: 22px;
        padding-top: 0;
    }

    .timeline-horizontal-stage .storyline {
        --node-size: 42px;
        --timeline-line-inset: calc(6.25% + 2px);
        width: min(100%, 700px);
    }

    .timeline-horizontal-stage .story-node {
        font-size: 1rem;
    }

    .timeline-horizontal-stage .story-popover {
        display: none;
    }

    .timeline-horizontal-stage .timeline-detail {
        height: clamp(500px, 62vh, 540px);
        min-height: 500px;
        padding: 18px 16px 20px;
        overflow: hidden;
        border-radius: 22px;
    }

    .chapter-gate {
        padding: 14px;
        align-items: center;
    }

    .chapter-gate-card {
        width: min(100%, 440px);
        gap: 8px;
        padding: 0;
    }

    .chapter-game-launcher-preview {
        width: min(100%, 292px);
    }
}

@media (max-width: 760px) {
    .timeline-horizontal-stage {
        width: 100%;
        min-height: auto;
        padding: 0 0 28px;
    }

    .timeline-horizontal-stage .timeline-pin {
        width: min(100% - 18px, 440px);
        padding-top: 28px;
    }

    .timeline-horizontal-stage .timeline-showcase {
        display: grid;
        min-height: 28vh;
    }

    .timeline-horizontal-stage .timeline-title-block h1 {
        font-size: clamp(1.95rem, 10.5vw, 3.1rem);
        line-height: 0.94;
    }

    .timeline-horizontal-stage .timeline-bg-sticker {
        display: none;
    }

    .timeline-horizontal-stage .storyline {
        --node-size: 40px;
        --node-gap: 18px;
        --storyline-side: 18px;
        --timeline-line-inset: calc(var(--storyline-side) + var(--node-size) / 2);
        --timeline-track-width: calc((var(--node-size) + var(--node-gap)) * 7);
        grid-template-columns: repeat(8, var(--node-size));
        justify-content: start;
        column-gap: var(--node-gap);
        width: 100%;
        max-width: 100%;
        padding: 18px 10px 22px;
        padding-inline: var(--storyline-side);
        overflow-x: auto;
        overflow-y: visible;
        scroll-padding-inline: var(--storyline-side);
        scroll-snap-type: x mandatory;
        scrollbar-width: thin;
        scrollbar-color: rgba(241, 107, 124, 0.55) rgba(255, 255, 255, 0.4);
        -webkit-overflow-scrolling: touch;
    }

    .timeline-horizontal-stage .storyline::-webkit-scrollbar {
        display: block;
        height: 4px;
    }

    .timeline-horizontal-stage .storyline::-webkit-scrollbar-track {
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.4);
    }

    .timeline-horizontal-stage .storyline::-webkit-scrollbar-thumb {
        border-radius: 999px;
        background: rgba(241, 107, 124, 0.55);
    }

    .timeline-horizontal-stage .storyline::before,
    .timeline-horizontal-stage .storyline::after {
        right: auto;
        left: var(--timeline-line-inset);
        width: var(--timeline-track-width);
    }

    .timeline-horizontal-stage .storyline-item {
        scroll-snap-align: center;
    }

    .timeline-horizontal-stage .story-node {
        border-width: 2px;
        font-size: 0.9rem;
    }

    .timeline-horizontal-stage .story-popover {
        display: none;
    }

    .timeline-horizontal-stage .timeline-detail {
        order: 0;
        z-index: 4;
        height: auto;
        min-height: 620px;
        padding: 16px 14px 18px;
        border-radius: 19px;
        transform: none;
    }

    .timeline-horizontal-stage .detail-heading {
        padding-right: 54px;
    }

    .timeline-horizontal-stage .detail-number {
        padding: 6px 12px;
        font-size: 0.72rem;
    }

    .timeline-horizontal-stage .timeline-detail h2 {
        font-size: clamp(1.82rem, 9vw, 2.55rem);
        line-height: 1.02;
    }

    .timeline-horizontal-stage .detail-period {
        font-size: 0.86rem;
    }

    .timeline-horizontal-stage .timeline-detail p[data-detail-description] {
        font-size: 0.8rem;
        line-height: 1.52;
    }

    .timeline-horizontal-stage .detail-sticker {
        display: none;
    }

    .timeline-horizontal-stage .moments-panel {
        padding: 12px;
    }

    .chapter-gate {
        padding: 10px;
        align-items: start;
    }

    .chapter-gate-card {
        gap: 7px;
        padding: 0;
        border-radius: 0;
    }

    .chapter-gate-card h3 {
        font-size: clamp(1.62rem, 9.4vw, 2.2rem);
        line-height: 1;
    }

    .chapter-gate-card p[data-chapter-gate-copy] {
        max-width: 280px;
        font-size: 0.76rem;
        line-height: 1.3;
    }

    .chapter-gate-game-badge {
        min-height: 25px;
        padding: 4px 10px;
        font-size: 0.66rem;
    }

    .chapter-game-launcher {
        gap: 8px;
    }

    .chapter-game-launcher-preview {
        width: min(100%, 258px);
        border-radius: 18px;
    }

    .chapter-game-launcher-preview::before {
        inset: 0;
        border-radius: inherit;
    }

    .chapter-game-preview-caption {
        left: 8px;
        bottom: 8px;
        max-width: calc(100% - 16px);
        padding: 5px 8px;
        font-size: 0.6rem;
    }

    .chapter-game-launcher-copy {
        max-width: 260px;
        gap: 3px;
    }

    .chapter-game-launcher-copy strong {
        font-size: 0.98rem;
    }

    .chapter-game-launcher p {
        max-width: 260px;
        font-size: 0.74rem;
        line-height: 1.28;
    }

    .chapter-game-launcher-note {
        font-size: 0.64rem;
    }

    .chapter-game-launcher-button {
        min-height: 39px;
        padding: 8px 18px;
        font-size: 0.96rem;
    }

    .chapter-gate-grid {
        gap: 8px;
        width: 100%;
    }

    .chapter-gate-step {
        width: 56px;
        height: 52px;
    }

    .chapter-gate-tile {
        min-height: 66px;
    }

    .arcade-stage {
        height: 136px;
    }

    .chapter-game-submit,
    .game-controls button,
    .snake-controls button {
        min-height: 36px;
        border-radius: 12px;
        font-size: 0.92rem;
    }

    .snake-board {
        width: min(100%, 220px);
    }

    .memory-card {
        min-height: 68px;
    }

    .math-row {
        grid-template-columns: 1fr 72px;
        padding: 9px 10px;
    }

    .fullscreen-game-shell {
        padding: 8px;
    }

    .fullscreen-game-chrome {
        width: 100%;
        height: 100%;
        padding: 10px;
        border-radius: 20px;
        gap: 14px;
    }

    .fullscreen-game-topbar {
        grid-template-columns: minmax(0, 1fr) auto auto;
    }

    .fullscreen-game-stats {
        justify-content: start;
    }

    .fullscreen-game-heading strong {
        font-size: clamp(1.55rem, 10vw, 2.45rem);
    }

    .fullscreen-game-stage {
        border-radius: 18px;
    }

    .fullscreen-game-canvas {
        min-height: 340px;
    }

    .fullscreen-game-footer {
        grid-template-columns: 1fr;
    }

    .fullscreen-game-footer p {
        display: none;
    }

    .fullscreen-game-controls {
        justify-content: stretch;
    }

    .fullscreen-game-controls button {
        flex: 1 1 0;
        min-width: 0;
        min-height: 44px;
        font-size: 0.96rem;
    }

    .fullscreen-game-controls.is-keypad {
        justify-content: center;
        grid-template-columns: repeat(3, minmax(54px, 1fr));
    }

    .fullscreen-game-controls.is-choice-grid {
        justify-content: center;
        grid-template-columns: repeat(4, minmax(48px, 1fr));
        width: min(100%, 340px);
    }

    .timeline-horizontal-stage .moment-card {
        grid-template-columns: 1fr;
        height: 178px;
        min-height: 178px;
    }

    .timeline-horizontal-stage .moment-card img {
        height: 78px;
    }
}

/* Timeline large detail block redesign */
.timeline-horizontal-stage .timeline-detail {
    --detail-accent-line: linear-gradient(180deg, var(--detail-accent), rgba(241, 107, 124, 0.36));
    display: grid;
    height: clamp(430px, 49vh, 520px);
    min-height: 430px;
    grid-template-columns: minmax(0, 1.04fr) minmax(320px, 0.84fr);
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(116, 79, 75, 0.14);
    border-radius: 24px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(255, 250, 246, 0.84)),
        var(--paper);
    box-shadow:
        0 20px 42px rgba(116, 79, 75, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.74);
    backdrop-filter: blur(14px);
}

.timeline-horizontal-stage .timeline-detail::before {
    display: none;
}

.timeline-horizontal-stage .timeline-detail::after {
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(circle at 12% 18%, rgba(255, 220, 224, 0.38), transparent 30%),
        radial-gradient(circle at 92% 18%, rgba(187, 213, 223, 0.24), transparent 26%),
        linear-gradient(90deg, rgba(255, 255, 255, 0.12), transparent 44%, rgba(255, 220, 224, 0.12));
    opacity: 1;
    transform: none;
}

.timeline-horizontal-stage.is-ready .mock-scroll-note {
    opacity: 0;
    pointer-events: none;
}

.timeline-horizontal-stage.is-ready .timeline-title-block {
    pointer-events: none;
}

.timeline-horizontal-stage .timeline-detail.is-locked .detail-heading,
.timeline-horizontal-stage .timeline-detail.is-locked .moments-panel,
.timeline-horizontal-stage .timeline-detail.is-locked .timeline-final-line {
    visibility: hidden;
    opacity: 0;
    filter: none;
}

.timeline-horizontal-stage .detail-heading {
    grid-column: 1;
    grid-row: 1;
    display: grid;
    min-width: 0;
    grid-template-columns: minmax(0, 1fr) clamp(104px, 12vw, 156px);
    grid-template-areas:
        "number sticker"
        "title sticker"
        "period sticker"
        "description sticker"
        "replay sticker";
    align-content: center;
    align-items: center;
    gap: clamp(8px, 1.3vw, 12px) clamp(18px, 2.5vw, 34px);
    padding: clamp(26px, 3.4vw, 42px) clamp(24px, 3.4vw, 44px);
    border-right: 1px solid rgba(116, 79, 75, 0.1);
    background:
        radial-gradient(circle at 10% 16%, rgba(255, 255, 255, 0.72), transparent 30%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 246, 243, 0.24));
}

.timeline-horizontal-stage .detail-number {
    grid-area: number;
    justify-self: start;
    padding: 6px 12px;
    border: 1px solid rgba(241, 107, 124, 0.24);
    border-radius: 999px;
    color: var(--coral-strong);
    background: rgba(255, 255, 255, 0.66);
    box-shadow: 0 8px 18px rgba(116, 79, 75, 0.07);
    font-size: 0.72rem;
    line-height: 1;
}

.timeline-horizontal-stage .timeline-detail h2 {
    grid-area: title;
    max-width: 11ch;
    margin: 4px 0 0;
    color: #432032;
    font-size: clamp(2.35rem, 4vw, 3.65rem);
    line-height: 0.98;
}

.timeline-horizontal-stage .detail-period {
    grid-area: period;
    color: var(--coral-strong);
    font-size: clamp(0.92rem, 1.25vw, 1.06rem);
    line-height: 1.1;
}

.timeline-horizontal-stage .timeline-detail p[data-detail-description] {
    grid-area: description;
    max-width: 520px;
    margin: 0;
    color: rgba(76, 35, 52, 0.78);
    font-size: clamp(0.86rem, 1.02vw, 0.95rem);
    line-height: 1.58;
}

.timeline-horizontal-stage .detail-sticker {
    position: relative;
    grid-area: sticker;
    z-index: 1;
    place-self: center;
    top: auto;
    right: auto;
    bottom: auto;
    width: clamp(86px, 10vw, 132px);
    max-width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    opacity: 0.9;
    pointer-events: none;
    transform: rotate(3deg);
    filter: drop-shadow(0 12px 18px rgba(116, 79, 75, 0.14));
}

.timeline-horizontal-stage .detail-replay-game {
    position: absolute;
    top: clamp(14px, 1.8vw, 24px);
    right: clamp(14px, 1.8vw, 24px);
    z-index: 6;
    margin: 0;
}

.timeline-horizontal-stage .detail-sticker.sticker-dudu {
    opacity: 0.9;
}

.timeline-horizontal-stage .detail-sticker.sticker-bubu-dudu-cuddle,
.timeline-horizontal-stage .detail-sticker.sticker-bubu-dudu-hearts,
.timeline-horizontal-stage .detail-sticker.sticker-bubu-dudu-sit,
.timeline-horizontal-stage .detail-sticker.sticker-bubu-dudu-stand,
.timeline-horizontal-stage .detail-sticker.sticker-bubu-dudu-cooking,
.timeline-horizontal-stage .detail-sticker.sticker-bubu-face,
.timeline-horizontal-stage .detail-sticker.sticker-bubu-dudu-bed,
.timeline-horizontal-stage .detail-sticker.sticker-bubu-dudu-travel {
    width: clamp(104px, 12vw, 154px);
    height: auto;
    opacity: 0.94;
    transform: rotate(3deg);
}

.timeline-horizontal-stage .detail-sticker.sticker-bubu-dudu-cuddle {
    aspect-ratio: 320 / 276;
}

.timeline-horizontal-stage .detail-sticker.sticker-bubu-dudu-hearts {
    aspect-ratio: 530 / 445;
}

.timeline-horizontal-stage .detail-sticker.sticker-bubu-dudu-sit {
    aspect-ratio: 452 / 340;
}

.timeline-horizontal-stage .detail-sticker.sticker-bubu-dudu-stand {
    aspect-ratio: 636 / 495;
}

.timeline-horizontal-stage .detail-sticker.sticker-bubu-dudu-cooking {
    aspect-ratio: 557 / 556;
}

.timeline-horizontal-stage .detail-sticker.sticker-bubu-face {
    aspect-ratio: 234 / 235;
}

.timeline-horizontal-stage .detail-sticker.sticker-bubu-dudu-bed {
    aspect-ratio: 352 / 329;
}

.timeline-horizontal-stage .detail-sticker.sticker-bubu-dudu-travel {
    aspect-ratio: 531 / 455;
}

.timeline-horizontal-stage .timeline-detail.sticker-layout-2 .detail-heading {
    grid-template-columns: clamp(104px, 12vw, 156px) minmax(0, 1fr);
    grid-template-areas:
        "sticker number"
        "sticker title"
        "sticker period"
        "sticker description"
        "sticker replay";
}

.timeline-horizontal-stage .timeline-detail.sticker-layout-3 .detail-heading {
    grid-template-columns: minmax(0, 1fr) clamp(104px, 12vw, 156px);
    grid-template-areas:
        "number number"
        "title title"
        "period period"
        "description sticker"
        "replay sticker";
}

.timeline-horizontal-stage .timeline-detail.sticker-layout-4 .detail-heading {
    grid-template-columns: minmax(0, 1fr) clamp(104px, 12vw, 156px);
    grid-template-areas:
        "number sticker"
        "title sticker"
        "period period"
        "description description"
        "replay replay";
}

.timeline-horizontal-stage .timeline-detail.sticker-layout-5 .detail-heading {
    grid-template-columns: clamp(104px, 12vw, 156px) minmax(0, 1fr);
    grid-template-areas:
        "number number"
        "title title"
        "period period"
        "sticker description"
        "sticker replay";
}

.timeline-horizontal-stage .timeline-detail.sticker-layout-6 .detail-heading {
    grid-template-columns: 1fr;
    grid-template-areas:
        "sticker"
        "number"
        "title"
        "period"
        "description"
        "replay";
    justify-items: center;
    text-align: center;
}

.timeline-horizontal-stage .timeline-detail.sticker-layout-7 .detail-heading {
    grid-template-columns: minmax(0, 1fr) clamp(104px, 12vw, 156px);
    grid-template-areas:
        "number number"
        "title title"
        "period sticker"
        "description sticker"
        "replay replay";
}

.timeline-horizontal-stage .timeline-detail.sticker-layout-8 .detail-heading {
    grid-template-columns: clamp(104px, 12vw, 156px) minmax(0, 1fr);
    grid-template-areas:
        "sticker number"
        "title title"
        "period period"
        "description description"
        "replay replay";
}

.timeline-horizontal-stage .timeline-detail.sticker-layout-2 .detail-sticker,
.timeline-horizontal-stage .timeline-detail.sticker-layout-8 .detail-sticker {
    justify-self: start;
    transform: rotate(-4deg);
}

.timeline-horizontal-stage .timeline-detail.sticker-layout-3 .detail-sticker,
.timeline-horizontal-stage .timeline-detail.sticker-layout-5 .detail-sticker {
    align-self: end;
    transform: rotate(5deg);
}

.timeline-horizontal-stage .timeline-detail.sticker-layout-4 .detail-sticker {
    align-self: start;
    justify-self: end;
    transform: rotate(2deg);
}

.timeline-horizontal-stage .timeline-detail.sticker-layout-6 .detail-sticker {
    justify-self: center;
    width: clamp(94px, 11vw, 142px);
    transform: rotate(-1deg);
}

.timeline-horizontal-stage .timeline-detail.sticker-layout-7 .detail-sticker {
    align-self: center;
    justify-self: end;
    transform: rotate(-2deg);
}

.timeline-horizontal-stage .timeline-detail.sticker-layout-1 .chapter-gate-sticker {
    justify-self: start;
    align-self: end;
    transform: rotate(-2deg);
}

.timeline-horizontal-stage .timeline-detail.sticker-layout-2 .chapter-gate-card {
    grid-template-areas:
        "kicker game"
        "title game"
        "copy game"
        "status game"
        "sticker game";
}

.timeline-horizontal-stage .timeline-detail.sticker-layout-3 .chapter-gate-card {
    grid-template-areas:
        "kicker game"
        "sticker game"
        "title game"
        "copy game"
        "status game";
}

.timeline-horizontal-stage .timeline-detail.sticker-layout-4 .chapter-gate-card {
    grid-template-areas:
        "kicker game"
        "title game"
        "sticker game"
        "copy game"
        "status game";
}

.timeline-horizontal-stage .timeline-detail.sticker-layout-5 .chapter-gate-card {
    grid-template-areas:
        "kicker game"
        "title game"
        "copy game"
        "sticker game"
        "status game";
}

.timeline-horizontal-stage .timeline-detail.sticker-layout-6 .chapter-gate-card {
    grid-template-areas:
        "sticker game"
        "kicker game"
        "title game"
        "copy game"
        "status game";
}

.timeline-horizontal-stage .timeline-detail.sticker-layout-7 .chapter-gate-card {
    grid-template-areas:
        "kicker game"
        "title game"
        "sticker game"
        "copy game"
        "status game";
}

.timeline-horizontal-stage .timeline-detail.sticker-layout-8 .chapter-gate-card {
    grid-template-areas:
        "kicker game"
        "title game"
        "copy game"
        "status game"
        "sticker game";
}

.timeline-horizontal-stage .timeline-detail.sticker-layout-2 .chapter-gate-sticker,
.timeline-horizontal-stage .timeline-detail.sticker-layout-8 .chapter-gate-sticker {
    align-self: start;
    justify-self: end;
    transform: rotate(4deg);
}

.timeline-horizontal-stage .timeline-detail.sticker-layout-3 .chapter-gate-sticker,
.timeline-horizontal-stage .timeline-detail.sticker-layout-6 .chapter-gate-sticker {
    justify-self: center;
    transform: rotate(-1deg);
}

.timeline-horizontal-stage .timeline-detail.sticker-layout-4 .chapter-gate-sticker,
.timeline-horizontal-stage .timeline-detail.sticker-layout-7 .chapter-gate-sticker {
    justify-self: start;
    transform: rotate(-5deg);
}

.timeline-horizontal-stage .timeline-detail.sticker-layout-5 .chapter-gate-sticker {
    align-self: end;
    justify-self: center;
    transform: rotate(3deg);
}

.timeline-horizontal-stage .moments-panel {
    grid-column: 2;
    grid-row: 1;
    display: grid;
    min-width: 0;
    align-content: start;
    gap: 12px;
    margin: 0;
    padding: clamp(18px, 2.1vw, 26px);
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: rgba(255, 255, 255, 0.22);
}

.timeline-horizontal-stage .moments-panel-head {
    grid-template-columns: 34px minmax(0, 1fr) 34px;
    gap: 8px;
}

.timeline-horizontal-stage .moments-panel-head p {
    color: #432032;
    font-size: clamp(1rem, 1.45vw, 1.22rem);
    line-height: 1.05;
}

.timeline-horizontal-stage .timeline-icon-button {
    width: 34px;
    height: 34px;
    border-radius: 12px;
}

.timeline-horizontal-stage .moment-selector {
    justify-content: flex-start;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 2px 4px;
    scrollbar-width: none;
}

.timeline-horizontal-stage .moment-selector::-webkit-scrollbar {
    display: none;
}

.timeline-horizontal-stage .moment-chip {
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    border-radius: 12px;
}

.timeline-horizontal-stage .moment-cards {
    gap: 9px;
    min-height: 0;
}

.timeline-horizontal-stage .moment-card {
    min-height: 92px;
    height: auto;
    grid-template-columns: minmax(0, 1fr) 92px;
    gap: 12px;
    padding: 10px 10px 10px 12px;
    border-color: rgba(116, 79, 75, 0.1);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.68);
    box-shadow: 0 8px 18px rgba(116, 79, 75, 0.07);
}

.timeline-horizontal-stage .moment-card-kicker {
    gap: 8px;
    font-size: 0.68rem;
}

.timeline-horizontal-stage .moment-card-kicker b {
    width: 22px;
    height: 22px;
    font-size: 0.68rem;
}

.timeline-horizontal-stage .moment-card strong {
    font-size: 1rem;
}

.timeline-horizontal-stage .moment-card p {
    font-size: 0.72rem;
    line-height: 1.28;
}

.timeline-horizontal-stage .moment-card img {
    width: 92px;
    height: 66px;
    border-radius: 12px;
}

.timeline-horizontal-stage .timeline-final-line {
    grid-column: 1 / -1;
    grid-row: 2;
    margin: 0;
    padding: 10px 20px 13px;
    border-top: 1px solid rgba(116, 79, 75, 0.1);
    background: rgba(255, 255, 255, 0.32);
    font-size: clamp(0.86rem, 1.15vw, 1.02rem);
}

.chapter-gate {
    padding: clamp(18px, 3vw, 34px);
    background:
        radial-gradient(circle at 16% 18%, rgba(255, 220, 224, 0.48), transparent 32%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 247, 244, 0.76));
    backdrop-filter: blur(12px);
}

.chapter-gate-card {
    width: min(100%, 850px);
    display: grid;
    grid-template-columns: minmax(210px, 0.82fr) minmax(280px, 1fr);
    grid-template-areas:
        "sticker game"
        "kicker game"
        "title game"
        "copy game"
        "status game";
    align-items: center;
    justify-items: start;
    gap: 12px clamp(24px, 4vw, 44px);
    text-align: left;
}

.chapter-gate-sticker {
    grid-area: sticker;
    display: block;
    width: clamp(98px, 12vw, 154px);
    max-width: 100%;
    height: auto;
    margin-bottom: 2px;
    justify-self: start;
    align-self: end;
    opacity: 0.95;
    filter: drop-shadow(0 12px 18px rgba(116, 79, 75, 0.14));
    pointer-events: none;
    transform: rotate(-2deg);
}

.chapter-gate-kicker {
    grid-area: kicker;
    font-size: clamp(1.15rem, 1.4vw, 1.34rem);
    font-weight: 950;
}

.chapter-gate-card h3 {
    grid-area: title;
    max-width: 10ch;
    font-size: clamp(2rem, 4vw, 3.3rem);
    line-height: 0.95;
}

.chapter-gate-card p[data-chapter-gate-copy] {
    grid-area: copy;
    max-width: 310px;
    font-size: 0.86rem;
    line-height: 1.45;
}

.chapter-gate-sequence {
    grid-area: sequence;
    justify-content: flex-start;
}

.chapter-gate-grid {
    grid-area: game;
    width: min(100%, 380px);
    justify-self: center;
}

.chapter-gate-status {
    grid-area: status;
    min-height: 18px;
}

.chapter-game-launcher-preview {
    width: min(100%, 350px);
    aspect-ratio: 16 / 8;
    border-radius: 20px;
}

.chapter-game-launcher p {
    text-align: center;
}

.timeline-horizontal-stage .timeline-detail.sticker-layout-2 .chapter-gate-card {
    grid-template-areas:
        "kicker game"
        "title game"
        "copy game"
        "status game"
        "sticker game";
}

.timeline-horizontal-stage .timeline-detail.sticker-layout-3 .chapter-gate-card {
    grid-template-areas:
        "kicker game"
        "sticker game"
        "title game"
        "copy game"
        "status game";
}

.timeline-horizontal-stage .timeline-detail.sticker-layout-4 .chapter-gate-card {
    grid-template-areas:
        "kicker game"
        "title game"
        "sticker game"
        "copy game"
        "status game";
}

.timeline-horizontal-stage .timeline-detail.sticker-layout-5 .chapter-gate-card {
    grid-template-areas:
        "kicker game"
        "title game"
        "copy game"
        "sticker game"
        "status game";
}

.timeline-horizontal-stage .timeline-detail.sticker-layout-6 .chapter-gate-card {
    grid-template-areas:
        "sticker game"
        "kicker game"
        "title game"
        "copy game"
        "status game";
}

.timeline-horizontal-stage .timeline-detail.sticker-layout-7 .chapter-gate-card {
    grid-template-areas:
        "kicker game"
        "title game"
        "sticker game"
        "copy game"
        "status game";
}

.timeline-horizontal-stage .timeline-detail.sticker-layout-8 .chapter-gate-card {
    grid-template-areas:
        "kicker game"
        "title game"
        "copy game"
        "status game"
        "sticker game";
}

.timeline-horizontal-stage .timeline-detail.sticker-layout-2 .chapter-gate-sticker,
.timeline-horizontal-stage .timeline-detail.sticker-layout-8 .chapter-gate-sticker {
    align-self: start;
    justify-self: end;
    transform: rotate(4deg);
}

.timeline-horizontal-stage .timeline-detail.sticker-layout-3 .chapter-gate-sticker,
.timeline-horizontal-stage .timeline-detail.sticker-layout-6 .chapter-gate-sticker {
    justify-self: center;
    transform: rotate(-1deg);
}

.timeline-horizontal-stage .timeline-detail.sticker-layout-4 .chapter-gate-sticker,
.timeline-horizontal-stage .timeline-detail.sticker-layout-7 .chapter-gate-sticker {
    justify-self: start;
    transform: rotate(-5deg);
}

.timeline-horizontal-stage .timeline-detail.sticker-layout-5 .chapter-gate-sticker {
    align-self: end;
    justify-self: center;
    transform: rotate(3deg);
}

@media (max-width: 1100px) {
    .timeline-horizontal-stage .timeline-detail {
        height: auto;
        min-height: 0;
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
    }

    .timeline-horizontal-stage .detail-heading,
    .timeline-horizontal-stage .moments-panel,
    .timeline-horizontal-stage .timeline-final-line {
        grid-column: 1;
    }

    .timeline-horizontal-stage .detail-heading {
        grid-row: 1;
        grid-template-columns: minmax(0, 1fr) clamp(92px, 18vw, 138px);
        border-right: 0;
        border-bottom: 1px solid rgba(116, 79, 75, 0.1);
        padding: 24px 24px 22px;
    }

    .timeline-horizontal-stage .moments-panel {
        grid-row: 2;
        padding: 18px;
    }

    .timeline-horizontal-stage .timeline-final-line {
        grid-row: 3;
    }
}

@media (min-width: 761px) and (max-width: 900px) {
    .timeline-horizontal-stage .timeline-detail {
        min-height: 0;
        height: auto;
        padding: 0;
        overflow: hidden;
    }

    .chapter-gate-card {
        grid-template-columns: minmax(0, 0.82fr) minmax(260px, 1fr);
        gap: 8px 24px;
    }

    .chapter-gate-sticker {
        width: clamp(82px, 14vw, 118px);
    }

    .chapter-gate-card h3 {
        font-size: clamp(1.85rem, 5.5vw, 2.75rem);
    }

    .chapter-gate-grid {
        width: min(100%, 320px);
    }
}

@media (max-width: 760px) {
    .timeline-horizontal-stage .timeline-detail {
        min-height: 0;
        padding: 0;
        border-radius: 20px;
    }

    .timeline-horizontal-stage .timeline-detail.is-locked {
        min-height: 560px;
    }

    .timeline-horizontal-stage .detail-heading {
        grid-template-columns: minmax(0, 1fr) clamp(70px, 21vw, 94px);
        grid-template-areas:
            "number sticker"
            "title title"
            "period period"
            "description description"
            "replay replay";
        gap: 8px;
        padding: 20px 18px 18px;
    }

    .timeline-horizontal-stage .detail-sticker,
    .timeline-horizontal-stage .detail-sticker.sticker-bubu-dudu-cuddle,
    .timeline-horizontal-stage .detail-sticker.sticker-bubu-dudu-hearts,
    .timeline-horizontal-stage .detail-sticker.sticker-bubu-dudu-sit,
    .timeline-horizontal-stage .detail-sticker.sticker-bubu-dudu-stand,
    .timeline-horizontal-stage .detail-sticker.sticker-bubu-dudu-cooking,
    .timeline-horizontal-stage .detail-sticker.sticker-bubu-face,
    .timeline-horizontal-stage .detail-sticker.sticker-bubu-dudu-bed,
    .timeline-horizontal-stage .detail-sticker.sticker-bubu-dudu-travel {
        width: clamp(68px, 21vw, 92px);
        justify-self: end;
        align-self: center;
        transform: rotate(2deg);
    }

    .timeline-horizontal-stage .timeline-detail.sticker-layout-2 .detail-heading {
        grid-template-areas:
            "sticker number"
            "title title"
            "period period"
            "description description"
            "replay replay";
    }

    .timeline-horizontal-stage .timeline-detail.sticker-layout-3 .detail-heading,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-6 .detail-heading {
        grid-template-columns: 1fr;
        grid-template-areas:
            "sticker"
            "number"
            "title"
            "period"
            "description"
            "replay";
        justify-items: center;
        text-align: center;
    }

    .timeline-horizontal-stage .timeline-detail.sticker-layout-4 .detail-heading,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-8 .detail-heading {
        grid-template-areas:
            "number sticker"
            "title title"
            "period period"
            "description description"
            "replay replay";
    }

    .timeline-horizontal-stage .timeline-detail.sticker-layout-5 .detail-heading,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-7 .detail-heading {
        grid-template-columns: 1fr;
        grid-template-areas:
            "number"
            "title"
            "period"
            "description"
            "replay"
            "sticker";
        justify-items: center;
        text-align: center;
    }

    .timeline-horizontal-stage .timeline-detail.sticker-layout-2 .detail-sticker,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-5 .detail-sticker {
        justify-self: start;
    }

    .timeline-horizontal-stage .timeline-detail.sticker-layout-4 .detail-sticker,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-8 .detail-sticker {
        justify-self: end;
    }

    .timeline-horizontal-stage .timeline-detail.sticker-layout-3 .detail-sticker,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-6 .detail-sticker,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-7 .detail-sticker {
        justify-self: center;
    }

    .timeline-horizontal-stage .detail-number {
        padding: 6px 10px;
        font-size: 0.66rem;
    }

    .timeline-horizontal-stage .timeline-detail h2 {
        max-width: 13ch;
        font-size: clamp(1.75rem, 8vw, 2.35rem);
        line-height: 1.02;
    }

    .timeline-horizontal-stage .detail-period {
        font-size: 0.82rem;
    }

    .timeline-horizontal-stage .timeline-detail p[data-detail-description] {
        font-size: 0.78rem;
        line-height: 1.48;
    }

    .timeline-horizontal-stage .moments-panel {
        gap: 10px;
        padding: 14px;
    }

    .timeline-horizontal-stage .moments-panel-head {
        grid-template-columns: 32px minmax(0, 1fr) 32px;
    }

    .timeline-horizontal-stage .moments-panel-head p {
        font-size: 0.98rem;
    }

    .timeline-horizontal-stage .timeline-icon-button {
        width: 32px;
        height: 32px;
    }

    .timeline-horizontal-stage .moment-chip {
        width: 42px;
        height: 42px;
    }

    .timeline-horizontal-stage .moment-card {
        min-height: 96px;
        height: auto;
        grid-template-columns: minmax(0, 1fr) 78px;
        gap: 10px;
        padding: 10px;
    }

    .timeline-horizontal-stage .moment-card img {
        width: 78px;
        height: 66px;
    }

    .timeline-horizontal-stage .timeline-final-line {
        padding: 9px 14px 11px;
        font-size: 0.84rem;
    }

    .chapter-gate {
        align-items: center;
        padding: 18px 14px;
    }

    .chapter-gate-card {
        width: min(100%, 360px);
        grid-template-columns: 1fr;
        grid-template-areas:
            "kicker"
            "title"
            "copy"
            "sticker"
            "status"
            "game";
        justify-items: center;
        gap: 10px;
        text-align: center;
    }

    .chapter-gate-sticker {
        width: clamp(92px, 28vw, 130px);
        margin-bottom: 0;
        justify-self: center;
        transform: rotate(-1deg);
    }

    .timeline-horizontal-stage .timeline-detail.sticker-layout-1 .chapter-gate-sticker,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-2 .chapter-gate-sticker,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-3 .chapter-gate-sticker,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-4 .chapter-gate-sticker,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-5 .chapter-gate-sticker,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-6 .chapter-gate-sticker,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-7 .chapter-gate-sticker,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-8 .chapter-gate-sticker {
        justify-self: center;
        align-self: center;
    }

    .timeline-horizontal-stage .timeline-detail.sticker-layout-2 .chapter-gate-card {
        grid-template-areas:
            "kicker"
            "title"
            "copy"
            "sticker"
            "status"
            "game";
    }

    .timeline-horizontal-stage .timeline-detail.sticker-layout-3 .chapter-gate-card,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-6 .chapter-gate-card {
        grid-template-areas:
            "kicker"
            "title"
            "copy"
            "sticker"
            "status"
            "game";
    }

    .timeline-horizontal-stage .timeline-detail.sticker-layout-4 .chapter-gate-card,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-8 .chapter-gate-card {
        grid-template-areas:
            "kicker"
            "title"
            "copy"
            "sticker"
            "status"
            "game";
    }

    .timeline-horizontal-stage .timeline-detail.sticker-layout-5 .chapter-gate-card,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-7 .chapter-gate-card {
        grid-template-areas:
            "kicker"
            "title"
            "copy"
            "status"
            "sticker"
            "game";
    }

    .timeline-horizontal-stage .timeline-detail.sticker-layout-2 .chapter-gate-sticker,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-5 .chapter-gate-sticker {
        justify-self: center;
    }

    .timeline-horizontal-stage .timeline-detail.sticker-layout-4 .chapter-gate-sticker,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-8 .chapter-gate-sticker {
        justify-self: center;
    }

    .chapter-gate-kicker {
        font-size: clamp(1rem, 4.8vw, 1.2rem);
    }

    .chapter-gate-card h3 {
        max-width: 12ch;
        font-size: clamp(1.65rem, 8.6vw, 2.25rem);
    }

    .chapter-gate-card p[data-chapter-gate-copy] {
        max-width: 280px;
        font-size: 0.76rem;
        line-height: 1.35;
    }

    .chapter-gate-sequence {
        justify-content: center;
    }

    .chapter-gate-grid {
        width: min(100%, 300px);
    }

    .chapter-game-launcher-preview {
        width: min(100%, 276px);
        border-radius: 18px;
    }

    .chapter-game-preview-caption {
        left: 8px;
        bottom: 8px;
        max-width: calc(100% - 16px);
        padding: 5px 8px;
        font-size: 0.6rem;
    }

    .chapter-game-launcher-copy {
        max-width: 280px;
    }
}

/* Book-like chapter cards */
@media (min-width: 761px) {
    .timeline-horizontal-stage .timeline-pin {
        width: min(100% - 32px, 1240px);
    }

    .timeline-horizontal-stage .timeline-experience {
        width: min(100%, 1180px);
        gap: clamp(18px, 2.8vh, 32px);
        padding-top: clamp(50px, 7vh, 82px);
    }
}

.timeline-horizontal-stage .timeline-detail {
    width: min(100%, 1180px);
    justify-self: center;
    height: clamp(540px, calc(100svh - 170px), 660px);
    min-height: clamp(520px, calc(100svh - 190px), 580px);
    grid-template-columns: minmax(250px, 0.58fr) minmax(500px, 1.42fr);
}

.timeline-horizontal-stage .timeline-detail.is-locked .book-pages {
    visibility: hidden;
    opacity: 0;
}

.timeline-horizontal-stage .timeline-detail.sticker-layout-1 .book-chapter-heading,
.timeline-horizontal-stage .timeline-detail.sticker-layout-2 .book-chapter-heading,
.timeline-horizontal-stage .timeline-detail.sticker-layout-3 .book-chapter-heading,
.timeline-horizontal-stage .timeline-detail.sticker-layout-4 .book-chapter-heading,
.timeline-horizontal-stage .timeline-detail.sticker-layout-5 .book-chapter-heading,
.timeline-horizontal-stage .timeline-detail.sticker-layout-6 .book-chapter-heading,
.timeline-horizontal-stage .timeline-detail.sticker-layout-7 .book-chapter-heading,
.timeline-horizontal-stage .timeline-detail.sticker-layout-8 .book-chapter-heading {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
        "number"
        "title"
        "period"
        "description"
        "sticker"
        "replay";
    align-content: center;
    align-items: start;
    gap: clamp(7px, 0.9vw, 11px);
    padding: clamp(22px, 2.5vw, 34px);
    border-right: 1px solid rgba(116, 79, 75, 0.1);
}

.timeline-horizontal-stage .book-chapter-heading .detail-number {
    border-radius: 12px;
    text-transform: none;
}

.timeline-horizontal-stage .book-chapter-heading h2 {
    max-width: 12ch;
    margin-top: 2px;
    font-size: clamp(2rem, 3vw, 3.15rem);
    line-height: 1;
}

.timeline-horizontal-stage .book-chapter-heading .detail-period {
    width: fit-content;
    padding: 6px 11px;
    border: 1px solid color-mix(in srgb, var(--detail-accent) 28%, transparent);
    border-radius: 999px;
    color: #6b3446;
    background: color-mix(in srgb, var(--detail-accent) 11%, white);
    font-size: 0.76rem;
    font-weight: 800;
}

.timeline-horizontal-stage .book-chapter-heading p[data-detail-description] {
    max-width: 34ch;
    color: rgba(76, 35, 52, 0.74);
    font-size: clamp(0.82rem, 0.92vw, 0.92rem);
    line-height: 1.48;
}

.timeline-horizontal-stage .book-chapter-heading .detail-sticker,
.timeline-horizontal-stage .timeline-detail.sticker-layout-2 .book-chapter-heading .detail-sticker,
.timeline-horizontal-stage .timeline-detail.sticker-layout-3 .book-chapter-heading .detail-sticker,
.timeline-horizontal-stage .timeline-detail.sticker-layout-4 .book-chapter-heading .detail-sticker,
.timeline-horizontal-stage .timeline-detail.sticker-layout-5 .book-chapter-heading .detail-sticker,
.timeline-horizontal-stage .timeline-detail.sticker-layout-6 .book-chapter-heading .detail-sticker,
.timeline-horizontal-stage .timeline-detail.sticker-layout-7 .book-chapter-heading .detail-sticker,
.timeline-horizontal-stage .timeline-detail.sticker-layout-8 .book-chapter-heading .detail-sticker {
    grid-area: sticker;
    justify-self: start;
    align-self: center;
    width: clamp(70px, 7vw, 98px);
    margin-top: clamp(2px, 0.5vw, 6px);
    transform: rotate(-3deg);
}

.timeline-horizontal-stage .book-pages {
    position: relative;
    z-index: 1;
    grid-column: 2;
    grid-row: 1;
    display: grid;
    grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(10px, 1vw, 13px);
    min-width: 0;
    min-height: 0;
    padding: clamp(18px, 1.8vw, 26px);
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.28), rgba(255, 246, 243, 0.46)),
        repeating-linear-gradient(0deg, rgba(116, 79, 75, 0.035) 0 1px, transparent 1px 27px);
}

.timeline-horizontal-stage .book-spread {
    display: grid;
    grid-template-columns: minmax(0, 1.16fr) minmax(140px, 0.7fr);
    gap: clamp(12px, 1.25vw, 16px);
    align-items: stretch;
    min-height: 0;
    padding: clamp(12px, 1.15vw, 15px);
    border: 1px solid rgba(116, 79, 75, 0.1);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.54);
    box-shadow: 0 12px 26px rgba(116, 79, 75, 0.08);
}

.timeline-horizontal-stage .book-spread.is-image-left {
    grid-template-columns: minmax(140px, 0.7fr) minmax(0, 1.16fr);
}

.timeline-horizontal-stage .book-copy {
    display: grid;
    align-content: center;
    gap: 7px;
    min-width: 0;
}

.timeline-horizontal-stage .book-copy span {
    color: var(--detail-accent);
    font-size: 0.68rem;
    font-weight: 900;
    text-transform: uppercase;
}

.timeline-horizontal-stage .book-copy p {
    margin: 0;
    color: rgba(76, 35, 52, 0.82);
    font-size: clamp(0.76rem, 0.82vw, 0.86rem);
    font-weight: 650;
    line-height: 1.42;
}

.timeline-horizontal-stage .book-photo {
    position: relative;
    min-width: 0;
    min-height: 126px;
    margin: 0;
    overflow: hidden;
    border: 5px solid rgba(255, 255, 255, 0.78);
    border-radius: 18px;
    background: rgba(255, 220, 224, 0.28);
    box-shadow: 0 12px 22px rgba(116, 79, 75, 0.12);
}

.timeline-horizontal-stage .book-photo img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 126px;
    object-fit: cover;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.timeline-horizontal-stage .book-photo figcaption {
    position: absolute;
    right: 8px;
    bottom: 8px;
    max-width: calc(100% - 16px);
    padding: 5px 8px;
    border-radius: 999px;
    color: #6b3446;
    background: rgba(255, 255, 255, 0.76);
    font-size: 0.58rem;
    font-weight: 850;
    white-space: nowrap;
}

@media (min-width: 761px) and (max-width: 1100px) {
    .timeline-horizontal-stage .timeline-pin {
        width: min(100% - 22px, 1000px);
        padding-top: clamp(18px, 3vh, 28px);
    }

    .timeline-horizontal-stage .timeline-showcase {
        min-height: clamp(120px, 18vh, 160px);
    }

    .timeline-horizontal-stage .timeline-experience {
        width: min(100%, 960px);
        gap: 16px;
        padding-top: 0;
    }

    .timeline-horizontal-stage .timeline-detail {
        grid-template-columns: minmax(210px, 0.54fr) minmax(0, 1.46fr);
        grid-template-rows: minmax(0, 1fr);
        height: clamp(540px, calc(100svh - 150px), 640px);
        min-height: 520px;
        max-height: none;
    }

    .timeline-horizontal-stage .timeline-detail.sticker-layout-1 .book-chapter-heading,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-2 .book-chapter-heading,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-3 .book-chapter-heading,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-4 .book-chapter-heading,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-5 .book-chapter-heading,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-6 .book-chapter-heading,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-7 .book-chapter-heading,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-8 .book-chapter-heading {
        grid-template-columns: minmax(0, 1fr) clamp(92px, 16vw, 130px);
        grid-template-areas:
            "number sticker"
            "title sticker"
            "period sticker"
            "description sticker"
            "replay sticker";
        gap: 7px;
        padding: 20px;
        border-right: 1px solid rgba(116, 79, 75, 0.1);
        border-bottom: 0;
    }

    .timeline-horizontal-stage .book-chapter-heading h2 {
        max-width: 11ch;
        font-size: clamp(1.75rem, 3.8vw, 2.35rem);
        line-height: 1.02;
    }

    .timeline-horizontal-stage .book-chapter-heading p[data-detail-description] {
        max-width: 27ch;
        font-size: 0.76rem;
        line-height: 1.38;
    }

    .timeline-horizontal-stage .book-chapter-heading .detail-sticker,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-2 .book-chapter-heading .detail-sticker,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-3 .book-chapter-heading .detail-sticker,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-4 .book-chapter-heading .detail-sticker,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-5 .book-chapter-heading .detail-sticker,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-6 .book-chapter-heading .detail-sticker,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-7 .book-chapter-heading .detail-sticker,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-8 .book-chapter-heading .detail-sticker {
        width: clamp(58px, 7vw, 82px);
    }

    .timeline-horizontal-stage .book-pages {
        grid-column: 2;
        grid-row: 1;
        gap: 10px;
        padding: 16px;
    }

    .timeline-horizontal-stage .book-spread {
        grid-template-columns: minmax(0, 1.15fr) minmax(118px, 0.68fr);
        gap: 10px;
        padding: 11px;
        border-radius: 17px;
    }

    .timeline-horizontal-stage .book-spread.is-image-left {
        grid-template-columns: minmax(118px, 0.68fr) minmax(0, 1.15fr);
    }

    .timeline-horizontal-stage .book-copy {
        gap: 5px;
    }

    .timeline-horizontal-stage .book-copy p {
        font-size: 0.72rem;
        line-height: 1.34;
    }

    .timeline-horizontal-stage .book-photo,
    .timeline-horizontal-stage .book-photo img {
        min-height: 112px;
    }
}

@media (max-width: 760px) {
    .timeline-horizontal-stage .timeline-detail {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        width: 100%;
        height: auto;
        min-height: 0;
    }

    .timeline-horizontal-stage .timeline-detail.sticker-layout-1 .book-chapter-heading,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-2 .book-chapter-heading,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-3 .book-chapter-heading,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-4 .book-chapter-heading,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-5 .book-chapter-heading,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-6 .book-chapter-heading,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-7 .book-chapter-heading,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-8 .book-chapter-heading {
        grid-template-columns: minmax(0, 1fr) 86px;
        padding: 18px;
    }

    .timeline-horizontal-stage .book-chapter-heading h2 {
        font-size: clamp(1.7rem, 9vw, 2.35rem);
    }

    .timeline-horizontal-stage .book-chapter-heading p[data-detail-description] {
        max-width: none;
        font-size: 0.82rem;
    }

    .timeline-horizontal-stage .book-chapter-heading .detail-sticker,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-2 .book-chapter-heading .detail-sticker,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-3 .book-chapter-heading .detail-sticker,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-4 .book-chapter-heading .detail-sticker,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-5 .book-chapter-heading .detail-sticker,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-6 .book-chapter-heading .detail-sticker,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-7 .book-chapter-heading .detail-sticker,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-8 .book-chapter-heading .detail-sticker {
        width: 82px;
        justify-self: end;
    }

    .timeline-horizontal-stage .book-pages {
        gap: 12px;
        padding: 14px;
    }

    .timeline-horizontal-stage .book-spread,
    .timeline-horizontal-stage .book-spread.is-image-left {
        grid-template-columns: 1fr;
        padding: 12px;
    }

    .timeline-horizontal-stage .book-spread.is-image-left .book-photo {
        order: 1;
    }

    .timeline-horizontal-stage .book-spread.is-image-left .book-copy {
        order: 2;
    }

    .timeline-horizontal-stage .book-copy p {
        font-size: 0.82rem;
        line-height: 1.45;
    }

    .timeline-horizontal-stage .book-photo,
    .timeline-horizontal-stage .book-photo img {
        min-height: 150px;
    }
}

/* Timeline spacing and responsive density polish */
@media (min-width: 1101px) {
    .timeline-horizontal-stage {
        min-height: 176vh;
        min-height: 176svh;
    }

    .timeline-horizontal-stage .timeline-title-block {
        transform:
            translate3d(0, calc(var(--timeline-scroll) * -128vh), 0)
            scale(calc(1 - var(--timeline-scroll) * 0.15));
    }
}

.timeline-horizontal-stage .timeline-experience {
    width: min(100%, 1220px);
    gap: clamp(16px, 2.3vh, 26px);
    padding-top: clamp(62px, 7.2vh, 86px);
}

.timeline-horizontal-stage .storyline {
    --node-size: clamp(44px, 4vw, 54px);
    width: min(100%, 900px);
}

.timeline-horizontal-stage .timeline-detail {
    width: min(100%, 1220px);
    height: clamp(548px, calc(100svh - 220px), 628px);
    min-height: clamp(520px, calc(100svh - 240px), 568px);
    grid-template-columns: minmax(220px, 0.5fr) minmax(560px, 1.5fr);
}

.timeline-horizontal-stage .timeline-final-line {
    padding: 8px 18px 10px;
}

.timeline-horizontal-stage .timeline-detail.sticker-layout-1 .book-chapter-heading,
.timeline-horizontal-stage .timeline-detail.sticker-layout-2 .book-chapter-heading,
.timeline-horizontal-stage .timeline-detail.sticker-layout-3 .book-chapter-heading,
.timeline-horizontal-stage .timeline-detail.sticker-layout-4 .book-chapter-heading,
.timeline-horizontal-stage .timeline-detail.sticker-layout-5 .book-chapter-heading,
.timeline-horizontal-stage .timeline-detail.sticker-layout-6 .book-chapter-heading,
.timeline-horizontal-stage .timeline-detail.sticker-layout-7 .book-chapter-heading,
.timeline-horizontal-stage .timeline-detail.sticker-layout-8 .book-chapter-heading {
    gap: clamp(6px, 0.75vw, 10px);
    padding: clamp(18px, 2vw, 28px);
}

.timeline-horizontal-stage .book-chapter-heading h2 {
    max-width: 11ch;
    font-size: clamp(1.92rem, 2.65vw, 2.92rem);
}

.timeline-horizontal-stage .book-chapter-heading p[data-detail-description] {
    max-width: 33ch;
    font-size: clamp(0.8rem, 0.86vw, 0.88rem);
    line-height: 1.42;
}

.timeline-horizontal-stage .book-chapter-heading .detail-sticker,
.timeline-horizontal-stage .timeline-detail.sticker-layout-2 .book-chapter-heading .detail-sticker,
.timeline-horizontal-stage .timeline-detail.sticker-layout-3 .book-chapter-heading .detail-sticker,
.timeline-horizontal-stage .timeline-detail.sticker-layout-4 .book-chapter-heading .detail-sticker,
.timeline-horizontal-stage .timeline-detail.sticker-layout-5 .book-chapter-heading .detail-sticker,
.timeline-horizontal-stage .timeline-detail.sticker-layout-6 .book-chapter-heading .detail-sticker,
.timeline-horizontal-stage .timeline-detail.sticker-layout-7 .book-chapter-heading .detail-sticker,
.timeline-horizontal-stage .timeline-detail.sticker-layout-8 .book-chapter-heading .detail-sticker {
    width: clamp(58px, 5.8vw, 84px);
}

.timeline-horizontal-stage .book-pages {
    gap: clamp(8px, 0.8vw, 11px);
    padding: clamp(14px, 1.4vw, 20px);
}

.timeline-horizontal-stage .book-spread {
    grid-template-columns: minmax(0, 1.2fr) minmax(156px, 0.76fr);
    gap: clamp(10px, 1vw, 14px);
    padding: clamp(10px, 1vw, 13px);
}

.timeline-horizontal-stage .book-spread.is-image-left {
    grid-template-columns: minmax(156px, 0.76fr) minmax(0, 1.2fr);
}

.timeline-horizontal-stage .book-copy {
    gap: 5px;
}

.timeline-horizontal-stage .book-copy p {
    font-size: clamp(0.74rem, 0.78vw, 0.84rem);
    line-height: 1.36;
}

.timeline-horizontal-stage .book-photo,
.timeline-horizontal-stage .book-photo img {
    min-height: 148px;
}

@media (min-width: 1101px) and (max-height: 760px) {
    .timeline-horizontal-stage .timeline-experience {
        gap: 14px;
        padding-top: 42px;
    }

    .timeline-horizontal-stage .timeline-detail {
        height: clamp(500px, calc(100svh - 150px), 560px);
        min-height: 500px;
    }

    .timeline-horizontal-stage .book-photo,
    .timeline-horizontal-stage .book-photo img {
        min-height: 126px;
    }
}

@media (min-width: 761px) and (max-width: 1100px) {
    .timeline-horizontal-stage {
        min-height: auto;
        padding-bottom: 26px;
    }

    .timeline-horizontal-stage .timeline-title-block {
        opacity: 1;
        filter: none;
        transform: none;
    }

    .timeline-horizontal-stage .timeline-pin {
        width: min(100% - 22px, 1040px);
        padding-top: clamp(14px, 2.4vh, 24px);
    }

    .timeline-horizontal-stage .timeline-showcase {
        min-height: clamp(190px, 24vh, 240px);
    }

    .timeline-horizontal-stage .timeline-title-block h1 {
        font-size: clamp(3.45rem, 9vw, 5.25rem);
        line-height: 0.92;
    }

    .timeline-horizontal-stage .timeline-experience {
        width: min(100%, 980px);
        gap: 14px;
        padding-top: 0;
    }

    .timeline-horizontal-stage .storyline {
        --node-size: 42px;
        width: min(100%, 760px);
    }

    .timeline-horizontal-stage .timeline-detail {
        height: clamp(520px, calc(100svh - 330px), 610px);
        min-height: 500px;
        grid-template-columns: minmax(190px, 0.48fr) minmax(0, 1.52fr);
    }

    .timeline-horizontal-stage .timeline-detail.sticker-layout-1 .book-chapter-heading,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-2 .book-chapter-heading,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-3 .book-chapter-heading,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-4 .book-chapter-heading,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-5 .book-chapter-heading,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-6 .book-chapter-heading,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-7 .book-chapter-heading,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-8 .book-chapter-heading {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "number"
            "title"
            "period"
            "description"
            "sticker"
            "replay";
        padding: 16px;
    }

    .timeline-horizontal-stage .book-chapter-heading h2 {
        max-width: 10.5ch;
        font-size: clamp(1.55rem, 3.2vw, 2.15rem);
        line-height: 1.02;
    }

    .timeline-horizontal-stage .book-chapter-heading .detail-period {
        padding: 5px 9px;
        font-size: 0.68rem;
    }

    .timeline-horizontal-stage .book-chapter-heading p[data-detail-description] {
        max-width: 26ch;
        font-size: 0.71rem;
        line-height: 1.32;
    }

    .timeline-horizontal-stage .book-chapter-heading .detail-sticker,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-2 .book-chapter-heading .detail-sticker,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-3 .book-chapter-heading .detail-sticker,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-4 .book-chapter-heading .detail-sticker,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-5 .book-chapter-heading .detail-sticker,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-6 .book-chapter-heading .detail-sticker,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-7 .book-chapter-heading .detail-sticker,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-8 .book-chapter-heading .detail-sticker {
        width: clamp(52px, 6vw, 72px);
    }

    .timeline-horizontal-stage .book-pages {
        gap: 8px;
        padding: 12px;
    }

    .timeline-horizontal-stage .book-spread {
        grid-template-columns: minmax(0, 1.18fr) minmax(120px, 0.7fr);
        gap: 9px;
        padding: 10px;
    }

    .timeline-horizontal-stage .book-spread.is-image-left {
        grid-template-columns: minmax(120px, 0.7fr) minmax(0, 1.18fr);
    }

    .timeline-horizontal-stage .book-copy p {
        font-size: 0.7rem;
        line-height: 1.3;
    }

    .timeline-horizontal-stage .book-photo,
    .timeline-horizontal-stage .book-photo img {
        min-height: 116px;
    }

    .timeline-horizontal-stage .timeline-final-line {
        padding: 7px 14px 9px;
        font-size: 0.82rem;
    }
}

@media (max-width: 760px) {
    .timeline-horizontal-stage {
        min-height: auto;
    }

    .timeline-horizontal-stage .timeline-pin {
        width: min(100% - 14px, 460px);
        padding-top: 18px;
    }

    .timeline-horizontal-stage .timeline-title-block {
        opacity: 1;
        filter: none;
        transform: none;
    }

    .timeline-horizontal-stage .timeline-showcase {
        min-height: clamp(150px, 22vh, 190px);
    }

    .timeline-horizontal-stage .timeline-title-block h1 {
        font-size: clamp(2.18rem, 10vw, 3.35rem);
        line-height: 0.92;
    }

    .timeline-horizontal-stage .timeline-experience {
        gap: 12px;
        padding-top: 0;
    }

    .timeline-horizontal-stage .storyline {
        --node-size: 42px;
        --node-gap: 14px;
        padding-top: 12px;
        padding-bottom: 14px;
    }

    .timeline-horizontal-stage .timeline-detail {
        border-radius: 18px;
    }

    .timeline-horizontal-stage .timeline-detail.sticker-layout-1 .book-chapter-heading,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-2 .book-chapter-heading,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-3 .book-chapter-heading,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-4 .book-chapter-heading,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-5 .book-chapter-heading,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-6 .book-chapter-heading,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-7 .book-chapter-heading,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-8 .book-chapter-heading {
        padding: 16px;
    }

    .timeline-horizontal-stage .book-pages {
        gap: 10px;
        padding: 12px;
    }

    .timeline-horizontal-stage .book-photo,
    .timeline-horizontal-stage .book-photo img {
        min-height: 132px;
    }
}

@media (min-width: 600px) and (max-width: 760px) {
    .timeline-horizontal-stage .timeline-pin {
        width: min(100% - 20px, 720px);
    }

    .timeline-horizontal-stage .timeline-showcase {
        min-height: clamp(120px, 17vh, 154px);
    }

    .timeline-horizontal-stage .timeline-title-block h1 {
        font-size: clamp(2.25rem, 8.6vw, 3.85rem);
    }

    .timeline-horizontal-stage .timeline-experience {
        width: 100%;
        gap: 10px;
    }

    .timeline-horizontal-stage .storyline {
        --node-size: 40px;
        --storyline-side: 12px;
        --timeline-line-inset: calc(var(--storyline-side) + var(--node-size) / 2);
        grid-template-columns: repeat(8, minmax(0, 1fr));
        column-gap: 0;
        justify-content: stretch;
        width: min(100%, 700px);
        padding: 8px var(--storyline-side) 10px;
        overflow-x: visible;
        scroll-snap-type: none;
        scrollbar-width: none;
    }

    .timeline-horizontal-stage .storyline::-webkit-scrollbar {
        display: none;
    }

    .timeline-horizontal-stage .storyline::before,
    .timeline-horizontal-stage .storyline::after {
        right: var(--timeline-line-inset);
        left: var(--timeline-line-inset);
        width: auto;
    }

    .timeline-horizontal-stage .story-node {
        width: var(--node-size);
        height: var(--node-size);
        font-size: 0.92rem;
    }

    .timeline-horizontal-stage .timeline-detail {
        width: 100%;
        grid-template-columns: 1fr;
        grid-template-rows: auto minmax(0, 1fr) auto;
        height: clamp(590px, calc(100svh - 230px), 680px);
        min-height: 590px;
    }

    .timeline-horizontal-stage .timeline-detail.sticker-layout-1 .book-chapter-heading,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-2 .book-chapter-heading,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-3 .book-chapter-heading,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-4 .book-chapter-heading,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-5 .book-chapter-heading,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-6 .book-chapter-heading,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-7 .book-chapter-heading,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-8 .book-chapter-heading {
        grid-template-columns: minmax(0, 1fr) 90px;
        grid-template-areas:
            "number sticker"
            "title sticker"
            "period sticker"
            "description description"
            "replay replay";
        grid-column: 1;
        grid-row: 1;
        border-right: 0;
        border-bottom: 1px solid rgba(116, 79, 75, 0.1);
        gap: 6px 12px;
        padding: 12px 16px;
    }

    .timeline-horizontal-stage .book-chapter-heading h2 {
        max-width: 13ch;
        font-size: clamp(1.75rem, 5.4vw, 2.35rem);
        line-height: 0.98;
    }

    .timeline-horizontal-stage .book-chapter-heading .detail-period {
        padding: 4px 9px;
        font-size: 0.68rem;
    }

    .timeline-horizontal-stage .book-chapter-heading p[data-detail-description] {
        max-width: 52ch;
        font-size: 0.76rem;
        line-height: 1.3;
    }

    .timeline-horizontal-stage .book-chapter-heading .detail-sticker,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-2 .book-chapter-heading .detail-sticker,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-3 .book-chapter-heading .detail-sticker,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-4 .book-chapter-heading .detail-sticker,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-5 .book-chapter-heading .detail-sticker,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-6 .book-chapter-heading .detail-sticker,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-7 .book-chapter-heading .detail-sticker,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-8 .book-chapter-heading .detail-sticker {
        width: 78px;
        justify-self: end;
    }

    .timeline-horizontal-stage .book-pages {
        grid-column: 1;
        grid-row: 2;
        grid-template-columns: 1fr;
        grid-template-rows: repeat(2, minmax(0, 1fr));
        gap: 8px;
        padding: 10px 12px;
    }

    .timeline-horizontal-stage .book-spread,
    .timeline-horizontal-stage .book-spread.is-image-left {
        grid-template-columns: minmax(0, 1fr) clamp(154px, 27vw, 188px);
        grid-template-rows: 1fr;
        min-height: 138px;
        align-content: stretch;
        align-items: stretch;
        gap: 10px;
        padding: 10px;
    }

    .timeline-horizontal-stage .book-spread.is-image-left {
        grid-template-columns: clamp(154px, 27vw, 188px) minmax(0, 1fr);
    }

    .timeline-horizontal-stage .book-spread .book-photo {
        order: 2;
    }

    .timeline-horizontal-stage .book-spread .book-copy {
        order: 1;
        align-content: center;
        gap: 5px;
    }

    .timeline-horizontal-stage .book-spread.is-image-left .book-photo {
        order: 2;
    }

    .timeline-horizontal-stage .book-copy p {
        font-size: 0.74rem;
        line-height: 1.34;
    }

    .timeline-horizontal-stage .book-photo,
    .timeline-horizontal-stage .book-photo img {
        width: 100%;
        height: 100%;
        min-height: 132px;
    }

    .timeline-horizontal-stage .timeline-final-line {
        grid-column: 1;
        grid-row: 3;
        padding: 6px 12px 8px;
        font-size: 0.78rem;
    }
}

/* Keep the large chapter card as one continuous glass surface. */
.timeline-horizontal-stage .detail-heading,
.timeline-horizontal-stage .book-chapter-heading,
.timeline-horizontal-stage .timeline-detail.sticker-layout-1 .book-chapter-heading,
.timeline-horizontal-stage .timeline-detail.sticker-layout-2 .book-chapter-heading,
.timeline-horizontal-stage .timeline-detail.sticker-layout-3 .book-chapter-heading,
.timeline-horizontal-stage .timeline-detail.sticker-layout-4 .book-chapter-heading,
.timeline-horizontal-stage .timeline-detail.sticker-layout-5 .book-chapter-heading,
.timeline-horizontal-stage .timeline-detail.sticker-layout-6 .book-chapter-heading,
.timeline-horizontal-stage .timeline-detail.sticker-layout-7 .book-chapter-heading,
.timeline-horizontal-stage .timeline-detail.sticker-layout-8 .book-chapter-heading {
    border-right: 0;
    border-bottom: 0;
    background: transparent;
}

.timeline-horizontal-stage .book-pages {
    background: transparent;
}

.timeline-horizontal-stage .timeline-final-line {
    border-top: 0;
    background: transparent;
}

.timeline-horizontal-stage .timeline-detail {
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.76),
        inset 0 -1px 0 rgba(255, 220, 224, 0.16);
}

/* Responsive minigame layout */
.chapter-game-launcher {
    min-width: 0;
}

.chapter-game-launcher-preview {
    width: min(100%, 420px);
    aspect-ratio: 16 / 9;
}

.fullscreen-game-shell {
    place-items: center;
}

.fullscreen-game-chrome {
    width: min(100%, calc(100vw - 18px), 1480px);
    height: min(100%, calc(100svh - 18px), 940px);
    min-height: 0;
}

.fullscreen-game-stage {
    justify-self: stretch;
    align-self: stretch;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    aspect-ratio: auto;
}

.fullscreen-game-canvas {
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    aspect-ratio: auto;
}

@media (min-width: 761px) and (max-width: 1180px) {
    .timeline-horizontal-stage .timeline-detail.is-locked {
        height: clamp(520px, calc(100svh - 190px), 600px);
        min-height: 520px;
    }

    .chapter-gate {
        align-items: center;
        overflow: hidden;
        padding: clamp(18px, 2.5vw, 30px);
    }

    .chapter-gate-card {
        width: min(100%, 980px);
        height: auto;
        max-height: 100%;
        grid-template-columns: minmax(270px, 0.78fr) minmax(0, 1.08fr);
        grid-template-rows: minmax(0, 1fr) auto auto auto auto minmax(0, 1fr);
        grid-template-areas:
            ". game"
            "title game"
            "copy game"
            "sticker game"
            "status game"
            ". game";
        align-content: center;
        align-items: center;
        justify-items: center;
        gap: clamp(8px, 1.1vw, 13px) clamp(24px, 3.1vw, 42px);
        padding: clamp(4px, 0.8vw, 10px);
        text-align: center;
    }

    .timeline-horizontal-stage .timeline-detail.sticker-layout-1 .chapter-gate-card,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-2 .chapter-gate-card,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-3 .chapter-gate-card,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-4 .chapter-gate-card,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-5 .chapter-gate-card,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-6 .chapter-gate-card,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-7 .chapter-gate-card,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-8 .chapter-gate-card {
        grid-template-areas:
            ". game"
            "title game"
            "copy game"
            "sticker game"
            "status game"
            ". game";
    }

    .chapter-gate-sticker,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-1 .chapter-gate-sticker,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-2 .chapter-gate-sticker,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-3 .chapter-gate-sticker,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-4 .chapter-gate-sticker,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-5 .chapter-gate-sticker,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-6 .chapter-gate-sticker,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-7 .chapter-gate-sticker,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-8 .chapter-gate-sticker {
        justify-self: center;
        align-self: start;
        width: clamp(118px, 12vw, 156px);
        margin: clamp(8px, 1vw, 12px) 0 0;
        transform: rotate(-2deg);
    }

    .chapter-gate-kicker {
        justify-self: center;
        max-width: 100%;
        font-size: clamp(0.92rem, 1.25vw, 1.12rem);
        line-height: 1.1;
        text-align: center;
    }

    .chapter-gate-card h3 {
        justify-self: center;
        max-width: min(100%, 12.5ch);
        margin: 0;
        font-size: clamp(2rem, 4.1vw, 3.15rem);
        line-height: 0.95;
        text-align: center;
    }

    .chapter-gate-card p[data-chapter-gate-copy] {
        justify-self: center;
        max-width: min(100%, 34ch);
        font-size: clamp(0.76rem, 0.9vw, 0.86rem);
        line-height: 1.36;
        text-align: center;
    }

    .chapter-gate-status {
        justify-self: center;
        min-height: 0;
        font-size: 0.76rem;
        text-align: center;
    }

    .chapter-gate-grid {
        width: 100%;
        height: auto;
        align-self: stretch;
        display: grid;
        min-width: 0;
    }

    .chapter-game-launcher {
        width: 100%;
        height: auto;
        min-height: 0;
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto auto auto;
        grid-template-areas:
            "preview"
            "copy"
            "button"
            "dev";
        align-content: center;
        align-items: center;
        justify-items: center;
        gap: clamp(8px, 1.1vw, 14px);
        padding: 0;
        overflow: visible;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .chapter-game-launcher-preview {
        grid-area: preview;
        width: min(100%, 430px);
        max-width: none;
        min-height: clamp(144px, 20vh, 204px);
        aspect-ratio: 16 / 8.6;
        border-radius: clamp(16px, 1.8vw, 22px);
        justify-self: center;
    }

    .chapter-game-launcher-copy {
        grid-area: copy;
        justify-items: center;
        max-width: 36ch;
        text-align: center;
    }

    .chapter-game-launcher-copy strong {
        font-size: clamp(1.02rem, 1.4vw, 1.22rem);
    }

    .chapter-game-launcher p {
        max-width: 100%;
        font-size: clamp(0.74rem, 0.85vw, 0.82rem);
        line-height: 1.32;
    }

    .chapter-game-launcher-note {
        font-size: clamp(0.64rem, 0.74vw, 0.7rem);
    }

    .chapter-game-launcher-button {
        grid-area: button;
        justify-self: center;
        min-height: 44px;
        width: min(100%, 230px);
        padding-inline: 22px;
    }

    .fullscreen-game-shell {
        padding: clamp(10px, 1.7vw, 18px);
    }

    .fullscreen-game-chrome {
        display: grid;
        grid-template-columns: minmax(190px, 0.28fr) minmax(0, 1fr);
        grid-template-rows: auto minmax(0, 1fr);
        grid-template-areas:
            "topbar stage"
            "footer stage";
        width: 100%;
        height: min(100%, 760px);
        gap: clamp(12px, 2vw, 20px);
    }

    .fullscreen-game-topbar {
        grid-area: topbar;
        grid-template-columns: 1fr;
        align-content: start;
        align-self: start;
    }

    .fullscreen-game-heading strong {
        font-size: clamp(1.65rem, 4vw, 2.65rem);
    }

    .fullscreen-game-stats {
        justify-content: start;
    }

    .fullscreen-game-close {
        justify-self: start;
    }

    .fullscreen-game-stage {
        grid-area: stage;
    }

    .fullscreen-game-footer {
        grid-area: footer;
        grid-template-columns: 1fr;
        align-self: end;
        align-content: end;
    }

    .fullscreen-game-footer p {
        display: block;
        font-size: 0.74rem;
        line-height: 1.35;
    }

    .fullscreen-game-controls {
        justify-content: stretch;
    }

    .fullscreen-game-controls button {
        flex: 1 1 100%;
        min-width: 0;
    }

    .fullscreen-game-controls.is-keypad {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .fullscreen-game-controls.is-choice-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 761px) and (max-width: 1180px) and (max-height: 640px) {
    .fullscreen-game-shell {
        padding: 6px;
    }

    .fullscreen-game-chrome {
        grid-template-columns: minmax(0, 1fr) minmax(150px, 0.28fr);
        grid-template-rows: auto minmax(0, 1fr);
        grid-template-areas:
            "stage topbar"
            "stage footer";
        gap: 8px;
        padding: 8px;
        border-radius: 18px;
    }

    .fullscreen-game-heading strong {
        font-size: clamp(1.28rem, 3.4vw, 1.85rem);
    }

    .fullscreen-game-stats span {
        min-height: 28px;
        padding: 6px 9px;
        font-size: 0.68rem;
    }

    .fullscreen-game-close {
        height: 34px;
        min-height: 34px;
        padding: 0 12px;
        font-size: 0.74rem;
    }

    .fullscreen-game-footer p {
        display: none;
    }
}

@media (min-width: 600px) and (max-width: 760px) {
    .chapter-gate {
        padding: 12px;
        overflow: hidden;
    }

    .chapter-gate-card {
        width: min(100%, 690px);
        grid-template-columns: minmax(142px, 0.54fr) minmax(330px, 1fr);
        grid-template-rows: minmax(0, 1fr) auto auto auto auto auto minmax(0, 1fr);
        grid-template-areas:
            ". game"
            "kicker game"
            "title game"
            "copy game"
            "sticker game"
            "status game"
            ". game";
        align-items: center;
        justify-items: center;
        gap: 8px 18px;
        text-align: center;
    }

    .timeline-horizontal-stage .timeline-detail.sticker-layout-2 .chapter-gate-card,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-3 .chapter-gate-card,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-4 .chapter-gate-card,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-5 .chapter-gate-card,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-6 .chapter-gate-card,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-7 .chapter-gate-card,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-8 .chapter-gate-card {
        grid-template-areas:
            ". game"
            "kicker game"
            "title game"
            "copy game"
            "sticker game"
            "status game"
            ". game";
    }

    .chapter-gate-sticker,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-1 .chapter-gate-sticker,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-2 .chapter-gate-sticker,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-3 .chapter-gate-sticker,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-4 .chapter-gate-sticker,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-5 .chapter-gate-sticker,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-6 .chapter-gate-sticker,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-7 .chapter-gate-sticker,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-8 .chapter-gate-sticker {
        justify-self: center;
        align-self: start;
        width: clamp(82px, 16vw, 118px);
        margin-top: 6px;
    }

    .chapter-gate-card h3 {
        max-width: 10ch;
        font-size: clamp(1.4rem, 4.7vw, 2rem);
        text-align: center;
    }

    .chapter-gate-card p[data-chapter-gate-copy] {
        max-width: 24ch;
        font-size: 0.72rem;
        line-height: 1.28;
        text-align: center;
    }

    .chapter-game-launcher {
        grid-template-columns: minmax(150px, 0.85fr) minmax(0, 1fr);
        grid-template-areas:
            "preview copy"
            "preview button"
            "preview dev";
        align-items: center;
        justify-items: stretch;
        gap: 8px 12px;
    }

    .chapter-game-launcher-preview {
        grid-area: preview;
        width: 100%;
        border-radius: 18px;
    }

    .chapter-game-launcher-copy {
        grid-area: copy;
        justify-items: start;
        max-width: none;
        gap: 3px;
        text-align: left;
    }

    .chapter-game-launcher-copy strong {
        font-size: 0.96rem;
    }

    .chapter-game-launcher p {
        max-width: none;
        font-size: 0.7rem;
        line-height: 1.22;
    }

    .chapter-game-launcher-note {
        font-size: 0.62rem;
    }

    .chapter-game-launcher-button {
        grid-area: button;
        justify-self: start;
        min-height: 36px;
        padding: 7px 18px;
        font-size: 0.92rem;
    }
}

@media (max-width: 760px) {
    .fullscreen-game-shell {
        padding: 8px;
    }

    .fullscreen-game-chrome {
        width: 100%;
        height: 100%;
        grid-template-rows: auto minmax(0, 1fr) auto;
        gap: 10px;
        padding: 9px;
        border-radius: 18px;
    }

    .fullscreen-game-topbar {
        grid-template-columns: minmax(0, 1fr) auto auto;
        gap: 8px;
    }

    .fullscreen-game-heading strong {
        font-size: clamp(1.35rem, 8vw, 2.1rem);
    }

    .fullscreen-game-stats {
        gap: 5px;
    }

    .fullscreen-game-stats span {
        min-height: 28px;
        padding: 6px 9px;
        font-size: 0.68rem;
    }

    .fullscreen-game-close {
        height: 34px;
        min-height: 34px;
        padding: 0 12px;
        font-size: 0.76rem;
    }

    .fullscreen-game-stage {
        border-radius: 16px;
    }

    .fullscreen-game-footer {
        grid-template-columns: 1fr;
    }

    .fullscreen-game-footer p {
        display: none;
    }

    .fullscreen-game-controls {
        justify-content: stretch;
        gap: 6px;
    }

    .fullscreen-game-controls button {
        flex: 1 1 0;
        min-width: 0;
        min-height: 40px;
        border-radius: 12px;
        font-size: 0.92rem;
    }

    .fullscreen-game-controls.is-keypad {
        grid-template-columns: repeat(3, minmax(46px, 1fr));
    }

    .fullscreen-game-controls.is-choice-grid {
        width: 100%;
        grid-template-columns: repeat(4, minmax(42px, 1fr));
    }
}

@media (max-width: 599px) {
    .chapter-gate {
        padding: 10px;
        overflow-y: auto;
    }

    .chapter-gate-card {
        width: min(100%, 340px);
        gap: 8px;
    }

    .chapter-game-launcher {
        grid-template-columns: 1fr;
        grid-template-areas:
            "preview"
            "copy"
            "button"
            "dev";
        justify-items: center;
    }

    .chapter-game-launcher-preview {
        width: min(100%, 304px);
    }

    .chapter-game-launcher-copy {
        justify-items: center;
        text-align: center;
    }

    .chapter-game-launcher-button {
        justify-self: center;
    }

    .fullscreen-game-topbar {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .fullscreen-game-stats {
        grid-column: 1;
        grid-row: 2;
    }

    .fullscreen-game-close {
        grid-column: 2;
        grid-row: 1 / span 2;
        align-self: start;
    }
}

@media (max-width: 760px) and (orientation: landscape) {
    .fullscreen-game-shell {
        padding: 6px;
    }

    .fullscreen-game-chrome {
        grid-template-columns: minmax(0, 1fr) minmax(138px, 0.3fr);
        grid-template-rows: auto minmax(0, 1fr);
        grid-template-areas:
            "stage topbar"
            "stage footer";
        gap: 8px;
        padding: 8px;
    }

    .fullscreen-game-topbar {
        grid-area: topbar;
        grid-template-columns: 1fr;
        align-content: start;
    }

    .fullscreen-game-stats,
    .fullscreen-game-close {
        grid-column: auto;
        grid-row: auto;
    }

    .fullscreen-game-heading strong {
        font-size: clamp(1.15rem, 4vw, 1.55rem);
    }

    .fullscreen-game-stage {
        grid-area: stage;
    }

    .fullscreen-game-footer {
        grid-area: footer;
        align-self: end;
        align-content: end;
    }

    .fullscreen-game-controls {
        display: grid;
        grid-template-columns: 1fr;
        align-content: end;
    }

    .fullscreen-game-controls.is-keypad,
    .fullscreen-game-controls.is-choice-grid {
        grid-template-columns: 1fr;
    }
}

/* True fullscreen game mode */
.fullscreen-game-shell {
    padding: 0;
    place-items: stretch;
    transition: opacity 520ms ease, transform 560ms var(--ease), filter 560ms ease;
}

.fullscreen-game-shell::before {
    z-index: 2;
    opacity: 0.34;
    transition: opacity 520ms ease;
}

.fullscreen-game-shell.is-complete .fullscreen-game-stage {
    animation: fullscreen-game-stage-complete 760ms var(--ease);
}

.fullscreen-game-shell.is-complete .fullscreen-game-topbar,
.fullscreen-game-shell.is-complete .fullscreen-game-footer {
    animation: fullscreen-game-ui-complete 520ms ease forwards;
}

.fullscreen-game-shell.is-closing {
    opacity: 0;
    transform: scale(0.985);
    filter: blur(9px);
    pointer-events: none;
}

.fullscreen-game-shell.is-closing::before {
    opacity: 0;
}

.fullscreen-game-chrome {
    position: relative;
    display: grid;
    grid-template-areas:
        "topbar"
        "stage"
        "footer";
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: clamp(6px, 1svh, 10px);
    width: 100%;
    height: 100svh;
    max-width: none;
    max-height: none;
    padding: clamp(8px, 1.25vw, 16px);
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
}

.fullscreen-game-stage {
    position: relative;
    grid-area: stage;
    z-index: 1;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: clamp(18px, 2.1vw, 34px);
    background: transparent;
    box-shadow: 0 22px 52px rgba(24, 12, 22, 0.22), inset 0 0 0 1px rgba(255, 255, 255, 0.16);
    overflow: hidden;
}

.fullscreen-game-canvas {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    border-radius: inherit;
}

.fullscreen-game-topbar {
    position: relative;
    grid-area: topbar;
    z-index: 5;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
    grid-template-columns: none;
    align-self: start;
    width: min(100%, 960px);
    margin-inline: auto;
    pointer-events: none;
}

.fullscreen-game-heading,
.fullscreen-game-stats span,
.fullscreen-game-close {
    min-height: 38px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 250, 247, 0.28);
    box-shadow: 0 10px 24px rgba(24, 12, 22, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(16px);
    pointer-events: auto;
}

.fullscreen-game-heading {
    display: flex;
    align-items: center;
    flex: 0 1 min(30vw, 220px);
    max-width: min(30vw, 220px);
    min-width: 0;
    padding: 0 13px;
}

.fullscreen-game-heading strong {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: var(--script);
    font-size: clamp(1.02rem, 1.8vw, 1.42rem);
    line-height: 1;
}

.fullscreen-game-stats {
    display: flex;
    flex: 0 1 auto;
    justify-content: center;
    gap: 6px;
    min-width: 0;
}

.fullscreen-game-stats span {
    display: grid;
    max-width: min(38vw, 180px);
    min-width: max-content;
    place-items: center;
    overflow: hidden;
    padding: 0 12px;
    color: #fffaf7;
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fullscreen-game-close {
    height: 38px;
    min-height: 38px;
    flex: 0 0 auto;
    padding: 0 14px;
    color: #fffaf7;
    font-size: 0.78rem;
    font-weight: 700;
}

.fullscreen-game-shell.is-space .fullscreen-game-stats span:first-child,
.fullscreen-game-shell.is-racing .fullscreen-game-stats span:first-child,
.fullscreen-game-shell.is-snake .fullscreen-game-stats span:first-child,
.fullscreen-game-shell.is-math .fullscreen-game-stats span:first-child,
.fullscreen-game-shell.is-memory .fullscreen-game-stats span:first-child,
.fullscreen-game-shell.is-puzzle .fullscreen-game-stats span:first-child,
.fullscreen-game-shell.is-dino .fullscreen-game-stats span:first-child,
.fullscreen-game-shell.is-flappy .fullscreen-game-stats span:first-child {
    max-width: min(42vw, 220px);
    font-size: 0.82rem;
    font-weight: 800;
}

.fullscreen-game-footer {
    position: relative;
    grid-area: footer;
    z-index: 5;
    display: flex;
    justify-content: center;
    align-self: end;
    grid-template-columns: none;
    pointer-events: none;
}

.fullscreen-game-shell:not(.has-game-controls) .fullscreen-game-footer {
    display: none;
}

.fullscreen-game-shell.has-game-controls .fullscreen-game-footer {
    min-height: clamp(62px, 8svh, 86px);
    align-items: center;
}

.fullscreen-game-footer p {
    display: none;
}

.fullscreen-game-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    max-width: min(100%, 620px);
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(255, 250, 247, 0.16);
    box-shadow: 0 16px 34px rgba(24, 12, 22, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(18px);
    pointer-events: auto;
}

.fullscreen-game-controls[hidden],
.fullscreen-game-shell.is-math .fullscreen-game-controls,
.fullscreen-game-shell.is-puzzle .fullscreen-game-controls,
.fullscreen-game-shell.is-dino .fullscreen-game-controls,
.fullscreen-game-shell.is-flappy .fullscreen-game-controls {
    display: none !important;
}

.fullscreen-game-controls button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 104px;
    min-height: 46px;
    padding: 0 14px;
    border-radius: 999px;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 760;
}

.fullscreen-game-control-icon {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.26);
    color: #fff;
    font-size: 1rem;
    font-weight: 900;
    line-height: 1;
}

.fullscreen-game-control-svg {
    display: block;
    width: 0.9rem;
    height: 0.9rem;
}

.fullscreen-game-control-label {
    line-height: 1;
}

@keyframes fullscreen-game-stage-complete {
    0% {
        transform: scale(1);
        filter: saturate(1);
    }

    44% {
        transform: scale(1.012);
        filter: saturate(1.08);
    }

    100% {
        transform: scale(1);
        filter: saturate(1);
    }
}

@keyframes fullscreen-game-ui-complete {
    0% {
        opacity: 1;
        transform: translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateY(-8px);
    }
}

@media (max-width: 760px) {
    .fullscreen-game-chrome {
        height: 100svh;
        gap: 6px;
        padding: 6px;
    }

    .fullscreen-game-topbar {
        justify-content: center;
        gap: 5px;
    }

    .fullscreen-game-heading,
    .fullscreen-game-stats span,
    .fullscreen-game-close {
        min-height: 30px;
    }

    .fullscreen-game-heading {
        flex-basis: clamp(82px, 27vw, 130px);
        max-width: clamp(82px, 27vw, 130px);
        padding: 0 9px;
    }

    .fullscreen-game-heading strong {
        font-size: clamp(0.82rem, 3.4vw, 1.02rem);
    }

    .fullscreen-game-stage {
        border-radius: 18px;
    }

    .fullscreen-game-stats {
        order: 0;
        flex: 0 1 auto;
        justify-content: center;
        gap: 5px;
        min-width: 0;
    }

    .fullscreen-game-stats span {
        max-width: clamp(44px, 24vw, 104px);
        min-width: 0;
        padding: 0 8px;
        font-size: 0.61rem;
    }

    .fullscreen-game-shell.is-space .fullscreen-game-stats span:first-child,
    .fullscreen-game-shell.is-racing .fullscreen-game-stats span:first-child,
    .fullscreen-game-shell.is-snake .fullscreen-game-stats span:first-child,
    .fullscreen-game-shell.is-math .fullscreen-game-stats span:first-child,
    .fullscreen-game-shell.is-memory .fullscreen-game-stats span:first-child,
    .fullscreen-game-shell.is-puzzle .fullscreen-game-stats span:first-child,
    .fullscreen-game-shell.is-dino .fullscreen-game-stats span:first-child,
    .fullscreen-game-shell.is-flappy .fullscreen-game-stats span:first-child {
        max-width: clamp(118px, 38vw, 148px);
        padding-inline: 9px;
        font-size: 0.68rem;
    }

    .fullscreen-game-close {
        height: 30px;
        min-height: 30px;
        padding: 0 10px;
        font-size: 0.68rem;
    }

    .fullscreen-game-controls {
        width: min(100%, 430px);
        border-radius: 22px;
    }

    .fullscreen-game-controls button {
        flex: 1 1 104px;
        min-width: 0;
    }
}

@media (max-width: 760px) and (orientation: landscape) {
    .fullscreen-game-topbar {
        justify-content: center;
    }

    .fullscreen-game-stats {
        order: 0;
        flex: 0 1 auto;
    }

    .fullscreen-game-controls {
        width: auto;
        max-width: 92vw;
        border-radius: 999px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 1ms !important;
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }

    [data-float],
    [data-float]:hover {
        transform: none;
    }
}

/* Final fullscreen game pass: the game is the screen, UI is only a small overlay. */
body.has-fullscreen-game {
    overflow: hidden;
}

.fullscreen-game-shell {
    place-items: stretch;
    padding: 0;
    overflow: hidden;
    background: #2b1727;
}

.fullscreen-game-shell::before {
    display: none;
}

.fullscreen-game-chrome {
    position: fixed;
    inset: 0;
    display: block;
    width: 100vw;
    height: 100svh;
    max-width: none;
    max-height: none;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
}

.fullscreen-game-stage {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.fullscreen-game-canvas {
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    border-radius: 0;
}

.fullscreen-game-topbar {
    position: absolute;
    top: max(10px, env(safe-area-inset-top));
    right: max(10px, env(safe-area-inset-right));
    left: auto;
    z-index: 8;
    display: flex;
    width: auto;
    margin: 0;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    pointer-events: none;
}

.fullscreen-game-heading,
.fullscreen-game-footer,
.fullscreen-game-controls {
    display: none !important;
}

.fullscreen-game-stats {
    display: flex;
    flex: 0 1 auto;
    gap: 7px;
    min-width: 0;
    pointer-events: none;
}

.fullscreen-game-heading,
.fullscreen-game-stats span,
.fullscreen-game-close {
    min-height: 34px;
    border: 0;
    border-radius: 999px;
    background: rgba(48, 25, 42, 0.48);
    box-shadow: 0 10px 24px rgba(24, 12, 22, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(18px);
}

.fullscreen-game-stats span {
    display: grid;
    height: 34px;
    max-width: min(36vw, 170px);
    min-width: max-content;
    place-items: center;
    padding: 0 12px;
    color: #fffaf7;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fullscreen-game-stats span:last-child {
    min-width: 48px;
    max-width: 54px;
    padding-inline: 10px;
}

.fullscreen-game-shell.is-space .fullscreen-game-stats span:first-child,
.fullscreen-game-shell.is-racing .fullscreen-game-stats span:first-child,
.fullscreen-game-shell.is-snake .fullscreen-game-stats span:first-child,
.fullscreen-game-shell.is-math .fullscreen-game-stats span:first-child,
.fullscreen-game-shell.is-memory .fullscreen-game-stats span:first-child,
.fullscreen-game-shell.is-puzzle .fullscreen-game-stats span:first-child,
.fullscreen-game-shell.is-dino .fullscreen-game-stats span:first-child,
.fullscreen-game-shell.is-flappy .fullscreen-game-stats span:first-child {
    max-width: min(40vw, 180px);
    font-size: 0.72rem;
    font-weight: 850;
}

.fullscreen-game-close {
    display: grid;
    height: 34px;
    min-height: 34px;
    min-width: max-content;
    place-items: center;
    padding: 0 13px;
    color: #fffaf7;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
    pointer-events: auto;
}

.fullscreen-game-shell.is-complete .fullscreen-game-topbar {
    animation: fullscreen-game-ui-complete 520ms ease forwards;
}

.fullscreen-game-shell.is-snake .fullscreen-game-controls.is-snake-pad {
    position: absolute;
    right: auto;
    bottom: max(14px, env(safe-area-inset-bottom));
    left: 50%;
    z-index: 9;
    display: none !important;
    width: max-content;
    max-width: calc(100vw - 24px);
    padding: 8px;
    transform: translateX(-50%);
    grid-template-areas:
        ". up ."
        "left . right"
        ". down .";
    grid-template-columns: repeat(3, max-content);
    gap: 6px;
    border: 0;
    border-radius: 30px;
    background: rgba(48, 25, 42, 0.42);
    box-shadow: 0 18px 34px rgba(24, 12, 22, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(18px);
    pointer-events: auto;
    touch-action: none;
}

.fullscreen-game-shell.is-snake .snake-mobile-button {
    position: relative;
    display: grid;
    width: clamp(42px, 6.5vw, 50px);
    height: clamp(42px, 6.5vw, 50px);
    min-width: 0;
    min-height: 0;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(255, 250, 247, 0.88), rgba(255, 220, 224, 0.74));
    box-shadow: 0 10px 22px rgba(76, 35, 52, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.74);
    color: #743149;
    -webkit-tap-highlight-color: transparent;
}

.fullscreen-game-shell.is-snake .snake-mobile-button:active {
    transform: translateY(1px) scale(0.96);
    background: linear-gradient(145deg, #f25f79, #e84d6f);
    color: #fffaf7;
}

.fullscreen-game-shell.is-snake .snake-mobile-up {
    grid-area: up;
}

.fullscreen-game-shell.is-snake .snake-mobile-left {
    grid-area: left;
}

.fullscreen-game-shell.is-snake .snake-mobile-right {
    grid-area: right;
}

.fullscreen-game-shell.is-snake .snake-mobile-down {
    grid-area: down;
}

.fullscreen-game-shell.is-snake .snake-mobile-button .fullscreen-game-control-icon {
    width: 24px;
    height: 24px;
    background: transparent;
    color: inherit;
}

.fullscreen-game-shell.is-snake .snake-mobile-button .fullscreen-game-control-icon i {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.fullscreen-game-shell.is-snake .snake-mobile-button .fullscreen-game-control-svg {
    width: 1rem;
    height: 1rem;
    fill: currentColor;
}

/* Remove the browser's blue mobile tap flash from every game surface. */
.chapter-game,
.chapter-game *,
.chapter-game-launcher,
.chapter-game-launcher *,
.chapter-gate-grid,
.chapter-gate-grid *,
.detail-replay-game,
.fullscreen-game-shell,
.fullscreen-game-shell * {
    -webkit-tap-highlight-color: transparent;
}

.fullscreen-game-canvas {
    touch-action: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.chapter-game button,
.chapter-game [role="button"],
.chapter-game-launcher-button,
.detail-replay-game,
.fullscreen-game-shell button {
    touch-action: manipulation;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

@media (hover: none) and (pointer: coarse) {
    .chapter-game button:focus,
    .chapter-game [role="button"]:focus,
    .chapter-game-launcher-button:focus,
    .detail-replay-game:focus,
    .fullscreen-game-shell button:focus {
        outline: none;
    }
}

@media (max-width: 760px) {
    .fullscreen-game-topbar {
        top: max(7px, env(safe-area-inset-top));
        right: max(7px, env(safe-area-inset-right));
        gap: 5px;
    }

    .fullscreen-game-stats {
        gap: 5px;
    }

    .fullscreen-game-stats span,
    .fullscreen-game-close {
        height: 30px;
        min-height: 30px;
        font-size: 0.64rem;
    }

    .fullscreen-game-stats span {
        max-width: 34vw;
        padding-inline: 8px;
    }

    .fullscreen-game-stats span:last-child {
        min-width: 42px;
        max-width: 46px;
    }

    .fullscreen-game-shell.is-space .fullscreen-game-stats span:first-child,
    .fullscreen-game-shell.is-racing .fullscreen-game-stats span:first-child,
    .fullscreen-game-shell.is-snake .fullscreen-game-stats span:first-child,
    .fullscreen-game-shell.is-math .fullscreen-game-stats span:first-child,
    .fullscreen-game-shell.is-memory .fullscreen-game-stats span:first-child,
    .fullscreen-game-shell.is-puzzle .fullscreen-game-stats span:first-child,
    .fullscreen-game-shell.is-dino .fullscreen-game-stats span:first-child,
    .fullscreen-game-shell.is-flappy .fullscreen-game-stats span:first-child {
        max-width: 40vw;
        font-size: 0.64rem;
    }

    .fullscreen-game-close {
        padding-inline: 10px;
    }
}

@media (max-width: 900px) {
    .fullscreen-game-shell.is-snake .fullscreen-game-controls.is-snake-pad {
        display: grid !important;
    }
}

.timeline-horizontal-stage .chapter-gate-card,
.timeline-horizontal-stage .timeline-detail.sticker-layout-1 .chapter-gate-card,
.timeline-horizontal-stage .timeline-detail.sticker-layout-2 .chapter-gate-card,
.timeline-horizontal-stage .timeline-detail.sticker-layout-3 .chapter-gate-card,
.timeline-horizontal-stage .timeline-detail.sticker-layout-4 .chapter-gate-card,
.timeline-horizontal-stage .timeline-detail.sticker-layout-5 .chapter-gate-card,
.timeline-horizontal-stage .timeline-detail.sticker-layout-6 .chapter-gate-card,
.timeline-horizontal-stage .timeline-detail.sticker-layout-7 .chapter-gate-card,
.timeline-horizontal-stage .timeline-detail.sticker-layout-8 .chapter-gate-card {
    width: min(100%, 1040px);
    grid-template-columns: minmax(280px, 0.94fr) minmax(0, 1.06fr);
    grid-template-rows: minmax(0, 1fr) auto auto auto auto minmax(0, 1fr);
    grid-template-areas:
        ". game"
        "title game"
        "copy game"
        "sticker game"
        "status game"
        ". game";
    align-content: center;
    align-items: center;
    justify-items: center;
    gap: clamp(8px, 1.1vw, 14px) clamp(24px, 3.1vw, 44px);
    text-align: center;
}

.timeline-horizontal-stage .chapter-gate-sticker,
.timeline-horizontal-stage .timeline-detail.sticker-layout-1 .chapter-gate-sticker,
.timeline-horizontal-stage .timeline-detail.sticker-layout-2 .chapter-gate-sticker,
.timeline-horizontal-stage .timeline-detail.sticker-layout-3 .chapter-gate-sticker,
.timeline-horizontal-stage .timeline-detail.sticker-layout-4 .chapter-gate-sticker,
.timeline-horizontal-stage .timeline-detail.sticker-layout-5 .chapter-gate-sticker,
.timeline-horizontal-stage .timeline-detail.sticker-layout-6 .chapter-gate-sticker,
.timeline-horizontal-stage .timeline-detail.sticker-layout-7 .chapter-gate-sticker,
.timeline-horizontal-stage .timeline-detail.sticker-layout-8 .chapter-gate-sticker {
    justify-self: center;
    align-self: center;
    width: clamp(118px, 12vw, 158px);
    margin: clamp(8px, 1vw, 12px) 0 0;
    transform: rotate(-2deg);
}

.timeline-horizontal-stage .chapter-gate-card h3 {
    justify-self: center;
    max-width: min(100%, 15ch);
    text-align: center;
}

.timeline-horizontal-stage .chapter-gate-card p[data-chapter-gate-copy],
.timeline-horizontal-stage .chapter-gate-status {
    justify-self: center;
    text-align: center;
}

.timeline-horizontal-stage .chapter-gate-grid {
    grid-area: game;
    align-self: center;
    justify-self: stretch;
    width: 100%;
}

@media (max-width: 760px) {
    .timeline-horizontal-stage .timeline-detail.is-locked {
        height: clamp(340px, 48vw, 390px);
        min-height: clamp(340px, 48vw, 390px);
    }

    .timeline-horizontal-stage .chapter-gate {
        align-items: flex-start;
        padding: clamp(18px, 4vh, 32px) clamp(14px, 3vw, 20px) 10px;
    }

    .timeline-horizontal-stage .chapter-gate-card,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-1 .chapter-gate-card,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-2 .chapter-gate-card,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-3 .chapter-gate-card,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-4 .chapter-gate-card,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-5 .chapter-gate-card,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-6 .chapter-gate-card,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-7 .chapter-gate-card,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-8 .chapter-gate-card {
        width: min(100%, 660px);
        box-sizing: border-box;
        grid-template-columns:
            minmax(220px, 280px)
            minmax(0, 1fr)
            clamp(78px, 12vw, 96px)
            minmax(0, 0);
        grid-template-rows: auto auto auto auto;
        grid-template-areas:
            "title . sticker ."
            "copy . sticker ."
            "status status status ."
            "game game game game";
        gap: clamp(9px, 1.8vw, 13px) clamp(18px, 3.3vw, 26px);
        align-content: center;
        padding-inline: clamp(22px, 4vw, 32px);
    }

    .timeline-horizontal-stage .chapter-gate-sticker,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-1 .chapter-gate-sticker,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-2 .chapter-gate-sticker,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-3 .chapter-gate-sticker,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-4 .chapter-gate-sticker,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-5 .chapter-gate-sticker,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-6 .chapter-gate-sticker,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-7 .chapter-gate-sticker,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-8 .chapter-gate-sticker {
        width: clamp(78px, 12vw, 96px);
        margin: 0;
    }

    .timeline-horizontal-stage .chapter-gate-card h3,
    .timeline-horizontal-stage .chapter-gate-card p[data-chapter-gate-copy] {
        justify-self: start;
        text-align: left;
    }

    .timeline-horizontal-stage .chapter-gate-card h3 {
        max-width: 12ch;
        font-size: clamp(1.48rem, 3.5vw, 2rem);
    }

    .timeline-horizontal-stage .chapter-gate-card p[data-chapter-gate-copy] {
        max-width: 28ch;
        font-size: clamp(0.66rem, 1.5vw, 0.78rem);
        line-height: 1.24;
    }

    .timeline-horizontal-stage .chapter-game-launcher {
        grid-template-columns: minmax(260px, 1.08fr) minmax(178px, 0.92fr);
        grid-template-areas:
            "preview copy"
            "preview button"
            "preview dev";
        align-content: center;
        align-items: center;
        justify-items: center;
        gap: clamp(14px, 2.5vw, 22px);
        margin-top: clamp(20px, 3.2vw, 28px);
    }

    .timeline-horizontal-stage .chapter-game-launcher-preview {
        width: min(100%, clamp(292px, 45vw, 368px));
    }

    .timeline-horizontal-stage .chapter-game-launcher-copy {
        justify-items: center;
        max-width: 24ch;
        text-align: center;
    }

    .timeline-horizontal-stage .chapter-game-launcher-copy strong {
        font-size: clamp(1.02rem, 2.45vw, 1.22rem);
        line-height: 1.02;
    }

    .timeline-horizontal-stage .chapter-game-launcher p {
        font-size: clamp(0.68rem, 1.65vw, 0.82rem);
        line-height: 1.24;
    }

    .timeline-horizontal-stage .chapter-game-launcher-note {
        font-size: clamp(0.62rem, 1.45vw, 0.72rem);
    }

    .timeline-horizontal-stage .chapter-game-launcher-button {
        justify-self: center;
    }
}

@media (max-width: 599px) {
    .timeline-horizontal-stage .timeline-detail.is-locked {
        height: clamp(450px, 104vw, 535px);
        min-height: clamp(450px, 104vw, 535px);
    }

    .timeline-horizontal-stage .chapter-gate {
        align-items: center;
        padding: clamp(10px, 2.7vw, 14px) 10px;
    }

    .timeline-horizontal-stage .chapter-gate-card,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-1 .chapter-gate-card,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-2 .chapter-gate-card,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-3 .chapter-gate-card,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-4 .chapter-gate-card,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-5 .chapter-gate-card,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-6 .chapter-gate-card,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-7 .chapter-gate-card,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-8 .chapter-gate-card {
        width: min(100%, 460px);
        grid-template-columns: minmax(0, 1fr) clamp(72px, 20vw, 96px);
        grid-template-rows: auto auto auto auto;
        grid-template-areas:
            "title sticker"
            "copy sticker"
            "status status"
            "game game";
        gap: clamp(8px, 2vw, 12px) clamp(16px, 4.5vw, 22px);
        padding-inline: clamp(16px, 4.6vw, 22px);
    }

    .timeline-horizontal-stage .chapter-gate-card h3 {
        justify-self: start;
        max-width: min(100%, 11ch);
        font-size: clamp(1.48rem, 5.4vw, 1.98rem);
        line-height: 0.94;
        text-align: left;
    }

    .timeline-horizontal-stage .chapter-gate-card p[data-chapter-gate-copy] {
        justify-self: start;
        max-width: min(100%, 31ch);
        font-size: clamp(0.66rem, 2vw, 0.76rem);
        line-height: 1.22;
        text-align: left;
    }

    .timeline-horizontal-stage .chapter-gate-sticker,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-1 .chapter-gate-sticker,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-2 .chapter-gate-sticker,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-3 .chapter-gate-sticker,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-4 .chapter-gate-sticker,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-5 .chapter-gate-sticker,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-6 .chapter-gate-sticker,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-7 .chapter-gate-sticker,
    .timeline-horizontal-stage .timeline-detail.sticker-layout-8 .chapter-gate-sticker {
        align-self: center;
        justify-self: center;
        width: clamp(72px, 20vw, 96px);
        margin: 0;
    }

    .timeline-horizontal-stage .chapter-game-launcher {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "preview"
            "copy"
            "button"
            "dev";
        gap: clamp(9px, 2.2vw, 13px);
        justify-items: center;
        margin-top: clamp(16px, 4vw, 24px);
    }

    .timeline-horizontal-stage .chapter-game-launcher-preview {
        width: min(100%, clamp(256px, 70vw, 340px));
    }

    .timeline-horizontal-stage .chapter-game-launcher-copy {
        justify-items: center;
        max-width: 32ch;
        text-align: center;
    }

    .timeline-horizontal-stage .chapter-game-launcher-copy strong {
        font-size: clamp(1.08rem, 3.9vw, 1.28rem);
        line-height: 1;
    }

    .timeline-horizontal-stage .chapter-game-launcher p {
        font-size: clamp(0.7rem, 2.25vw, 0.82rem);
        line-height: 1.24;
    }

    .timeline-horizontal-stage .chapter-game-launcher-note {
        font-size: clamp(0.64rem, 1.95vw, 0.74rem);
    }

    .timeline-horizontal-stage .chapter-game-launcher-button {
        justify-self: center;
        min-height: clamp(42px, 9vw, 48px);
        padding: 9px clamp(18px, 5vw, 28px);
        font-size: clamp(0.96rem, 3.4vw, 1.08rem);
    }
}

.timeline-horizontal-stage .book-chapter-heading,
.timeline-horizontal-stage .timeline-detail.sticker-layout-1 .book-chapter-heading,
.timeline-horizontal-stage .timeline-detail.sticker-layout-2 .book-chapter-heading,
.timeline-horizontal-stage .timeline-detail.sticker-layout-3 .book-chapter-heading,
.timeline-horizontal-stage .timeline-detail.sticker-layout-4 .book-chapter-heading,
.timeline-horizontal-stage .timeline-detail.sticker-layout-5 .book-chapter-heading,
.timeline-horizontal-stage .timeline-detail.sticker-layout-6 .book-chapter-heading,
.timeline-horizontal-stage .timeline-detail.sticker-layout-7 .book-chapter-heading,
.timeline-horizontal-stage .timeline-detail.sticker-layout-8 .book-chapter-heading {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
        "number"
        "title"
        "period"
        "description"
        "replay";
}

.timeline-horizontal-stage .timeline-detail + .timeline-final-line {
    grid-column: 1 / -1;
    grid-row: auto;
    justify-self: center;
    width: min(100%, 1220px);
    margin: clamp(8px, 1.3vh, 14px) auto 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.timeline-horizontal-stage .timeline-detail.is-locked + .timeline-final-line {
    display: none;
}

.timeline-horizontal-stage .timeline-detail:not(.is-locked) {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
}

.timeline-horizontal-stage .timeline-detail:not(.is-locked) .book-chapter-heading,
.timeline-horizontal-stage .timeline-detail:not(.is-locked).sticker-layout-1 .book-chapter-heading,
.timeline-horizontal-stage .timeline-detail:not(.is-locked).sticker-layout-2 .book-chapter-heading,
.timeline-horizontal-stage .timeline-detail:not(.is-locked).sticker-layout-3 .book-chapter-heading,
.timeline-horizontal-stage .timeline-detail:not(.is-locked).sticker-layout-4 .book-chapter-heading,
.timeline-horizontal-stage .timeline-detail:not(.is-locked).sticker-layout-5 .book-chapter-heading,
.timeline-horizontal-stage .timeline-detail:not(.is-locked).sticker-layout-6 .book-chapter-heading,
.timeline-horizontal-stage .timeline-detail:not(.is-locked).sticker-layout-7 .book-chapter-heading,
.timeline-horizontal-stage .timeline-detail:not(.is-locked).sticker-layout-8 .book-chapter-heading {
    grid-column: 1;
    grid-row: 1;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
        "title"
        "description";
    justify-items: center;
    align-content: center;
    gap: clamp(8px, 1vw, 12px);
    padding: clamp(18px, 2vw, 28px) clamp(112px, 12vw, 164px) clamp(8px, 1vw, 12px) clamp(18px, 2.4vw, 32px);
    text-align: center;
}

.timeline-horizontal-stage .timeline-detail:not(.is-locked) .detail-number,
.timeline-horizontal-stage .timeline-detail:not(.is-locked) .detail-period,
.timeline-horizontal-stage .timeline-detail:not(.is-locked) .detail-sticker {
    display: none;
}

.timeline-horizontal-stage .timeline-detail:not(.is-locked) .book-chapter-heading h2 {
    max-width: min(100%, 18ch);
    margin: 0;
}

.timeline-horizontal-stage .timeline-detail:not(.is-locked) .book-chapter-heading p[data-detail-description] {
    max-width: min(100%, 68ch);
    text-align: center;
}

.timeline-horizontal-stage .timeline-detail:not(.is-locked) .book-pages {
    grid-column: 1;
    grid-row: 2;
    min-height: 0;
}

.timeline-horizontal-stage .book-photo figcaption {
    display: none;
}

.timeline-horizontal-stage .timeline-detail:not(.is-locked) .book-photo {
    aspect-ratio: 4 / 3;
    align-self: center;
    min-height: 0;
    height: auto;
}

.timeline-horizontal-stage .timeline-detail:not(.is-locked) .book-photo img {
    aspect-ratio: 4 / 3;
    height: 100%;
    min-height: 0;
    object-fit: cover;
}

@media (max-width: 599px) {
    .timeline-horizontal-stage .timeline-detail:not(.is-locked) {
        height: auto;
        min-height: 0;
        grid-template-rows: auto auto;
        overflow: visible;
    }

    .timeline-horizontal-stage .timeline-detail:not(.is-locked) .book-chapter-heading,
    .timeline-horizontal-stage .timeline-detail:not(.is-locked).sticker-layout-1 .book-chapter-heading,
    .timeline-horizontal-stage .timeline-detail:not(.is-locked).sticker-layout-2 .book-chapter-heading,
    .timeline-horizontal-stage .timeline-detail:not(.is-locked).sticker-layout-3 .book-chapter-heading,
    .timeline-horizontal-stage .timeline-detail:not(.is-locked).sticker-layout-4 .book-chapter-heading,
    .timeline-horizontal-stage .timeline-detail:not(.is-locked).sticker-layout-5 .book-chapter-heading,
    .timeline-horizontal-stage .timeline-detail:not(.is-locked).sticker-layout-6 .book-chapter-heading,
    .timeline-horizontal-stage .timeline-detail:not(.is-locked).sticker-layout-7 .book-chapter-heading,
    .timeline-horizontal-stage .timeline-detail:not(.is-locked).sticker-layout-8 .book-chapter-heading {
        position: relative;
        z-index: 2;
        gap: 7px;
        padding: clamp(14px, 4vw, 18px) 16px 10px;
    }

    .timeline-horizontal-stage .timeline-detail:not(.is-locked) .book-chapter-heading h2 {
        max-width: 13ch;
        font-size: clamp(1.82rem, 7.2vw, 2.25rem);
        line-height: 0.96;
    }

    .timeline-horizontal-stage .timeline-detail:not(.is-locked) .book-chapter-heading p[data-detail-description] {
        max-width: min(100%, 42ch);
        font-size: clamp(0.72rem, 2.5vw, 0.8rem);
        line-height: 1.32;
    }

    .timeline-horizontal-stage .timeline-detail:not(.is-locked) .detail-replay-game {
        top: clamp(10px, 2.3vw, 16px);
        right: clamp(10px, 2.3vw, 16px);
        min-height: 36px;
        padding: 7px 15px;
        border-radius: 13px;
        font-size: clamp(0.9rem, 4vw, 1rem);
    }

    .timeline-horizontal-stage .timeline-detail:not(.is-locked) .book-pages {
        display: grid;
        grid-template-rows: repeat(2, auto);
        align-content: start;
        gap: clamp(10px, 2.8vw, 14px);
        overflow: visible;
        padding: 10px clamp(10px, 3vw, 14px) clamp(12px, 3vw, 16px);
    }

    .timeline-horizontal-stage .timeline-detail:not(.is-locked) .book-spread,
    .timeline-horizontal-stage .timeline-detail:not(.is-locked) .book-spread.is-image-left {
        display: flex;
        flex-direction: column;
        height: auto;
        min-height: 0;
        gap: clamp(8px, 2.5vw, 11px);
        overflow: visible;
        padding: clamp(9px, 2.7vw, 12px);
    }

    .timeline-horizontal-stage .timeline-detail:not(.is-locked) .book-spread .book-photo,
    .timeline-horizontal-stage .timeline-detail:not(.is-locked) .book-spread.is-image-left .book-photo {
        order: 1;
        flex: 0 0 auto;
        min-height: 0;
    }

    .timeline-horizontal-stage .timeline-detail:not(.is-locked) .book-spread .book-copy,
    .timeline-horizontal-stage .timeline-detail:not(.is-locked) .book-spread.is-image-left .book-copy {
        order: 2;
        width: 100%;
        align-content: start;
        gap: 5px;
        padding-inline: 2px;
        text-align: left;
    }

    .timeline-horizontal-stage .timeline-detail:not(.is-locked) .book-photo,
    .timeline-horizontal-stage .timeline-detail:not(.is-locked) .book-photo img {
        width: 100%;
        height: auto;
        min-height: 0;
    }

    .timeline-horizontal-stage .timeline-detail:not(.is-locked) .book-photo {
        justify-self: center;
        width: min(100%, clamp(232px, 64vw, 280px));
        margin-inline: auto;
    }

    .timeline-horizontal-stage .timeline-detail:not(.is-locked) .book-copy p {
        font-size: clamp(0.7rem, 2.35vw, 0.78rem);
        line-height: 1.34;
    }

    .timeline-horizontal-stage .timeline-detail:not(.is-locked) .book-copy span {
        font-size: 0.64rem;
    }
}

@media (min-width: 600px) {
    .timeline-horizontal-stage .timeline-detail:not(.is-locked) {
        height: auto;
        min-height: 0;
        grid-template-rows: auto auto;
        overflow: visible;
    }

    .timeline-horizontal-stage .timeline-detail:not(.is-locked) .book-chapter-heading,
    .timeline-horizontal-stage .timeline-detail:not(.is-locked).sticker-layout-1 .book-chapter-heading,
    .timeline-horizontal-stage .timeline-detail:not(.is-locked).sticker-layout-2 .book-chapter-heading,
    .timeline-horizontal-stage .timeline-detail:not(.is-locked).sticker-layout-3 .book-chapter-heading,
    .timeline-horizontal-stage .timeline-detail:not(.is-locked).sticker-layout-4 .book-chapter-heading,
    .timeline-horizontal-stage .timeline-detail:not(.is-locked).sticker-layout-5 .book-chapter-heading,
    .timeline-horizontal-stage .timeline-detail:not(.is-locked).sticker-layout-6 .book-chapter-heading,
    .timeline-horizontal-stage .timeline-detail:not(.is-locked).sticker-layout-7 .book-chapter-heading,
    .timeline-horizontal-stage .timeline-detail:not(.is-locked).sticker-layout-8 .book-chapter-heading {
        padding-bottom: clamp(10px, 1.2vw, 16px);
    }

    .timeline-horizontal-stage .timeline-detail:not(.is-locked) .book-pages {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: auto;
        align-content: start;
        align-items: stretch;
        gap: 8px;
        overflow: visible;
        padding: 8px 10px;
    }

    .timeline-horizontal-stage .timeline-detail:not(.is-locked) .book-spread,
    .timeline-horizontal-stage .timeline-detail:not(.is-locked) .book-spread.is-image-left {
        display: flex;
        flex-direction: column;
        height: auto;
        min-height: 0;
        align-items: stretch;
        justify-content: flex-start;
        gap: clamp(8px, 0.9vw, 12px);
        overflow: visible;
    }

    .timeline-horizontal-stage .timeline-detail:not(.is-locked) .book-spread .book-photo,
    .timeline-horizontal-stage .timeline-detail:not(.is-locked) .book-spread.is-image-left .book-photo {
        order: 1;
    }

    .timeline-horizontal-stage .timeline-detail:not(.is-locked) .book-photo {
        justify-self: center;
        width: min(100%, clamp(160px, 15vw, 230px));
        min-height: 0;
        margin-inline: auto;
    }

    .timeline-horizontal-stage .timeline-detail:not(.is-locked) .book-photo img {
        width: 100%;
        height: auto;
        min-height: 0;
    }

    .timeline-horizontal-stage .timeline-detail:not(.is-locked) .book-copy,
    .timeline-horizontal-stage .timeline-detail:not(.is-locked) .book-spread.is-image-left .book-copy {
        order: 2;
        align-content: start;
        gap: 5px;
        min-width: 0;
        text-align: left;
    }

    .timeline-horizontal-stage .timeline-detail:not(.is-locked) .book-copy p {
        font-size: clamp(0.72rem, 0.86vw, 0.84rem);
        line-height: 1.36;
    }
}

@media (min-width: 761px) {
    .timeline-horizontal-stage .timeline-detail:not(.is-locked) .book-photo {
        width: min(100%, clamp(210px, 22vw, 300px));
    }
}

@media (min-width: 1101px) {
    .timeline-horizontal-stage .timeline-detail:not(.is-locked) .book-photo {
        width: min(100%, clamp(260px, 24vw, 330px));
    }
}

.timeline-horizontal-stage .timeline-detail:not(.is-locked) .detail-replay-game {
    position: absolute;
    top: clamp(10px, 1.6vw, 22px);
    right: clamp(10px, 1.6vw, 22px);
    z-index: 8;
    max-width: clamp(132px, 18vw, 196px);
    margin: 0;
    box-shadow: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.timeline-horizontal-stage .timeline-detail:not(.is-locked) .detail-replay-game:hover,
.timeline-horizontal-stage .timeline-detail:not(.is-locked) .detail-replay-game:focus-visible {
    box-shadow: none;
}

.timeline-horizontal-stage .timeline-detail:not(.is-locked) .book-chapter-heading,
.timeline-horizontal-stage .timeline-detail:not(.is-locked).sticker-layout-1 .book-chapter-heading,
.timeline-horizontal-stage .timeline-detail:not(.is-locked).sticker-layout-2 .book-chapter-heading,
.timeline-horizontal-stage .timeline-detail:not(.is-locked).sticker-layout-3 .book-chapter-heading,
.timeline-horizontal-stage .timeline-detail:not(.is-locked).sticker-layout-4 .book-chapter-heading,
.timeline-horizontal-stage .timeline-detail:not(.is-locked).sticker-layout-5 .book-chapter-heading,
.timeline-horizontal-stage .timeline-detail:not(.is-locked).sticker-layout-6 .book-chapter-heading,
.timeline-horizontal-stage .timeline-detail:not(.is-locked).sticker-layout-7 .book-chapter-heading,
.timeline-horizontal-stage .timeline-detail:not(.is-locked).sticker-layout-8 .book-chapter-heading {
    grid-template-areas:
        "title"
        "description";
    padding-right: clamp(156px, 20vw, 232px);
}

@media (max-width: 599px) {
    .timeline-horizontal-stage .timeline-detail:not(.is-locked) .book-chapter-heading,
    .timeline-horizontal-stage .timeline-detail:not(.is-locked).sticker-layout-1 .book-chapter-heading,
    .timeline-horizontal-stage .timeline-detail:not(.is-locked).sticker-layout-2 .book-chapter-heading,
    .timeline-horizontal-stage .timeline-detail:not(.is-locked).sticker-layout-3 .book-chapter-heading,
    .timeline-horizontal-stage .timeline-detail:not(.is-locked).sticker-layout-4 .book-chapter-heading,
    .timeline-horizontal-stage .timeline-detail:not(.is-locked).sticker-layout-5 .book-chapter-heading,
    .timeline-horizontal-stage .timeline-detail:not(.is-locked).sticker-layout-6 .book-chapter-heading,
    .timeline-horizontal-stage .timeline-detail:not(.is-locked).sticker-layout-7 .book-chapter-heading,
    .timeline-horizontal-stage .timeline-detail:not(.is-locked).sticker-layout-8 .book-chapter-heading {
        padding-right: clamp(122px, 38vw, 156px);
    }

    .timeline-horizontal-stage .timeline-detail:not(.is-locked) .detail-replay-game {
        max-width: clamp(112px, 34vw, 136px);
    }
}

/* Keep rounded UI edges soft everywhere: no hard dark clipped corners. */
.glass-card,
.timeline-mockup-stage .timeline-detail,
.timeline-horizontal-stage .timeline-detail,
.timeline-horizontal-stage .book-spread,
.timeline-horizontal-stage .book-photo,
.timeline-horizontal-stage .chapter-gate-card,
.chapter-game-launcher-preview,
.fullscreen-game-stage {
    --soft-edge-radius: 20px;
    background-clip: padding-box;
    border-color: rgba(116, 79, 75, 0.08);
}

.glass-card {
    --soft-edge-radius: var(--radius);
}

.timeline-mockup-stage .timeline-detail,
.timeline-horizontal-stage .timeline-detail {
    --soft-edge-radius: 24px;
}

.timeline-horizontal-stage .book-spread,
.timeline-horizontal-stage .chapter-gate-card,
.chapter-game-launcher-preview,
.fullscreen-game-stage {
    --soft-edge-radius: 20px;
}

.timeline-horizontal-stage .book-photo {
    --soft-edge-radius: 16px;
}

.timeline-mockup-stage .timeline-detail,
.timeline-horizontal-stage .timeline-detail,
.timeline-horizontal-stage .book-spread,
.timeline-horizontal-stage .chapter-gate-card,
.chapter-game-launcher-preview,
.fullscreen-game-stage {
    clip-path: inset(0 round var(--soft-edge-radius));
}

.timeline-mockup-stage .timeline-detail::before,
.timeline-mockup-stage .timeline-detail::after,
.timeline-horizontal-stage .timeline-detail::before,
.timeline-horizontal-stage .timeline-detail::after,
.chapter-game-launcher-preview::before,
.chapter-game-launcher-preview::after,
.fullscreen-game-stage::before,
.fullscreen-game-stage::after {
    border-radius: inherit;
}

.timeline-horizontal-stage .timeline-detail,
.timeline-mockup-stage .timeline-detail {
    box-shadow:
        0 18px 38px rgba(116, 79, 75, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.76),
        inset 0 -1px 0 rgba(255, 220, 224, 0.16);
}

/* Long chapter text needs to read like a page, not a label. */
.timeline-horizontal-stage .book-chapter-heading p[data-detail-description],
.timeline-horizontal-stage .timeline-detail:not(.is-locked) .book-chapter-heading p[data-detail-description] {
    font-size: clamp(0.92rem, 0.98vw, 1.04rem);
    font-weight: 480;
    line-height: 1.5;
}

.timeline-horizontal-stage .book-copy span,
.timeline-horizontal-stage .timeline-detail:not(.is-locked) .book-copy span {
    font-size: clamp(0.7rem, 0.74vw, 0.8rem);
    font-weight: 720;
}

.timeline-horizontal-stage .book-copy p,
.timeline-horizontal-stage .timeline-detail:not(.is-locked) .book-copy p {
    font-size: clamp(0.86rem, 0.94vw, 0.98rem);
    font-weight: 500;
    line-height: 1.46;
}

@media (min-width: 600px) and (max-width: 1100px) {
    .timeline-horizontal-stage .book-chapter-heading p[data-detail-description],
    .timeline-horizontal-stage .timeline-detail:not(.is-locked) .book-chapter-heading p[data-detail-description] {
        font-size: clamp(0.86rem, 1.22vw, 0.98rem);
        font-weight: 480;
        line-height: 1.44;
    }

    .timeline-horizontal-stage .book-copy p,
    .timeline-horizontal-stage .timeline-detail:not(.is-locked) .book-copy p {
        font-size: clamp(0.82rem, 1.12vw, 0.94rem);
        font-weight: 500;
        line-height: 1.42;
    }
}

@media (max-width: 599px) {
    .timeline-horizontal-stage .book-chapter-heading p[data-detail-description],
    .timeline-horizontal-stage .timeline-detail:not(.is-locked) .book-chapter-heading p[data-detail-description] {
        font-size: clamp(0.82rem, 2.9vw, 0.94rem);
        font-weight: 480;
        line-height: 1.4;
    }

    .timeline-horizontal-stage .book-copy span,
    .timeline-horizontal-stage .timeline-detail:not(.is-locked) .book-copy span {
        font-size: clamp(0.66rem, 2.35vw, 0.76rem);
        font-weight: 720;
    }

    .timeline-horizontal-stage .book-copy p,
    .timeline-horizontal-stage .timeline-detail:not(.is-locked) .book-copy p {
        font-size: clamp(0.8rem, 2.8vw, 0.9rem);
        font-weight: 500;
        line-height: 1.38;
    }
}

.timeline-horizontal-stage .timeline-detail:not(.is-locked) .book-chapter-heading,
.timeline-horizontal-stage .timeline-detail:not(.is-locked).sticker-layout-1 .book-chapter-heading,
.timeline-horizontal-stage .timeline-detail:not(.is-locked).sticker-layout-2 .book-chapter-heading,
.timeline-horizontal-stage .timeline-detail:not(.is-locked).sticker-layout-3 .book-chapter-heading,
.timeline-horizontal-stage .timeline-detail:not(.is-locked).sticker-layout-4 .book-chapter-heading,
.timeline-horizontal-stage .timeline-detail:not(.is-locked).sticker-layout-5 .book-chapter-heading,
.timeline-horizontal-stage .timeline-detail:not(.is-locked).sticker-layout-6 .book-chapter-heading,
.timeline-horizontal-stage .timeline-detail:not(.is-locked).sticker-layout-7 .book-chapter-heading,
.timeline-horizontal-stage .timeline-detail:not(.is-locked).sticker-layout-8 .book-chapter-heading {
    padding-inline: clamp(18px, 2.4vw, 32px);
}

.timeline-horizontal-stage .timeline-detail:not(.is-locked) .book-chapter-heading h2 {
    justify-self: center;
    text-align: center;
}

@media (max-width: 599px) {
    .timeline-horizontal-stage .timeline-detail:not(.is-locked) .book-chapter-heading,
    .timeline-horizontal-stage .timeline-detail:not(.is-locked).sticker-layout-1 .book-chapter-heading,
    .timeline-horizontal-stage .timeline-detail:not(.is-locked).sticker-layout-2 .book-chapter-heading,
    .timeline-horizontal-stage .timeline-detail:not(.is-locked).sticker-layout-3 .book-chapter-heading,
    .timeline-horizontal-stage .timeline-detail:not(.is-locked).sticker-layout-4 .book-chapter-heading,
    .timeline-horizontal-stage .timeline-detail:not(.is-locked).sticker-layout-5 .book-chapter-heading,
    .timeline-horizontal-stage .timeline-detail:not(.is-locked).sticker-layout-6 .book-chapter-heading,
    .timeline-horizontal-stage .timeline-detail:not(.is-locked).sticker-layout-7 .book-chapter-heading,
    .timeline-horizontal-stage .timeline-detail:not(.is-locked).sticker-layout-8 .book-chapter-heading {
        padding-inline: 16px;
    }
}

.timeline-horizontal-stage .timeline-detail:not(.is-locked) {
    grid-template-rows: auto auto auto;
}

.timeline-horizontal-stage .timeline-detail:not(.is-locked) .book-copy span {
    display: none;
}

.timeline-horizontal-stage .timeline-detail:not(.is-locked) .detail-replay-game {
    position: static;
    grid-column: 1;
    grid-row: 3;
    justify-self: center;
    align-self: center;
    width: max-content;
    max-width: min(100%, clamp(220px, 28vw, 310px));
    margin: clamp(6px, 0.9vw, 12px) auto clamp(14px, 1.5vw, 20px);
    overflow: visible;
    text-overflow: clip;
    z-index: 2;
}

@media (max-width: 599px) {
    .timeline-horizontal-stage .timeline-detail:not(.is-locked) .detail-replay-game {
        max-width: min(100%, 230px);
        margin-block: 6px 14px;
    }
}
