﻿/* Main Styles */
:root {
    --bg-color: #f8f9fa;
    /* Slightly off-white */
    --text-color: #2c2c2c;
    --accent-color: #000;
    --font-main: 'Inter', sans-serif;
    --font-heading: 'Noto Sans JP', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: 0.03em;
    /* More breathing room site-wide */
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--accent-color);
    line-height: 1.2;
}

/* Utilities */
.sp-only {
    display: none;
}

.ib {
    display: inline-block;
}

.container {
    max-width: 1000px;
    /* Tighter container for text readability */
    margin: 0 auto;
    padding: 0 40px;
}

/* Navigation - Minimalist */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    mix-blend-mode: difference;
    /* Stylish blend mode */
    color: #fff;
}

.site-title a {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    /* Bumped up */
    font-size: 1.2rem;
}

/* Custom Logo - SVG Support */
.custom-logo-link {
    display: flex;
    align-items: center;
}

.custom-logo-link img,
.custom-logo-link svg,
.custom-logo {
    width: auto;
    height: 40px;
    /* Adjust this value as needed */
    max-width: 200px;
    /* Invert the logo so it displays correctly with mix-blend-mode: difference */
    filter: invert(1);
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.main-navigation a {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Hero Section - Full viewport */
.hero {
    height: 100vh;
    height: 100svh;
    /* Small viewport height - excludes mobile address bar */
    display: flex;
    justify-content: center;
    /* Center the container */
    align-items: center;
    text-align: left;
    /* Left align text content */
    background: transparent;
    /* Allow body bg */
    position: relative;
    overflow: hidden;
    /* Ensure botanical corners don't overflow */
}

.hero h2 {
    font-size: clamp(2.5rem, 5.5vw, 6.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
    padding-bottom: 0.2em;
    overflow: visible;
    word-break: normal;
    overflow-wrap: normal;
    visibility: hidden;
    /* Prevent FOUC, JS will reveal */
}

/* Hero character styling - reserve space to prevent layout shift */
.hero-char {
    display: inline-block;
    visibility: hidden;
}

.hero-char.visible {
    visibility: visible;
}

/* Typing cursor effect - absolute positioned to not affect layout */
.hero-cursor {
    display: none;
    position: absolute;
    width: 3px;
    height: 0.85em;
    background: #000;
    margin-left: 0.05em;
    transform: translateY(0.15em);
}

.hero-cursor.active {
    display: inline-block;
    animation: cursorBlink 0.6s ease-in-out infinite;
}

@keyframes cursorBlink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* Line break indicator (hidden but semantic) */
.hero-line {
    display: block;
}

/* ============================================
   Hero Botanical Animation
   ============================================ */
.hero-botanical {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
}

/* Corner SVG positioning */
.botanical-corner {
    position: absolute;
    width: clamp(120px, 18vw, 220px);
    height: clamp(120px, 18vw, 220px);
    opacity: 0;
    visibility: hidden;
}

.botanical-corner.visible {
    opacity: 1;
    visibility: visible;
}

.botanical-top-left {
    top: -4px;
    left: -4px;
}

.botanical-top-right {
    top: -4px;
    right: -4px;
}

.botanical-bottom-left {
    bottom: -4px;
    left: -4px;
}

.botanical-bottom-right {
    bottom: -4px;
    right: -4px;
}

/* SVG path stroke animation - controlled by JS scroll */
.botanical-corner path {
    fill: none;
    stroke: #000;
    /* stroke-dasharray and stroke-dashoffset set by JavaScript */
}

/* Text flowers container */
.hero-text-flowers {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 3;
}

/* Individual flower on text */
.text-flower {
    position: absolute;
    width: 24px;
    height: 24px;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1),
        opacity 0.4s ease-out;
}

.text-flower.bloom {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

/* Flower SVG styling */
.text-flower svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: #000;
    stroke-width: 1;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.text-flower .flower-center {
    fill: #000;
}

/* Flower bloom animation variants */
.text-flower.bloom-delay-1 {
    transition-delay: 0.1s;
}

.text-flower.bloom-delay-2 {
    transition-delay: 0.2s;
}

.text-flower.bloom-delay-3 {
    transition-delay: 0.3s;
}

.text-flower.bloom-delay-4 {
    transition-delay: 0.4s;
}

.text-flower.bloom-delay-5 {
    transition-delay: 0.5s;
}

/* Subtle sway animation for flowers after bloom */
@keyframes flowerSway {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
    }

    25% {
        transform: translate(-50%, -50%) scale(1) rotate(3deg);
    }

    75% {
        transform: translate(-50%, -50%) scale(1) rotate(-3deg);
    }
}

.text-flower.bloom.sway {
    animation: flowerSway 4s ease-in-out infinite;
}

.hero-small {
    height: 40vh;
    /* Condensed but enough space */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: transparent;
    margin-bottom: 4rem;
    padding-top: 6rem;
    /* Clear fixed header */
}

.hero-small .page-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.hero-small .hero-subtitle {
    font-size: 1.1rem;
    color: #666;
    letter-spacing: 0.1em;
}

.hero-labo {
    margin-bottom: 0;
    padding-bottom: 0;
}

.section-labo-grid {
    padding-top: 2rem;
}

/* Works Section */
/* Works Section */
.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 4rem 3rem;
    /* Increased Gap */
}

.work-item a {
    display: block;
    color: inherit;
    transition: opacity 0.3s ease, transform 0.4s ease;
}

.work-item:hover a {
    opacity: 1;
    transform: translateY(-8px);
}

.work-thumb {
    width: 100%;
    /* Removed fixed aspect-ratio to allow different image sizes "properly" */
    /* Alternatively, if we want uniformity but "proper" fit: */
    aspect-ratio: 4/3;
    background: #f4f4f4;
    margin-bottom: 1.5rem;
    overflow: hidden;
    border-radius: 0;
    /* Boxy/Modern */
    position: relative;
}

.work-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Cover is standard for consistent grid */
    transition: transform 0.7s cubic-bezier(0.25, 1, 0.5, 1);
}

.work-item:hover .work-thumb img {
    transform: scale(1.03);
    /* Subtle Zoom */
}

.work-item h4 {
    font-size: 1.25rem;
    /* Larger Title */
    font-weight: 400;
    /* Lighter weight */
    margin-top: 1rem;
    letter-spacing: -0.01em;
}

.work-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    margin-bottom: 0.3rem;
    gap: 1rem;
}

.work-category {
    font-size: 0.75rem;
    color: #999;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.work-author {
    font-size: 0.75rem;
    color: #888;
    letter-spacing: 0.02em;
}

/* Works CTA */
.works-cta {
    text-align: center;
    margin-top: 4rem;
}

.btn-works {
    display: inline-block;
    padding: 1rem 3rem;
    background: transparent;
    color: #000;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border: 1px solid #000;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.btn-works:hover {
    background: #000;
    color: #fff;
    transform: translateY(-2px);
    opacity: 1;
}

/* News Section */
.news-list {
    list-style: none;
    padding: 0;
    max-width: 900px;
    /* Wider */
    margin: 0 auto;
}

.news-list li {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding: 2rem 0;
    /* More breathing room */
    display: flex;
    align-items: baseline;
    gap: 3rem;
    transition: all 0.3s;
}

.news-list li:hover {
    padding-left: 15px;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.02) 0%, transparent 100%);
}

.news-list .date {
    font-family: var(--font-main);
    font-size: 0.85rem;
    color: #999;
    min-width: 100px;
    letter-spacing: 0.05em;
}

.news-list a {
    font-weight: 400;
    font-size: 1.1rem;
    flex: 1;
}

