:root {
    --header-offset: 17vw;
    --footer-height: 8vw;
    --panel-bg: rgba(255, 255, 255, 0.4);
    --modal-bg: rgba(0, 0, 0, 0.7);
}

body {
    margin: 0;
    padding: 0;
    background: url('img/bg.webp') no-repeat center center fixed;
    background-size: cover;
}

.fixed-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1250;
    overflow: hidden;
}

.header-inner {
    padding: 2vw 4vw;
}

.fixed-header-image {
    width: 100%;
    height: auto;
}

.content-area {
    position: fixed;
    left: 0;
    right: 0;
    bottom: var(--footer-height);
    top: var(--header-offset);
    overflow-y: auto;
    overflow-x: hidden;
}

.fixed-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1300;
    overflow: hidden;
}

.footer-inner {
    padding: 1vw 4vw;
}

.fixed-footer-img {
    width: 100%;
    height: auto;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto;
    gap: 2vw;
    width: 96vw;
    margin: 0 auto 0 auto;
    background: var(--panel-bg);
    padding: 2.5vw;
    box-sizing: border-box;
}

.grid-container img {
    width: 100%;
    height: auto;
    box-shadow: 3px 3px 5px rgba(0,0,0,0.5);
    cursor: pointer;
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
    user-select: none;
}

img {
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
    user-select: none;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--modal-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-close-layer {
    position: absolute;
    inset: 0;
    background: transparent;
    z-index: 3;
    cursor: pointer;
    -webkit-touch-callout: none;
    user-select: none;
    touch-action: manipulation;
}

.modal-overlay[hidden] {
    display: none;
}

.modal-img {
    position: relative;
    z-index: 2;
    max-width: 90vw;
    max-height: 90vh;
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
    user-select: none;
}

.line-image {
    position: fixed;
    left: 0;
    width: 100%;
    height: 1vw; /* 高さを自動調整 */
    z-index: 1400;
    object-fit: cover; /* 必要に応じて画像をカバー表示 */
}

.line-image.top {
    top: 0;
}

.line-image.bottom {
    bottom: 0;
}

.header-inner,
.footer-inner {
    width: 100%;
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    box-sizing: border-box;
}
