/* ================================
   Shantou Coffee Map
   Fully inspired by zaraintokyo.com
   ================================ */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --cream: #F7F3ED;
    --warm-white: #FEFCF9;
    --sand: #E8E0D4;
    --stone: #C4B9A8;
    --ink: #1A1612;
    --ink-light: #3D362E;
    --ink-faded: #6B6158;
    --japan-blue: #2B5F8A;
    --japan-blue-soft: #4A7FA8;
    --japan-blue-light: #E8EFF6;
    --indigo: #2B3A52;
    --matcha: #6B7F5A;
    --matcha-light: #E8EDE3;
    --gold: #B8963E;
    --gold-light: #F5EDD8;
    --font-display: 'Cormorant Garamond', 'Noto Serif SC', 'Georgia', serif;
    --font-body: 'DM Sans', 'Noto Sans SC', 'Hiragino Sans', sans-serif;
    --radius: 2px;
    --shadow-sm: 0 1px 3px rgba(26,22,18,0.06);
    --shadow-md: 0 4px 16px rgba(26,22,18,0.08);
    --shadow-lg: 0 8px 32px rgba(26,22,18,0.12);
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    background: var(--cream);
    color: var(--ink);
    line-height: 1.6;
    font-weight: 300;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ══════════════════════════════
   Hero — Offset Overlap Layout
   ══════════════════════════════ */
.hero {
    height: 100vh;
    max-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 4rem;
    padding-top: calc(2rem + env(safe-area-inset-top, 0px));
    position: relative;
    overflow: hidden;
    background: var(--warm-white);
}

/* Atmospheric background */
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 20% 50%, rgba(43,95,138,0.05) 0%, transparent 50%),
                radial-gradient(ellipse at 75% 30%, rgba(74,127,168,0.04) 0%, transparent 45%),
                radial-gradient(ellipse at 50% 85%, rgba(107,127,90,0.03) 0%, transparent 50%);
    animation: bgDrift 24s ease-in-out infinite;
}

/* (diagonal line removed) */

@keyframes bgDrift {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(2%, -1%) rotate(0.3deg); }
    66% { transform: translate(-1%, 1%) rotate(-0.2deg); }
}

.hero-inner {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: clamp(1rem, 2vw, 2rem);
    max-width: 920px;
    width: 100%;
}

/* ── Text side ── */
.hero-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 3;
}

/* Shantou label — letter-spacing contracts on entry */
.hero-kanji {
    font-family: var(--font-display);
    font-size: clamp(0.85rem, 1.5vw, 1.15rem);
    color: var(--japan-blue);
    font-weight: 400;
    margin-bottom: 1rem;
    opacity: 0;
    letter-spacing: 1.2em;
    animation: labelReveal 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.1s forwards;
}

@keyframes labelReveal {
    0% {
        opacity: 0;
        letter-spacing: 1.2em;
        transform: translateY(8px);
    }
    60% { opacity: 1; }
    100% {
        opacity: 1;
        letter-spacing: 0.5em;
        transform: translateY(0);
    }
}

/* Title — staggered word reveal */
.hero-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 7vw, 6.5rem);
    font-weight: 300;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin-bottom: 1.2rem;
    word-spacing: 0.06em;
}

.hero-title .word-wrap {
    display: inline-block;
    overflow-x: visible;
    overflow-y: clip;
    vertical-align: bottom;
    padding-bottom: 0.08em;
}