/* Labo & Works Archive Filters */
.filters-wrapper {
    position: relative;
    margin-bottom: 4rem;
    overflow-x: auto;
    overflow-y: visible;
    padding-top: 0.5rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.filters-wrapper::-webkit-scrollbar {
    display: none;
}

.labo-filters,
.works-filters {
    display: flex;
    flex-wrap: nowrap;
    gap: 1.5rem;
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.labo-filters::-webkit-scrollbar,
.works-filters::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.labo-filters .filter-btn,
.works-filters .filter-btn {
    flex-shrink: 0;
    white-space: nowrap;
}

/* Scroll indicator - right arrow hint */
.filters-wrapper.can-scroll-right::after {
    content: '›';
    position: absolute;
    right: 0;
    top: 2.5rem;
    /* カテゴリフィルターの高さの中央に配置 */
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: #999;
    opacity: 0.6;
    pointer-events: none;
    animation: scrollHint 1.5s ease-in-out infinite;
}

@keyframes scrollHint {

    0%,
    100% {
        opacity: 0.6;
        transform: translateY(-50%) translateX(0);
    }

    50% {
        opacity: 1;
        transform: translateY(-50%) translateX(3px);
    }
}

/* Labo用の矢印位置調整（日本語カテゴリで高さが異なるため） */
.section-labo-grid .filters-wrapper.can-scroll-right::after {
    top: 2.2rem;
}

/* Library用の矢印位置調整（キーワード検索があるため） */
.section-library-grid .filters-wrapper.can-scroll-right::after {
    top: 6.5rem;
}

/* Works Archive */
.hero-works {
    margin-bottom: 0;
}

.section-works-grid {
    padding-top: 2rem;
}

.filter-btn {
    padding: 0.6rem 2rem;
    border: 1px solid #ddd;
    background: transparent;
    cursor: pointer;
    border-radius: 50px;
    font-family: var(--font-main);
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.filter-btn.active,
.filter-btn:hover {
    background: #000;
    color: #fff;
    border-color: #000;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Labo Archive */
.labo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 4rem 3rem;
}

/* Labo Item - Minimalist/Sophisticated */
.labo-item {
    background: transparent;
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
    transition: opacity 0.3s ease;
    border: none;
}

.labo-item a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.labo-item:hover {
    opacity: 0.7;
}

.labo-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    background: #f0f0f0;
    margin-bottom: 1.2rem;
    overflow: hidden;
    position: relative;
    border-radius: 4px;
}

.labo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.labo-item:hover .labo-thumb img {
    transform: scale(1.05);
}

.labo-title {
    font-size: 1.15rem;
    margin: 0.5rem 0;
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: 0.02em;
}

.labo-excerpt {
    font-size: 0.9rem;
    color: #888;
    margin-top: 0.5rem;
    line-height: 1.6;
}

/* Section Label - Refined */
.section-label {
    display: inline-block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #999;
    margin-bottom: 1rem;
    font-weight: 500;
}

/* About Section - Minimal (legacy) */
.section-about-minimal {
    padding: 4rem 0;
    text-align: center;
}

.about-intro {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    line-height: 2;
    color: #666;
    letter-spacing: 0.05em;
    max-width: 600px;
    margin: 0 auto;
}

/* About Section - Designer Portfolio Style */
.section-about-portfolio {
    padding: 6rem 0;
    background: #fff;
}

.about-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 4rem;
    align-items: start;
}

/* Profile Image */
.about-image {
    position: sticky;
    top: 120px;
}

.about-image-wrapper {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
}

.about-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e8e8e8 0%, #d4d4d4 50%, #e8e8e8 100%);
    position: relative;
}

.about-image-placeholder::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
}

.about-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.about-image-wrapper:hover img {
    transform: scale(1.03);
}

/* Profile Content */
.about-content {
    padding-top: 0.5rem;
}

.about-label {
    display: inline-block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #999;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.about-name {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.about-title {
    font-size: 1rem;
    color: #666;
    letter-spacing: 0.05em;
    margin-bottom: 2rem;
    font-weight: 400;
}

.about-bio {
    font-size: 1rem;
    line-height: 2;
    color: #555;
    letter-spacing: 0.03em;
    margin-bottom: 2.5rem;
    max-width: 500px;
}

/* Detail Items */
.about-details {
    display: flex;
    gap: 3rem;
    margin-bottom: 2.5rem;
    padding: 1.5rem 0;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
}

.about-detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.detail-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #999;
}

.detail-value {
    font-size: 1rem;
    font-weight: 500;
    color: #333;
    letter-spacing: 0.02em;
}

/* Skills (reuse existing .about-skills and .skill-tag) */
.about-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-start;
}

.skill-tag {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border: 1px solid #ddd;
    border-radius: 50px;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    color: #666;
    transition: all 0.3s ease;
}

.skill-tag:hover {
    background: #000;
    color: #fff;
    border-color: #000;
}


/* ============================================
   About Section - Two Members Layout
   ============================================ */
.section-about-members {
    padding: 6rem 0;
    background: #fff;
}

.section-about-members .section-heading {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 3rem;
    text-align: center;
}

.about-members-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4rem;
}

.member-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Member Profile Image - Magnetic Effect */
.member-image {
    position: relative;
    margin-bottom: 1.5rem;
    width: 180px;
    height: 180px;
}

.member-image-wrapper {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    background: #f5f5f5;
    will-change: transform;
    transform-style: preserve-3d;
    backface-visibility: hidden;
}

.member-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.member-image-wrapper:hover img {
    transform: scale(1.05);
}

.member-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e8e8e8 0%, #d4d4d4 50%, #e8e8e8 100%);
}

/* Member Content */
.member-content {
    max-width: 360px;
}

.member-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    letter-spacing: -0.01em;
}

.member-title {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1.25rem;
    letter-spacing: 0.02em;
}

.member-bio {
    font-size: 0.95rem;
    line-height: 1.8;
    color: #555;
    margin-bottom: 1.5rem;
}

.member-details {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
    padding: 1rem 0;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
}

.member-detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.member-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

/* Members Mobile */
@media (max-width: 768px) {
    .section-about-members {
        padding: 4rem 0;
        overflow: hidden;
        /* Prevent horizontal scrollbar during animations */
    }

    .about-members-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .member-image {
        width: 140px;
        height: 140px;
    }

    .member-name {
        font-size: 1.25rem;
    }

    .member-details {
        gap: 1.5rem;
    }

    /* Mobile Scroll Animation for Member Images */
    /* Hide images initially before GSAP takes over */
    .member-card .member-image {
        will-change: transform, opacity;
        opacity: 0;
    }

    /* Hide's image starts off-screen right */
    .member-card[data-member="1"] .member-image {
        transform: translateX(100vw);
    }

    /* Satoru's image starts off-screen left */
    .member-card[data-member="2"] .member-image {
        transform: translateX(-100vw);
    }

    /* Flip Hide's image horizontally to face right when sliding from left */
    .member-card[data-member="2"] .member-image-wrapper img {
        transform: scaleX(-1);
    }
}

/* Labo Section on Front Page - Compact Carousel */
.section-labo-compact {
    padding: 3rem 0;
    background: #fafafa;
    overflow: hidden;
}

.labo-carousel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto 1.5rem;
    padding: 0 40px;
}

.labo-carousel-title {
    font-size: 1.5rem;
    font-weight: 300;
    margin: 0;
    color: #333;
}

.labo-view-all {
    font-size: 0.85rem;
    color: #666;
    letter-spacing: 0.05em;
    transition: color 0.3s;
}

.labo-view-all:hover {
    color: #000;
    opacity: 1;
}

