@import url('https://fonts.googleapis.com/css2?family=Wawati+TC&family=HanziPen+TC&family=LingWai+TC&family=Hannotate+TC&family=Yuppy+TC&family=Senty+Creek&display=swap');

/* 全局樣式 — 啞光暖紙與文字級別 */
:root {
    color-scheme: light;
    --primary: #946244;
    --primary-light: #caa178;
    --primary-dark: #614735;
    --accent-sage: #77866f;
    --accent-ink: #4b6070;
    --accent-rose: #c88774;
    --paper: #fff8ec;
    --paper-warm: #f4e7d1;
    --neutral: #3d3026;
    --neutral-muted: #7a675e;
    --neutral-light: #eadfce;
    --bg: #f4ead8;
    --surface: #fbf2e3;
    --border: rgba(118, 89, 70, 0.16);
    --shadow-sm: 0 3px 10px rgba(80, 62, 49, 0.045);
    --shadow-md: 0 12px 26px rgba(80, 62, 49, 0.075);
    --shadow-lg: 0 22px 56px rgba(80, 62, 49, 0.105);
    --ease-soft: cubic-bezier(0.22, 1, 0.36, 1);
    --base-font: 'Senty Creek', cursive;
    --story-title-font: 'HanWangMingBlack', var(--base-font);
    --story-body-font: 'HanziPen TC', 'Noto Serif TC', serif;
    --story-foot-font: 'LingWai TC', 'Noto Serif TC', serif;
    --product-title-font: 'HanWangMingBlack', var(--base-font);
    --product-body-font: 'Yuppy TC', 'Noto Serif TC', serif;
    --store-title-font: 'HanWangMingBlack', var(--base-font);
    --store-body-font: 'Yuppy TC', 'Noto Serif TC', serif;
    --store-button-font: 'Hannotate TC', 'Noto Serif TC', serif;
    --footer-font: 'LingWai TC', 'Noto Serif TC', serif;
    --hand-font: 'BiauKai', 'KaiTi', 'DFKai-SB', 'STKaiti', 'Kaiti TC', 'Noto Serif TC', cursive;
    --torn-edge: polygon(0 1.2%, 4% 0, 10% 1.4%, 16% 0.4%, 23% 1.7%, 31% 0.3%, 38% 1.1%, 45% 0.2%, 54% 1.5%, 62% 0.5%, 70% 1.7%, 78% 0.3%, 86% 1.2%, 94% 0.1%, 100% 1.4%, 99.3% 12%, 100% 21%, 99.1% 31%, 100% 42%, 99.2% 52%, 100% 63%, 99.1% 75%, 100% 87%, 99.2% 100%, 91% 99.1%, 83% 100%, 76% 98.9%, 68% 99.8%, 60% 98.7%, 51% 100%, 43% 98.9%, 35% 99.8%, 27% 98.7%, 18% 100%, 10% 98.9%, 0 99.6%, 0.8% 88%, 0 78%, 0.9% 67%, 0 56%, 0.7% 45%, 0 35%, 0.8% 24%, 0 14%);
}

* {
    box-sizing: border-box;
}

html {
    background-color: var(--bg);
}

html, body {
    margin: 0;
    padding: 0;
    font-family: var(--base-font), var(--hand-font);
    color: var(--neutral-muted);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100%;
}

/* 標題字體粗些 */
h1, h2, h3, .section-title-block h1, .store-card h3, .carousel-item h3 {
    font-weight: 700;
}

