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

body {
    font-family: "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
    line-height: 1.6;
    color: #222;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-header {
    position: relative;
    z-index: 100;
    border-bottom: 1px solid #ececec;
    background: #fff;
}

body.site-menu-open .site-header {
    z-index: 1002;
}

.site-header__inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0.55rem 1.25rem;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    line-height: 0;
}

.site-logo img {
    display: block;
    width: auto;
    height: 32px;
    max-width: 120px;
    object-fit: contain;
}

/* Hamburger menu (PC / mobile共通) */
.site-menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    color: #222;
    transition: background 0.2s ease;
}

.site-menu-toggle:hover {
    background: #f3f4f6;
}

.site-menu-toggle__bar {
    display: block;
    width: 1.35rem;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
    transition: transform 0.25s ease, opacity 0.2s ease;
}

.site-menu-toggle[aria-expanded="true"] .site-menu-toggle__bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.site-menu-toggle[aria-expanded="true"] .site-menu-toggle__bar:nth-child(2) {
    opacity: 0;
}

.site-menu-toggle[aria-expanded="true"] .site-menu-toggle__bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.site-menu {
    position: fixed;
    inset: 0;
    z-index: 1000;
    pointer-events: none;
}

.site-menu:not([hidden]) {
    pointer-events: auto;
}

.site-menu__backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    padding: 0;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    cursor: pointer;
    transition: opacity 0.25s ease;
}

.site-menu:not([hidden]) .site-menu__backdrop {
    opacity: 1;
}

.site-menu__panel {
    position: absolute;
    top: 0;
    right: 0;
    width: min(280px, 85vw);
    height: 100%;
    background: #fff;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
    transform: translateX(100%);
    transition: transform 0.28s ease;
    padding: 1rem 1.25rem 2rem;
    overflow-y: auto;
}

.site-menu__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #ececec;
}

.site-menu__title {
    font-size: 0.75rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #888;
}

.site-menu__close {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    color: #222;
    flex-shrink: 0;
}

.site-menu__close:hover,
.site-menu__close:focus-visible {
    background: #f3f4f6;
}

.site-menu__close-bar {
    position: absolute;
    display: block;
    width: 1.25rem;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
}

.site-menu__close-bar:nth-child(1) {
    transform: rotate(45deg);
}

.site-menu__close-bar:nth-child(2) {
    transform: rotate(-45deg);
}

.site-menu:not([hidden]) .site-menu__panel {
    transform: translateX(0);
}

.site-menu__list {
    list-style: none;
    display: grid;
    gap: 0.25rem;
}

.site-menu__link {
    display: block;
    padding: 0.85rem 0.75rem;
    border-radius: 8px;
    color: #222;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: background 0.15s ease, color 0.15s ease;
}

.site-menu__link:hover,
.site-menu__link:focus-visible {
    background: #f3f4f6;
    text-decoration: none;
}

body.site-menu-open {
    overflow: hidden;
}

.site-main {
    flex: 1;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem 1.25rem;
}

.site-footer {
    border-top: 1px solid #e5e5e5;
    margin-top: auto;
}

.site-footer__inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.25rem;
    text-align: center;
}

.site-footer__copy {
    font-size: 0.875rem;
    color: #666;
}

/* Hero slideshow */
.hero-slideshow {
    width: 100%;
    padding: 1.25rem 0 1.5rem;
    background: #fff;
    overflow: hidden;
}

.hero-slideshow__track {
    position: relative;
    width: 100%;
    height: 210px;
    margin: 0 auto;
}

.hero-slideshow__slide {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(52%, 520px);
    height: 100%;
    margin: 0;
    border-radius: 10px;
    overflow: hidden;
    background: #f3f3f3;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translate(-50%, -50%) scale(0.72);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.45s ease, opacity 0.45s ease, width 0.45s ease, height 0.45s ease;
    z-index: 1;
}

.hero-slideshow__slide.is-prev,
.hero-slideshow__slide.is-next {
    width: min(40%, 380px);
    height: 82%;
    opacity: 0.72;
    pointer-events: auto;
    cursor: pointer;
    z-index: 2;
}

.hero-slideshow__slide.is-prev {
    transform: translate(calc(-50% - 34vw), -50%) scale(0.86);
}

.hero-slideshow__slide.is-next {
    transform: translate(calc(-50% + 34vw), -50%) scale(0.86);
}