/* Carousel Wrapper */
.labo-carousel-wrapper {
    overflow-x: auto;
    overflow-y: hidden;
    padding: 1rem 40px;
    max-width: 1080px;
    margin: 0 auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    cursor: grab;
    /* Hide scrollbar but keep functionality */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.labo-carousel-wrapper::-webkit-scrollbar {
    display: none;
}

.labo-carousel-wrapper.is-dragging {
    cursor: grabbing;
    scroll-behavior: auto;
}

.labo-carousel-wrapper.is-dragging * {
    pointer-events: none;
}

.labo-carousel-track {
    display: flex;
    gap: 1.25rem;
    width: max-content;
}

/* Carousel Items */
.labo-carousel-item {
    flex-shrink: 0;
    width: 180px;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.labo-carousel-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.labo-carousel-item a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.labo-carousel-thumb {
    aspect-ratio: 4/3;
    background: #f0f0f0;
    overflow: hidden;
}

.labo-carousel-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.labo-carousel-item:hover .labo-carousel-thumb img {
    transform: scale(1.05);
}

.labo-carousel-thumb .no-thumb {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e8e8e8 0%, #f5f5f5 100%);
}

.labo-carousel-item-title {
    padding: 0.75rem;
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.4;
    margin: 0;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* More Card */
.labo-more-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.labo-more-card a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 180px;
}

.labo-more-content {
    text-align: center;
    color: #fff;
}

.labo-more-count {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.labo-more-text {
    display: block;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 0.25rem;
}

/* Featured Badge (おすすめ Label) */
.labo-carousel-item.is-featured,
.library-card-carousel-item.is-featured {
    position: relative;
}

.labo-carousel-item.is-featured::before,
.library-card-carousel-item.is-featured::before {
    content: 'おすすめ';
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 10;
    padding: 4px 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
    pointer-events: none;
}

/* Today's Diary Badge (今日 Label) - same position as おすすめ */
.library-card-carousel-item.is-today {
    position: relative;
}

.library-card-carousel-item.is-today::before {
    content: '今日';
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 10;
    padding: 4px 10px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(245, 87, 108, 0.4);
    pointer-events: none;
}

/* Legacy Labo styles for other pages */
.labo-header {
    text-align: center;
    margin-bottom: 4rem;
}

.labo-heading {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: center;
}

.labo-description {
    font-size: 1.05rem;
    color: #666;
    letter-spacing: 0.03em;
}

/* Labo Featured Items */
.labo-featured {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2.5rem;
    margin-bottom: 4rem;
}

.labo-featured-item {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.labo-featured-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

.labo-featured-item a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.labo-featured-thumb {
    aspect-ratio: 16/9;
    background: #f0f0f0;
    overflow: hidden;
}

.labo-featured-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.labo-featured-item:hover .labo-featured-thumb img {
    transform: scale(1.05);
}

.labo-featured-thumb .no-thumb {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f0f0f0 0%, #e8e8e8 100%);
}

.labo-featured-info {
    padding: 1.5rem;
}

.labo-featured-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.labo-featured-excerpt {
    font-size: 0.9rem;
    color: #888;
    line-height: 1.6;
    margin: 0;
}

/* Labo CTA */
.labo-cta {
    text-align: center;
}

.btn-labo {
    display: inline-block;
    padding: 1rem 3rem;
    background: #000;
    color: #fff;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.btn-labo:hover {
    background: #333;
    transform: translateY(-2px);
    opacity: 1;
}

/* Labo Single Page */
.labo-single-header {
    padding-top: 140px;
    padding-bottom: 3rem;
    text-align: center;
    background: linear-gradient(180deg, #f8f9fa 0%, #fff 100%);
}

.labo-categories {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.labo-cat-tag {
    display: inline-block;
    padding: 0.3rem 1rem;
    background: #000;
    color: #fff;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 50px;
}

.labo-single-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 0.75rem;
}

.labo-single-author {
    font-size: 0.9rem;
    color: #999;
    letter-spacing: 0.03em;
    margin-bottom: 1.5rem;
}

.works-single-author {
    font-size: 0.9rem;
    color: #999;
    letter-spacing: 0.03em;
    margin-top: 0.75rem;
    margin-bottom: 1rem;
}

.labo-single-excerpt {
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.8;
}

/* App CTA Button */
.labo-app-cta {
    margin-top: 2rem;
}

.btn-app {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-radius: 50px;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
}

.btn-app:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.5);
    opacity: 1;
}

.btn-app-icon {
    font-size: 1.2rem;
}

.btn-app-large {
    padding: 1.25rem 3rem;
    font-size: 1.1rem;
}

/* Works Site Link Button */
.works-site-link {
    margin: 3rem auto 4rem;
    text-align: center;
}

.btn-site-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, #2d3436 0%, #636e72 100%);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    border-radius: 50px;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: 0 4px 20px rgba(45, 52, 54, 0.3);
    text-decoration: none;
}

.btn-site-link:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 30px rgba(45, 52, 54, 0.4);
    opacity: 1;
    color: #fff;
}

.btn-site-icon {
    font-size: 1.2rem;
}

/* Labo Single Thumbnail */
.labo-single-thumbnail {
    margin-bottom: 3rem;
}

.labo-single-thumbnail img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

/* Labo Bottom CTA */
.labo-bottom-cta {
    text-align: center;
    padding: 4rem 0;
    margin-top: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* Section Spacing */
section {
    padding: 8rem 0;
    /* significantly increased */
}

/* Headings Spacing */
section h3 {
    font-size: 2.5rem;
    margin-bottom: 4rem;
    font-weight: 300;
    text-align: center;
}


.work-item a {
    display: block;
    color: inherit;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.work-item:hover a {
    opacity: 1;
    /* Handle opacity via image/text */
    transform: translateY(-5px);
}

.work-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    background: #e0e0e0;
    margin-bottom: 1rem;
    overflow: hidden;
    border-radius: 4px;
}

.work-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.work-item:hover .work-thumb img {
    transform: scale(1.05);
    /* Zoom effect */
}

.work-item h4 {
    font-size: 1.1rem;
    font-weight: 500;
    margin-top: 0.5rem;
}

/* News Section */
.news-list {
    list-style: none;
    padding: 0;
    max-width: 800px;
    margin: 0 auto;
}

.news-list li {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding: 1.5rem 0;
    display: flex;
    align-items: baseline;
    gap: 2rem;
    transition: background-color 0.3s;
}

.news-list li:hover {
    padding-left: 10px;
    /* Subtle slide */
}

.news-list .date {
    font-family: var(--font-main);
    font-size: 0.9rem;
    color: #888;
    min-width: 100px;
}

.news-list a {
    font-weight: 500;
    font-size: 1.05rem;
    flex: 1;
}

/* Labo Archive - margin override */
.labo-archive .labo-filters {
    margin-bottom: 2rem;
    gap: 1rem;
}

.filter-btn {
    padding: 0.5rem 1.5rem;
    border: 1px solid #ccc;
    background: none;
    cursor: pointer;
    border-radius: 20px;
    font-family: var(--font-main);
    transition: all 0.3s ease;
}

.filter-btn.active,
.filter-btn:hover {
    background: #000;
    color: #fff;
    border-color: #000;
}

/* Duplicate Lab CSS removed */

/* Contact Section & Form */
.section-contact {
    padding-bottom: 8rem;
}

/* Contact Page Styles */
.hero-contact {
    margin-bottom: 0;
}

.section-contact-page {
    padding-top: 2rem;
    padding-bottom: 8rem;
}

.contact-intro {
    max-width: 600px;
    margin: 0 auto 4rem;
    text-align: center;
    font-size: 1.05rem;
    line-height: 1.8;
    color: #666;
}

.contact-form-wrap {
    max-width: 600px;
    margin: 0 auto;
}

.wpcf7-form p {
    margin-bottom: 2.5rem;
    /* Increased from 1.5rem */
}

.wpcf7-form label {
    display: block;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.3rem;
    color: #666;
}

.wpcf7-form-control-wrap {
    display: block;
}

.wpcf7-text,
.wpcf7-textarea,
.wpcf7-email {
    width: 100%;
    border: none;
    border-bottom: 1px solid #ccc;
    background: transparent;
    padding: 0.5rem 0;
    font-family: var(--font-main);
    font-size: 1rem;
    transition: border-color 0.3s;
    border-radius: 0;
}

.wpcf7-text:focus,
.wpcf7-textarea:focus,
.wpcf7-email:focus {
    outline: none;
    border-bottom-color: #000;
}

.wpcf7-submit {
    margin-top: 2rem;
    background: #000;
    color: #fff;
    border: none;
    padding: 1rem 3rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    border-radius: 50px;
    display: block;
    /* Ensure block to accept margins */
    margin-left: auto;
    /* Center or align right if desired, let's allow flow */
    margin-right: auto;
    /* Centered button looks good */
}

.wpcf7-submit:hover {
    background: #333;
    transform: translateY(-2px);
}

/* Section Spacing */
section {
    padding: 8rem 0;
}

/* Breadcrumb Navigation - Minimalist Elegant */
.breadcrumb {
    padding: 0;
    margin-bottom: 2rem;
}

.breadcrumb-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
    padding: 0;
    margin: 0;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    color: #888;
}

.breadcrumb-item {
    display: inline-flex;
    align-items: center;
}

.breadcrumb-item a {
    color: #666;
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease;
}

.breadcrumb-item a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #000;
    transition: width 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.breadcrumb-item a:hover {
    color: #000;
    opacity: 1;
}

.breadcrumb-item a:hover::after {
    width: 100%;
}

.breadcrumb-item.current {
    color: #333;
    font-weight: 400;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.breadcrumb-sep {
    margin: 0 0.75rem;
    color: #ccc;
    font-weight: 300;
}

/* Breadcrumb in hero-small sections */
.hero-small .breadcrumb {
    text-align: left;
    width: 100%;
    margin-bottom: 1.5rem;
}

.hero-small .breadcrumb-list {
    justify-content: center;
}

/* Breadcrumb in hero-single (article headers) */
.hero-single .breadcrumb {
    text-align: left;
    margin-bottom: 2rem;
}

.hero-single .breadcrumb-list {
    justify-content: flex-start;
}

/* Footer */
.site-footer {
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    margin-top: 4rem;
}

/* Single Page Styles */
/* Single Page Styles - Note Style */
.hero-single {
    padding-top: 160px;
    padding-bottom: 60px;
    /* Ample top space for fixed header */
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-single .entry-meta {
    font-size: 0.95rem;
    color: #666;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
    display: block;
}

.hero-single .entry-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 0;
    line-height: 1.3;
    letter-spacing: 0.02em;
}

.entry-thumbnail {
    margin-bottom: 3rem;
    max-width: 1000px;
    /* Wider than text */
    margin-left: auto;
    margin-right: auto;
}

.entry-thumbnail img {
    border-radius: 8px;
    /* Softer roundness */
    width: 100%;
    max-height: 60vh;
    object-fit: cover;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    /* Subtle depth */
}

.entry-content {
    max-width: 720px;
    /* Note-like narrow column */
    margin: 0 auto 6rem;
    font-size: 1.05rem;
    /* Slightly refined */
    line-height: 2.0;
    letter-spacing: 0.05em;
    /* Sophisticated spacing */
    color: #333;
}

.entry-content h2 {
    font-size: 1.8rem;
    margin: 4rem 0 2rem;
    border-bottom: 0;
    /* Remove if any default */
    padding-bottom: 0;
    font-weight: 700;
}

.entry-content h3 {
    font-size: 1.4rem;
    margin: 2.5rem 0 1rem;
    text-align: left;
    /* Reset from section h3 center */
}

.entry-content p {
    margin-bottom: 1.5rem;
}

.entry-content img {
    margin: 2rem 0;
    border-radius: 4px;
}

.entry-content ul,
.entry-content ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.entry-content ul {
    list-style-type: disc;
}

.entry-content ol {
    list-style-type: decimal;
}

.entry-content li {
    margin-bottom: 0.5rem;
    padding-left: 0.5rem;
}

/* Post Navigation */
.post-navigation {
    display: flex;
    justify-content: space-between;
    padding-top: 3rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    margin-top: 4rem;
}

.nav-links {
    display: flex;
    width: 100%;
    justify-content: space-between;
    gap: 2rem;
}

.nav-previous,
.nav-next {
    max-width: 45%;
}

.nav-subtitle {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #999;
    margin-bottom: 0.3rem;
}

.nav-title {
    font-weight: 600;
    font-size: 1rem;
}

/* Post Navigation with Thumbnails */
.post-navigation-thumbnails .nav-links {
    gap: 1.5rem;
}

.post-navigation-thumbnails .nav-previous,
.post-navigation-thumbnails .nav-next {
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 48%;
    text-decoration: none;
    color: inherit;
    padding: 1rem;
    border-radius: 8px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.post-navigation-thumbnails .nav-previous:hover,
.post-navigation-thumbnails .nav-next:hover {
    background-color: rgba(0, 0, 0, 0.03);
    transform: translateY(-2px);
}

.post-navigation-thumbnails .nav-next {
    margin-left: auto;
    text-align: right;
}

.post-navigation-thumbnails .nav-thumbnail {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    background: #f5f5f5;
}

.post-navigation-thumbnails .nav-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-navigation-thumbnails .nav-previous:hover .nav-thumbnail img,
.post-navigation-thumbnails .nav-next:hover .nav-thumbnail img {
    transform: scale(1.05);
}

.post-navigation-thumbnails .nav-text {
    flex: 1;
    min-width: 0;
}

.post-navigation-thumbnails .nav-subtitle {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #999;
    margin-bottom: 0.4rem;
}

.post-navigation-thumbnails .nav-title {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #333;
}

/* Responsive & Mobile Menu */
.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    z-index: 200;
}

.menu-toggle .line {
    width: 25px;
    height: 2px;
    background-color: #fff;
    /* mix-blend-mode difference makes this work on dark/light */
    transition: all 0.3s ease;
}

/* Mobile Queries */
@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    .site-header {
        padding: 1.5rem 2rem;
    }

    .menu-toggle {
        display: flex;
    }

    .main-navigation {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100vw;
        height: 100vh;
        /* Glassmorphism effect - clear visual that menu is open */
        background: linear-gradient(135deg, rgba(0, 0, 0, 0.95) 0%, rgba(20, 20, 30, 0.98) 100%);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        display: flex;
        justify-content: center;
        align-items: center;
        transition: right 0.4s cubic-bezier(0.65, 0, 0.35, 1);
        z-index: 150;
    }

    .main-navigation.toggled {
        right: 0;
    }

    /* Subtle animated border accent when open */
    .main-navigation::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 2px;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
        opacity: 0;
        transition: opacity 0.4s ease 0.2s;
    }

    .main-navigation.toggled::before {
        opacity: 1;
    }

    .main-navigation ul {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }

    .main-navigation a {
        font-size: 1.5rem;
        color: #fff;
    }

    /* Menu Open Animation - Perfect Center X */
    .menu-toggle {
        position: relative;
        /* Ensure context for absolute lines */
    }

    .menu-open .menu-toggle .line {
        position: absolute;
        top: 50%;
        left: 50%;
        width: 25px;
        /* Ensure width stays consistent */
    }

    .menu-open .menu-toggle .line:nth-child(1) {
        transform: translate(-50%, -50%) rotate(45deg);
    }

    .menu-open .menu-toggle .line:nth-child(2) {
        transform: translate(-50%, -50%) rotate(-45deg);
    }

    /* Hero Mobile */
    .hero h2 {
        font-size: 3.5rem;
        /* Larger mobile font */
        overflow: visible;
    }

    .hero h2 br {
        display: block;
        /* Ensure breaks work */
    }

    .sp-only {
        display: block;
        /* Show on mobile */
    }

    /* News Mobile */
    .news-list li {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
        padding-left: 0 !important;
        /* Remove hover slide effect padding base if buggy */
    }

    .news-list .date {
        font-size: 0.8rem;
        color: #aaa;
    }

    .news-list a {
        font-size: 1rem;
        width: 100%;
    }

    /* Single Mobile Refinements */
    .hero-single {
        padding-top: 120px;
        padding-bottom: 40px;
        /* padding-left: 0; REMOVED to allow container padding */
        height: auto;
        /* Reset height if needed */
        text-align: left;
    }

    .hero-single .entry-title {
        font-size: 1.75rem;
        /* Adjusted for balance */
        line-height: 1.4;
    }

    .hero-single .entry-meta {
        margin-bottom: 1rem;
    }

    .entry-content {
        font-size: 1rem;
        /* Remove specific padding to inherit from .container */
        line-height: 2.0;
        /* Readable line height */
    }

    .entry-content p {
        margin-bottom: 2rem;
        letter-spacing: 0.05em;
    }

    .entry-thumbnail {
        margin-bottom: 2.5rem;
    }

    /* Post Navigation Mobile */
    .post-navigation-thumbnails .nav-links {
        flex-direction: column;
        gap: 1rem;
    }

    .post-navigation-thumbnails .nav-previous,
    .post-navigation-thumbnails .nav-next {
        max-width: 100%;
        padding: 0.75rem;
    }

    .post-navigation-thumbnails .nav-thumbnail {
        width: 60px;
        height: 60px;
    }

    .post-navigation-thumbnails .nav-next {
        flex-direction: row;
        text-align: left;
    }

    .post-navigation-thumbnails .nav-title {
        font-size: 0.9rem;
    }

    /* Labo & Works Filters - Horizontal Scroll on Mobile */
    .labo-filters,
    .works-filters {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: visible;
        -webkit-overflow-scrolling: touch;
        justify-content: flex-start;
        padding-top: 0.75rem;
        padding-bottom: 1rem;
        margin-left: -20px;
        margin-right: -20px;
        padding-left: 20px;
        padding-right: 20px;
        scrollbar-width: none;
        /* Firefox */
        -ms-overflow-style: none;
        /* IE/Edge */
    }

    .labo-filters::-webkit-scrollbar,
    .works-filters::-webkit-scrollbar {
        display: none;
        /* Chrome/Safari */
    }

    .labo-filters .filter-btn,
    .works-filters .filter-btn {
        flex-shrink: 0;
        white-space: nowrap;
    }

    /* Breadcrumb Mobile */
    .breadcrumb-list {
        font-size: 0.8rem;
    }

    .breadcrumb-sep {
        margin: 0 0.5rem;
    }

    .breadcrumb-item.current {
        max-width: 150px;
    }

    .hero-small .breadcrumb-list,
    .hero-single .breadcrumb-list {
        justify-content: flex-start;
    }

    /* About Section - Portfolio Mobile */
    .section-about-portfolio {
        padding: 4rem 0;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .about-image {
        position: static;
        max-width: 200px;
        margin: 0 auto;
    }

    .about-content {
        text-align: center;
    }

    .about-label {
        margin-bottom: 0.75rem;
    }

    .about-name {
        font-size: 1.75rem;
    }

    .about-bio {
        max-width: 100%;
        margin-bottom: 2rem;
    }

    .about-details {
        justify-content: center;
        gap: 2rem;
    }

    .about-skills {
        justify-content: center;
    }
}

/* ============================================
   2 Members Layout - About Section
   ============================================ */
.section-about-members {
    padding: 6rem 0;
    background: #fff;
}

.section-about-members .section-label {
    display: block;
    text-align: center;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #999;
    margin-bottom: 0.75rem;
}

.section-about-members .section-heading {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 4rem;
}

.about-members-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4rem;
}