/* 內容字體細 */
p, .story-section p, .store-card p, .store-name, .store-status {
    font-weight: 300;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: url("images/background01.jpg") center top/cover no-repeat;
    background-color: var(--bg);
    opacity: 1;
    filter: grayscale(12%) sepia(10%) blur(0.6px) saturate(0.98);
    pointer-events: none;
    z-index: -2;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse at 14% 18%, rgba(255, 250, 238, 0.46), transparent 32%),
        radial-gradient(ellipse at 82% 22%, rgba(234, 220, 198, 0.4), transparent 34%),
        radial-gradient(ellipse at 70% 80%, rgba(255, 244, 226, 0.48), transparent 38%),
        linear-gradient(135deg, rgba(250, 241, 225, 0.86), rgba(238, 222, 198, 0.72));
    pointer-events: none;
    z-index: -1;
    animation: ambientDrift 18s var(--ease-soft) infinite alternate;
}

.page-grain {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0.34;
    mix-blend-mode: multiply;
    background-image:
        radial-gradient(ellipse at 12% 20%, rgba(255, 255, 255, 0.55) 0 1px, transparent 3px),
        radial-gradient(ellipse at 76% 70%, rgba(255, 255, 255, 0.46) 0 1.2px, transparent 4px),
        radial-gradient(ellipse at 42% 52%, rgba(118, 89, 70, 0.04) 0 0.8px, transparent 3px),
        linear-gradient(18deg, transparent 0 48%, rgba(80, 62, 49, 0.032) 49% 50%, transparent 51% 100%),
        linear-gradient(162deg, transparent 0 48%, rgba(255, 255, 255, 0.2) 49% 50%, transparent 51% 100%),
        radial-gradient(circle at 20% 30%, rgba(62, 47, 36, 0.11) 0 0.6px, transparent 0.9px),
        radial-gradient(circle at 70% 60%, rgba(255, 255, 255, 0.42) 0 0.8px, transparent 1.1px),
        linear-gradient(90deg, rgba(62, 47, 36, 0.035) 1px, transparent 1px),
        linear-gradient(rgba(62, 47, 36, 0.025) 1px, transparent 1px);
    background-size: 84px 70px, 116px 92px, 68px 80px, 96px 84px, 120px 96px, 31px 29px, 37px 35px, 18px 18px, 18px 18px;
    mask-image: linear-gradient(to bottom, transparent, #000 10%, #000 88%, transparent);
}

.cursor-glow {
    position: fixed;
    left: 0;
    top: 0;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background:
        radial-gradient(circle, rgba(255, 230, 188, 0.26), rgba(200, 135, 116, 0.07) 44%, transparent 70%);
    pointer-events: none;
    transform: translate3d(-50%, -50%, 0);
    opacity: 0;
    transition: opacity 0.35s ease;
    z-index: 2;
    filter: blur(8px);
}

.cursor-glow.is-visible {
    opacity: 1;
}

.section-rail {
    position: fixed;
    right: 22px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 80;
    display: grid;
    gap: 14px;
}

.section-rail a {
    width: 10px;
    height: 10px;
    border-radius: 48% 52% 45% 55%;
    background: rgba(80, 62, 49, 0.2);
    border: 1.5px solid rgba(255, 248, 236, 0.72);
    box-shadow: 0 4px 14px rgba(80, 62, 49, 0.1);
    transition: transform 0.3s var(--ease-soft), background 0.3s ease, box-shadow 0.3s ease;
}

.section-rail a.is-active {
    background: var(--accent-sage);
    transform: scale(1.55) rotate(-8deg);
    box-shadow:
        0 0 0 7px rgba(111, 138, 120, 0.14),
        0 0 0 10px rgba(80, 62, 49, 0.045);
}

/* 滾動容器 */
.scroll-container {
    min-height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    position: relative;
    z-index: 1;
}

/* 分頁樣式 */
.section {
    min-height: 100vh;
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    position: relative;
    overflow: visible;
    background: transparent;
}

.section::before,
.section::after {
    content: "";
    position: absolute;
    width: min(34vw, 360px);
    aspect-ratio: 1;
    border: 1px solid rgba(148, 98, 68, 0.08);
    border-radius: 48% 52% 58% 42%;
    pointer-events: none;
    opacity: 0.28;
    filter: blur(0.4px);
    animation: slowFloat 12s var(--ease-soft) infinite alternate;
}

.section::before {
    left: -130px;
    top: 12%;
    background: rgba(255, 248, 236, 0.32);
}

.section::after {
    right: -150px;
    bottom: 12%;
    background: rgba(119, 134, 111, 0.07);
    animation-delay: -3s;
}

.ambient-lottie {
    position: absolute;
    z-index: 2;
    pointer-events: none;
    opacity: 0.2;
    filter: saturate(0.72) sepia(0.24) blur(0.15px);
    animation: lottieFloat 9s var(--ease-soft) infinite alternate;
}

.ambient-lottie lottie-player {
    width: clamp(150px, 22vw, 270px);
    height: clamp(150px, 22vw, 270px);
}

.ambient-lottie-story {
    right: max(18px, calc((100vw - 960px) / 2 - 132px));
    top: 18%;
}

.ambient-lottie-products {
    left: 7%;
    bottom: 13%;
}

.ambient-lottie-stores {
    right: max(18px, calc((100vw - 960px) / 2 - 132px));
    bottom: 13%;
}

/* 背景 Lottie */
.background-lottie {
    position: absolute;
    inset: 0;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 0;
}

.background-lottie lottie-player {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.08;
}

/* 內容容器 */
.scroll-content {
    position: relative;
    z-index: 1;
    width: min(960px, 100%);
    padding: 60px 48px;
    background:
        radial-gradient(ellipse at 16% 20%, rgba(255, 255, 255, 0.12) 0 1px, transparent 6px),
        repeating-linear-gradient(0deg, rgba(72, 54, 41, 0.014) 0 1px, transparent 1px 11px),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 14px),
        linear-gradient(135deg, rgba(255, 249, 238, 0.96), rgba(244, 231, 211, 0.92));
    backdrop-filter: blur(3px) saturate(0.9);
    -webkit-backdrop-filter: blur(3px) saturate(0.9);
    border: 1px solid var(--border);
    border-radius: 18px;
    clip-path: var(--torn-edge);
    box-shadow:
        0 20px 44px rgba(74, 58, 42, 0.08);
    text-align: center;
    transform: translateY(24px) scale(0.985);
    opacity: 0;
    transition: opacity 0.8s var(--ease-soft), transform 0.8s var(--ease-soft), box-shadow 0.35s ease;
}

