/* Craig Mod inspired design - Clean & Modern */
/* 修正版：コンテンツ表示問題を解決 */

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color system */
    --primary-font: 'Crimson Text', Georgia, serif;
    --secondary-font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --text-color: #333;
    --text-light: #666;
    --text-lighter: #999;
    --bg-color: #fafafa;
    --white: #ffffff;
    --border-color: #e5e5e5;
    --hover-color: #f5f5f5;
    --accent-color: #2563eb;
    --focus-color: #2563eb;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    
    /* Typography scale */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --text-color: #e5e5e5;
        --text-light: #a1a1a1;
        --text-lighter: #737373;
        --bg-color: #0f0f0f;
        --white: #1a1a1a;
        --border-color: #262626;
        --hover-color: #2a2a2a;
        --accent-color: #3b82f6;
        --focus-color: #3b82f6;
    }
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--secondary-font);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    font-size: var(--text-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--accent-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 1000;
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: 6px;
}

/* Navigation */
.main-nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(250, 250, 250, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 100;
}

@media (prefers-color-scheme: dark) {
    .gallery-media {
        height: 180px;
    }
    
    .gear-image {
        height: 200px;
    }
    
    .gear-specs {
        gap: 6px;
    }
    
    .spec-item {
        padding: 3px 8px;
        font-size: 10px;
    }
    
    .gear-experience {
        padding: 15px;
    }
    
    .btn {
        padding: 8px 12px;
        font-size: var(--text-xs);
    }
    
    .btn-large {
        padding: 12px 20px;
        font-size: var(--text-sm);
    }
    
    .category-info {
        padding: 25px 20px;
    }
    
    .category-stats {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .stat-item {
        align-self: flex-start;
    }
    
    .section-header h2 {
        font-size: var(--text-xl);
    }
    
    .article-item {
        padding: 20px 15px;
    }
    
    .article-source {
        padding: 3px 8px;
        font-size: 10px;
    }
    
    .subscribe-section {
        padding: 50px 20px;
    }
    
    .subscribe-btn {
        flex-direction: column;
        text-align: center;
        padding: 20px;
        gap: 12px;
    }
    
    .subscribe-icon {
        font-size: 1.8rem;
        width: 45px;
        height: 45px;
    }
}

/* 修正: アニメーション関連の問題を解決 */
@media (prefers-reduced-motion: no-preference) {
    /* アニメーション初期状態は削除し、オプションのエフェクトのみ残す */
    .content-card:hover {
        animation: none;
    }
    
    .gallery-item:hover {
        animation: none;
    }
    
    .gear-item:hover {
        animation: none;
    }
    
    /* 軽微なフェードインエフェクトのみ適用（必要に応じて） */
    .fade-in {
        opacity: 0;
        transform: translateY(20px);
        animation: fadeInUp 0.6s ease forwards;
    }
    
    .fade-in:nth-child(1) { animation-delay: 0.1s; }
    .fade-in:nth-child(2) { animation-delay: 0.2s; }
    .fade-in:nth-child(3) { animation-delay: 0.3s; }
    .fade-in:nth-child(4) { animation-delay: 0.4s; }
    .fade-in:nth-child(5) { animation-delay: 0.5s; }
    .fade-in:nth-child(6) { animation-delay: 0.6s; }
}

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

/* 修正: Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    /* 全ての要素をデフォルトで表示状態にする */
    .content-card,
    .gallery-item,
    .gear-item,
    .category-card,
    .social-link {
        opacity: 1 !important;
        transform: translateY(0) !important;
    }
}

/* 修正: JavaScriptなしでも表示される基本スタイル */
.no-js .content-card,
.no-js .gallery-item,
.no-js .gear-item,
.no-js .category-card,
.no-js .social-link {
    opacity: 1;
    transform: translateY(0);
}

/* 修正: ギャラリーモーダル用のスタイル */
.gallery-modal-content {
    display: flex;
    flex-direction: column;
    max-width: 90vw;
    max-height: 90vh;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.gallery-modal-info {
    padding: 25px;
    max-width: 500px;
}

.gallery-modal-title {
    font-family: var(--primary-font);
    font-size: var(--text-xl);
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-color);
}

.gallery-modal-description {
    font-size: var(--text-sm);
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 15px;
}