.hero-title .word {
    display: inline-block;
    opacity: 0;
    transform: translateY(105%);
    animation: wordSlideUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-title .word-wrap:nth-child(1) .word { animation-delay: 0.3s; }
.hero-title .word-wrap:nth-child(2) .word { animation-delay: 0.45s; }
.hero-title .word-wrap:nth-child(3) .word { animation-delay: 0.6s; }

@keyframes wordSlideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title em {
    font-style: italic;
    color: var(--japan-blue);
}

.hero-subtitle {
    font-size: clamp(0.85rem, 1.3vw, 1.05rem);
    color: var(--ink-faded);
    max-width: 420px;
    margin: 0 0 2rem;
    font-weight: 300;
    letter-spacing: 0.02em;
    opacity: 0;
    animation: fadeSlideUp 0.8s ease-out 1s forwards;
}

@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Illustration — Offset Overlap ── */
.hero-illustration {
    flex-shrink: 0;
    width: clamp(220px, 30vw, 380px);
    position: relative;
    z-index: 2;
    transition: transform 0.4s ease;
}

.hero-illustration img {
    width: 100%;
    height: auto;
    position: relative;
    z-index: 2;
    transform: rotate(2.5deg) translateY(40px);
    opacity: 0;
    animation: imgBounceIn 1s cubic-bezier(0.34, 1.56, 0.64, 1) 0.6s forwards,
               imgFloat 4s ease-in-out 1.8s infinite;
    filter: drop-shadow(0 12px 32px rgba(43,95,138,0.18));
    transition: filter 0.4s ease;
}

.hero-illustration:hover {
    transform: translateY(-3px);
}

.hero-illustration:hover img {
    filter: drop-shadow(0 8px 24px rgba(43,95,138,0.25));
}

@keyframes imgBounceIn {
    0% {
        opacity: 0;
        transform: rotate(5deg) translateY(80px) scale(0.92);
    }
    65% {
        opacity: 1;
        transform: rotate(1.5deg) translateY(-8px) scale(1.02);
    }
    80% {
        transform: rotate(3deg) translateY(3px) scale(0.99);
    }
    100% {
        opacity: 1;
        transform: rotate(2.5deg) translateY(0) scale(1);
    }
}

@keyframes imgFloat {
    0%, 100% { transform: rotate(2.5deg) translateY(0); }
    50% { transform: rotate(2deg) translateY(-10px); }
}

/* Decorative blob behind illustration */
.hero-illustration::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 110%;
    height: 110%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, var(--japan-blue-light) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
    opacity: 0;
    animation: blobPulse 5s ease-in-out 1s infinite, blobFadeIn 1s ease-out 0.8s forwards;
}

@keyframes blobPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
    50% { transform: translate(-50%, -50%) scale(1.08); opacity: 0.9; }
}

@keyframes blobFadeIn {
    to { opacity: 0.7; }
}

.hero-count {
    display: flex;
    gap: 2.5rem;
    justify-content: flex-start;
    opacity: 0;
    animation: fadeSlideUp 0.8s ease-out 1.2s forwards;
}

.hero-count-item {
    text-align: center;
    position: relative;
}

.hero-count-item + .hero-count-item::before {
    content: '';
    position: absolute;
    left: -1.25rem;
    top: 10%;
    height: 80%;
    width: 1px;
    background: var(--sand);
}

.hero-count-number {
    font-family: var(--font-display);
    font-size: 2.8rem;
    font-weight: 400;
    color: var(--ink);
    line-height: 1;
}

.hero-count-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--stone);
    margin-top: 0.3rem;
}

/* (decorative dots removed) */

/* (overlap slash removed) */

/* (corner accent removed) */

.scroll-hint {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    animation: fadeSlideUp 0.8s ease-out 2s forwards;
    z-index: 5;
}

.scroll-hint svg {
    width: 20px;
    height: 20px;
    color: var(--stone);
    animation: bounce 2.5s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(7px); }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ── Toolbar ── */