.hero-slideshow__slide.is-active {
    width: min(52%, 520px);
    height: 100%;
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
    z-index: 3;
}

.hero-slideshow__slide.is-hidden {
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0.6);
    z-index: 0;
}

.hero-slideshow__slide img,
.hero-slideshow__link {
    display: block;
    width: 100%;
    height: 100%;
}

.hero-slideshow__frame {
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-slideshow__frame img {
    width: 100%;
    height: 100%;
    display: block;
}

.hero-slideshow__slide img {
    object-fit: contain;
}

.hero-slideshow__dots {
    display: flex;
    justify-content: center;
    gap: 0.55rem;
    margin-top: 0.9rem;
}

.hero-slideshow__dot {
    width: 9px;
    height: 9px;
    border: 0;
    border-radius: 50%;
    padding: 0;
    background: #cfcfcf;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-slideshow__dot.is-active {
    background: #555;
    transform: scale(1.15);
}

.hero-slideshow__dot:focus-visible {
    outline: 2px solid #555;
    outline-offset: 2px;
}

.hero-slideshow__dot:focus-visible {
    outline: 2px solid #555;
    outline-offset: 2px;
}

/* Top news */
.top-news {
    width: 100%;
    background: #fafafa;
    border-bottom: 1px solid #ececec;
}

.top-news__inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.5rem 1.25rem 1.75rem;
}

.top-news__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.top-news__title {
    font-size: 1.125rem;
    font-weight: 700;
}

.top-news__more {
    font-size: 0.875rem;
    color: #555;
}

.top-news__list {
    list-style: none;
    display: grid;
    gap: 0.75rem;
}

.top-news__item {
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e8e8e8;
}

.top-news__item:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.top-news__link {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.75rem 1rem;
    color: inherit;
    text-decoration: none;
}

.top-news__link:hover .top-news__post-title {
    text-decoration: underline;
}

.top-news__date {
    flex: 0 0 auto;
    font-size: 0.875rem;
    color: #777;
}

.top-news__post-title {
    flex: 1 1 auto;
    font-size: 0.95rem;
}

.top-news__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.35rem;
}

/* Blog */
.page-title,
.blog-article__title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.blog-tag-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.blog-tag-nav__link {
    display: inline-block;
    padding: 0.3rem 0.7rem;
    border: 1px solid #ddd;
    border-radius: 999px;
    font-size: 0.85rem;
    color: #444;
    text-decoration: none;
}

.blog-tag-nav__link.is-active {
    background: #222;
    border-color: #222;
    color: #fff;
}

.blog-tag {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    background: #efefef;
    font-size: 0.75rem;
    color: #555;
    text-decoration: none;
}

.blog-list {
    list-style: none;
    display: grid;
    gap: 1.25rem;
}

.blog-list__item {
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #ececec;
}

.blog-list__date,
.blog-article__date {
    display: block;
    font-size: 0.875rem;
    color: #777;
    margin-bottom: 0.35rem;
}

.blog-list__tags,
.blog-article__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
}

.blog-list__title {
    font-size: 1.125rem;
    margin-bottom: 0.35rem;
}

.blog-list__title a {
    color: inherit;
    text-decoration: none;
}

.blog-list__title a:hover {
    text-decoration: underline;
}

.blog-list__excerpt {
    font-size: 0.9rem;
    color: #555;
}

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

.blog-pagination__link {
    display: inline-block;
    padding: 0.45rem 0.9rem;
    border: 1px solid #ddd;
    border-radius: 999px;
    color: #333;
    text-decoration: none;
    font-size: 0.9rem;
}

.blog-pagination__link:hover {
    background: #f5f5f5;
    text-decoration: none;
}

.blog-pagination__info {
    font-size: 0.9rem;
    color: #666;
}

.blog-article__back {
    margin-bottom: 1rem;
}

.blog-article__body {
    line-height: 1.8;
}

/* Top gallery teaser */
.top-gallery {
    width: 100%;
    background: linear-gradient(135deg, #faf7f2 0%, #f3f6fb 100%);
    border-bottom: 1px solid #ececec;
}

.top-gallery__inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1.25rem;
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 1.5rem;
    align-items: center;
}

.top-gallery__eyebrow {
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #888;
    margin-bottom: 0.35rem;
}