.gallery-modal-meta {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.gallery-modal-location,
.gallery-modal-date {
    font-size: var(--text-xs);
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 500;
}

.gallery-modal-location {
    background: var(--accent-color);
    color: white;
}

.gallery-modal-date {
    background: var(--hover-color);
    color: var(--text-lighter);
}

@media (max-width: 768px) {
    .gallery-modal-content {
        max-width: 95vw;
        max-height: 85vh;
    }
    
    .gallery-modal-info {
        padding: 20px;
    }
    
    .gallery-modal-meta {
        flex-direction: column;
        gap: 8px;
    }
}main-nav {
        background: rgba(26, 26, 26, 0.95);
    }
}

.main-nav.scrolled {
    background: rgba(250, 250, 250, 0.98);
    box-shadow: var(--shadow-sm);
}

@media (prefers-color-scheme: dark) {
    .main-nav.scrolled {
        background: rgba(26, 26, 26, 0.98);
    }
}

.nav-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo {
    font-family: var(--primary-font);
    font-size: var(--text-2xl);
    font-weight: 600;
    color: var(--text-color);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    font-size: var(--text-sm);
    transition: color var(--transition-base);
    position: relative;
    padding: 5px 0;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width var(--transition-base);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    margin: 3px 0;
    transition: all var(--transition-base);
    border-radius: 1px;
}

.nav-toggle:hover {
    background: var(--hover-color);
}

.nav-toggle:focus {
    outline: 2px solid var(--focus-color);
    outline-offset: 2px;
}

/* Hero Sections */
.hero,
.gallery-hero,
.gear-hero,
.writings-hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
    margin-top: 70px;
}

.gallery-hero,
.gear-hero,
.writings-hero {
    height: 60vh;
    min-height: 400px;
}

.hero-image,
.gallery-hero-image,
.gear-hero-image,
.writings-hero-image {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-image img,
.gallery-hero-image img,
.gear-hero-image img,
.writings-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7) contrast(1.1);
}

.hero-overlay,
.gallery-hero-overlay,
.gear-hero-overlay,
.writings-hero-overlay {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: white;
    z-index: 2;
}

.gallery-hero-overlay,
.gear-hero-overlay,
.writings-hero-overlay {
    bottom: 60px;
}

.hero-title,
.gallery-hero-title,
.gear-hero-title,
.writings-hero-title {
    font-family: var(--primary-font);
    font-size: var(--text-4xl);
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    letter-spacing: -0.02em;
}

.hero-subtitle,
.gallery-hero-subtitle,
.gear-hero-subtitle,
.writings-hero-subtitle {
    font-family: var(--secondary-font);
    font-size: var(--text-lg);
    font-weight: 300;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    letter-spacing: 0.05em;
}

/* Main content */
.main-content {
    background-color: var(--white);
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Introduction section */
.intro,
.gallery-intro,
.gear-intro,
.writings-intro {
    padding: 80px 0;
    border-bottom: 1px solid var(--border-color);
}

.gallery-intro,
.gear-intro,
.writings-intro {
    text-align: center;
    padding: 80px 0 60px;
}

.intro-text {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.lead {
    font-family: var(--primary-font);
    font-size: var(--text-lg);
    line-height: 1.8;
    color: var(--text-color);
    margin: 0;
}

.gallery-intro .lead,
.gear-intro .lead,
.writings-intro .lead {
    max-width: 700px;
    margin: 0 auto;
}

/* Content grid layout */
.content-grid {
    padding: 80px 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 30px;
    border-bottom: 1px solid var(--border-color);
}

/* Grid positioning */
.content-card:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
}

.content-card:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
}

.content-card.large {
    grid-column: 1 / -1;
    grid-row: 2;
}

.content-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    border: 1px solid var(--border-color);
    position: relative;
    /* 修正: デフォルトで表示状態にする */
    opacity: 1;
    transform: translateY(0);
}

.content-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left var(--transition-slow);
    z-index: 1;
    pointer-events: none;
}

.content-card:hover::before {
    left: 100%;
}

.content-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.content-card:focus-within {
    outline: 2px solid var(--focus-color);
    outline-offset: 2px;
}

.content-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.content-card.large .content-image {
    height: 400px;
}

.content-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-base);
    filter: grayscale(0.2) contrast(1.1);
}

.content-card:hover .content-image img {
    transform: scale(1.05);
}