.toolbar {
    position: relative;
    z-index: 100;
    background: rgba(247,243,237,0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(200,185,168,0.3);
    padding: 0;
    transition: box-shadow 0.3s ease;
}

.toolbar.scrolled {
    box-shadow: 0 2px 20px rgba(26,22,18,0.06);
}

.toolbar-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.toolbar-logo {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 400;
    color: var(--ink);
    white-space: nowrap;
    flex-shrink: 0;
    text-decoration: none;
}

.toolbar-logo em {
    font-style: italic;
    color: var(--japan-blue);
}

.search-box {
    flex: 1;
    min-width: 200px;
    max-width: 400px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 0.6rem 1rem 0.6rem 2.4rem;
    border: 1px solid var(--sand);
    border-radius: 100px;
    background: var(--warm-white);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 300;
    color: var(--ink);
    outline: none;
    transition: all 0.25s ease;
}

.search-box input:hover {
    border-color: var(--stone);
}

.search-box input:focus {
    border-color: var(--japan-blue-soft);
    box-shadow: 0 0 0 3px rgba(43,95,138,0.08);
}

.search-box input::placeholder {
    color: var(--stone);
}

.search-box svg {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    color: var(--stone);
}

.result-count {
    font-size: 0.75rem;
    color: var(--stone);
    white-space: nowrap;
    flex-shrink: 0;
}

/* ── Categories ── */
.categories-bar {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem 0.8rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.categories-bar::-webkit-scrollbar {
    display: none;
}

.categories-list {
    display: flex;
    gap: 0.4rem;
    list-style: none;
    white-space: nowrap;
}

.cat-btn {
    padding: 0.4rem 1rem;
    border: 1px solid transparent;
    border-radius: 100px;
    background: transparent;
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--ink-faded);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.cat-btn:hover {
    color: var(--ink);
    background: rgba(200,185,168,0.15);
}

.cat-btn.active {
    background: var(--ink);
    color: var(--warm-white);
    border-color: var(--ink);
}

.cat-btn .cat-count {
    font-size: 0.7rem;
    opacity: 0.6;
    margin-left: 0.3rem;
}

/* Areas Bar - Light Theme */
.areas-bar {
    background: transparent;
    padding: 0;
    border-bottom: 1px solid rgba(200,185,168,0.3);
}

.areas-bar-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.areas-bar-inner::-webkit-scrollbar {
    display: none;
}

.areas-bar .categories-list {
    gap: 0.5rem;
}

.areas-bar .cat-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--ink-faded);
    font-size: 0.85rem;
    padding: 0.5rem 1.2rem;
}

.areas-bar .cat-btn:hover {
    background: rgba(200,185,168,0.15);
    color: var(--ink);
}

.areas-bar .cat-btn.active {
    background: var(--ink);
    color: var(--warm-white);
    border-color: var(--ink);
}

.areas-bar .cat-count {
    color: inherit;
    opacity: 0.6;
}

/* Tags Bar */
.tags-bar {
    padding: 0.6rem 2rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.tags-bar::-webkit-scrollbar {
    display: none;
}

/* ── Featured Strip ── */
.featured-section {
    background: var(--warm-white);
    border-top: 1px solid rgba(200,185,168,0.2);
    border-bottom: 1px solid rgba(200,185,168,0.2);
    padding: 3rem 0;
    padding-right: 80px;
    margin-bottom: 0;
    overflow: visible;
    position: relative;
}

.featured-header {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem 1.5rem;
    display: flex;
    align-items: baseline;
    gap: 1rem;
}

.featured-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--ink);
}

.featured-subtitle {
    font-size: 0.8rem;
    color: var(--stone);
    font-weight: 300;
}

.featured-scroll {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    overflow-y: visible;
    padding: 0 2rem 1rem;
    max-width: 1400px;
    margin: 0 auto;
    scrollbar-width: none;
    cursor: grab;
    -webkit-overflow-scrolling: touch;
}

.featured-scroll.dragging {
    cursor: grabbing;
    scroll-behavior: auto;
}

.featured-scroll.dragging .featured-card {
    pointer-events: none;
}

.featured-scroll::-webkit-scrollbar {
    display: none;
}

.featured-card {
    flex-shrink: 0;
    width: 260px;
    background: var(--cream);
    border: 1px solid rgba(200,185,168,0.3);
    border-radius: 16px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    text-decoration: none;
    color: inherit;
    display: block;
    overflow: visible;
}

.featured-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--stone);
}

.featured-card-cat {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--japan-blue);
    margin-bottom: 0.6rem;
    font-weight: 500;
}

.featured-card-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 500;
    line-height: 1.3;
    margin-bottom: 0.4rem;
}

.featured-card-rating {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
}

.featured-card-details {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.4rem;
}

.featured-card-stars-visual {
    display: flex;
    gap: 1px;
}

.featured-card-stars {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--ink);
    line-height: 1;
}

.featured-card-address {
    font-size: 0.65rem;
    color: var(--stone);
    font-weight: 300;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.3rem;
}

.featured-card-note {
    font-size: 0.75rem;
    color: var(--ink-faded);
    font-style: italic;
}