.top-gallery__title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.top-gallery__text {
    color: #555;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.top-gallery__btn {
    display: inline-block;
    padding: 0.55rem 1.1rem;
    border-radius: 999px;
    background: #222;
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
}

.top-gallery__btn:hover {
    background: #444;
    text-decoration: none;
}

.top-gallery__mosaic {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: repeat(4, 42px);
    gap: 0.45rem;
}

.top-gallery__thumb {
    border-radius: 8px;
    overflow: hidden;
    background: #e8e8e8;
    display: block;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.top-gallery__thumb:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.top-gallery__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.top-gallery__thumb--1 { grid-column: 1 / 4; grid-row: 1 / 3; }
.top-gallery__thumb--2 { grid-column: 4 / 7; grid-row: 1 / 4; }
.top-gallery__thumb--3 { grid-column: 1 / 3; grid-row: 3 / 5; }
.top-gallery__thumb--4 { grid-column: 3 / 5; grid-row: 3 / 5; }
.top-gallery__thumb--5 { grid-column: 5 / 7; grid-row: 4 / 5; }

.top-gallery__placeholder {
    min-height: 180px;
    border: 1px dashed #ccc;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.5);
}

/* Gallery page */
.gallery-page__header {
    margin-bottom: 1.25rem;
}

.gallery-page__lead {
    color: #666;
    font-size: 0.95rem;
}

.gallery-controls {
    margin-bottom: 1.5rem;
    display: grid;
    gap: 1rem;
}

.gallery-controls__row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    align-items: end;
    justify-content: space-between;
}

.gallery-search {
    display: grid;
    gap: 0.35rem;
    flex: 1 1 220px;
}

.gallery-search__label {
    font-size: 0.85rem;
    color: #555;
}

.gallery-search input {
    width: 100%;
    padding: 0.55rem 0.7rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    font: inherit;
}

.gallery-view-toggle {
    display: inline-flex;
    border: 1px solid #ddd;
    border-radius: 999px;
    overflow: hidden;
    background: #fff;
}

.gallery-view-btn {
    border: 0;
    background: transparent;
    padding: 0.5rem 0.9rem;
    font: inherit;
    font-size: 0.85rem;
    cursor: pointer;
    color: #444;
}

.gallery-view-btn.is-active {
    background: #222;
    color: #fff;
}

.gallery-tag-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.gallery-tag-btn {
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    font: inherit;
    font-size: 0.85rem;
    cursor: pointer;
    color: #444;
}

.gallery-tag-btn.is-active {
    background: #222;
    border-color: #222;
    color: #fff;
}