.content-info {
    padding: 25px;
    position: relative;
    z-index: 2;
}

.content-category {
    font-size: var(--text-xs);
    text-transform: uppercase;
    color: var(--text-lighter);
    letter-spacing: 0.1em;
    font-weight: 500;
}

.content-info h2,
.content-info h3 {
    font-family: var(--primary-font);
    margin: 8px 0 12px 0;
    line-height: 1.3;
}

.content-info h2 {
    font-size: var(--text-2xl);
}

.content-info h3 {
    font-size: var(--text-lg);
}

.content-info a {
    color: var(--text-color);
    text-decoration: none;
    transition: color var(--transition-base);
}

.content-info a:hover {
    color: var(--text-light);
}

.content-info a:focus {
    outline: 2px solid var(--focus-color);
    outline-offset: 2px;
    border-radius: 4px;
}

.content-info p {
    color: var(--text-light);
    font-size: var(--text-sm);
    margin-bottom: 15px;
    line-height: 1.5;
}

.content-info time {
    font-size: var(--text-xs);
    color: var(--text-lighter);
    font-style: italic;
}

/* Latest preview */
.latest-preview {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.latest-preview h4 {
    font-family: var(--secondary-font);
    font-size: var(--text-sm);
    color: var(--text-lighter);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.preview-item {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
    transition: transform var(--transition-fast);
}

.preview-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.preview-item:hover {
    transform: translateX(3px);
}

.preview-title {
    font-size: var(--text-base);
    font-weight: 500;
    margin-bottom: 8px;
    line-height: 1.4;
}

.preview-title a {
    color: var(--text-color);
    text-decoration: none;
    transition: color var(--transition-base);
}

.preview-title a:hover {
    color: var(--text-light);
}

.preview-title a:focus {
    outline: 2px solid var(--focus-color);
    outline-offset: 2px;
    border-radius: 4px;
}

.preview-excerpt {
    font-size: var(--text-xs);
    color: var(--text-light);
    line-height: 1.5;
    margin-bottom: 5px;
}

.preview-date {
    font-size: var(--text-xs);
    color: var(--text-lighter);
}

.preview-loading {
    font-size: var(--text-xs);
    color: var(--text-lighter);
    font-style: italic;
}

/* Button styles */
.btn {
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    font-size: var(--text-sm);
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-base);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-family: var(--secondary-font);
    line-height: 1;
}

.btn-primary {
    background: var(--accent-color);
    color: white;
}

.btn-primary:hover {
    background: var(--focus-color);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--white);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--hover-color);
}

.btn-contact {
    background: var(--success-color);
    color: white;
}

.btn-contact:hover {
    background: #059669;
    transform: translateY(-1px);
}

.btn-disabled {
    background: var(--text-lighter);
    color: white;
    cursor: not-allowed;
}

.btn-large {
    padding: 15px 30px;
    font-size: var(--text-base);
}

.btn:focus {
    outline: 2px solid var(--focus-color);
    outline-offset: 2px;
}

/* Card action buttons */
.card-action-btn {
    display: inline-block;
    margin-top: 15px;
    padding: 8px 16px;
    background: var(--accent-color);
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-size: var(--text-xs);
    font-weight: 500;
    transition: all var(--transition-base);
}