.featured-card-arrow {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    width: 20px;
    height: 20px;
    color: var(--stone);
    opacity: 0;
    transform: translate(-4px, 0);
    transition: all 0.3s ease;
}

.featured-card:hover .featured-card-arrow {
    opacity: 1;
    transform: translate(0, 0);
}

/* ── Coffee Pour Progress Indicator ── */
.pour-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
}

.pour-cup {
    width: 48px;
    height: 60px;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pour-indicator:hover .pour-cup {
    transform: rotate(-5deg) scale(1.08);
}

/* Liquid fill animation */
.pour-liquid {
    transition: y 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Wobbly surface line follows the liquid level */
.pour-surface {
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    animation: pourWobble 3s ease-in-out infinite;
}

@keyframes pourWobble {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-1.5px); }
    75% { transform: translateX(1.5px); }
}

/* Steam wiggle - only visible when cup is filling up */
.pour-steam path {
    animation: steamRise 2.5s ease-in-out infinite;
}

.pour-steam path:nth-child(1) { animation-delay: 0s; }
.pour-steam path:nth-child(2) { animation-delay: 0.4s; }
.pour-steam path:nth-child(3) { animation-delay: 0.8s; }

@keyframes steamRise {
    0% { opacity: 0; transform: translateY(0) scaleX(1); }
    30% { opacity: 0.35; }
    60% { opacity: 0.2; transform: translateY(-4px) scaleX(1.2); }
    100% { opacity: 0; transform: translateY(-8px) scaleX(0.8); }
}

.pour-label {
    font-family: var(--font-display);
    font-size: 0.7rem;
    color: var(--stone);
    font-weight: 400;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

/* ── Featured scroll enhancements ── */
/* Card focus effect — center card pops */
.featured-card {
    transition: all 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
    will-change: transform, opacity;
}

.featured-card.in-focus {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 8px 28px rgba(26,22,18,0.12);
    border-color: var(--stone);
}

.featured-card.out-focus {
    opacity: 0.55;
    transform: scale(0.97);
    filter: saturate(0.7);
}

/* ── Thought Bubble Portal ── */
.thought-bubble-portal {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
}

.thought-bubble-portal.visible {
    opacity: 1;
    visibility: visible;
}

/* Hiding animation class - overrides .visible */
.thought-bubble-portal.visible.hiding {
    opacity: 1;
    visibility: visible;
}

/* Small thought dots - hand-drawn dashed style */
.thought-dot {
    position: absolute;
    background: var(--warm-white);
    border: 1.5px dashed var(--stone);
    border-radius: 50%;
    opacity: 0;
    transform: scale(0);
}

.thought-dot-1 {
    width: 6px;
    height: 6px;
    bottom: 0;
    right: 12px;
}

.thought-dot-2 {
    width: 9px;
    height: 9px;
    bottom: 10px;
    right: 22px;
}

.thought-dot-3 {
    width: 12px;
    height: 12px;
    bottom: 22px;
    right: 34px;
}

/* Appear animation for dots */
.thought-bubble-portal.visible .thought-dot-1 {
    animation: dotPopIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) 0.05s forwards;
}

.thought-bubble-portal.visible .thought-dot-2 {
    animation: dotPopIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s forwards;
}

.thought-bubble-portal.visible .thought-dot-3 {
    animation: dotPopIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) 0.25s forwards;
}

@keyframes dotPopIn {
    0% { opacity: 0; transform: scale(0); }
    60% { opacity: 1; transform: scale(1.3); }
    100% { opacity: 1; transform: scale(1); }
}

/* Disappear "poof" animation for dots - higher specificity to override .visible */
.thought-bubble-portal.visible.hiding .thought-dot-3 {
    animation: dotPoof 0.2s ease-in 0s forwards;
}

.thought-bubble-portal.visible.hiding .thought-dot-2 {
    animation: dotPoof 0.2s ease-in 0.05s forwards;
}

.thought-bubble-portal.visible.hiding .thought-dot-1 {
    animation: dotPoof 0.2s ease-in 0.1s forwards;
}