.member-card {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.member-image {
    width: 100%;
    max-width: 180px;
    margin: 0 auto;
}

.member-image-wrapper {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
}

.member-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.member-image-wrapper:hover img {
    transform: scale(1.03);
}

.member-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e8e8e8 0%, #d4d4d4 50%, #e8e8e8 100%);
    position: relative;
}

.member-image-placeholder::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
}

.member-content {
    text-align: center;
}

.member-name {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 0.25rem;
    letter-spacing: -0.01em;
}

.member-title {
    font-size: 0.9rem;
    color: #666;
    letter-spacing: 0.03em;
    margin-bottom: 1.25rem;
}

.member-bio {
    font-size: 0.95rem;
    line-height: 1.9;
    color: #555;
    letter-spacing: 0.02em;
    margin-bottom: 1.5rem;
    text-align: left;
}

.member-details {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
    padding: 1rem 0;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
    justify-content: center;
}

.member-detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    text-align: center;
}

.member-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

/* Members Responsive */
@media (max-width: 768px) {
    .about-members-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .section-about-members .section-heading {
        font-size: 2rem;
        margin-bottom: 3rem;
    }

    .member-image {
        max-width: 150px;
    }

    .member-name {
        font-size: 1.35rem;
    }

    .member-bio {
        text-align: center;
    }

    .member-details {
        gap: 1.5rem;
    }
}