.section.is-visible .scroll-content {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.scroll-content::before {
    content: "";
    position: absolute;
    inset: 10px;
    border: 1.5px dashed rgba(148, 98, 68, 0.16);
    border-radius: 14px 11px 16px 10px;
    pointer-events: none;
    box-shadow: inset 0 0 36px rgba(148, 98, 68, 0.04);
}

.scroll-content::after {
    content: "";
    position: absolute;
    right: 28px;
    top: 22px;
    width: 64px;
    height: 20px;
    border-radius: 3px 6px 4px 5px;
    background:
        linear-gradient(90deg, rgba(255, 250, 240, 0.28), rgba(202, 161, 120, 0.16)),
        repeating-linear-gradient(90deg, rgba(80, 62, 49, 0.035) 0 1px, transparent 1px 7px);
    transform: rotate(7deg);
    opacity: 0.62;
}

/* Feather 背景（裝飾） */
.feather-bg {
    display: none;
}

.section-title-block {
    margin-bottom: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    min-height: 100px;
}

.hero-header {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 12px;
}

.hero-logo img {
    width: 100px;
    height: auto;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    animation: logoBreathe 4.8s var(--ease-soft) infinite;
}

.hero-header h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin: 0;
    color: var(--neutral);
    font-family: var(--story-title-font);
    line-height: 1.1;
    letter-spacing: 0.04em;
    font-weight: 700;
    text-shadow:
        0 1px 0 rgba(255, 255, 255, 0.45),
        1px 2px 0 rgba(148, 98, 68, 0.08);
}

