/* motion.css - アニメーション・トランジション・reveal
   「Gentle Motion」: 有機的なイージングで呼吸するようなアニメーション
   分割元: style.css unlayered セクション */

/* =========================================
   Page Content Scroll Animations（reveal 統一）
   Service / About / Contact / Privacy Policy
   全ページ opacity-only。stagger は transition-delay + animation-delay で制御
   ========================================= */

/* --- Service Page Stagger Animation --- */
.service-intro>*,
.service-menu>.service-item,
.workflow>.flow-list>li,
.faq-section>.faq-container>.faq-item,
.service-cta>* {
    opacity: 0;
    transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity;
}

.service-intro>*.is-visible,
.service-menu>.service-item.is-visible,
.workflow>.flow-list>li.is-visible,
.faq-section>.faq-container>.faq-item.is-visible,
.service-cta>*.is-visible {
    opacity: 1;
}

/* --- About Page Stagger Animation --- */
.about-hero>*,
.about-members .member-card,
.about-closing>* {
    opacity: 0;
    transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity;
}

.about-hero>*.is-visible,
.about-members .member-card.is-visible,
.about-closing>*.is-visible {
    opacity: 1;
}

/* --- Contact Page Stagger Animation --- */
.contact-page .page-header>*,
.contact-form-container {
    opacity: 0;
    transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity;
}

.contact-page .page-header>*.is-visible,
.contact-form-container.is-visible {
    opacity: 1;
}

/* --- Privacy Policy Page Stagger Animation --- */
.privacy-content>section,
.privacy-content>hr,
.privacy-page .page-header>* {
    opacity: 0;
    transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity;
}

.privacy-content>section.is-visible,
.privacy-content>hr.is-visible,
.privacy-page .page-header>*.is-visible {
    opacity: 1;
}

/* --- Stagger Delays for All Pages --- */
.service-intro>*:nth-child(1),
.about-hero>*:nth-child(1),
.contact-page .page-header>*:nth-child(1),
.privacy-page .page-header>*:nth-child(1) {
    transition-delay: 0s;
    animation-delay: 0s;
}

.service-intro>*:nth-child(2),
.about-hero>*:nth-child(2),
.contact-page .page-header>*:nth-child(2),
.privacy-page .page-header>*:nth-child(2) {
    transition-delay: 0.08s;
    animation-delay: 0.08s;
}

.service-intro>*:nth-child(3),
.about-hero>*:nth-child(3),
.contact-page .page-header>*:nth-child(3) {
    transition-delay: 0.16s;
    animation-delay: 0.16s;
}

/* Service Items Stagger */
.service-menu>.service-item:nth-of-type(1) {
    transition-delay: 0s;
    animation-delay: 0s;
}

.service-menu>.service-item:nth-of-type(2) {
    transition-delay: 0.1s;
    animation-delay: 0.1s;
}

.service-menu>.service-item:nth-of-type(3) {
    transition-delay: 0.2s;
    animation-delay: 0.2s;
}

.service-menu>.service-item:nth-of-type(4) {
    transition-delay: 0.3s;
    animation-delay: 0.3s;
}

/* Privacy Sections Stagger */
.privacy-content>section:nth-of-type(1) {
    transition-delay: 0s;
    animation-delay: 0s;
}

.privacy-content>section:nth-of-type(2) {
    transition-delay: 0.06s;
    animation-delay: 0.06s;
}

.privacy-content>section:nth-of-type(3) {
    transition-delay: 0.12s;
    animation-delay: 0.12s;
}

.privacy-content>section:nth-of-type(4) {
    transition-delay: 0.18s;
    animation-delay: 0.18s;
}

.privacy-content>section:nth-of-type(5) {
    transition-delay: 0.24s;
    animation-delay: 0.24s;
}

.privacy-content>section:nth-of-type(6) {
    transition-delay: 0.30s;
    animation-delay: 0.30s;
}

.privacy-content>section:nth-of-type(7) {
    transition-delay: 0.36s;
    animation-delay: 0.36s;
}

.privacy-content>section:nth-of-type(8) {
    transition-delay: 0.42s;
    animation-delay: 0.42s;
}

.privacy-content>section:nth-of-type(n+9) {
    transition-delay: 0.48s;
    animation-delay: 0.48s;
}

/* Member Cards Stagger */
.about-members .member-card:nth-of-type(1) {
    transition-delay: 0s;
    animation-delay: 0s;
}

.about-members .member-card:nth-of-type(2) {
    transition-delay: 0.15s;
    animation-delay: 0.15s;
}