/* ============================================
   News List - Two Line Format
   ============================================ */
.news-list-two-line li {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 1.75rem 0;
}

.news-list-two-line li a {
    display: block;
    width: 100%;
    text-decoration: none;
    color: inherit;
}

.news-list-two-line .news-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.85rem;
    color: #888;
}

.news-list-two-line .date {
    min-width: auto;
    letter-spacing: 0.05em;
}

.news-list-two-line .author {
    color: #666;
    font-weight: 500;
}

.news-list-two-line .author::before {
    content: '|';
    margin-right: 1.5rem;
    color: #ddd;
}

.news-list-two-line .news-title {
    font-size: 1.15rem;
    font-weight: 500;
    margin-top: 0.25rem;
    line-height: 1.5;
    transition: color 0.3s ease;
}

.news-list-two-line li:hover .news-title {
    color: #666;
}

/* ============================================
   Single Post Author Display
   ============================================ */
.entry-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #888;
}

.entry-date {
    letter-spacing: 0.05em;
}

.entry-author {
    color: #666;
    font-weight: 500;
}

.entry-author::before {
    content: '|';
    margin-right: 1rem;
    color: #ddd;
}

/* ============================================
   Tag Filters Section - Checkbox Style
   ============================================ */
.tag-filters-section {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

.tag-filters-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #999;
    flex-shrink: 0;
    display: block;
}

.tag-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* Checkbox Style Tags */
.tag-checkboxes {
    gap: 1rem;
}

.tag-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    padding: 0.4rem 0.5rem;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    user-select: none;
}

.tag-checkbox:hover {
    opacity: 0.7;
}

.tag-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.tag-checkbox-custom {
    position: relative;
    width: 18px;
    height: 18px;
    border: 2px solid #ccc;
    border-radius: 4px;
    background: #fff;
    transition: all 0.25s cubic-bezier(0.25, 1, 0.5, 1);
    flex-shrink: 0;
}

.tag-checkbox-custom::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 5px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    opacity: 0;
    transition: all 0.2s cubic-bezier(0.25, 1, 0.5, 1);
}

.tag-checkbox-label {
    font-size: 0.9rem;
    color: #555;
    letter-spacing: 0.02em;
    font-weight: 500;
    transition: color 0.3s ease;
}

/* Checked State */
.tag-checkbox input:checked+.tag-checkbox-custom {
    background: #000;
    border-color: #000;
}

.tag-checkbox input:checked+.tag-checkbox-custom::after {
    transform: rotate(45deg) scale(1);
    opacity: 1;
}

.tag-checkbox:has(input:checked) .tag-checkbox-label {
    color: #000;
    font-weight: 600;
}