@keyframes dotPoof {
    0% { opacity: 1; transform: scale(1); }
    40% { opacity: 1; transform: scale(1.5); }
    100% { opacity: 0; transform: scale(0); }
}

/* Main thought cloud - hand-drawn comic style */
.thought-cloud {
    position: absolute;
    bottom: 36px;
    right: 40px;
    width: 250px;
    background: var(--warm-white);
    border: 2px dashed var(--stone);
    border-radius: 24px;
    padding: 1.1rem 1.2rem;
    box-shadow: 0 6px 24px rgba(26,22,18,0.08), 0 2px 8px rgba(26,22,18,0.04);
    opacity: 0;
    transform: scale(0) rotate(-3deg);
    transform-origin: bottom right;
}

/* Comic-style slight skew for hand-drawn feel */
.thought-cloud::before {
    content: '';
    position: absolute;
    inset: 3px;
    border: 1px dashed rgba(196,185,168,0.3);
    border-radius: 21px;
    pointer-events: none;
}

/* Appear: bounce in */
.thought-bubble-portal.visible .thought-cloud {
    animation: cloudBounceIn 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s forwards;
}

@keyframes cloudBounceIn {
    0% { opacity: 0; transform: scale(0) rotate(-3deg); }
    50% { opacity: 1; transform: scale(1.05) rotate(0.5deg); }
    75% { opacity: 1; transform: scale(0.97) rotate(-0.3deg); }
    100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

/* Disappear: "poof" shrink - higher specificity */
.thought-bubble-portal.visible.hiding .thought-cloud {
    animation: cloudPoof 0.3s ease-in forwards;
}

@keyframes cloudPoof {
    0% { opacity: 1; transform: scale(1) rotate(0deg); }
    30% { opacity: 1; transform: scale(1.08) rotate(1deg); }
    100% { opacity: 0; transform: scale(0) rotate(-5deg); }
}

.thought-label {
    display: block;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--ink-faded);
    font-weight: 500;
    margin-bottom: 0.4rem;
}

.thought-text {
    font-size: 0.72rem;
    color: var(--ink-light);
    font-weight: 300;
    line-height: 1.6;
    margin: 0;
    font-style: italic;
}

/* ── Main Grid ── */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2.5rem 2rem 5rem;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--sand);
    position: relative;
    overflow: visible;
}

.section-illustration {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    opacity: 0.9;
    object-fit: contain;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.section-header:hover .section-illustration {
    opacity: 1;
    transform: translateY(-2px);
    filter: drop-shadow(0 6px 16px rgba(43,95,138,0.15));
}

/* ── Illustration scroll-triggered animations ── */
.section-illustration {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.section-illustration.alive {
    opacity: 0.9;
    transform: translateY(0);
}

/* Chair - gentle rocking */
.illust-chair.alive {
    animation: chairRock 2.5s ease-in-out 0.3s infinite;
    transform-origin: bottom center;
}

@keyframes chairRock {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(2deg); }
    75% { transform: rotate(-2deg); }
}

/* Latte - wobble */
.illust-latte.alive {
    animation: latteWobble 3s ease-in-out 0.3s infinite;
}

@keyframes latteWobble {
    0%, 100% { transform: rotate(0deg) translateY(0); }
    50% { transform: rotate(-1.5deg) translateY(-3px); }
}

/* Pour-over - tilt */
.illust-pourover.alive {
    animation: pourTilt 3s ease-in-out 0.3s infinite;
    transform-origin: 70% 90%;
}

@keyframes pourTilt {
    0%, 100% { transform: rotate(0deg); }
    30% { transform: rotate(-12deg); }
    50% { transform: rotate(-12deg); }
    80% { transform: rotate(0deg); }
}

/* Dog - head tilt + bounce */
.illust-dog.alive {
    animation: dogTilt 4s ease-in-out 0.3s infinite;
    transform-origin: bottom center;
}

@keyframes dogTilt {
    0%, 100% { transform: rotate(0deg) scale(1); }
    15% { transform: rotate(5deg) scale(1.02); }
    30% { transform: rotate(0deg) scale(1); }
    45% { transform: rotate(-4deg) scale(1.01); }
    60% { transform: rotate(0deg) scale(1); }
    75% { transform: rotate(0deg) scale(1.05) translateY(-4px); }
    85% { transform: rotate(0deg) scale(0.98) translateY(0); }
}

/* Specialty - float */
.illust-specialty.alive {
    animation: specialtyFloat 3s ease-in-out 0.3s infinite;
}

@keyframes specialtyFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-4px) rotate(1deg); }
    75% { transform: translateY(-2px) rotate(-1deg); }
}