.gallery-stage__viewport {
    position: relative;
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

/* Gallery mosaic */
.gallery-mosaic-section {
    margin-bottom: 2rem;
}

.gallery-mosaic {
    --mosaic-row-size: 52px;
    position: relative;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: var(--mosaic-row-size);
    gap: 0;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0.5rem 0 2rem;
}

.gallery-mosaic__item {
    position: relative;
    display: block;
    text-decoration: none;
    color: inherit;
    transform: rotate(var(--mosaic-rot, 0deg));
    transition: transform 0.25s ease, box-shadow 0.25s ease, z-index 0s;
    border-radius: 14px;
    overflow: visible;
    opacity: 0;
    animation: gallery-mosaic-arrive 0.5s ease-out var(--mosaic-delay, 0ms) forwards;
}

@keyframes gallery-mosaic-arrive {
    from {
        opacity: 0;
        transform: translateY(18px) rotate(var(--mosaic-rot, 0deg)) scale(0.94);
    }
    to {
        opacity: 1;
        transform: translateY(0) rotate(var(--mosaic-rot, 0deg)) scale(1);
    }
}

.gallery-mosaic__item:hover,
.gallery-mosaic__item:focus-visible {
    transform: rotate(0deg) scale(1.04);
    z-index: 20 !important;
    outline: none;
}

.gallery-mosaic__frame {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 14px;
    overflow: hidden;
    background: #ececec;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
    border: 3px solid #fff;
}

.gallery-mosaic__item:hover .gallery-mosaic__frame,
.gallery-mosaic__item:focus-visible .gallery-mosaic__frame {
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
}

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

.gallery-mosaic__label {
    position: absolute;
    left: 0.65rem;
    right: 0.65rem;
    bottom: 0.55rem;
    padding: 0.25rem 0.55rem;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.62);
    color: #fff;
    font-size: 0.72rem;
    line-height: 1.35;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

.gallery-mosaic__item:hover .gallery-mosaic__label,
.gallery-mosaic__item:focus-visible .gallery-mosaic__label {
    opacity: 1;
    transform: translateY(0);
}

.gallery-grid__list {
    list-style: none;
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.gallery-grid__link {
    display: block;
    color: inherit;
    text-decoration: none;
    height: 100%;
}

.gallery-grid__link:hover .gallery-grid__card {
    border-color: #ccc;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.gallery-grid__card {
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.gallery-grid__thumb {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    box-sizing: border-box;
}

.gallery-grid__thumb img,
.gallery-grid__card img {
    display: block;
    max-height: 240px;
    max-width: 100%;
    width: auto;
    height: auto;
}

.gallery-grid__card figcaption {
    padding: 0.75rem;
    font-size: 0.85rem;
}

.gallery-grid__card strong {
    display: block;
    margin-bottom: 0.25rem;
}

.gallery-grid__card p {
    color: #666;
    line-height: 1.5;
}

.gallery-grid__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.45rem;
}

.gallery-grid__badge {
    display: inline-block;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    background: #eef2ff;
    color: #4338ca;
    font-size: 0.72rem;
}

.gallery-grid__tags {
    font-size: 0.72rem;
    color: #777;
}

.gallery-empty {
    text-align: center;
    color: #777;
    padding: 2rem 0;
}

/* Gallery detail */
.gallery-article__back {
    margin-bottom: 1rem;
}

.gallery-article__visual {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    border-radius: 12px;
    padding: 0.75rem;
}

.gallery-article__visual img {
    display: block;
    max-height: 720px;
    max-width: 100%;
    width: auto;
    height: auto;
}

.gallery-article__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.75rem;
}

.gallery-article__badge {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    background: #eef2ff;
    color: #4338ca;
    font-size: 0.78rem;
}

.gallery-article__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.gallery-tag {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    background: #efefef;
    font-size: 0.75rem;
    color: #555;
    text-decoration: none;
}

.gallery-tag:hover {
    background: #e2e2e2;
    text-decoration: none;
}

.gallery-article__title {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.gallery-article__description {
    line-height: 1.8;
    color: #444;
}

.is-hidden {
    display: none !important;
}

/* Admin styles moved to /admin/css/admin.css */
@media (max-width: 700px) {
    .hero-slideshow {
        padding: 0.9rem 0 1.1rem;
    }

    .hero-slideshow__track {
        height: 150px;
    }

    .hero-slideshow__slide.is-prev {
        transform: translate(calc(-50% - 38vw), -50%) scale(0.82);
    }

    .hero-slideshow__slide.is-next {
        transform: translate(calc(-50% + 38vw), -50%) scale(0.82);
    }

    .hero-slideshow__slide.is-active {
        width: min(64%, 360px);
    }

    .site-header__inner {
        min-height: 48px;
        padding: 0.45rem 1rem;
    }

    .site-logo img {
        height: 28px;
        max-width: 104px;
    }

    .top-news__link {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .top-gallery__inner {
        grid-template-columns: 1fr;
    }

    .top-gallery__mosaic {
        grid-template-rows: repeat(4, 36px);
    }

    .gallery-mosaic {
        --mosaic-row-size: clamp(34px, 10vw, 43px);
        grid-template-columns: repeat(6, 1fr);
        width: calc(100% + 0.75rem);
        margin-left: -0.375rem;
        padding: 0.75rem 0.25rem 2rem;
    }

    .gallery-mosaic__item {
        border-radius: 11px;
    }

    .gallery-mosaic__item:active {
        transform: rotate(0deg) scale(1.035);
        z-index: 20 !important;
    }

    .gallery-mosaic__frame {
        border-width: 2px;
        border-radius: 11px;
        box-shadow: 0 7px 18px rgba(0, 0, 0, 0.18);
    }

    .gallery-mosaic__label {
        left: 0.35rem;
        right: 0.35rem;
        bottom: 0.35rem;
        padding: 0.2rem 0.4rem;
        font-size: 0.65rem;
        opacity: 1;
        transform: none;
        background: linear-gradient(90deg, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.42));
    }
}

@media (prefers-reduced-motion: reduce) {
    .gallery-mosaic__item {
        opacity: 1;
        animation: none;
        transition: none;
    }
}