/* Focus State */
.tag-checkbox input:focus-visible+.tag-checkbox-custom {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Responsive */
@media (max-width: 768px) {
    .tag-checkboxes {
        gap: 0.5rem;
    }

    .tag-checkbox {
        padding: 0.35rem 0.4rem;
    }

    .tag-checkbox-custom {
        width: 16px;
        height: 16px;
    }

    .tag-checkbox-label {
        font-size: 0.85rem;
    }
}

/* ============================================
   Filter Apply Button (Batch Filtering)
   ============================================ */
.filter-apply-wrapper {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

.filter-apply-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 2rem;
    background: #000;
    color: #fff;
    border: 2px solid #000;
    border-radius: 50px;
    font-family: var(--font-main);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.filter-apply-btn:hover {
    background: #333;
    border-color: #333;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.filter-apply-btn:active {
    transform: translateY(0);
}

.filter-apply-icon::before {
    content: '🔍';
    font-size: 0.9rem;
}

.filter-reset-btn {
    padding: 0.6rem 1.5rem;
    background: transparent;
    color: #666;
    border: 1px solid #ddd;
    border-radius: 50px;
    font-family: var(--font-main);
    font-size: 0.85rem;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-reset-btn:hover {
    border-color: #999;
    color: #333;
}

/* Responsive */
@media (max-width: 768px) {
    .filter-apply-wrapper {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .filter-apply-btn {
        justify-content: center;
        padding: 1rem 2rem;
    }

    .filter-reset-btn {
        text-align: center;
    }
}

/* ============================================
   Contact Form 7 - Response Messages
   ============================================ */
.wpcf7-response-output {
    margin: 2rem 0 !important;
    padding: 1.25rem 1.5rem !important;
    border: none !important;
    border-radius: 0 !important;
    font-family: var(--font-main);
    font-size: 0.95rem;
    letter-spacing: 0.03em;
    line-height: 1.6;
    text-align: center;
    transition: all 0.3s ease;
}

/* 成功メッセージ */
.wpcf7 form.sent .wpcf7-response-output {
    background: #000;
    color: #fff;
    border-left: 4px solid #000 !important;
}

/* 送信中 */
.wpcf7 form.submitting .wpcf7-response-output {
    background: #f8f9fa;
    color: #666;
    border-left: 4px solid #999 !important;
}

/* エラーメッセージ */
.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.unaccepted .wpcf7-response-output,
.wpcf7 form.failed .wpcf7-response-output {
    background: #fff5f5;
    color: #c53030;
    border-left: 4px solid #c53030 !important;
}

/* スパムエラー */
.wpcf7 form.spam .wpcf7-response-output {
    background: #fffaf0;
    color: #c05621;
    border-left: 4px solid #c05621 !important;
}

/* バリデーションエラー（個別フィールド） */
.wpcf7-not-valid-tip {
    color: #c53030;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    font-weight: 400;
}

/* Custom cursor for Our Team section has been removed */

/* ============================================
   Splitting.js Text Animations
   ============================================ */

/* Base setup for split text */
[data-splitting] {
    --char-delay: 0.03s;
    --word-delay: 0.1s;
}

/* Section Headings - Character split animation */
.section-works h3[data-splitting],
.section-news h3[data-splitting],
.section-labo h3[data-splitting],
.section-labo-compact h3[data-splitting],
.section-contact h3[data-splitting],
.section-about-members .section-heading[data-splitting],
.labo-subsection-title[data-splitting] {
    overflow: hidden;
}

/* Initial state for characters */
.section-works h3[data-splitting] .char,
.section-news h3[data-splitting] .char,
.section-labo h3[data-splitting] .char,
.section-labo-compact h3[data-splitting] .char,
.section-contact h3[data-splitting] .char,
.section-about-members .section-heading[data-splitting] .char,
.labo-subsection-title[data-splitting] .char {
    opacity: 0;
    transform: translateY(100%) rotateX(-80deg);
    transform-origin: top center;
    display: inline-block;
    transition:
        opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: calc(var(--char-index) * var(--char-delay));
}

/* Animated state - triggered when in view */
.section-works h3[data-splitting].in-view .char,
.section-news h3[data-splitting].in-view .char,
.section-labo h3[data-splitting].in-view .char,
.section-labo-compact h3[data-splitting].in-view .char,
.section-contact h3[data-splitting].in-view .char,
.section-about-members .section-heading[data-splitting].in-view .char,
.labo-subsection-title[data-splitting].in-view .char {
    opacity: 1;
    transform: translateY(0) rotateX(0deg);
}

/* News list items - Slide in from left */
.news-list li[data-splitting] .word {
    opacity: 0;
    transform: translateX(-20px);
    display: inline-block;
    transition:
        opacity 0.5s ease,
        transform 0.5s ease;
    transition-delay: calc(var(--word-index) * var(--word-delay));
}

.news-list li[data-splitting].in-view .word {
    opacity: 1;
    transform: translateX(0);
}

/* About section label animation */
.section-about-members .section-label[data-splitting] .char {
    opacity: 0;
    transform: translateY(10px);
    display: inline-block;
    transition:
        opacity 0.4s ease,
        transform 0.4s ease;
    transition-delay: calc(var(--char-index) * 0.02s);
}

.section-about-members .section-label[data-splitting].in-view .char {
    opacity: 1;
    transform: translateY(0);
}

/* Labo carousel title */
.labo-carousel-title[data-splitting] .char {
    opacity: 0;
    transform: translateY(50%);
    display: inline-block;
    transition:
        opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: calc(var(--char-index) * 0.025s);
}

.labo-carousel-title[data-splitting].in-view .char {
    opacity: 1;
    transform: translateY(0);
}

/* Subpage title animations (Works, Labo, News archives) */
/* Hide titles until Splitting.js is applied to prevent FOUC */
.hero-small .page-title:not([data-splitting]),
.hero-small .hero-subtitle:not([data-splitting]) {
    visibility: hidden;
}

.hero-small .page-title[data-splitting],
.hero-small .hero-subtitle[data-splitting] {
    visibility: visible;
}

.hero-small .page-title[data-splitting] .char {
    opacity: 0;
    transform: translateY(40%);
    display: inline-block;
    transition:
        opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: calc(var(--char-index) * 0.03s);
}

.hero-small .page-title[data-splitting].in-view .char {
    opacity: 1;
    transform: translateY(0);
}

.hero-small .hero-subtitle[data-splitting] .char {
    opacity: 0;
    transform: translateX(-10px);
    display: inline-block;
    transition:
        opacity 0.4s ease,
        transform 0.4s ease;
    transition-delay: calc(var(--char-index) * 0.02s + 0.3s);
}

.hero-small .hero-subtitle[data-splitting].in-view .char {
    opacity: 1;
    transform: translateX(0);
}

/* Alternative animation style: Blur in */
[data-split-effect="blur"] .char {
    opacity: 0;
    filter: blur(8px);
    transform: translateY(20px);
    transition:
        opacity 0.6s ease,
        filter 0.6s ease,
        transform 0.6s ease;
    transition-delay: calc(var(--char-index) * 0.03s);
}

[data-split-effect="blur"].in-view .char {
    opacity: 1;
    filter: blur(0px);
    transform: translateY(0);
}

/* Alternative animation: Scale up */
[data-split-effect="scale"] .char {
    opacity: 0;
    transform: scale(0.5);
    display: inline-block;
    transition:
        opacity 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
        transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    transition-delay: calc(var(--char-index) * 0.025s);
}

[data-split-effect="scale"].in-view .char {
    opacity: 1;
    transform: scale(1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    [data-splitting] {
        --char-delay: 0.02s;
        --word-delay: 0.08s;
    }
}

/* ============================================
   Work Items Animation
   ============================================ */

/* Page load animation - Items start hidden and are revealed by GSAP */
.work-item {
    opacity: 0;
    transform: translateY(30px);
}

/* ============================================
   Labo Section - New Structure with Apps & Library
   ============================================ */

/* Main Labo Section */
.section-labo {
    padding: 6rem 0;
    background: #fafafa;
}

.section-labo>.container>h3 {
    font-size: 2rem;
    font-weight: 300;
    margin-bottom: 3rem;
    text-align: center;
    color: #000;
}

/* Labo Subsections */
.labo-subsection {
    margin-bottom: 3rem;
}

.labo-subsection:last-child {
    margin-bottom: 0;
}

.labo-subsection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto 1.5rem;
    padding: 0 40px;
}

.labo-subsection-header-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.labo-subsection-title {
    font-size: 1.5rem;
    font-weight: 300;
    margin: 0;
    color: #333;
    letter-spacing: 0.02em;
}

.labo-subsection-subtitle {
    font-size: 0.85rem;
    color: #888;
    margin: 0;
    font-weight: 400;
    letter-spacing: 0.02em;
}

/* Apps Subsection */
.labo-apps-subsection {
    overflow: hidden;
}

/* Library Subsection */
.labo-library-subsection {
    overflow: hidden;
}

/* ============================================
   Featured Cards Grid (Labo Landing Page)
   ============================================ */
.featured-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.featured-cards-grid-library {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

/* Library Archive Page - match container width (1000px) like Works/Apps filters */
.section-library-grid .featured-cards-grid-library {
    max-width: 1000px;
    padding: 0 40px;
    gap: 1.5rem;
}

@media (max-width: 992px) {
    .featured-cards-grid-library {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .featured-cards-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
        padding: 0 20px;
    }

    .featured-cards-grid-library {
        grid-template-columns: 1fr;
    }
}

.featured-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.featured-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border-color: transparent;
}

.featured-card a {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* App Cards (with thumbnail) */
.featured-card-app {
    display: flex;
    flex-direction: column;
}

.featured-card-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f5f5 0%, #eee 100%);
}

.featured-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.featured-card:hover .featured-card-thumb img {
    transform: scale(1.05);
}

.featured-card-thumb .no-thumb {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e0e0e0 0%, #d0d0d0 100%);
}

/* Library Cards (no thumbnail) */
.featured-card-library {
    background: #fff;
}

.featured-card-library .featured-card-content {
    padding: 1.5rem;
}

/* Card Content */
.featured-card-content {
    padding: 1.25rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.featured-card-category {
    font-size: 0.7rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 500;
}

.featured-card-title {
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
    color: #111;
}

.featured-card-author {
    font-size: 0.8rem;
    color: #888;
}

.featured-card-author span::before {
    content: 'by ';
}

.featured-card-author span:not(:last-child)::after {
    content: ', ';
}

.featured-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.25rem;
}

.featured-tag {
    font-size: 0.7rem;
    color: #555;
    background: rgba(0, 0, 0, 0.05);
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    letter-spacing: 0.02em;
}

.featured-card-summary {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.6;
    margin: 0.5rem 0 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Labo Featured Section Styling */
.labo-featured-section {
    padding: 2.5rem 0;
}

.labo-featured-section:first-of-type {
    padding-top: 0;
}

.section-apps {
    background: #fafafa;
}

.section-library {
    background: #fff;
}

/* ============================================
   Library Card Carousel (Front Page)
   ============================================ */
.library-card-carousel-wrapper {
    overflow-x: auto;
    overflow-y: hidden;
    padding: 1rem 40px;
    max-width: 1080px;
    margin: 0 auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    cursor: grab;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.library-card-carousel-wrapper::-webkit-scrollbar {
    display: none;
}

.library-card-carousel-wrapper {
    cursor: grab;
}

.library-card-carousel-wrapper.is-dragging {
    cursor: grabbing;
    scroll-behavior: auto;
}

.library-card-carousel-wrapper.is-dragging * {
    pointer-events: none;
}

.library-card-carousel-track {
    display: flex;
    gap: 1.25rem;
    width: max-content;
}

.library-card-carousel-item {
    flex-shrink: 0;
    width: 300px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.library-card-carousel-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border-color: transparent;
}

.library-card-carousel-item a {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.library-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.library-card-category {
    font-size: 0.7rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 500;
}

.library-card-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
    color: #111;
}

.library-card-author {
    font-size: 0.8rem;
    color: #888;
}

.library-card-author span::before {
    content: 'by ';
}

.library-card-author span:not(:last-child)::after {
    content: ', ';
}

.library-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.25rem;
}

.library-card-tag {
    font-size: 0.7rem;
    color: #555;
    background: rgba(0, 0, 0, 0.05);
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    letter-spacing: 0.02em;
}

.library-card-summary {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.6;
    margin: 0.25rem 0 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Library More Card */
.library-more-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

.library-more-card:hover {
    border-color: transparent;
}

.library-more-card a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 200px;
}

.library-more-content {
    text-align: center;
    color: #fff;
}

.library-more-count {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
}

.library-more-text {
    display: block;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 0.25rem;
}

/* Library Carousel on Front Page */
.library-carousel-wrapper {
    overflow-x: auto;
    overflow-y: hidden;
    padding: 1rem 40px;
    max-width: 1080px;
    margin: 0 auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    cursor: grab;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.library-carousel-wrapper::-webkit-scrollbar {
    display: none;
}

.library-carousel-track {
    display: flex;
    gap: 1.25rem;
    width: max-content;
}

.library-carousel-item {
    flex-shrink: 0;
    width: 260px;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.library-carousel-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border-color: transparent;
}

.library-carousel-item a {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.library-carousel-content {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    min-height: 140px;
}

.library-carousel-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.library-carousel-category {
    font-size: 0.7rem;
    color: #666;
    background: #f5f5f5;
    padding: 0.2rem 0.6rem;
    border-radius: 3px;
    letter-spacing: 0.02em;
}

.library-carousel-date {
    font-size: 0.75rem;
    color: #999;
    letter-spacing: 0.03em;
}

.library-carousel-title {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.5;
    margin: 0 0 0.5rem;
    color: #222;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.library-carousel-excerpt {
    font-size: 0.8rem;
    color: #888;
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.library-empty-message {
    color: #999;
    font-style: italic;
    padding: 2rem;
    text-align: center;
}

/* Library List Styles */
.library-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-width: 900px;
}

.library-list li {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.library-list li:first-child {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.library-list li:hover {
    padding-left: 15px;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.02) 0%, transparent 100%);
}

.library-list li a {
    display: flex;
    align-items: baseline;
    gap: 2rem;
    padding: 1.5rem 0;
    text-decoration: none;
    color: inherit;
}

.library-list .library-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 200px;
}

.library-list .date {
    font-family: var(--font-main);
    font-size: 0.85rem;
    color: #999;
    letter-spacing: 0.05em;
}

.library-list .category {
    font-size: 0.75rem;
    color: #666;
    background: #f0f0f0;
    padding: 0.2rem 0.6rem;
    border-radius: 3px;
    letter-spacing: 0.03em;
}

.library-list .library-title {
    font-size: 1rem;
    font-weight: 400;
    flex: 1;
    color: #333;
}

/* Compact Library List */
.library-list-compact li a {
    padding: 1.25rem 0;
}

.library-list-compact .library-meta {
    min-width: 180px;
}

/* Library List - No items message */
.library-list .no-items {
    padding: 2rem 0;
    color: #999;
    font-style: italic;
    text-align: center;
    border-bottom: none;
}

/* ============================================
   Library Archive Page
   ============================================ */

.hero-library {
    margin-bottom: 0;
    padding-bottom: 0;
}

.section-library-grid {
    padding-top: 2rem;
}

.library-filters {
    display: flex;
    flex-wrap: nowrap;
    gap: 1.5rem;
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.library-filters::-webkit-scrollbar {
    display: none;
}

.library-filters .filter-btn {
    flex-shrink: 0;
    white-space: nowrap;
}

/* Library Grid */
.library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.library-grid .library-item {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.library-grid .library-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border-color: transparent;
}

.library-grid .library-item a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.library-grid .library-item-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.library-grid .library-date {
    font-size: 0.8rem;
    color: #999;
    letter-spacing: 0.05em;
}

.library-grid .library-category {
    font-size: 0.7rem;
    color: #666;
    background: #f5f5f5;
    padding: 0.2rem 0.6rem;
    border-radius: 3px;
}

.library-grid .library-title {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    color: #222;
}

.library-grid .library-excerpt {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.library-grid .library-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.library-grid .library-tag {
    font-size: 0.7rem;
    color: #888;
    background: #f9f9f9;
    border: 1px solid #eee;
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
}

/* ============================================
   Library Single Page
   ============================================ */

.library-single-header {
    padding: 6rem 0 3rem;
    text-align: center;
    background: transparent;
}

.library-categories {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.library-cat-tag {
    font-size: 0.75rem;
    color: #666;
    background: #f0f0f0;
    padding: 0.25rem 0.75rem;
    border-radius: 3px;
    letter-spacing: 0.03em;
}

.library-single-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.library-single-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    color: #666;
    font-size: 0.9rem;
}

.library-single-date {
    color: #999;
}

.library-single-author {
    color: #666;
}

.library-single-excerpt {
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto 1.5rem;
    line-height: 1.8;
}

.library-single-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.library-single-tags .library-tag {
    font-size: 0.8rem;
    color: #666;
    border: 1px solid #ddd;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.library-single-tags .library-tag:hover {
    background: #000;
    color: #fff;
    border-color: #000;
}

.library-single-thumbnail {
    margin-bottom: 3rem;
}

.library-single-thumbnail img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Library Content - Optimized for reading */
.library-content {
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 2;
    color: #333;
}

.library-content p {
    margin-bottom: 1.75rem;
}

.library-content h2,
.library-content h3,
.library-content h4 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

/* ============================================
   Labo Landing Page
   ============================================ */

.labo-featured-section {
    padding: 3rem 0;
}

.labo-featured-section.section-apps {
    background: #fafafa;
    overflow: hidden;
}

.labo-featured-section.section-library {
    background: #fff;
}

.labo-featured-section .labo-subsection-header {
    margin-bottom: 2rem;
}

.labo-featured-section .library-list {
    max-width: 100%;
}

/* ============================================
   Responsive - Labo & Library
   ============================================ */

@media (max-width: 768px) {
    .section-labo {
        padding: 4rem 0;
    }

    .section-labo>.container>h3 {
        font-size: 1.75rem;
        margin-bottom: 2rem;
    }

    .labo-subsection-header {
        padding: 0 20px;
    }

    .labo-subsection-title {
        font-size: 1.25rem;
    }

    .library-list li a {
        flex-direction: column;
        gap: 0.5rem;
    }

    .library-list .library-meta {
        min-width: auto;
    }

    .library-grid {
        grid-template-columns: 1fr;
    }

    .library-single-header {
        padding: 4rem 0 2rem;
    }

    .library-single-title {
        font-size: 1.5rem;
    }

    .library-single-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .library-content {
        font-size: 1rem;
        line-height: 1.9;
    }
}

/* ============================================
   Keyword Search Input
   ============================================ */
.keyword-search-wrapper {
    position: relative;
    margin: 0 auto 1.5rem;
    max-width: 400px;
}

.keyword-search-input {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 50px;
    font-family: var(--font-main);
    font-size: 0.9rem;
    background: #fff;
    transition: all 0.3s ease;
    outline: none;
}

.keyword-search-input:focus {
    border-color: #000;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.keyword-search-input::placeholder {
    color: #aaa;
}

.keyword-search-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    pointer-events: none;
}

.keyword-search-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 11px;
    height: 11px;
    border: 2px solid #888;
    border-radius: 50%;
}

.keyword-search-icon::after {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    width: 6px;
    height: 2px;
    background: #888;
    transform: rotate(45deg);
}

.keyword-search-input:focus+.keyword-search-icon::before {
    border-color: #000;
}

.keyword-search-input:focus+.keyword-search-icon::after {
    background: #000;
}

/* ============================================
   Library Series Notice (e.g. 空想日記)
   ============================================ */
.library-series-notice {
    background: #fafafa;
    border: 1px solid #e0e0e0;
    padding: 2rem 2.5rem;
    margin-bottom: 3rem;
    border-radius: 8px;
}

.series-notice-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 1.25rem 0;
    color: #333;
    letter-spacing: 0.03em;
    text-align: center;
}

.library-series-notice p {
    font-size: 0.88rem;
    line-height: 1.9;
    color: #666;
    margin: 0 0 0.75rem 0;
    text-align: justify;
}

.library-series-notice p:last-child {
    margin-bottom: 0;
}

/* ============================================
   Library Summary Box
   ============================================ */
.library-summary-box {
    background: linear-gradient(145deg, #ffffff 0%, #fafafa 100%);
    border: 1px solid #e5e5e5;
    border-left: 3px solid #333;
    padding: 1.75rem 2rem;
    margin-bottom: 2.5rem;
    border-radius: 0 8px 8px 0;
    position: relative;
}

.library-summary-box .summary-title {
    font-size: 0.8rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
    color: #555;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.library-summary-box p {
    font-size: 0.95rem;
    line-height: 1.9;
    color: #555;
    margin: 0;
}

/* Spoiler variant for Remix category */
.library-summary-spoiler {
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
}

.library-summary-spoiler .summary-spoiler-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(145deg, rgba(40, 40, 40, 0.95) 0%, rgba(30, 30, 30, 0.98) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    z-index: 2;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 0 8px 8px 0;
}

.library-summary-spoiler .spoiler-icon {
    color: rgba(255, 255, 255, 0.7);
    transition: transform 0.3s ease;
}

.library-summary-spoiler .spoiler-icon svg {
    width: 32px;
    height: 32px;
}

.library-summary-spoiler .spoiler-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    text-align: center;
    line-height: 1.6;
    font-weight: 500;
}

.library-summary-spoiler .spoiler-text small {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 400;
}

.library-summary-spoiler .summary-content {
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Hover state for spoiler */
.library-summary-spoiler:hover .summary-spoiler-overlay {
    background: linear-gradient(145deg, rgba(50, 50, 50, 0.95) 0%, rgba(40, 40, 40, 0.98) 100%);
}

.library-summary-spoiler:hover .spoiler-icon {
    transform: scale(1.1);
}

/* Revealed state */
.library-summary-spoiler.revealed .summary-spoiler-overlay {
    opacity: 0;
    pointer-events: none;
}

.library-summary-spoiler.revealed .summary-content {
    opacity: 1;
}

.library-summary-spoiler:focus {
    outline: 2px solid rgba(0, 0, 0, 0.1);
    outline-offset: 2px;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .library-summary-box {
        padding: 1.25rem 1.5rem;
        margin-bottom: 2rem;
    }

    .library-summary-spoiler .spoiler-icon svg {
        width: 28px;
        height: 28px;
    }

    .library-summary-spoiler .spoiler-text {
        font-size: 0.85rem;
    }
}

/* ============================================
   404 Error Page
   ============================================ */
.error-404 {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}

.error-404-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    z-index: 2;
}

.error-404-content {
    max-width: 600px;
}

.error-404-label {
    display: inline-block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #999;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.error-404-title {
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 700;
    line-height: 1;
    margin: 0 0 1.5rem 0;
    letter-spacing: -0.02em;
    color: #999;
}

.error-404-image {
    margin-bottom: 2rem;
}

.error-404-image img {
    max-width: 400px;
    width: 100%;
    height: auto;
    margin: 0 auto;
}

.error-404-message {
    font-size: 1rem;
    line-height: 2;
    color: #666;
    margin-bottom: 3rem;
    letter-spacing: 0.03em;
}

.error-404-actions {
    display: flex;
    justify-content: center;
}

.btn-back-home {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2.5rem;
    background: #000;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    border-radius: 50px;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    text-decoration: none;
}

.btn-back-home:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    background: #222;
}

.btn-back-home .btn-arrow {
    transition: transform 0.3s ease;
}

.btn-back-home:hover .btn-arrow {
    transform: translateX(4px);
}

/* 404 Responsive */
@media (max-width: 768px) {
    .error-404 {
        padding: 4rem 0;
    }

    .error-404-title {
        font-size: 3rem;
    }

    .error-404-message {
        font-size: 0.95rem;
        padding: 0 1rem;
    }
}

/* ============================================
   Privacy Policy Page
   ============================================ */
.privacy-policy-page {
    padding-bottom: 6rem;
}

.privacy-policy-content {
    max-width: 800px;
}

.policy-section {
    margin-bottom: 3rem;
}

.policy-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #eee;
    letter-spacing: 0.02em;
}

.policy-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: #444;
}

.policy-section p {
    font-size: 1rem;
    line-height: 2;
    color: #555;
    margin-bottom: 1rem;
    letter-spacing: 0.03em;
}

.policy-section ul {
    margin: 1rem 0 1.5rem 1.5rem;
    padding: 0;
}

.policy-section li {
    font-size: 1rem;
    line-height: 2;
    color: #555;
    margin-bottom: 0.5rem;
    position: relative;
}

.policy-section li::before {
    content: '';
    position: absolute;
    left: -1rem;
    top: 0.85em;
    width: 4px;
    height: 4px;
    background: #999;
    border-radius: 50%;
}

.policy-section a {
    color: #000;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: opacity 0.3s ease;
}

.policy-section a:hover {
    opacity: 0.6;
}

.policy-updated {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
    font-size: 0.9rem;
    color: #999;
    letter-spacing: 0.05em;
}

/* Privacy Policy Responsive */
@media (max-width: 768px) {
    .privacy-policy-page {
        padding-bottom: 4rem;
    }

    .policy-section {
        margin-bottom: 2rem;
    }

    .policy-section h2 {
        font-size: 1.25rem;
    }

    .policy-section p,
    .policy-section li {
        font-size: 0.95rem;
        line-height: 1.9;
    }
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
    padding: 3rem 0;
    background: #fff;
    border-top: 1px solid #eee;
}

.site-info {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.site-footer .copyright {
    font-size: 0.85rem;
    color: #999;
    letter-spacing: 0.05em;
    margin: 0;
}

.footer-link {
    font-size: 0.85rem;
    color: #999;
    letter-spacing: 0.05em;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: #000;
    opacity: 1;
}

@media (max-width: 480px) {
    .site-info {
        flex-direction: column;
        gap: 0.75rem;
    }
}

/* ============================================
   Like Button Feature (Apps & Library)
   ============================================ */
.like-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: var(--font-main);
    font-size: 0.9rem;
    color: #999;
    transition: all 0.3s ease;
}

.like-button:hover {
    color: #e74c3c;
}

.like-button:hover .heart-icon {
    fill: rgba(231, 76, 60, 0.2);
}

.like-button.liked {
    color: #e74c3c;
}

.like-button.liked .heart-icon {
    fill: #e74c3c;
    stroke: #e74c3c;
}

.like-button .like-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.like-button .heart-icon {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    transition: all 0.3s ease;
}

.like-button .like-count {
    font-weight: 500;
    min-width: 1rem;
    text-align: center;
}

/* Pop animation */
.like-button.pop .like-icon {
    animation: heartPop 0.3s ease;
}

@keyframes heartPop {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.3);
    }

    100% {
        transform: scale(1);
    }
}