/* FAQ Items Stagger */
.faq-section>.faq-container>.faq-item:nth-of-type(1) {
    transition-delay: 0s;
    animation-delay: 0s;
}

.faq-section>.faq-container>.faq-item:nth-of-type(2) {
    transition-delay: 0.08s;
    animation-delay: 0.08s;
}

.faq-section>.faq-container>.faq-item:nth-of-type(3) {
    transition-delay: 0.16s;
    animation-delay: 0.16s;
}

/* No-JS Fallback for All Pages */
.no-js .service-intro>*,
.no-js .service-menu>.service-item,
.no-js .workflow>.flow-list>li,
.no-js .faq-section>.faq-container>.faq-item,
.no-js .service-cta>*,
.no-js .about-hero>*,
.no-js .about-members .member-card,
.no-js .about-closing>*,
.no-js .contact-page .page-header>*,
.no-js .contact-form-container,
.no-js .privacy-content>section,
.no-js .privacy-page .page-header>* {
    opacity: 1;
    transform: none;
}


.post-tags {
    max-width: 800px;
    margin: 0 auto 4rem;
    padding: 1.5rem 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.post-tags .tags-label {
    font-family: var(--font-ui);
    font-weight: 700;
    margin-right: 0.5rem;
    color: #666;
    letter-spacing: 0.04em;
}

.post-tags a {
    display: inline-block;
    background-color: #f5f5f5;
    padding: 0.3rem 0.8rem;
    margin: 0.2rem;
    border-radius: var(--radius-sm);
    font-size: var(--fs-base);
    color: #666;
    transition: all var(--transition-accent);
}

.post-tags a:hover {
    background: var(--hover-accent-bg);
    border-color: var(--color-accent);
    color: var(--color-accent);
}

/* --- Post Navigation (Previous/Next) - Minimal Text Link Style --- */
.post-navigation {
    max-width: 800px;
    margin: 80px auto 0;
    /* Space from the article end */
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    padding-top: 40px;
    border-top: 1px solid #ccc;
    /* Thin separator line */
}

.post-navigation .nav-previous,
.post-navigation .nav-next {
    font-size: 1rem;
    max-width: 45%;
}

.post-navigation .nav-previous {
    text-align: left;
}

.post-navigation .nav-next {
    text-align: right;
    margin-left: auto;
    /* Push to right */
}

/* Link Style - Remove Box, Add Typography */
.post-navigation a {
    /* Reset default button styles */
    background-color: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
    border-radius: 0;

    /* New Typography */
    font-family: var(--font-base);
    /* Shippori Mincho */
    font-size: 1rem;
    color: #333;
    text-decoration: none;
    line-height: 1.6;

    /* Layout */
    display: inline-flex;
    flex-direction: column;
    transition: all var(--transition-base);
}

/* Hover Effect - Text color change only */
.post-navigation a:hover {
    background-color: transparent;
    color: var(--color-accent);
}

/* --- Fix Double Arrows in Navigation --- */

/* 1. Labels - Remove Arrow from Custom Label */
/* Changed "← Previous" to "Previous" to prevent double arrow */
.post-navigation .nav-previous a::before {
    content: "Previous";
    display: block;
    font-family: var(--font-ui);
    font-size: var(--fs-base);
    color: var(--color-text-secondary);
    margin-bottom: 8px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

/* Changed "Next →" to "Next" to prevent double arrow */
.post-navigation .nav-next a::before {
    content: "Next";
    display: block;
    font-family: var(--font-ui);
    font-size: var(--fs-base);
    color: var(--color-text-secondary);
    margin-bottom: 8px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-align: right;
}

/* 2. Hide Theme's Arrow Elements (if wrapped in span) */
.post-navigation .meta-nav,
.post-navigation .nav-short,
.post-navigation .arrow {
    display: none;
}

/* 3. Ensure Title Text uses Mincho font */
.post-navigation .nav-links a {
    font-family: var(--font-base);
}

/* Right align the "Next" link content */
.post-navigation .nav-next a {
    align-items: flex-end;
}

/* Post title styling */
.post-navigation .nav-title {
    font-weight: 500;
}

/* Mobile Styles for Single Post */
@media (max-width: 768px) {
    .post-title {
        font-size: 1.3rem;
    }

    .post-meta {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }

    .post-content {
        max-width: 100%;
    }

    .post-content h2 {
        font-size: 1.2rem;
        margin-top: 60px;
        margin-bottom: 24px;
    }

    .post-content h3 {
        font-size: var(--fs-lg);
        margin-top: 40px;
        margin-bottom: 16px;
    }

    .post-content blockquote {
        padding: 24px;
    }

    .post-tags {
        max-width: 100%;
    }

    .post-navigation {
        max-width: 100%;
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .post-navigation .nav-next {
        text-align: left;
    }

    /* Mobile: Watermark size adjustment for post-summary */
    .post-summary.watermark-dan::before,
    .post-summary.watermark-rin::before {
        width: 11.25rem;
        height: 15rem;
        opacity: 0.06;
    }
}

/* アニメーション低減設定: ヒーローテキスト即時表示 */
@media (prefers-reduced-motion: reduce) {
    .hero-text-animate {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

/* Recipe Detail Page Images */
.header-visual img,
.note-visual img {
    border-radius: var(--radius-card);
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: cover;
}

/* =========================================
   Animation System (Organic & Gentle)
   ========================================= */

/* --- Keyframes --- */
@keyframes float-bg {
    0% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-15px) rotate(2deg);
    }

    100% {
        transform: translateY(0) rotate(0deg);
    }
}

@keyframes wave {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* --- Utilities --- */

/* Stagger Delays（0.08s刻み — 波紋のような微細なリズム）
   transition-delay: モバイル用（transition 制御）
   animation-delay: デスクトップ用（@keyframes reveal 制御）
   unlayered配置: @layer utilities 内の .fade-section.is-visible の
   animation shorthand が暗黙設定する animation-delay: 0s を上書きするため */
.stagger-delay-1 {
    transition-delay: 0.08s;
    animation-delay: 0.08s;
}

.stagger-delay-2 {
    transition-delay: 0.16s;
    animation-delay: 0.16s;
}

.stagger-delay-3 {
    transition-delay: 0.24s;
    animation-delay: 0.24s;
}

.stagger-delay-4 {
    transition-delay: 0.32s;
    animation-delay: 0.32s;
}

.stagger-delay-5 {
    transition-delay: 0.40s;
    animation-delay: 0.40s;
}

.stagger-delay-6 {
    transition-delay: 0.48s;
    animation-delay: 0.48s;
}

/* --- Hover Effects (Interactive) --- */
.hover-float {
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease;
}

.hover-float:hover {
    transform: var(--hover-lift);
    box-shadow: var(--shadow-fill-hover);
}

.hover-zoom {
    overflow: hidden;
    display: block;
}

.hover-zoom img {
    transition: transform 1.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.hover-zoom:hover img {
    transform: var(--hover-scale);
}



/* --- Background Shapes --- */
.bg-shape-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.bg-shape {
    position: absolute;
    background: linear-gradient(45deg, rgba(235, 233, 228, 0.4), rgba(253, 251, 247, 0.1));
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    filter: blur(20px);
    animation: float-bg 15s infinite ease-in-out alternate;
}

.bg-shape-1 {
    top: 10%;
    left: -5%;
    width: 400px;
    height: 400px;
    animation-delay: 0s;
}

.bg-shape-2 {
    bottom: 20%;
    right: -10%;
    width: 500px;
    height: 500px;
    animation-delay: -5s;
    background: linear-gradient(120deg, rgba(197, 160, 89, 0.05), rgba(253, 251, 247, 0.1));
}

/* --- Hero Animation --- */
/* hero-visualは初期opacity:1で描画（LCP改善） */

.hero-text-animate {
    opacity: 0;
    transform: translateY(20px);
    animation: heroFadeIn 1.5s ease-out 0.3s forwards;
}

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

/* --- Global Nav Animation --- */
.site-nav li {
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.site-nav.is-visible li {
    opacity: 1;
    transform: translateY(0);
}

/* Nav Hover Effect (Organic Underline) */
.site-nav a::after {
    transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.site-nav a {
    display: inline-block;
    /* Fix: Always inline-block to prevent layout shift */
}

.site-nav a:hover {
    transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   Layout Refactoring: 2-Column Sidebar (PC) / 1-Column (Mobile)
   -------------------------------------------------------------------------- */

/* Layout Engine */
.ohashiyasume-layout-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--header-safe-zone) 20px 0 20px;
    /* Unified top padding */
}

/* PC: Grid Layout */
@media (min-width: 1024px) {
    .post-type-archive-recipe .ohashiyasume-layout-container {
        display: grid;
        grid-template-columns: 320px 1fr;
        /* Fixed sidebar width */
        gap: 60px;
        padding: var(--header-safe-zone) 40px 60px 40px;
        /* Unified top padding */
        /* Remove top padding to let margin handle spacing */
        align-items: start;
    }

    .filter-sidebar {
        /* Sticky Sidebar - Aligned with Content */
        position: sticky;
        top: 100px;
        /* Header buffer */
        margin-top: 0;
        /* Align with recipe card top */

        /* Remove internal scroll */
        height: auto;
        max-height: none;
        overflow: visible;

        background: #ffffff;
        border-radius: var(--radius-btn);
        padding: 24px;
        box-shadow: none;
        border: none;
    }

    .sidebar-inner {
        padding: 0;
    }

    .sidebar-header.mobile-only,
    .mobile-filter-trigger {
        display: none !important;
    }

    /* Accordion Styles (PC) - フィルターサイドバー + レシピ詳細サイドバー + ディスカバリーゾーン */
    .filter-sidebar .filter-section .section-title,
    .recipe-sidebar .filter-section .section-title,
    .discovery-section .filter-section .section-title {
        cursor: pointer;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .filter-sidebar .filter-section .section-title::after,
    .recipe-sidebar .filter-section .section-title::after,
    .discovery-section .filter-section .section-title::after {
        content: '';
        width: 8px;
        height: 8px;
        border-right: 2px solid #ccc;
        border-bottom: 2px solid #ccc;
        transform: rotate(45deg);
        /* Down arrow */
        transition: transform var(--transition-base);
    }

    .filter-sidebar .filter-section.open .section-title::after,
    .recipe-sidebar .filter-section.open .section-title::after,
    .discovery-section .filter-section.open .section-title::after {
        transform: rotate(-135deg);
        /* Up arrow */
    }

    .filter-sidebar .filter-section .chips-container,
    .recipe-sidebar .filter-section .chips-container,
    .discovery-section .filter-section .chips-container {
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        padding-top: 0;
        /* Removing padding to smooth collapse */
    }

    .filter-sidebar .filter-section.open .chips-container,
    .recipe-sidebar .filter-section.open .chips-container,
    .discovery-section .filter-section.open .chips-container {
        max-height: 1000px;
        /* Arbitrary large height */
        opacity: 1;
        padding-top: 1rem;
    }

    /* Adjust Main Content Title spacing */
    .recipe-content-area .section-title {
        /* Removed as title moved out */
        margin: 0;
    }

    .recipe-content-area {
        margin-top: 0;
    }

    /* Page Title spanning full width */
    .page-header-title {
        grid-column: 1 / -1;
        text-align: center;
        margin-top: 0;
        /* Spacing from container padding */
        margin-bottom: 60px;
    }

    /* PCでは常にサイドバー表示 */
    .sidebar-inner {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
    }
}

/* Mobile: Drawer Layout */
@media (max-width: 1023px) {
    .ohashiyasume-layout-container {
        display: block;
        padding: var(--header-safe-zone) 20px 20px 20px;
        /* Unified top padding */
    }

    /* Sidebar is hidden by default (Drawer) */
    .filter-sidebar {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: #fff;
        z-index: 1000;
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
        transform: translateY(100%);
        transition: transform 0.6s cubic-bezier(0.83, 0, 0.17, 1), visibility 0.6s;
        max-height: 85vh;
        overflow-y: auto;
        padding: 0;
    }

    .filter-sidebar.is-open {
        transform: translateY(0);
    }

    .sidebar-inner {
        padding: 2rem;
        padding-bottom: env(safe-area-inset-bottom, 2rem);
    }

    /* Close Button Header */
    .sidebar-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 2rem;
        font-weight: bold;
        color: var(--text-charcoal);
        letter-spacing: 0.1em;
    }

    /* Force Cross State for Drawer Close Button - Matching Global Nav */
    .drawer-close-toggle {
        /* Inherit .menu-toggle styles (white circle with shadow) */
        opacity: 0;
        animation: fadeIn 0.8s ease forwards;
        animation-delay: 0.2s;
    }

    .drawer-close-toggle .chopstick-rest {
        width: 12px;
        height: 2px;
        top: 22px;
        transform: translate(-50%, -50%) rotate(-45deg);
        opacity: 1;
    }

    .drawer-close-toggle .chopstick.bar-top {
        top: 20px;
        transform: translateX(-50%) rotate(45deg);
    }

    .drawer-close-toggle .chopstick.bar-bottom {
        top: 24px;
        transform: translateX(-50%) rotate(45deg);
    }

    .sidebar-header {
        display: flex;
        justify-content: flex-end;
        /* Align close button to right */
        align-items: center;
        margin-bottom: 2rem;
        /* Match padding-top (2rem) for symmetry */
        font-weight: bold;
        color: var(--text-charcoal);
        letter-spacing: 0.1em;
    }

    .drawer-close {
        background: none;
        border: none;
        padding: 8px;
        cursor: pointer;
        color: #999;
    }

    /* Overlay styles need to be handled by JS adding class to body, or we create a pseudo element */
    body.drawer-open::after {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.4);
        z-index: 950;
        animation: fadeIn 0.3s ease;
    }
}

/* Trigger Button (Mobile) */
.mobile-filter-trigger {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) scale(1);
    z-index: 500;
    /* Below navigation overlay (9999) */
    display: flex;
    /* Flex to center icon/text */
    align-items: center;
    gap: 10px;
    background-color: var(--btn-kinako);
    color: var(--text-charcoal);
    border: none;
    border-radius: var(--radius-pill);
    padding: 14px 32px;
    font-family: var(--font-ui);
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.08em;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all var(--transition-base);
}

@media (min-width: 1024px) {
    .mobile-filter-trigger {
        display: none;
        /* Hide on PC */
    }
}

/* Animations */
@keyframes jelly {
    0% {
        transform: translateX(-50%) scale(1, 1);
    }

    30% {
        transform: translateX(-50%) scale(1.25, 0.75);
    }

    40% {
        transform: translateX(-50%) scale(0.75, 1.25);
    }

    50% {
        transform: translateX(-50%) scale(1.15, 0.85);
    }

    65% {
        transform: translateX(-50%) scale(0.95, 1.05);
    }

    75% {
        transform: translateX(-50%) scale(1.05, 0.95);
    }

    100% {
        transform: translateX(-50%) scale(1, 1);
    }
}

.mobile-filter-trigger.jelly-active {
    animation: jelly 0.5s ease;
}

/* --------------------------------------------------------------------------
   Breathing Grid: Archive Recipe 全幅レイアウト
   NOTE: 仕様書では @layer layout 指定だが、このプロジェクトでは
   @layer layout ブロックが存在せず、レイアウト系は全て unlayered で定義
   （Safari @layer inter-layer cascade bug 回避のプロジェクト方針）
   -------------------------------------------------------------------------- */

.archive-recipe-container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: var(--header-safe-zone) 1.5rem 12rem;
}

.archive-recipe-header {
    text-align: center;
    padding: 4rem 0 2rem;
}
.archive-recipe-label {
    font-family: var(--font-ui);
    font-size: var(--fs-sm);
    font-weight: var(--fw-bold);
    letter-spacing: 0.15em;
    color: var(--color-text-muted);
    text-transform: lowercase;
}
.archive-recipe-title {
    font-family: var(--font-base);
    font-size: 1.6rem;
    font-weight: var(--fw-reg);
    letter-spacing: 0.1em;
    color: var(--text-color);
    margin-top: 0.5rem;
}
.archive-recipe-ornament {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1.5rem;
    color: var(--color-accent);
}
.ornament-brush {
    display: block;
}
.archive-recipe-actions {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}
.filter-trigger-btn {
    background: none;
    border: 1px solid var(--color-sub);
    border-radius: var(--radius-pill);
    padding: 0.5rem 1.25rem;
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
    min-height: 44px;
}
.filter-trigger-btn:hover {
    background: var(--hover-accent-bg);
    border-color: var(--color-accent);
    color: var(--color-accent);
}
/* お気に入りボタン（ページ冒頭） */
.archive-recipe-actions .favorite-filter-chip {
    background: none;
    border: 1px solid var(--color-sub);
    border-radius: var(--radius-pill);
    padding: 0.5rem 1.25rem;
    font-family: var(--font-ui);
    font-size: var(--fs-sm);
    font-weight: var(--fw-bold);
    letter-spacing: 0.04em;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all var(--transition-accent);
}
.archive-recipe-actions .favorite-filter-chip:hover,
.archive-recipe-actions .favorite-filter-chip.active {
    background: var(--hover-accent-bg);
    border-color: var(--color-accent);
    color: var(--color-accent);
}
.favorite-filter-chip:hover {
    background: var(--hover-accent-bg);
    border-color: var(--color-accent);
    color: var(--color-accent);
}

/* モバイルモーダルチューニング */
@media (max-width: 767px) {
    .filter-modal-overlay {
        align-items: flex-end;
    }
    .filter-modal {
        width: 100%;
        max-width: none;
        border-radius: var(--radius-card) var(--radius-card) 0 0;
        transform: translateY(100%);
    }
    .filter-modal-overlay.is-open .filter-modal {
        transform: translateY(0);
    }
    .filter-modal-dragbar {
        display: block;
        width: 32px;
        height: 3px;
        background: var(--color-sub);
        border-radius: 2px;
        margin: 0.75rem auto 0;
    }
}

/* Breathing Grid — Beat パターン */
.beat {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 0;
}
.beat--hero {
    grid-template-columns: 3fr 2fr;
}
.beat--triple {
    grid-template-columns: 1fr 1fr 1fr;
}
.beat--asymmetric {
    grid-template-columns: 2fr 3fr;
}
.beat--duo {
    grid-template-columns: 1fr 1fr;
}
.beat--single {
    grid-template-columns: 1fr;
    max-width: 600px;
    margin: 0 auto;
}
/* お気に入りビュー: 部分欠損時の均一グリッドフォールバック */
.beat--fallback {
    grid-template-columns: 1fr;
}

/* Beat 内カードのアスペクト比制御 */
.beat--hero .recipe-card-wrapper:first-child .card-img img { aspect-ratio: 16 / 9; }
.beat--hero .recipe-card-wrapper:last-child .card-img img { aspect-ratio: 4 / 5; }

/* Hero beat: サブカードを少し小さくしてリズム差を維持 */
@media (max-width: 767px) {
    .beat--hero .recipe-card-wrapper:last-child {
        max-width: 75%;
    }
}

.beat--triple .card-img img { aspect-ratio: 1 / 1; }
.beat--asymmetric .recipe-card-wrapper:first-child .card-img img { aspect-ratio: 4 / 5; }
.beat--asymmetric .recipe-card-wrapper:last-child .card-img img { aspect-ratio: 16 / 9; }
.beat--duo .card-img img { aspect-ratio: 3 / 4; }

/* 均一グリッド（フィルター適用時 / 2ページ目以降） */
.recipe-grid--uniform {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

/* Breath — 息継ぎ */
.breath {
    text-align: center;
    padding: 2rem 0;
}
.breath--dot {
    font-family: var(--font-base);
    color: var(--color-accent);
    letter-spacing: 0.3em;
    font-size: var(--fs-md);
    opacity: 0.6;
}
.breath--section {
    padding: 2.5rem 0;
}
.breath-taxonomy {
    display: block;
    font-family: var(--font-ui);
    font-size: var(--fs-xs);
    font-weight: var(--fw-bold);
    letter-spacing: 0.15em;
    color: var(--color-text-muted);
    text-transform: lowercase;
}
.breath-term {
    display: block;
    font-family: var(--font-base);
    font-size: var(--fs-lg);
    color: var(--text-color);
    letter-spacing: 0.1em;
    margin-top: 0.3rem;
}
.breath-line {
    display: block;
    width: 24px;
    height: 1px;
    background: var(--color-accent);
    margin: 0.75rem auto 0;
}

/* ヒーローカード強化（unlayered: .recipe-card の display:block を上書きするため） */
.recipe-card--hero {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 1.5rem;
}
.hero-card-img {
    position: relative;
}
.hero-card-img img {
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: var(--radius-card);
    width: 100%;
    height: 100%;
}
/* カード内ラベル共通 */
.hero-label,
.blog-cat-label {
    position: absolute;
    font-family: var(--font-ui);
    font-weight: var(--fw-bold);
    font-size: var(--fs-2xs);
    letter-spacing: 0.08em;
    text-transform: lowercase;
    padding: 0.25rem 0.8rem;
    border-radius: var(--radius-pill);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.hero-label {
    top: 0.75rem;
    left: 0.75rem;
    background: rgba(250, 250, 248, 0.9);
    color: var(--color-accent);
    z-index: 1;
}
.hero-card-text {
    align-self: end;
    padding-bottom: 0.5rem;
}
.hero-card-text h3 {
    font-family: var(--font-base);
    font-size: var(--fs-lg);
    font-weight: 500;
    letter-spacing: 0.08em;
    color: var(--text-color);
    line-height: 1.6;
    margin: 0;
}
.hero-summary {
    font-family: var(--font-base);
    font-size: var(--fs-sm);
    font-weight: var(--fw-reg);
    color: var(--color-text-muted);
    line-height: 1.8;
    letter-spacing: 0.04em;
    margin-top: 0.6rem;
}

/* Beat レスポンシブ */
@media (max-width: 767px) {
    .beat--hero,
    .beat--triple,
    .beat--asymmetric,
    .beat--duo {
        grid-template-columns: 1fr;
    }
    .recipe-card--hero {
        grid-template-columns: 1fr;
    }
}
@media (min-width: 768px) and (max-width: 1023px) {
    .beat--triple {
        grid-template-columns: 1fr 1fr;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Adjustments for Sidebar Content in this new layout */
.filter-sidebar .recipe-search-form {
    background: transparent;
    padding: 0;
    margin-bottom: 0;
}

.filter-sidebar .search-grid {
    display: block;
    /* Stack vertically in sidebar */
    margin-bottom: 2rem;
}

.filter-sidebar .search-accordion {
    margin-bottom: 1rem;
}

.filter-sidebar .search-actions {
    flex-direction: column;
}

.filter-sidebar .search-submit,
.filter-sidebar .search-reset {
    width: 100%;
}

/* --------------------------------------------------------------------------
   Chip Design for Sidebar
   -------------------------------------------------------------------------- */

.filter-section {
    margin-bottom: 2rem;
}

.filter-section .section-title {
    font-size: 1rem;
    font-weight: bold;
    margin-top: 0;
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
    color: var(--text-charcoal);
    text-align: left;
}

/* Chip Container */
.chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem; /* 誤タップ防止のため拡大 */
}

/* Chip Design (OHASHIYASUME Style) */
.chip {
    display: inline-flex; /* タッチターゲット中央揃え */
    align-items: center; /* 垂直中央揃え */
    padding: 10px 20px; /* タップしやすいサイズに拡大 */
    border: 1px solid var(--color-sub);
    /* Thin border */
    border-radius: var(--radius-chip);
    /* Rounded */
    background-color: transparent;
    color: var(--text-color);
    text-decoration: none;
    /* No underline */
    font-size: var(--fs-base); /* 視認性向上 */
    min-height: 44px; /* Apple HIG準拠のタッチターゲット */
    transition: background-color 0.05s ease, color 0.05s ease, border-color 0.05s ease;
    /* transform は JS の Jelly Animation に任せる（CSS transition 無効化） */
    list-style: none;
    white-space: nowrap;
    cursor: pointer; /* button要素でも明示 */
}

/* Hover & Active */
.chip:hover,
.chip.active,
.current-cat {
    /* WP current val support */
    background: var(--hover-accent-bg);
    border-color: var(--color-accent);
    color: var(--color-accent);
    transform: scale(1.05);
    /* Swell on select */
}

/* Reset Button as Chip adjustment */
.search-reset.chip {
    display: block;
    text-align: center;
    width: 100%;
    background: var(--color-sub);
    color: var(--text-color);
    border-color: transparent;
    box-sizing: border-box;
    padding: 12px;
    border-radius: var(--radius-pill);
    font-size: var(--fs-md);
    line-height: normal;
    font-weight: var(--fw-bold);
}

/* フィルターアクション */
.filter-actions {
    margin-top: 2rem;
    display: flex;
    gap: 0.625rem;
    flex-direction: column;
}

.apply-filter-btn {
    width: 100%;
    padding: 1rem 3rem;
    border-radius: var(--radius-pill);
    background: var(--btn-kinako);
    color: var(--text-charcoal);
    border: none;
    font-size: var(--fs-md);
    line-height: normal;
    min-height: 44px;
    transition: all var(--transition-fill);
}
.apply-filter-btn:hover {
    background: var(--color-accent);
    color: #fff;
    transform: var(--hover-lift);
    box-shadow: var(--shadow-fill-hover);
    opacity: 1;
}

/* タグなし表示 */
.no-terms {
    font-size: 12px;
    color: var(--text-color);
    opacity: 0.6;
}

/* =========================================
   Typography: Page-Scoped Rules (Unlayered)
   Unlayered CSS > @layer (Cascade priority)
   NO !important - Uses specificity & cascade
   ========================================= */

/* Recipe Page typography moved to css/painting-recipe.css */

/* -----------------------------------------
   Sidebar: Functional UI (Helvetica)
   ----------------------------------------- */
.sidebar-widget .widget-title,
.filter-section .section-title,
.search-reset,
.apply-filter-btn,
#recipe-filter-form button {
    font-family: var(--font-ui);
    font-weight: var(--fw-bold);
    letter-spacing: 0.04em;
    text-transform: lowercase;
}

/* Sidebar widget title size */
.sidebar-widget .widget-title,
.filter-section .section-title {
    font-size: var(--fs-sm);
}

/* -----------------------------------------
   Content Chips: Emotional (Mincho)
   EXCEPT: .search-reset (Functional UI)
   ----------------------------------------- */
.chip {
    font-family: var(--font-base);
}

/* clear all button - Override .chip（font-baseを上書き）
   共通Button Base (unlayered) から font-family/font-weight/letter-spacing/text-transform を継承 */
/* （このルールブロックは Button Base unlayered に統合済みのため削除） */

/* -----------------------------------------
   Page Titles: Reinforcement for specificity
   (Base styles from Universal Section Heading section)
   ----------------------------------------- */
h1.section-title.en-font,
h2.section-title.en-font,
.page-header-title,
.about-label,
.service-page h2.section-title,
.workflow h2.section-title,
.faq-section h2.section-title,
.contact-page h1.section-title {
    font-family: var(--font-ui);
    font-weight: var(--fw-bold);
    text-transform: lowercase;
    letter-spacing: 0.04em;
    /* Unified */
}

/* Ingredient Amount typography moved to css/painting-recipe.css */

/* PC版: 呼吸アニメーション無効化（静的な「間」を表現） */
@media (min-width: 1024px) {
    .cta-btn.breathing-anim {
        animation: none;
    }
}

/* --- 少数件フォールバック --- */
.recipe-grid--few {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.recipe-grid--few .recipe-card-wrapper--hero {
    grid-column: span 1;
}

@media (min-width: 1024px) {
    .recipe-grid--few {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* =========================================
   Mobile Hero Refinement (2025-12-20)
   Target: Smartphone View (< 768px ideal, but general mobile)
   ========================================= */

@media (max-width: 768px) {

    /*
       Explicitly list all sectioning elements to satisfy PSI warning.
       Avoid :is() to ensure Lighthouse parser compatibility.
    */
    h1,
    section h1,
    article h1,
    aside h1,
    nav h1 {
        font-size: 1.75rem;
    }

    /* 1. Hero Search Layout Overrides */
    .hero-section {
        /* Ensure overlay layout on mobile */
        display: block;
        position: relative;
        min-height: 80vh;
        max-width: 100%;
        padding: 0;
        /* Adjust height for mobile visual */
        margin-bottom: 4rem;
        overflow: hidden;
        border-radius: 0 0 24px 24px;
        /* Organic bottom curve */
    }

    .hero-visual {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 1;
    }

    .hero-visual img {
        object-fit: cover;
        width: 100%;
        height: 100%;
        border-radius: 0 0 24px 24px;
    }

    /* Overlay Content on top of Image */
    .hero-content {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 2;
        display: flex;
        flex-direction: column;
        justify-content: center;
        /* Vertically center */
        align-items: center;
        /* Horizontally center */
        text-align: center;
        padding: 2rem;
        background: rgba(0, 0, 0, 0.2);
        /* Slight dim for readability */
        border-radius: 0 0 24px 24px;
    }

    /* 2. Typography (Hero Copy) */
    .hero-copy {
        width: 100%;
        margin-bottom: 2.5rem;
        /* Space between text and buttons */
    }

    .main-copy {
        writing-mode: horizontal-tb;
        /* Explicit Horizontal */
        font-family: var(--font-base), serif;
        font-weight: 500;
        /* Medium weight against photo */
        font-size: 1.75rem;
        /* Readable size on mobile */
        line-height: 1.8;
        /* Balanced breathing room */
        letter-spacing: 0.1em;
        /* Relaxed spacing */
        color: #FFFFFF;

        /* Critical Shadow for Readability */
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);

        margin-bottom: 1rem;
    }


    /* 3. CTA Buttons (Glassmorphism) */
    .hero-section .cta-buttons {
        display: flex;
        /* Force show on mobile */
        width: 100%;
        justify-content: center;
        gap: 16px;
        /* Gap between buttons */
    }

    .cta-btn.glass-pill {
        /* Box Model */
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 140px;
        /* Fixed elegant width */
        padding: 12px 0;

        /* Shape */
        border-radius: var(--radius-pill);
        /* Capsule / Pill Shape */
        border: 1px solid rgba(255, 255, 255, 0.6);
        /* Frosty border */

        /* Glass Effect */
        background: rgba(255, 255, 255, 0.25);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);

        /* Typography */
        font-family: var(--font-ui);
        font-size: var(--fs-base);
        font-weight: bold;
        color: #fff;
        text-transform: uppercase;
        letter-spacing: 0.15em;
        text-decoration: none;

        /* Transition */
        transition: all var(--transition-base);
    }

    /* Hover State (for touch feedback) */
    .cta-btn.glass-pill:active {
        background: rgba(255, 255, 255, 0.4);
        transform: scale(0.98);
    }

    /* 4. Breathing Animation */
    @keyframes breathing {
        0% {
            transform: scale(1);
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        }

        50% {
            transform: scale(1.03);
            /* Subtle expansion */
            box-shadow: 0 8px 25px rgba(255, 255, 255, 0.2);
            /* Glow pulse */
        }

        100% {
            transform: scale(1);
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        }
    }

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

    /* Offset logic to prevent sync feeling */
    .breathing-anim.delay-anim {
        animation-delay: 2s;
        /* Start halfway through the first one */
    }
}



/* Mobile Navigation Overlay styles moved to css/frame-header.css */
