:root {
    --pink: #ff6e76;
    --ink: #503f50;
    --bar-height: 60px;
    --mobile-nav-height: 48px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    overflow-x: hidden;
    color: var(--ink);
    background: var(--pink);
    font-family: "Noto Sans TC", "Microsoft JhengHei", sans-serif;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgb(255 248 248 / 92%);
    backdrop-filter: blur(8px);
    box-shadow: 0 1px 10px rgb(113 65 70 / 8%);
}

.topbar {
    width: min(1120px, calc(100% - 32px));
    min-height: var(--bar-height);
    margin: auto;
    display: flex;
    align-items: center;
    gap: clamp(18px, 4vw, 58px);
}

.brand {
    flex: 0 0 auto;
}

.brand img {
    width: 94px;
}

.desktop-links {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    gap: clamp(16px, 3vw, 43px);
    font-size: 1rem;
    font-weight: 700;
}

.desktop-links a,
.account-link {
    transition: color .2s ease, transform .2s ease;
}

.desktop-links a:hover,
.desktop-links a:focus-visible {
    color: #ef3971;
    transform: translateY(-2px);
}

.account-link {
    padding: 7px 13px;
    color: #ef5e81;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.account-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.account-link:hover,
.account-link:focus-visible {
    background: #ffc7ca;
}

.hero {
    position: relative;
    isolation: isolate;
}

.hero-content {
    position: relative;
    z-index: 3;
    width: min(1160px, 86vw);
    margin: auto;
    padding: clamp(36px, 5vw, 52px) 0 0;
    text-align: center;
}

.hero h1 {
    margin: 0 auto;
    width: 100%;
    max-width: 960px;
}

.hero h1 img {
    width: 100%;
}

.hero-subtitle {
    width: 80%;
    max-width: 560px;
    margin: 0 auto;
}

.hero-sale {
    width: 80%;
    max-width: 480px;
    margin: 16px auto 0;
}

.hero-list {
    width: 80%;
    max-width: 720px;
    margin: -40px auto 0;
}

.deco,
.cloud,
.hero-shape {
    position: absolute;
    pointer-events: none;
}

.hero-shape {
    z-index: 0;
}

.deco,
.cloud {
    z-index: 2;
}

.cloud {
    width: clamp(130px, 16vw, 360px);
    opacity: .96;
}

.cloud-left {
    top: 64%;
    left: 12%;
}

.cloud-right {
    top: 48%;
    right: 8%;
    transform: scaleX(-1);
}

.sun {
    top: 5%;
    left: 30%;
    width: clamp(44px, 5vw, 90px);
}

.fly {
    top: 10%;
    right: 28%;
    width: clamp(60px, 6vw, 120px);
}

.flower {
    width: clamp(24px, 3vw, 47px);
}

.flower-y {
    top: 88%;
    left: 31%;
}

.flower-g {
    top: 90%;
    right: 24%;
}

.flower-b {
    top: 84%;
    right: 30%;
}

.shape-left {
    width: clamp(120px, 30vw, 480px);
    left: -1%;
    top: -1%;
}

.shape-right {
    width: clamp(76px, 18vw, 360px);
    right: -1%;
    top: -30%;
}

.mobile-anchor-nav {
    display: none;
}

.go-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 30;
    display: grid;
    width: 48px;
    height: 48px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: #ef6b86;
    box-shadow: 0 5px 14px rgb(111 53 64 / 25%);
    color: #fff;
    cursor: pointer;
    font-size: 25px;
    font-weight: 900;
    line-height: 1;
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity .2s ease, transform .2s ease, background .2s ease;
}

.go-top.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.go-top:hover,
.go-top:focus-visible {
    background: #df315f;
}

.book-section {
    position: relative;
    padding: clamp(44px, 4vw, 60px) 18px clamp(44px, 4vw, 80px);
    scroll-margin-top: calc(var(--bar-height) + 12px);
}

.book-section::before {
    content: "";
    z-index: 0;
    position: absolute;
    inset: 0;
    background-image: url("images/section_bg_block_desktop.png");
    background-position: center;
    background-size: 100% 100%;
    pointer-events: none;
}

.book-section>* {
    position: relative;
    z-index: 1;
}

.section-title {
    width: min(640px, 62vw);
    margin: 0 auto;
}

.artwork {
    width: min(1160px, 100%);
    margin: 0 auto;
    display: grid;
    justify-items: center;
    gap: clamp(16px, 2.7vw, 42px);
}

.artwork picture {
    display: block;
    width: 100%;
}

.artwork>a {
    display: block;
    width: 100%;
}

.artwork img {
    width: 100%;
    height: auto;
    margin: auto;
}