.title-lottie {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.title-lottie.left,
.title-lottie.right {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    align-self: center;
}

.title-lottie lottie-player {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 8px 14px rgba(148, 98, 68, 0.1)) saturate(0.86);
}

/* 故事介紹 */
.story-intro {
    margin: 36px 0 48px;
    padding: 32px 24px;
    background: rgba(196, 161, 122, 0.04);
    border-radius: 16px;
    border: 1px solid var(--border);
}

.intro-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--neutral);
    margin: 0 0 12px;
    letter-spacing: -0.01em;
}

.intro-text {
    font-size: 1.05rem;
    color: var(--neutral-muted);
    margin: 0;
    line-height: 1.7;
}

/* 故事章節 */
.story-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 40px;
    margin-top: 40px;
    position: relative;
    counter-reset: storyStep;
    align-items: start;
}

.story-section {
    padding: 30px 28px 34px;
    background:
        linear-gradient(160deg, #fff7eb 0%, #f7e5d1 70%, #f2d8bf 100%);
    border-radius: 14px 18px 12px 20px;
    border: 1px solid rgba(118, 89, 70, 0.12);
    clip-path: polygon(0 3%, 8% 0, 20% 1.5%, 28% 0.4%, 38% 2%, 48% 0.8%, 56% 1.7%, 64% 0, 74% 1.5%, 84% 0.5%, 92% 1.4%, 100% 0.3%, 98% 16%, 100% 30%, 98% 44%, 100% 56%, 98% 74%, 100% 86%, 99% 100%, 88% 98.8%, 76% 100%, 64% 98.9%, 52% 100%, 40% 98.7%, 28% 100%, 16% 98.9%, 6% 100%, 2% 99%);
    text-align: left;
    box-shadow:
        0 18px 34px rgba(80, 62, 49, 0.06);
    position: relative;
    overflow: visible;
    transform: translateY(var(--paper-y, 0px)) rotate(var(--paper-rotate, 0deg));
    transition: transform 0.35s var(--ease-soft), box-shadow 0.35s ease, border-color 0.35s ease;
    counter-increment: storyStep;
}

.story-section:nth-of-type(1) {
    --paper-rotate: -1.8deg;
    --paper-y: 5px;
}

.story-section:nth-of-type(2) {
    --paper-rotate: 1.1deg;
    --paper-y: -8px;
}

.story-section:nth-of-type(3) {
    --paper-rotate: -0.7deg;
    --paper-y: 9px;
}

.story-section::after {
    content: counter(storyStep, decimal-leading-zero);
    position: absolute;
    right: 18px;
    bottom: 14px;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    color: rgba(80, 62, 49, 0.22);
    pointer-events: none;
}

.story-section::before {
    content: "";
    position: absolute;
    left: 22px;
    top: -12px;
    width: 72px;
    height: 22px;
    border-radius: 8px 10px 4px 6px;
    background:
        linear-gradient(135deg, rgba(248, 236, 218, 0.92), rgba(236, 214, 186, 0.88));
    box-shadow:
        0 6px 14px rgba(80, 62, 49, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
    transform: rotate(-3deg);
    pointer-events: none;
}

.story-section p::first-letter {
    color: var(--primary-dark);
    font-family: var(--hand-font);
    font-size: 1.15em;
}

.story-section:hover {
    transform: translateY(calc(var(--paper-y, 0px) - 8px)) rotate(calc(var(--paper-rotate, 0deg) * 0.55));
    border-color: rgba(119, 134, 111, 0.22);
    box-shadow:
        0 18px 34px rgba(80, 62, 49, 0.08),
        0 0 0 6px rgba(255, 248, 236, 0.34);
}

.story-section h2 {
    font-size: 1.2rem;
    margin: 0 0 16px;
    color: var(--neutral);
    font-weight: 600;
}

.story-section {
    font-family: var(--story-body-font);
}

.story-section p {
    font-size: 0.95rem;
    line-height: 1.7;
    margin: 0 0 12px;
    color: var(--neutral-muted);
    font-family: var(--story-body-font);
}

.story-section ul {
    margin: 12px 0;
    padding-left: 20px;
    list-style: none;
}

.story-section li {
    margin-bottom: 12px;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--neutral-muted);
}

.story-section li strong {
    color: var(--neutral);
}

.story-closing {
    font-size: 1rem;
    color: var(--neutral);
    margin-top: 40px;
    font-weight: 500;
    text-align: center;
    position: relative;
    display: inline-block;
    padding: 16px 24px 0;
    font-family: var(--story-foot-font);
    letter-spacing: 0.03em;
}

.story-closing::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    width: 72px;
    height: 8px;
    border-top: 1.5px dashed rgba(148, 98, 68, 0.38);
    border-radius: 50%;
    background: none;
    transform: translateX(-50%) rotate(-2deg);
}