.card-action-btn:hover {
    background: var(--focus-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* Social section */
.social-section {
    padding: 40px 0;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.social-section h2 {
    font-family: var(--primary-font);
    font-size: var(--text-2xl);
    margin-bottom: 30px;
    text-align: center;
    font-weight: 600;
    color: var(--text-color);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.social-link {
    display: flex;
    align-items: center;
    padding: 12px 18px;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    text-decoration: none;
    color: var(--text-color);
    transition: all var(--transition-base);
    font-size: var(--text-sm);
    font-weight: 500;
    position: relative;
    overflow: hidden;
    /* 修正: デフォルトで表示状態にする */
    opacity: 1;
    transform: translateY(0);
}

.social-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left var(--transition-slow);
}

.social-link:hover::before {
    left: 100%;
}

.social-link:hover {
    background: var(--hover-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.social-link:focus {
    outline: 2px solid var(--focus-color);
    outline-offset: 2px;
}

.social-icon {
    width: 30px;
    height: 30px;
    background: var(--text-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    transition: background-color var(--transition-base);
}

.social-icon svg {
    color: white;
    width: 16px;
    height: 16px;
}

.social-link:hover .social-icon {
    background: var(--text-light);
}

/* Loading */
.loading {
    text-align: center;
    color: var(--text-lighter);
    font-style: italic;
    padding: 40px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Footer */
.footer {
    padding: 60px 0 40px;
}

.footer-content {
    text-align: center;
    color: var(--text-lighter);
    font-size: var(--text-sm);
    line-height: 1.8;
}

.footer-content p:first-child {
    margin-bottom: 10px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn var(--transition-base) ease;
    backdrop-filter: blur(5px);
}

.modal[aria-hidden="false"] {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    animation: scaleIn var(--transition-base) ease;
}

@keyframes scaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-image {
    width: 100%;
    height: auto;
    display: block;
    max-height: 90vh;
    object-fit: contain;
}

.modal-video {
    width: 80vw;
    height: 45vw;
    max-width: 1200px;
    max-height: 675px;
    border: none;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    user-select: none;
    line-height: 1;
    background: none;
    border: none;
    transition: opacity var(--transition-base);
}

.close-modal:hover,
.close-modal:focus {
    opacity: 0.7;
    outline: 2px solid white;
    outline-offset: 2px;
    border-radius: 4px;
}

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

/* =====================================
   Filter Tabs (Universal)
   ===================================== */

.filter-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 10px 25px;
    border: 1px solid var(--border-color);
    background: var(--white);
    color: var(--text-color);
    border-radius: 25px;
    font-size: var(--text-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-base);
    font-family: var(--secondary-font);
}

.filter-tab:hover {
    background: var(--hover-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.filter-tab.active {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.filter-tab:focus {
    outline: 2px solid var(--focus-color);
    outline-offset: 2px;
}

/* =====================================
   Gallery Page Styles
   ===================================== */

.gallery-filters {
    padding: 0 0 60px;
    text-align: center;
}

.main-gallery {
    padding-bottom: 80px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.gallery-item {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all var(--transition-base);
    cursor: pointer;
    /* 修正: デフォルトで表示状態にする */
    opacity: 1;
    transform: translateY(0);
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.gallery-item:focus {
    outline: 2px solid var(--focus-color);
    outline-offset: 2px;
}

.gallery-item.photo {
    cursor: pointer;
}

.gallery-item.video {
    cursor: default;
}

.gallery-media {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.gallery-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-base);
    filter: grayscale(0.1) contrast(1.05);
}

.gallery-item:hover .gallery-media img {
    transform: scale(1.02);
    filter: grayscale(0) contrast(1.1);
}

.gallery-media iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.gallery-item.video .gallery-media::after {
    content: '▶';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.7);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    opacity: 0;
    transition: opacity var(--transition-base);
    pointer-events: none;
}

.gallery-item.video:hover .gallery-media::after {
    opacity: 1;
}

.gallery-info {
    padding: 25px;
}

.gallery-info h3 {
    font-family: var(--primary-font);
    font-size: var(--text-xl);
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-color);
    line-height: 1.3;
}

.gallery-description {
    font-size: var(--text-sm);
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 20px;
}

.gallery-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.gallery-location,
.gallery-date {
    font-size: var(--text-xs);
    color: var(--text-lighter);
    background: var(--hover-color);
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 500;
}

.gallery-location {
    background: var(--accent-color);
    color: white;
}

.gallery-item.hidden {
    display: none;
}

/* フィルタリング用のアニメーション修正 */
.gallery-item.filtering-out {
    opacity: 0;
    transform: translateY(20px) scale(0.8);
    transition: all var(--transition-base);
}

.gallery-item.filtering-in {
    opacity: 1;
    transform: translateY(0) scale(1);
    transition: all var(--transition-base);
}

/* Back to home */
.back-to-home {
    padding: 60px 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    font-size: var(--text-lg);
    transition: all var(--transition-base);
    padding: 12px 25px;
    border: 1px solid var(--border-color);
    border-radius: 30px;
    background: var(--white);
}

.back-link:hover {
    color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.back-link:focus {
    outline: 2px solid var(--focus-color);
    outline-offset: 2px;
}

.back-arrow {
    font-size: var(--text-xl);
    transition: transform var(--transition-base);
}

.back-link:hover .back-arrow {
    transform: translateX(-3px);
}

/* =====================================
   Gear Page Styles
   ===================================== */

.gear-filters {
    padding: 0 0 60px;
    text-align: center;
}

.gear-section {
    padding-bottom: 80px;
    width: 100%;
}

.gear-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
    align-items: start;
    width: 100%;
}

.gear-item {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all var(--transition-base);
    position: relative;
    display: flex;
    flex-direction: column;
    height: auto;
    width: 100%;
    min-height: 600px;
    /* 修正: デフォルトで表示状態にする */
    opacity: 1;
    transform: translateY(0);
}

.gear-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.gear-item.featured {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.gear-image {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    flex-shrink: 0;
}

.gear-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-base);
}

.gear-item:hover .gear-image img {
    transform: scale(1.05);
}

.gear-status {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.gear-status.available {
    background: var(--success-color);
    color: white;
}

.gear-status.sold {
    background: var(--error-color);
    color: white;
}

.gear-status.considering {
    background: var(--warning-color);
    color: white;
}

.gear-status.not-for-sale {
    background: var(--text-lighter);
    color: white;
}

.gear-info {
    padding: 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.gear-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.gear-header h3 {
    font-family: var(--primary-font);
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
    flex: 1;
    min-width: 0;
}

.gear-price {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--accent-color);
    flex-shrink: 0;
}

.gear-specs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.spec-item {
    background: var(--hover-color);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: var(--text-xs);
    font-weight: 500;
    color: var(--text-light);
    white-space: nowrap;
}

.gear-description {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.gear-experience {
    background: var(--hover-color);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.gear-experience h4 {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.gear-experience p {
    font-size: var(--text-sm);
    color: var(--text-light);
    line-height: 1.5;
    margin: 0;
}

.gear-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: auto;
}

.gear-item.hidden {
    display: none;
}

/* Selling info section */
.selling-info {
    padding: 80px 0;
    border-top: 1px solid var(--border-color);
}

.selling-info h2 {
    font-family: var(--primary-font);
    font-size: var(--text-3xl);
    margin-bottom: 40px;
    text-align: center;
    font-weight: 600;
    color: var(--text-color);
}

.selling-content {
    max-width: 800px;
    margin: 0 auto;
}

.selling-content > p {
    font-size: var(--text-lg);
    color: var(--text-light);
    text-align: center;
    margin-bottom: 40px;
    line-height: 1.7;
}

.selling-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.feature-item {
    text-align: center;
    padding: 30px 20px;
    background: var(--white);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.feature-item h4 {
    font-family: var(--primary-font);
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 15px;
}

.feature-item p {
    color: var(--text-light);
    font-size: var(--text-sm);
    line-height: 1.5;
}

.contact-section {
    text-align: center;
    padding: 40px;
    background: var(--hover-color);
    border-radius: 12px;
}

.contact-section h4 {
    font-family: var(--primary-font);
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 15px;
}

.contact-section p {
    color: var(--text-light);
    margin-bottom: 25px;
}

/* Category Grid */
.gear-categories {
    padding-bottom: 80px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.category-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all var(--transition-base);
    position: relative;
    /* 修正: デフォルトで表示状態にする */
    opacity: 1;
    transform: translateY(0);
}

.category-card.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.category-image {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-base);
    filter: brightness(0.9) contrast(1.1);
}

.category-card:hover .category-image img {
    transform: scale(1.05);
    filter: brightness(1) contrast(1.2);
}

.category-info {
    padding: 40px;
}

.category-info h2 {
    font-family: var(--primary-font);
    font-size: var(--text-3xl);
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 16px;
    line-height: 1.2;
}

.category-info p {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 24px;
    font-size: var(--text-base);
}

.category-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.stat-item {
    font-size: var(--text-sm);
    color: var(--text-lighter);
    background: var(--hover-color);
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 500;
}

.category-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    background: var(--accent-color);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: var(--text-base);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.category-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left var(--transition-slow);
}

.category-btn:hover::before {
    left: 100%;
}

.category-btn:hover {
    background: var(--focus-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3);
}

.btn-arrow {
    font-size: var(--text-lg);
    transition: transform var(--transition-base);
}

.category-btn:hover .btn-arrow {
    transform: translateX(4px);
}

/* =====================================
   Writings Page Styles
   ===================================== */

/* Writing Sections */
.writings-sections {
    padding-bottom: 80px;
}

.writing-section {
    margin-bottom: 80px;
    padding-bottom: 60px;
    border-bottom: 1px solid var(--border-color);
}

.writing-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-family: var(--primary-font);
    font-size: var(--text-3xl);
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 15px;
}

.section-description {
    color: var(--text-light);
    font-size: var(--text-lg);
    margin-bottom: 20px;
    line-height: 1.6;
}

.external-link {
    display: inline-flex;
    align-items: center;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    font-size: var(--text-sm);
    transition: all var(--transition-base);
    padding: 8px 16px;
    border: 1px solid var(--accent-color);
    border-radius: 20px;
    background: transparent;
}

.external-link:hover {
    background: var(--accent-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Articles Grid */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.article-item {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.article-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left var(--transition-slow);
    z-index: 1;
    pointer-events: none;
}

.article-item:hover::before {
    left: 100%;
}

.article-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.article-item.featured {
    border-color: var(--accent-color);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.02), transparent);
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    font-size: var(--text-xs);
    position: relative;
    z-index: 2;
}

.article-source {
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.article-source.note {
    background: #00D4AA;
    color: white;
}

.article-source.drone {
    background: #ff6b35;
    color: white;
}

.article-source.other {
    background: var(--text-lighter);
    color: white;
}

.article-meta time {
    color: var(--text-lighter);
}

.article-item h3 {
    font-family: var(--primary-font);
    font-size: var(--text-lg);
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 15px;
    position: relative;
    z-index: 2;
}

.article-item h3 a {
    color: var(--text-color);
    text-decoration: none;
    transition: color var(--transition-base);
}

.article-item h3 a:hover {
    color: var(--accent-color);
}

.article-item h3 a:focus {
    outline: 2px solid var(--focus-color);
    outline-offset: 2px;
    border-radius: 4px;
}

.article-excerpt {
    color: var(--text-light);
    line-height: 1.6;
    font-size: var(--text-sm);
    position: relative;
    z-index: 2;
}

.contact-link {
    color: var(--success-color) !important;
    font-weight: 600;
}

.contact-link:hover {
    color: #059669 !important;
}

/* Subscribe Section */
.subscribe-section {
    padding: 80px 0;
    background: var(--hover-color);
    border-radius: 16px;
    text-align: center;
    margin-bottom: 80px;
}

.subscribe-section h2 {
    font-family: var(--primary-font);
    font-size: var(--text-3xl);
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 50px;
}

.subscribe-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.subscribe-btn {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 30px;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    text-decoration: none;
    color: var(--text-color);
    transition: all var(--transition-base);
    text-align: left;
}

.subscribe-btn:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--accent-color);
}

.subscribe-btn:focus {
    outline: 2px solid var(--focus-color);
    outline-offset: 2px;
}

.subscribe-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--hover-color);
    border-radius: 50%;
}

.subscribe-btn.note .subscribe-icon {
    background: #00D4AA;
    color: white;
}

.subscribe-btn.drone .subscribe-icon {
    background: #ff6b35;
    color: white;
}

.subscribe-btn.twitter .subscribe-icon {
    background: #1da1f2;
    color: white;
}

.subscribe-btn h4 {
    font-family: var(--primary-font);
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 8px;
}

.subscribe-btn p {
    color: var(--text-light);
    font-size: var(--text-sm);
    line-height: 1.5;
    margin: 0;
}

/* Loading State */
.writings-sections .loading {
    text-align: center;
    color: var(--text-lighter);
    font-style: italic;
    padding: 60px 20px;
    grid-column: 1 / -1;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
    
    .nav-container {
        padding: 0 20px;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--white);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 50px;
        gap: 40px;
        transition: left var(--transition-base);
        box-shadow: var(--shadow-lg);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-link {
        font-size: var(--text-lg);
        padding: 10px 20px;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-toggle.active span:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }
    
    body.nav-open {
        overflow: hidden;
    }
    
    .hero-title,
    .gallery-hero-title,
    .gear-hero-title,
    .writings-hero-title {
        font-size: var(--text-3xl);
    }
    
    .hero-subtitle,
    .gallery-hero-subtitle,
    .gear-hero-subtitle,
    .writings-hero-subtitle {
        font-size: var(--text-base);
    }
    
    .hero-overlay,
    .gallery-hero-overlay,
    .gear-hero-overlay,
    .writings-hero-overlay {
        bottom: 40px;
    }
    
    .gallery-hero,
    .gear-hero,
    .writings-hero {
        height: 50vh;
        min-height: 300px;
    }
    
    /* Mobile grid layout */
    .content-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        padding: 60px 0;
    }
    
    .content-card:nth-child(1) {
        grid-column: 1;
        grid-row: 1;
        order: 1;
    }
    
    .content-card:nth-child(2) {
        grid-column: 1;
        grid-row: 2;
        order: 2;
    }
    
    .content-card.large {
        grid-column: 1;
        grid-row: 3;
        order: 3;
    }
    
    .intro,
    .gallery-intro,
    .gear-intro,
    .writings-intro {
        padding: 60px 0 40px;
    }
    
    .social-section {
        padding: 30px 0;
    }
    
    .social-links {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .lead {
        font-size: var(--text-base);
    }
    
    .social-section h2 {
        font-size: var(--text-lg);
        margin-bottom: 20px;
    }
    
    .modal-content {
        max-width: 95%;
        max-height: 85%;
    }
    
    .modal-video {
        width: 90vw;
        height: 50.625vw;
        max-width: none;
        max-height: 70vh;
    }
    
    .close-modal {
        top: 10px;
        right: 15px;
        font-size: 30px;
    }
    
    /* Gallery mobile */
    .gallery-filters,
    .gear-filters {
        padding: 0 0 40px;
    }
    
    .filter-tabs {
        gap: 10px;
    }
    
    .filter-tab {
        padding: 8px 16px;
        font-size: var(--text-xs);
    }
    
    .gallery-grid,
    .gear-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .gallery-media {
        height: 200px;
    }
    
    .gallery-info,
    .gear-info {
        padding: 20px;
    }
    
    .gallery-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    /* Gear mobile specific */
    .gear-section {
        padding-bottom: 60px;
    }
    
    .gear-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .gear-actions {
        flex-direction: column;
    }
    
    .gear-actions .btn {
        width: 100%;
    }
    
    .selling-features {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .feature-item {
        padding: 25px 15px;
    }
    
    .contact-section {
        padding: 30px 20px;
    }
    
    .selling-info {
        padding: 60px 0;
    }
    
    .selling-info h2 {
        font-size: var(--text-2xl);
        margin-bottom: 30px;
    }
    
    .back-to-home {
        padding: 40px 0;
    }
    
    .back-link {
        font-size: var(--text-base);
        padding: 10px 20px;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .category-image {
        height: 220px;
    }
    
    .category-info {
        padding: 30px 25px;
    }
    
    .category-info h2 {
        font-size: var(--text-2xl);
        margin-bottom: 12px;
    }
    
    .category-info p {
        font-size: var(--text-sm);
        margin-bottom: 20px;
    }
    
    .category-stats {
        gap: 15px;
        margin-bottom: 25px;
    }
    
    .stat-item {
        font-size: var(--text-xs);
        padding: 6px 12px;
    }
    
    .category-btn {
        padding: 14px 28px;
        font-size: var(--text-sm);
        width: 100%;
        justify-content: center;
    }
    
    /* Writings mobile */
    .writings-sections {
        padding-bottom: 60px;
    }
    
    .writing-section {
        margin-bottom: 60px;
        padding-bottom: 40px;
    }
    
    .section-header {
        margin-bottom: 40px;
    }
    
    .section-header h2 {
        font-size: var(--text-2xl);
        margin-bottom: 12px;
    }
    
    .section-description {
        font-size: var(--text-base);
        margin-bottom: 15px;
    }
    
    .external-link {
        padding: 6px 12px;
        font-size: var(--text-xs);
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .article-item {
        padding: 25px 20px;
    }
    
    .article-meta {
        gap: 12px;
        margin-bottom: 12px;
        flex-wrap: wrap;
    }
    
    .article-item h3 {
        font-size: var(--text-base);
        margin-bottom: 12px;
    }
    
    .article-excerpt {
        font-size: var(--text-xs);
    }
    
    .subscribe-section {
        padding: 60px 30px;
        margin-bottom: 60px;
    }
    
    .subscribe-section h2 {
        font-size: var(--text-2xl);
        margin-bottom: 40px;
    }
    
    .subscribe-options {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .subscribe-btn {
        padding: 25px 20px;
        gap: 15px;
    }
    
    .subscribe-icon {
        font-size: 2rem;
        width: 50px;
        height: 50px;
    }
    
    .subscribe-btn h4 {
        font-size: var(--text-base);
        margin-bottom: 6px;
    }
    
    .subscribe-btn p {
        font-size: var(--text-xs);
    }
}

@media (max-width: 480px) {
    .hero-title,
    .gallery-hero-title,
    .gear-hero-title,
    .writings-hero-title {
        font-size: var(--text-2xl);
    }
    
    .content-info {
        padding: 20px;
    }
    
    .social-links {
        flex-direction: column;
        gap: 8px;
    }
    
    .social-link {
        padding: 10px 15px;
        font-size: var(--text-xs);
    }
    
    .social-icon {
        width: 25px;
        height: 25px;
        margin-right: 8px;
    }
    
    .social-icon svg {
        width: 14px;
        height: 14px;
    }
    
    .modal-video {
        width: 95vw;
        height: 53.4375vw;
    }
    
    .gallery-hero-overlay,
    .gear-hero-overlay,
    .writings-hero-overlay {
        bottom: 30px;
    }
    
    .filter-tabs {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
    
    .filter-tab {
        width: 80%;
        max-width: 200px;
    }
    
/* =========================================================
   Thumbnails (UNIFIED)
   - 16:9 固定枠
   - 画像は歪みなし（デフォルト: contain）/ cover に切替可
   ========================================================= */

/* 変更しやすいように変数化 */
:root {
  --thumb-aspect: 16/9;     /* 枠の比率（変更可） */
  --thumb-radius: 12px;     /* 角丸 */
  --thumb-bg: #000;         /* 読み込み時の背景 */
  --thumb-fit: contain;     /* contain=トリミング無し / cover=トリミング有り */
}

/* 16:9 の“器”（figure）を作る */
figure.article-thumb,
.articles-grid .article-item > figure.article-thumb {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: var(--thumb-aspect);
  overflow: hidden;
  border-radius: var(--thumb-radius);
  background: var(--thumb-bg);
  margin: 0 0 16px;
}

/* 画像は器の中で絶対配置。歪ませずに収める（デフォルト contain） */
figure.article-thumb > img,
.articles-grid .article-item > figure.article-thumb > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: var(--thumb-fit);
  object-position: center center;
  max-width: none;
  max-height: none;
  display: block;
}

/* --- オプション：特定のカードだけ cover にしたい場合 --- */
/* figure.article-thumb.thumb--cover { --thumb-fit: cover; } */
/* figure.article-thumb.thumb--contain { --thumb-fit: contain; } */

/* aspect-ratio 未対応ブラウザ（ほぼ不要） */
@supports not (aspect-ratio: 1) {
  figure.article-thumb,
  .articles-grid .article-item > figure.article-thumb {
    height: 0;
    padding-top: calc(100% / (16/9)); /* 16:9 */
  }
  figure.article-thumb > img,
  .articles-grid .article-item > figure.article-thumb > img {
    position: absolute;
  }
}
  figure.article-thumb > img,
  .articles-grid .article-item > figure.article-thumb > img {
    position: absolute;
  }
}
  /* ←この } が480pxメディアクエリの終わり */

  
/* =====================================
   Gallery: Note Article Link (order + style)
   ===================================== */

.gallery-info {
  display: flex;
  flex-direction: column;
}

.gallery-info .gallery-note { 
  order: 5;
  margin: 6px 0 12px;
}

.gallery-info .gallery-meta {
  order: 10;
}

.note-link {
  display: inline-block;
  color: #000;
  font-family: var(--primary-font);
  font-weight: 600;
  text-decoration: none;
  line-height: 1.4;
  border-bottom: 1px solid rgba(0,0,0,0.35);
  padding-bottom: 1px;
  font-family: var(--primary-font);
}

.note-link:hover {
  border-bottom-color: rgba(255,255,255,0.8);
}

.note-link:focus {
  outline: 2px solid rgba(255,255,255,0.9);
  outline-offset: 2px;
  border-radius: 2px;
}

@media (max-width: 768px) {
  .gallery-info .gallery-note {
    margin: 4px 0 10px;
  }
}