.section-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 300;
    color: var(--ink);
    letter-spacing: -0.01em;
}

.section-count {
    font-size: 0.8rem;
    color: var(--stone);
    font-weight: 300;
    margin-top: 0.2rem;
}

.places-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1px;
    background: rgba(200,185,168,0.2);
    border: 1px solid rgba(200,185,168,0.2);
    margin-bottom: 4rem;
    overflow: hidden;
}

.place-card {
    background: var(--warm-white);
    padding: 1.2rem 1.4rem;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    transition: background 0.3s ease, box-shadow 0.25s ease;
    position: relative;
    cursor: pointer;
    min-height: 90px;
    overflow: visible;
    min-width: 0;
}

.place-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--japan-blue);
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.place-card:hover {
    background: var(--cream);
    z-index: 1;
    box-shadow: var(--shadow-md);
}

/* Card 3D tilt */
.place-card {
    transform-style: preserve-3d;
    will-change: transform;
}

.place-card .card-shine {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255,255,255,0.15) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 3;
}

.place-card:hover .card-shine {
    opacity: 1;
}

.place-card:hover::before {
    transform: scaleY(1);
}

.place-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
}

.place-card-title {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 500;
    line-height: 1.3;
    color: var(--ink);
    transition: color 0.2s;
    flex: 1;
}

.place-card:hover .place-card-title {
    color: var(--japan-blue);
}

.place-card-rating {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.place-card-stars {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--ink);
    line-height: 1;
}

.place-card-stars-visual {
    display: flex;
    gap: 1px;
}

.star-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--sand);
}

.star-dot.filled {
    background: var(--japan-blue);
}

.star-dot.half {
    background: linear-gradient(90deg, var(--japan-blue) 50%, var(--sand) 50%);
}

.place-card-reviews {
    font-size: 0.65rem;
    color: var(--stone);
    line-height: 1;
}

.place-card-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.place-card-type {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--stone);
    font-weight: 500;
}

.place-card-price {
    font-size: 0.65rem;
    color: var(--matcha);
    font-weight: 500;
    letter-spacing: 0.02em;
}

.place-card-pick {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--japan-blue);
    font-weight: 500;
}

.place-card-pick svg {
    width: 10px;
    height: 10px;
}

.place-card-summary {
    font-size: 0.75rem;
    color: var(--ink-faded);
    font-weight: 300;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.place-card-note {
    font-size: 0.72rem;
    color: var(--japan-blue-soft);
    font-style: italic;
    font-weight: 400;
}

.place-card-address {
    font-size: 0.8rem;
    color: var(--stone);
    font-weight: 300;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.place-card .maps-icon {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    width: 14px;
    height: 14px;
    color: var(--stone);
    opacity: 0;
    transition: opacity 0.2s;
}

.place-card:hover .maps-icon {
    opacity: 0.4;
}

/* ── No Results ── */
.no-results {
    text-align: center;
    padding: 5rem 2rem;
    display: none;
}

.no-results.visible {
    display: block;
}

.no-results-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.no-results-text {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--ink-faded);
    font-weight: 300;
}

.no-results-sub {
    font-size: 0.85rem;
    color: var(--stone);
    margin-top: 0.5rem;
}

/* ── Footer ── */
.site-footer {
    text-align: center;
    padding: 3rem 2rem;
    padding-bottom: calc(3rem + env(safe-area-inset-bottom, 0px));
    background: var(--warm-white);
    border-top: 1px solid rgba(200,185,168,0.2);
}

.footer-text {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--stone);
    font-weight: 300;
    font-style: italic;
}

/* ── Animations ── */
.category-section {
    opacity: 0;
    animation: fadeIn 0.5s ease-out forwards;
}