/* 標題一般樣式 */
h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin: 0;
    color: var(--neutral);
    font-family: var(--hand-font);
    line-height: 1.1;
    letter-spacing: 0.05em;
}

#products h1 {
    font-family: var(--product-title-font);
}

#products,
#products p,
#products .carousel-item {
    font-family: var(--product-body-font);
}

#stores h1,
.store-card h3 {
    font-family: var(--store-title-font);
}

#stores,
#stores p,
.store-card,
.store-name,
.store-status {
    font-family: var(--store-body-font);
}

h2 {
    font-size: 1.15rem;
    margin: 0 0 12px;
    color: var(--neutral);
    font-weight: 600;
    font-family: var(--hand-font);
}

h3 {
    font-size: 1.05rem;
    margin: 12px 0 0;
    color: var(--neutral);
    font-family: var(--hand-font);
}

/* 產品輪播 */
.carousel {
    position: relative;
    width: 100%;
    margin-top: 40px;
    overflow: hidden;
    border-radius: 16px;
    padding-bottom: 24px;
}

.image-lightbox {
    position: absolute;
    inset: 0;
    z-index: 40;
    display: grid;
    place-items: center;
    pointer-events: none;
}

.image-lightbox.hidden {
    display: none;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(18, 15, 12, 0.72);
    backdrop-filter: blur(2px);
    pointer-events: auto;
}

.lightbox-panel {
    position: relative;
    width: min(84vw, 820px);
    max-height: min(84vh, 780px);
    padding: 14px;
    background: rgba(255, 249, 238, 0.96);
    border-radius: 22px;
    box-shadow: 0 24px 70px rgba(26, 22, 18, 0.35);
    border: 1px solid rgba(118, 89, 70, 0.16);
    overflow: hidden;
    pointer-events: auto;
}

.lightbox-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    background: rgba(62, 47, 36, 0.08);
    color: var(--neutral);
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: transform 0.25s ease, background 0.25s ease;
    z-index: 9999;
}

.lightbox-close:hover {
    transform: scale(1.08);
    background: rgba(62, 47, 36, 0.16);
}

.lightbox-panel {
    position: relative;
    width: min(92vw, 92vh, 920px);
    max-height: 92vh;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-img {
    width: 100%;
    height: auto;
    border-radius: 0;
    max-height: 92vh;
    object-fit: contain;
    display: block;
    transform-origin: center center;
    touch-action: none;
    cursor: grab;
    transition: transform 0.17s ease-out;
}

.lightbox-img.zoomed {
    cursor: grabbing;
}

.carousel-inner {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.carousel-item {
    min-width: 100%;
    padding: 32px 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    perspective: 1000px;
}

.carousel-item h3 {
    position: relative;
    display: inline-block;
    margin: 16px 0 0;
    padding: 6px 18px 10px;
    color: var(--neutral);
    font-family: var(--product-title-font);
    font-size: clamp(1.35rem, 2.5vw, 2rem);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 0.08em;
    text-shadow:
        0 1px 0 rgba(255, 255, 255, 0.5),
        0 8px 18px rgba(80, 62, 49, 0.09);
}

.carousel-item h3::before {
    content: "";
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 4px;
    height: 11px;
    border-radius: 48% 52% 42% 58%;
    background:
        repeating-linear-gradient(90deg, transparent 0 7px, rgba(148, 98, 68, 0.18) 7px 9px, transparent 9px 15px);
    transform: rotate(-1.8deg);
    z-index: -1;
}

.carousel-item h3::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -7px;
    width: min(160px, 80%);
    height: 7px;
    border-top: 1.5px dashed rgba(148, 98, 68, 0.42);
    border-radius: 50%;
    background: none;
    transform: translateX(-50%) rotate(1.5deg);
}

.product-story-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
    max-width: min(520px, 86vw);
}