/* Processing state */
.like-button.processing {
    pointer-events: none;
    opacity: 0.7;
}

/* Like count badge (for archive pages) */
.like-count-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8rem;
    color: #bbb;
    transition: color 0.3s ease;
}

.like-count-badge .heart-icon-small {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    transition: all 0.3s ease;
}

.like-count-badge.liked {
    color: #e74c3c;
}

.like-count-badge.liked .heart-icon-small {
    fill: #e74c3c;
    stroke: transparent;
}

.like-count-badge .count {
    font-weight: 500;
}

/* Like button wrapper for single pages */
.like-button-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
}

/* Like count in archive items - fixed to bottom */
.labo-item {
    display: flex;
    flex-direction: column;
}

.labo-item>a {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.labo-item-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-top: auto;
    padding-top: 0.75rem;
}

.featured-card {
    display: flex;
    flex-direction: column;
}

.featured-card>a {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.featured-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.featured-card-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-top: auto;
    padding-top: 0.75rem;
}

/* ============================================
   Sort Controls (Apps & Library Archive)
   ============================================ */
.sort-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.sort-label {
    font-size: 0.85rem;
    color: #999;
    margin-right: 0.5rem;
}

.sort-btn {
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 50px;
    font-family: var(--font-main);
    font-size: 0.85rem;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sort-btn:hover {
    border-color: #000;
    color: #000;
}

.sort-btn.active {
    background: #000;
    border-color: #000;
    color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
    .like-button {
        padding: 0.4rem;
        font-size: 0.85rem;
    }

    .like-button .heart-icon {
        width: 20px;
        height: 20px;
    }

    .sort-controls {
        flex-wrap: wrap;
    }

    .sort-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
}

/* ============================================
   Library Pagination
   ============================================ */
.library-pagination {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
}

.library-pagination ul.page-numbers {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
    justify-content: center;
}

.library-pagination .page-numbers li {
    margin: 0;
}

.library-pagination a.page-numbers,
.library-pagination span.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
    background: #fff;
}

