@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;600;700&family=Shippori+Mincho:wght@600&display=swap');

:root {
    --ink-900: #1f2a33;
    --ink-700: #3a4a58;
    --ink-500: #5a6a78;
    --surface: #f6f5f2;
    --surface-alt: #ffffff;
    --accent: #0f5f76;
    --accent-soft: #d6e4ea;
    --line: #d8dee3;
    --shadow: rgba(23, 39, 55, 0.08);
}

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

body {
    font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif;
    line-height: 1.7;
    color: var(--ink-900);
    background-color: var(--surface);
    background-image: radial-gradient(circle at 20% 20%, rgba(15, 95, 118, 0.08), transparent 45%),
        radial-gradient(circle at 80% 0%, rgba(90, 122, 152, 0.08), transparent 40%);
    min-height: 100vh;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

header {
    background: var(--surface-alt);
    border-bottom: 1px solid var(--line);
    padding: 2.5rem 1.5rem 2rem;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.eyebrow {
    font-size: 0.95rem;
    color: var(--ink-500);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

header h1 {
    font-family: "Shippori Mincho", "Hiragino Mincho ProN", serif;
    font-size: 2.4rem;
    margin: 0.6rem 0 0.4rem;
}

.subtitle {
    color: var(--ink-700);
    font-size: 1.05rem;
    margin-bottom: 0.6rem;
}

.source-link {
    font-size: 0.95rem;
    color: var(--ink-500);
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 4rem;
}

.filter-panel {
    background: var(--surface-alt);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px var(--shadow);
    margin-bottom: 2rem;
}

.filter-title h2 {
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
}

.filter-title p {
    color: var(--ink-500);
    font-size: 0.95rem;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.tag-btn {
    border: 1px solid var(--line);
    background: var(--surface-alt);
    color: var(--ink-700);
    padding: 0.6rem 1rem;
    border-radius: 999px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tag-btn span {
    color: var(--ink-500);
    margin-left: 0.35rem;
}

.tag-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.tag-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.tag-btn.active span {
    color: rgba(255, 255, 255, 0.8);
}

.tag-btn.disabled {
    cursor: not-allowed;
    color: var(--ink-500);
    background: #f2f3f4;
}

.gallery-section {
    background: var(--surface-alt);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 10px 30px var(--shadow);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.gallery-section h2 {
    font-size: 1.6rem;
    margin-bottom: 0.4rem;
}

.section-description {
    color: var(--ink-500);
    font-size: 1rem;
}

.result-summary {
    font-size: 0.95rem;
    color: var(--ink-700);
    background: var(--accent-soft);
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
}

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

.gallery-item {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: #fff;
    box-shadow: 0 8px 20px rgba(24, 47, 64, 0.08);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 24px rgba(24, 47, 64, 0.12);
}

.gallery-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.caption {
    padding: 0.9rem 1rem 1.1rem;
}

.caption h3 {
    font-size: 1rem;
    margin-bottom: 0.2rem;
}

.caption p {
    font-size: 0.9rem;
    color: var(--ink-500);
}

.meta-tags {
    margin-top: 0.6rem;
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.meta-tag {
    font-size: 0.75rem;
    background: var(--accent-soft);
    color: var(--ink-700);
    border-radius: 999px;
    padding: 0.2rem 0.6rem;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.page-btn {
    border: 1px solid var(--line);
    background: var(--surface-alt);
    padding: 0.5rem 0.9rem;
    border-radius: 8px;
    cursor: pointer;
    color: var(--ink-700);
    min-width: 48px;
}

.page-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.page-btn:disabled {
    cursor: not-allowed;
    color: var(--ink-500);
    background: #f2f3f4;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(9, 18, 24, 0.88);
    backdrop-filter: blur(6px);
    padding: 3rem 1.5rem;
}

.modal-content {
    margin: 0 auto;
    display: block;
    max-width: 90%;
    max-height: 70vh;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1020;
}

.modal-caption {
    margin: 1rem auto 0;
    text-align: center;
    color: #e6eef2;
    max-width: 720px;
    font-size: 1rem;
}

.modal-nav {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
    z-index: 1010;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 2rem;
    padding: 10px 15px;
    border-radius: 50%;
    cursor: pointer;
    pointer-events: auto;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.4);
}

footer {
    background: #1b2d36;
    color: #d3d9dd;
    padding: 2rem 1.5rem;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    font-size: 0.9rem;
}

@media (max-width: 900px) {
    header h1 {
        font-size: 2rem;
    }

    .gallery-section {
        padding: 1.5rem;
    }

    .gallery-item img {
        height: 200px;
    }
}

@media (max-width: 600px) {
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .result-summary {
        width: 100%;
        text-align: center;
    }

    .modal-content {
        max-height: 60vh;
    }
}