.product-story-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 7px 16px 8px;
    color: var(--neutral);
    text-decoration: none;
    font-family: var(--store-button-font);
    font-size: 0.95rem;
    line-height: 1.25;
    background: rgba(255, 249, 238, 0.9);
    border: 1.5px dashed rgba(118, 89, 70, 0.3);
    border-radius: 48% 52% 44% 56%;
    box-shadow: 0 8px 18px rgba(80, 62, 49, 0.07);
    transition: transform 0.3s var(--ease-soft), background 0.3s ease, box-shadow 0.3s ease;
}

.product-story-links a::before {
    content: "IG";
    margin-right: 8px;
    color: var(--accent-rose);
    font-family: var(--base-font);
    font-size: 0.78em;
    font-weight: 700;
    letter-spacing: 0;
}

.product-story-links a:hover,
.product-story-links a:focus-visible {
    background: var(--paper);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px) rotate(-1deg);
}

.product-gallery {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
    transform-style: preserve-3d;
}

.gallery-img {
    width: auto;
    max-width: min(260px, 28vw);
    max-height: 260px;
    object-fit: contain;
    border-radius: 12px;
    border: 1px solid rgba(118, 89, 70, 0.12);
    background: rgba(255, 249, 238, 0.92);
    box-shadow:
        0 14px 26px rgba(80, 62, 49, 0.06),
        0 0 0 4px rgba(244, 232, 211, 0.28);
    filter: saturate(0.92) contrast(0.98);
    transform: translateY(0) rotate(var(--tilt, 0deg));
    transition: transform 0.45s var(--ease-soft), box-shadow 0.45s ease, filter 0.45s ease;
}

.gallery-img:nth-child(1) {
    --tilt: -2.2deg;
}

.gallery-img:nth-child(2) {
    --tilt: 1deg;
    transform: translateY(-12px) rotate(var(--tilt));
}

.gallery-img:nth-child(3) {
    --tilt: 2.2deg;
}

.product-gallery:hover .gallery-img {
    filter: saturate(1) contrast(1);
}

.product-gallery:hover .gallery-img:nth-child(1) {
    transform: translateX(6px) translateY(-6px) rotate(-3deg);
}

.product-gallery:hover .gallery-img:nth-child(2) {
    transform: translateY(-20px) scale(1.025) rotate(0deg);
}

.product-gallery:hover .gallery-img:nth-child(3) {
    transform: translateX(-6px) translateY(-6px) rotate(3deg);
}