/* ── Scroll reveal ── */
.reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ── Responsive ── */
/* ── Touch-friendly active states ── */
@media (hover: none) {
    .place-card:active {
        background: var(--cream);
        box-shadow: var(--shadow-sm);
    }

    .place-card:active::before {
        transform: scaleY(1);
    }

    .place-card:active .place-card-title {
        color: var(--japan-blue);
    }

    /* Disable 3D tilt and shine on touch */
    .place-card {
        transform-style: flat;
        will-change: auto;
    }

    .place-card .card-shine {
        display: none;
    }

    .featured-card:active {
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
        border-color: var(--stone);
    }
}

@media (max-width: 768px) {
    .toolbar {
        position: sticky;
        top: 0;
    }

    .toolbar-inner {
        padding: 0.8rem calc(1rem + env(safe-area-inset-left, 0px)) 0.8rem calc(1rem + env(safe-area-inset-right, 0px));
        gap: 0.8rem;
    }

    .toolbar-logo {
        display: none;
    }

    .search-box {
        max-width: none;
    }

    .areas-bar {
        position: sticky;
        top: 52px;
        background: var(--cream);
        z-index: 99;
    }

    .categories-bar {
        padding: 0 0.8rem 0.6rem;
    }

    .cat-btn {
        padding: 0.35rem 0.8rem;
        font-size: 0.7rem;
    }

    .hero {
        padding: 2rem 1.5rem;
    }

    .hero-inner {
        flex-direction: column;
        text-align: center;
    }

    .hero-content {
        order: 2;
    }

    .hero-illustration {
        order: 1;
        margin-left: 0;
        margin-bottom: -30px;
        width: 200px;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-count {
        gap: 2rem;
        justify-content: center;
    }

    /* (decorative elements removed) */

    .main-content {
        padding: 2rem 1rem 4rem;
    }

    .section-header {
        flex-direction: column;
        text-align: center;
        gap: 0.8rem;
        padding: 0.8rem 0;
    }

    .section-illustration {
        width: 100px;
        height: 100px;
    }

    .section-title {
        font-size: 2rem;
    }

    .places-grid {
        grid-template-columns: 1fr;
    }

    .place-card {
        padding: 1rem 1.2rem;
        overflow: hidden;
    }

    .place-card-title {
        font-size: 0.95rem;
    }

    .place-card-address {
        font-size: 0.7rem;
    }

    .featured-card {
        width: 220px;
    }

    .featured-scroll {
        padding: 0 1rem 1rem;
    }

    .featured-header {
        padding: 0 1rem 1.5rem;
    }

    .pour-indicator {
        position: relative;
        right: auto;
        top: auto;
        transform: none;
        flex-direction: row;
        gap: 0.6rem;
        margin: 0.5rem auto 0;
        justify-content: center;
    }

    .pour-cup {
        width: 36px;
        height: 45px;
    }

    .featured-section {
        padding-right: 0;
    }

    .thought-bubble-portal {
        display: none;
    }

    .site-footer {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero {
        height: auto;
        min-height: 100vh;
        padding: 1.5rem 1rem;
    }

    .hero-illustration {
        width: 160px;
    }

    .hero-title {
        font-size: clamp(2.2rem, 10vw, 3rem);
    }

    .hero-subtitle {
        font-size: 0.85rem;
    }

    .hero-count {
        gap: 1.5rem;
    }

    .section-illustration {
        width: 80px;
        height: 80px;
    }

    .section-title {
        font-size: 2rem;
    }

    .section-count {
        font-size: 0.7rem;
    }

    .main-content {
        padding: 2rem 0 4rem;
    }

    .places-grid {
        grid-template-columns: 1fr;
    }

    .section-header {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .place-card {
        padding: 0.9rem 1rem;
        min-height: auto;
    }

    .place-card-summary {
        font-size: 0.7rem;
    }

    .featured-card {
        width: 190px;
    }

    .pour-cup {
        width: 30px;
        height: 38px;
    }

    .pour-label {
        font-size: 0.6rem;
    }

    .featured-header h2 {
        font-size: 1.4rem;
    }

    .cat-btn {
        padding: 0.3rem 0.7rem;
        font-size: 0.65rem;
    }
}