.library-pagination a.page-numbers:hover {
    border-color: #000;
    color: #000;
}

.library-pagination span.page-numbers.current {
    background: #000;
    border-color: #000;
    color: #fff;
    font-weight: 500;
}

.library-pagination span.page-numbers.dots {
    border: none;
    background: transparent;
    min-width: auto;
    padding: 0 0.25rem;
}

.library-pagination a.prev,
.library-pagination a.next {
    padding: 0 1rem;
}

@media (max-width: 768px) {

    .library-pagination a.page-numbers,
    .library-pagination span.page-numbers {
        min-width: 36px;
        height: 36px;
        font-size: 0.85rem;
        padding: 0 0.5rem;
    }

    .library-pagination a.prev,
    .library-pagination a.next {
        padding: 0 0.75rem;
    }
}

/* ============================================
   Library Results Info
   ============================================ */
.library-results-info {
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: #666;
}

.library-results-info .results-count {
    font-weight: 600;
    color: #333;
}

.library-results-info .results-page {
    color: #999;
    margin-left: 0.5rem;
}

/* ============================================
   Library Grid Loading State
   ============================================ */
.featured-cards-grid-library[data-loading="true"] {
    position: relative;
    min-height: 200px;
    pointer-events: none;
}

.featured-cards-grid-library[data-loading="true"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    z-index: 10;
}

.featured-cards-grid-library[data-loading="true"]::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid #eee;
    border-top-color: #000;
    border-radius: 50%;
    animation: libraryLoading 0.8s linear infinite;
    z-index: 11;
}

@keyframes libraryLoading {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* No Results Message */
.featured-cards-grid-library .no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 1rem;
    color: #999;
    font-size: 1rem;
}

/* ============================================
   Active Filters Display
   ============================================ */
.active-filters-display {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #fafafa;
    border-radius: 8px;
}

.active-filter-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.8rem;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 50px;
    font-size: 0.85rem;
    color: #333;
}

/* Library Filter Form */
.library-filter-form .filter-reset-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 50px;
    font-family: var(--font-main);
    font-size: 0.9rem;
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.library-filter-form .filter-reset-btn:hover {
    border-color: #000;
    color: #000;
}