.story .artwork {
    gap: 14px;
}

.science-artwork {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.science-artwork>a:first-child {
    grid-column: 1 / -1;
}

.mystery::before,
.history::before {
    display: none;
}

.science,
.history {
    padding-top: clamp(50px, 7vw, 96px);
}

footer {
    position: relative;
    z-index: 1;
    padding: 16px 20px 32px;
    background: #ffc7ca;
    text-align: center;
    font-size: 14px;
}

footer img {
    width: 110px;
    margin: 0 auto 12px;
}

footer p {
    margin: 0;
}

.note {
    text-align: center;
}

.reveal {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .6s ease, transform .6s ease;
}

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

.float {
    animation: float 3s ease-in-out infinite;
}

.sway {
    animation: sway 4s ease-in-out infinite;
}

.delay {
    animation-delay: -1.5s;
}

@keyframes float {
    50% {
        transform: translateY(-5px);
    }
}

@keyframes sway {
    50% {
        transform: rotate(4deg) translateY(-2px);
    }
}

@media (max-width: 767px) {
    :root {
        --bar-height: 54px;
    }

    .topbar {
        width: calc(100% - 28px);
        min-height: var(--bar-height);
    }

    .brand img {
        width: 78px;
    }

    .desktop-links {
        display: none;
    }

    .account-actions {
        margin-left: auto;
        gap: 5px;
    }

    .account-link {
        padding: 6px 10px;
        font-size: 12px;
    }

    .hero {
        min-height: 0;
    }

    .hero-content {
        width: 98vw;
        padding: 32px 0 54px;
    }

    .eyebrow {
        font-size: 12px;
    }

    .hero h1 {
        width: 98%;
    }

    .hero-subtitle {
        width: 80%;
        margin-bottom: 9px;
    }

    .hero-sale {
        width: 78%;
    }

    .hero-list {
        width: 92%;
        margin-top: -10px;
    }

    .cloud-left {
        left: -7%;
        top: 55%;
        display: none;
    }

    .cloud-right {
        right: -8%;
        top: 49%;
        display: none;
    }

    .sun {
        left: 8%;
        top: 3%;
    }

    .fly {
        top: 3%;
        right: 6%;
    }

    .flower-y {
        left: 8%;
        top: 86%;
    }

    .flower-g {
        right: 3%;
        top: 76%;
    }

    .flower-b {
        right: 12%;
        top: 84%;
    }

    .shape-left {
        width: 120px;
        left: -16px;
        bottom: 4%;
        display: none;
    }

    .shape-right {
        width: 72px;
        right: -5px;
        bottom: 7%;
        display: none;
    }

    .mobile-anchor-nav {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        position: fixed;
        top: var(--bar-height);
        right: 0;
        left: 0;
        max-width: 100vw;
        z-index: 15;
        min-height: var(--mobile-nav-height);
        background: #fff8f6;
        box-shadow: 0 3px 8px rgb(129 72 79 / 10%);
        opacity: 0;
        pointer-events: none;
        transform: translateY(-110%);
        transition: opacity .2s ease, transform .2s ease;
    }

    .mobile-nav-is-visible .mobile-anchor-nav {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    .mobile-anchor-nav a {
        display: grid;
        min-width: 0;
        place-items: center;
        padding: 8px 2px;
        border-right: 1px solid #f2dadd;
        color: #895f68;
        font-size: .9rem;
        font-weight: 900;
        text-align: center;
        transition: color .2s, background .2s;
    }

    .mobile-anchor-nav a:last-child {
        border: 0;
    }

    .mobile-anchor-nav a.active {
        color: #fff;
        background: #e14061;
    }

    .book-section {
        padding: 18px 9px 18vw;
        scroll-margin-top: calc(var(--bar-height) + var(--mobile-nav-height) + 8px);
    }

    .book-section::before {
        inset: -20vw 0 0;
        background-image: url("images/section_bg_blockA_mobile.png");
        background-size: 100% 100%;
    }

    .mystery::before,
    .history::before {
        display: none;
    }

    .section-title {
        width: min(360px, 96vw);
        margin-bottom: 0px;
    }

    .artwork {
        width: min(740px, 100%);
        gap: 6px;
    }

    .science-artwork {
        grid-template-columns: 1fr;
    }

    .science-artwork>a:first-child {
        grid-column: auto;
    }

    .artwork img {
        width: 100%;
    }

    .story .artwork {
        gap: 3px;
    }

    .science,
    .history {
        padding-top: 44px;
    }

    footer {
        padding-bottom: 32px;
    }

    .go-top {
        right: 16px;
        bottom: 16px;
        width: 44px;
        height: 44px;
        font-size: 23px;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}