.product-img {
    width: min(700px, 100%);
    max-height: 500px;
    object-fit: contain;
    border-radius: 12px;
    border: 1px solid var(--border);
    margin-bottom: 16px;
    background: var(--neutral-light);
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(255, 249, 238, 0.92);
    color: var(--neutral);
    border: 1.5px dashed rgba(118, 89, 70, 0.3);
    border-radius: 48% 52% 44% 56%;
    font-size: 1.2rem;
    font-family: var(--hand-font);
    cursor: pointer;
    transition: all 0.3s var(--ease-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(80, 62, 49, 0.075);
}

.carousel-btn:hover {
    background: var(--paper);
    box-shadow: var(--shadow-md);
    transform: translateY(-50%) scale(1.05);
}

.carousel-btn.prev {
    left: 16px;
}

.carousel-btn.next {
    right: 16px;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 9px;
    min-height: 10px;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border: 0;
    border-radius: 48% 52% 46% 54%;
    background: rgba(80, 62, 49, 0.2);
    cursor: pointer;
    padding: 0;
    transition: width 0.3s var(--ease-soft), background 0.3s ease, transform 0.3s ease;
}

.carousel-dot.is-active {
    width: 26px;
    background: var(--accent-ink);
    transform: rotate(-3deg);
}

p,
a,
span,
button,
.store-status,
.store-name,
.icon-link span {
    font-family: var(--base-font);
}

/* 店舖卡片網格 */
.stores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.store-card {
    padding: 24px;
    border: 1px solid rgba(118, 89, 70, 0.16);
    border-radius: 18px 22px 18px 22px;
    clip-path: polygon(0 3%, 10% 0, 22% 1.6%, 34% 0.7%, 46% 1.2%, 58% 0.4%, 70% 1.3%, 82% 0.6%, 100% 0.7%, 99% 16%, 100% 34%, 98.6% 52%, 100% 69%, 99% 86%, 100% 100%, 87% 99%, 72% 100%, 56% 98%, 42% 100%, 26% 98.7%, 12% 100%, 2% 99%);
    background:
        linear-gradient(135deg, rgba(235, 214, 183, 0.94), rgba(214, 183, 154, 0.94)),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 10px),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 10px),
        repeating-linear-gradient(45deg, rgba(118, 89, 70, 0.05) 0 2px, transparent 2px 9px);
    transition: transform 0.3s var(--ease-soft), box-shadow 0.3s ease, opacity 0.3s ease, border-color 0.3s ease;
    opacity: 0.72;
    position: relative;
    overflow: hidden;
}

.store-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 6px),
        linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 6px),
        radial-gradient(circle at 20% 20%, rgba(255,255,255,0.08), transparent 20%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.05), transparent 40%);
    opacity: 0.55;
    pointer-events: none;
}

.store-card.active {
    opacity: 1;
    box-shadow:
        var(--shadow-md),
        0 0 0 6px rgba(255, 248, 236, 0.22);
}

.store-card.active::before {
    opacity: 1;
}

.store-card:hover.active {
    box-shadow:
        var(--shadow-lg),
        0 0 0 8px rgba(255, 248, 236, 0.28);
    transform: translateY(-6px) rotate(var(--tilt-card, 0deg));
    border-color: rgba(111, 138, 120, 0.25);
}

.store-card h3 {
    margin: 0 0 8px;
    color: var(--neutral);
    font-family: var(--store-title-font);
    font-size: 1.08rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.store-name {
    font-size: 0.95rem;
    color: var(--primary);
    margin: 0 0 8px;
    font-weight: 500;
    font-family: var(--store-body-font);
}

.store-status {
    font-size: 0.85rem;
    margin: 8px 0 16px;
    padding: 4px 8px;
    background:
        repeating-linear-gradient(90deg, rgba(118, 89, 70, 0.045) 0 1px, transparent 1px 6px),
        rgba(156, 102, 71, 0.08);
    color: var(--primary-dark);
    border-radius: 4px;
    display: inline-block;
    font-family: var(--store-body-font);
}

.store-status.coming {
    background:
        repeating-linear-gradient(90deg, rgba(118, 89, 70, 0.035) 0 1px, transparent 1px 6px),
        rgba(232, 223, 213, 0.72);
    color: var(--neutral-muted);
}

.store-link {
    display: inline-block;
    padding: 8px 16px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 9px 12px 8px 13px;
    font-size: 0.9rem;
    font-family: var(--store-button-font);
    transition: all 0.3s var(--ease-soft);
    border: none;
    box-shadow: 0 4px 0 rgba(80, 62, 49, 0.08);
    cursor: pointer;
}

.store-link:hover {
    background: var(--primary-dark);
    box-shadow: var(--shadow-md);
    transform: rotate(-1deg);
}

.store-link.disabled {
    background: var(--neutral-light);
    color: var(--neutral-muted);
    cursor: not-allowed;
    opacity: 0.6;
}

.store-link.disabled:hover {
    background: var(--neutral-light);
    box-shadow: none;
}

/* 底部固定圖標 */
.footer-icons {
    position: fixed;
    bottom: 0;
    width: 100%;
    background:
        repeating-linear-gradient(0deg, rgba(118, 89, 70, 0.025) 0 1px, transparent 1px 9px),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.12) 0 1px, transparent 1px 10px),
        linear-gradient(180deg, rgba(255, 249, 238, 0.94), rgba(246, 236, 220, 0.92));
    backdrop-filter: blur(8px) saturate(0.9);
    -webkit-backdrop-filter: blur(8px) saturate(0.9);
    border-top: 1.5px dashed rgba(118, 89, 70, 0.14);
    padding: 12px 0;
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    z-index: 100;
    box-shadow: 0 -8px 24px rgba(80, 62, 49, 0.045);
}

.icon-link {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: var(--neutral-muted);
    transition: transform 0.3s var(--ease-soft), color 0.3s ease, background 0.3s ease;
    padding: 8px;
    border-radius: 10px 13px 9px 12px;
}

.icon-link:hover {
    color: var(--primary);
    background: rgba(196, 161, 122, 0.08);
    transform: translateY(-5px) rotate(-2deg);
}

.icon-link lottie-player {
    width: 32px;
    height: 32px;
}

.icon-link span {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    font-family: var(--footer-font);
}

/* 行動版本 */
@media (max-width: 768px) {
    .section {
        padding: 40px 16px 80px;
    }

    .section-rail,
    .cursor-glow {
        display: none;
    }

    .ambient-lottie {
        opacity: 0.14;
    }

    .ambient-lottie-story,
    .ambient-lottie-stores {
        right: -28px;
        opacity: 0.1;
        transform: scale(0.78);
        transform-origin: right center;
    }

    .scroll-content {
        width: 100%;
        padding: 32px 20px;
        border-radius: 16px;
    }

    .hero-header {
        flex-direction: column;
        gap: 12px;
    }

    .hero-logo img {
        width: 80px;
    }

    .story-sections {
        grid-template-columns: 1fr;
    }

    .gallery-img {
        width: min(210px, 44vw);
    }

    .stores-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }

    .carousel-btn {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .carousel-btn.prev {
        left: 8px;
    }

    .carousel-btn.next {
        right: 8px;
    }

    .footer-icons {
        gap: 8px;
        padding: 8px 0;
    }

    .icon-link lottie-player {
        width: 28px;
        height: 28px;
    }

    .icon-link span {
        font-size: 0.7rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

/* 列印樣式 */
@media print {
    .footer-icons,
    .carousel-btn {
        display: none;
    }
}

@keyframes ambientDrift {
    from {
        transform: translate3d(0, 0, 0) scale(1);
    }
    to {
        transform: translate3d(0, -18px, 0) scale(1.04);
    }
}

@keyframes slowFloat {
    from {
        transform: translate3d(0, 0, 0) rotate(0deg);
    }
    to {
        transform: translate3d(22px, -18px, 0) rotate(8deg);
    }
}

@keyframes lottieFloat {
    from {
        transform: translate3d(0, 0, 0) rotate(-2deg);
    }
    to {
        transform: translate3d(10px, -18px, 0) rotate(3deg);
    }
}

@keyframes logoBreathe {
    0%,
    100% {
        transform: translateY(0) rotate(-1deg);
    }
    50% {
        transform: translateY(-5px) rotate(1deg);
    }
}
