/* サイト全体の色とフォントはここを編集します。 */
:root {
    --cream: #f4efe6;
    --cream-alt: #ede8df;
    --ink: #0c0c0c;
    --gold: #b89a5a;
    --gold-light: #d4b97a;
    --steel: #7a7a7a;
    --steel-light: #adadad;
    --rule: 1.5px solid var(--ink);
    --rule-thick: 2.5px solid var(--ink);

    --font-jp: 'Noto Sans JP', sans-serif;
    --font-jp-serif: 'Noto Serif JP', serif;
}

/* 全体共通の基本設定です。 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-jp);
    background-color: var(--cream);
    color: var(--ink);
    line-height: 1.6;
    overflow: hidden; /* PCでは1画面固定で表示します。 */
    -webkit-font-smoothing: antialiased;
}

/* 背景のざらつき表現です。不要ならこのブロックを削除します。 */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.055'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9998;
}

a {
    color: inherit;
    text-decoration: none;
}

/* PC用の丸いカーソル演出です。不要なら #cursor-* と合わせて調整します。 */
@media (hover: hover) and (pointer: fine) {
    body {
        cursor: none;
    }

    .nav-item,
    .section-index-item,
    .section-control,
    .click-zone,
    .preview-item {
        cursor: none;
    }
}

#cursor-outer {
    position: fixed;
    width: 36px;
    height: 36px;
    border: 1px solid var(--ink);
    border-radius: 50%;
    pointer-events: none;
    z-index: 99999;
    transform: translate(-50%, -50%);
    transition: width 0.25s ease, height 0.25s ease, background 0.25s ease;
    mix-blend-mode: multiply;
}
#cursor-inner {
    position: fixed;
    width: 4px;
    height: 4px;
    background: var(--ink);
    border-radius: 50%;
    pointer-events: none;
    z-index: 99999;
    transform: translate(-50%, -50%);
}
#cursor-label {
    position: fixed;
    font-family: "Space Mono", var(--font-jp), monospace;
    font-size: 7.5px;
    letter-spacing: 0.2em;
    pointer-events: none;
    z-index: 99999;
    opacity: 0;
    white-space: nowrap;
    transition: opacity 0.2s;
    transform: translate(-50%, 22px);
}
body.cursor-hover #cursor-outer {
    width: 54px;
    height: 54px;
    background: rgba(12, 12, 12, 0.07);
}
body.show-label #cursor-label {
    opacity: 1;
}

/* 全体レイアウトです。列幅や高さ配分を変える場合はここを編集します。 */
.shell {
    display: grid;
    width: 100vw;
    height: 100vh;
    grid-template-columns: 200px 1fr 280px;
    grid-template-rows: 48px 1fr 56px;
    border: var(--rule-thick);
    overflow: hidden;
}

/* ヘッダー全体の高さと区切り線です。 */
.page-header {
    grid-column: 1 / -1;
    grid-row: 1;
    display: grid;
    grid-template-columns: 200px 1fr 280px;
    border-bottom: var(--rule-thick);
    background: var(--cream);
    position: relative;
    z-index: 10;
}

/* ロゴ周りの余白です。 */
.header-brand {
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 7px;
    border-right: var(--rule-thick);
}

.brand-name {
    font-family: "Unbounded", sans-serif;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: 0.32em;
    text-transform: uppercase;
}

.brand-stroke {
    font-family: "Unbounded", sans-serif;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: 0.32em;
    -webkit-text-stroke: 0.8px var(--ink);
    color: transparent;
}

/* 上部メニューの間隔です。 */
.header-nav {
    display: flex;
    align-items: center;
    padding: 0 28px;
    gap: 32px;
}

.nav-item {
    appearance: none;
    border: 0;
    background: transparent;
    padding: 0;
    display: inline-flex;
    align-items: center;
    font-family: "Space Mono", var(--font-jp), monospace;
    font-size: 7.5px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--steel);
    position: relative;
    text-decoration: none;
    transition: color 0.3s;
}

.nav-item:hover, .nav-item.active {
    color: var(--ink);
}

.nav-item.active::after {
    content: "";
    position: absolute;
    bottom: -17px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gold);
}

/* 右上の年号と番号表示です。 */
.header-meta {
    border-left: var(--rule-thick);
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.meta-tag {
    font-family: "Space Mono", var(--font-jp), monospace;
    font-size: 7px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    border: 1px solid var(--ink);
    padding: 3px 8px;
    background: var(--ink);
    color: var(--cream);
}

.meta-count {
    font-family: "Space Mono", var(--font-jp), monospace;
    font-size: 8px;
    letter-spacing: 0.15em;
    color: var(--steel);
}

/* 左カラム全体の幅・背景・区切り線です。 */
.section-sidebar {
    grid-column: 1;
    grid-row: 2 / 4;
    border-right: var(--rule-thick);
    display: flex;
    flex-direction: column;
    background: var(--cream);
    position: relative;
    z-index: 10;
    overflow: hidden;
}

/* 左上の番号表示です。 */
.section-counter {
    padding: 22px 20px 18px;
    border-bottom: var(--rule);
    flex-shrink: 0;
}

.section-counter-label {
    font-family: "Space Mono", var(--font-jp), monospace;
    font-size: 7px;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--steel);
    margin-bottom: 6px;
}

.section-counter-number {
    font-family: "Cormorant Garamond", var(--font-jp-serif), serif;
    font-size: 3.4rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
    display: flex;
    align-items: flex-end;
    gap: 4px;
}

.section-counter-total {
    font-family: "Cormorant Garamond", var(--font-jp-serif), serif;
    font-size: 1rem;
    font-weight: 300;
    color: var(--steel);
    margin-bottom: 3px;
}

/* 左メニューの間隔と線の動きです。 */
.section-index {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-bottom: var(--rule);
    flex-shrink: 0;
}

.section-index-item {
    appearance: none;
    border: 0;
    background: transparent;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 0;
    text-align: left;
}

.section-index-line {
    width: 26px;
    height: 1.5px;
    background: var(--steel-light);
    flex-shrink: 0;
    transition: background 0.25s, width 0.3s;
}

.section-index-item.active .section-index-line {
    background: var(--ink);
    width: 38px;
}
.section-index-item:hover .section-index-line {
    background: var(--gold-light);
}

.section-index-label {
    font-family: "Space Mono", var(--font-jp), monospace;
    font-size: 7.5px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--steel);
    transition: color 0.25s;
}

.section-index-item.active .section-index-label {
    color: var(--ink);
}

/* 左カラムの補足テキストです。 */
.section-data {
    position: relative;
    flex: 1;
    overflow: hidden;
    margin: 0 20px;
}

.section-data::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gold);
}

.section-data-panel {
    position: absolute;
    inset: 18px 0;
    display: flex;
    flex-direction: column;
    gap: 13px;
    margin: 0;
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    transition: opacity 0.32s ease, transform 0.32s ease;
}

.section-data-panel.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.section-data-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.section-data-key {
    font-family: "Space Mono", var(--font-jp), monospace;
    font-size: 7px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--steel-light);
    margin: 0;
}

.section-data-value {
    font-family: "Cormorant Garamond", var(--font-jp-serif), serif;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.04em;
    margin: 0;
}

/* 左下の前へ / 次へボタンです。 */
.section-controls {
    display: flex;
    border-top: var(--rule);
    flex-shrink: 0;
    margin-top: auto;
}

.section-control {
    appearance: none;
    border: 0;
    background: transparent;
    flex: 1;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--ink);
    transition: background 0.2s, color 0.2s;
}

.section-control:first-child {
    border-right: var(--rule);
}
.section-control:hover {
    background: var(--ink);
    color: var(--cream);
}

/* メイン画像エリアです。背景色や表示範囲を変える場合はここを編集します。 */
.visual-stage {
    grid-column: 2;
    grid-row: 2;
    position: relative;
    overflow: hidden;
    background: #1c1a18;
}

.visual-stage::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(
      ellipse at center,
      transparent 50%,
      rgba(0, 0, 0, 0.28) 100%
    );
    z-index: 1;
    pointer-events: none;
}

.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.75s cubic-bezier(0.6, 0, 0.2, 1),
      transform 0.75s cubic-bezier(0.6, 0, 0.2, 1);
    transform: scale(1.04);
}

.slide.active {
    opacity: 1;
    transform: scale(1);
}

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

/* 画像右下の大きな番号です。 */
.visual-count {
    position: absolute;
    bottom: -20px;
    right: -6px;
    font-family: "Unbounded", sans-serif;
    font-size: clamp(5rem, 11vw, 10rem);
    font-weight: 900;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.09);
    pointer-events: none;
    line-height: 1;
    z-index: 2;
    user-select: none;
}

/* キャッチコピーの位置と文字サイズです。 */
.visual-caption {
    position: absolute;
    bottom: 8%;
    left: 8%;
    opacity: 0;
    transform: translateY(15px);
    font-family: var(--font-jp-serif), serif;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 700;
    color: #ffffff;
    text-align: left;
    line-height: 1.4;
    letter-spacing: 0.1em;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    z-index: 3;
    pointer-events: none;
    width: auto;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.slide.active .visual-caption {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.18s;
}

/* 画像下の進行ラインです。長さの見え方は JS と合わせて調整します。 */
.progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: var(--gold);
    width: 0%;
    z-index: 5;
    transition: width 0.55s ease;
}

.progress-bar.is-animating {
    width: 100%;
}

/* スクロール案内アイコンの上下アニメーションです。 */
@keyframes scrollIconBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* スクロール案内の位置です。 */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 10;
    pointer-events: none;
    opacity: 0.8;
}

.scroll-indicator .material-symbols-outlined {
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.8);
    animation: scrollIconBounce 2s infinite;
}

.scroll-indicator .scroll-text {
    display: block;
    font-family: "Space Mono", monospace;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 0.2em;
    margin-top: 4px;
}

/* 画像左右のクリック範囲です。広さを変える場合は width を調整します。 */
.click-zone {
    appearance: none;
    border: 0;
    background: transparent;
    padding: 0;
    position: absolute;
    top: 0;
    bottom: 0;
    width: 35%;
    z-index: 4;
}
.click-zone.left {
    left: 0;
}
.click-zone.right {
    right: 0;
}

/* 下部サムネイル一覧です。 */
.preview-nav {
    grid-column: 2;
    grid-row: 3;
    border-top: var(--rule-thick);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: var(--cream);
}

.preview-item {
    appearance: none;
    border: 0;
    background: transparent;
    width: 100%;
    height: 100%;
    padding: 0;
    position: relative;
    overflow: hidden;
    border-right: var(--rule);
}
.preview-item:last-child {
    border-right: none;
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: grayscale(0.5) contrast(1.05);
    transition: filter 0.3s;
}

.preview-item.active img,
.preview-item:hover img {
    filter: grayscale(0) contrast(1.05);
}

.preview-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding: 5px 7px;
}

.preview-item.active .preview-overlay {
    border-top: 2px solid var(--gold);
}

.preview-number {
    font-family: "Space Mono", monospace;
    font-size: 6.5px;
    letter-spacing: 0.2em;
    color: rgba(244, 239, 230, 0.85);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* 右カラム全体の幅・背景です。 */
.content-sidebar {
    grid-column: 3;
    grid-row: 2 / 4;
    border-left: var(--rule-thick);
    display: flex;
    flex-direction: column;
    background: var(--cream);
    overflow: hidden;
}

/* 右カラムは重ねて切り替えています。 */
.content-panels {
    position: relative;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.content-panel {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: var(--cream);
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: opacity 0.32s ease, transform 0.32s ease;
}

.content-panel.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* 右カラム上部の見出しです。 */
.content-header {
    padding: 24px 22px 0;
    flex-shrink: 0;
}

.content-label {
    font-family: "Space Mono", var(--font-jp), monospace;
    font-size: 7px;
    letter-spacing: 0.38em;
    text-transform: uppercase;
    color: var(--steel);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.content-label::before {
    content: "";
    display: inline-block;
    width: 18px;
    height: 1px;
    background: var(--gold);
}

.content-title {
    font-family: "Cormorant Garamond", var(--font-jp-serif), serif;
    font-size: clamp(1.9rem, 2.6vw, 2.5rem);
    font-weight: 700;
    line-height: 0.92;
    letter-spacing: -0.015em;
    margin-bottom: 4px;
}

.content-title em {
    display: block;
    font-weight: 300;
    font-style: italic;
    -webkit-text-stroke: 0.8px var(--ink);
    color: transparent;
    font-size: 1.12em;
    line-height: 1.02;
}

.content-summary {
    font-family: "Space Mono", var(--font-jp), monospace;
    font-size: 7.5px;
    letter-spacing: 0.18em;
    color: var(--steel);
    margin-top: 10px;
    margin-bottom: 22px;
}

/* 小見出しの帯です。 */
.content-group-header {
    display: flex;
    align-items: center;
    padding: 10px 22px;
    border-top: var(--rule);
    border-bottom: var(--rule);
    background: var(--cream-alt);
    flex-shrink: 0;
}

.content-group-label {
    font-family: "Space Mono", var(--font-jp), monospace;
    font-size: 7px;
    letter-spacing: 0.35em;
    text-transform: uppercase;
}

.content-group-symbol {
    margin-left: auto;
    font-size: 10px;
    color: var(--gold);
}

/* 右カラムの本文一覧です。 */
.content-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 0;
    scrollbar-width: none;
}
.content-list::-webkit-scrollbar {
    display: none;
}

.content-item {
    padding: 17px 22px;
    border-bottom: var(--rule);
    position: relative;
    transition: background 0.2s;
}
.content-item:hover {
    background: var(--cream-alt);
}

.content-item-number {
    font-family: "Space Mono", monospace;
    font-size: 7px;
    letter-spacing: 0.2em;
    color: var(--gold);
    margin-bottom: 8px;
}

.content-item-text {
    font-family: "Cormorant Garamond", var(--font-jp-serif), serif;
    font-size: 1.06rem;
    font-weight: 300;
    font-style: italic;
    line-height: 1.52;
    letter-spacing: 0.01em;
}

.content-item-note {
    font-family: "Space Mono", var(--font-jp), monospace;
    font-size: 6.5px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--steel);
    margin-top: 8px;
}

/* タブレット幅での列幅調整です。 */
@media (max-width: 1024px) {
    .shell {
        grid-template-columns: 160px 1fr 230px;
    }
}

/* スマホ表示の並び替えです。 */
@media (max-width: 768px) {
    /* スマホでは通常のカーソルに戻します。 */
    body {
        overflow-y: auto;
        cursor: auto;
    }
    #cursor-outer,
    #cursor-inner,
    #cursor-label {
        display: none;
    }
    button, a {
        cursor: pointer;
    }

    /* 全体を縦並びにします。 */
    .shell {
        grid-template-columns: 1fr;
        grid-template-rows: 80px 58vw 44px auto;
        height: auto;
        min-height: 100vh;
        overflow: visible;
    }

    /* ヘッダーを2段表示にします。 */
    .page-header {
        grid-column: 1;
        grid-row: 1;
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-rows: 44px 36px;
        height: 80px;
    }

    .header-brand {
        grid-column: 1;
        grid-row: 1;
        border-right: none;
        padding: 0 16px;
    }

    .header-meta {
        grid-column: 2;
        grid-row: 1;
        padding: 0 14px;
        border-left: var(--rule-thick);
    }

    /* 上部メニューは横スクロールで表示します。 */
    .header-nav {
        display: flex;
        grid-column: 1 / -1;
        grid-row: 2;
        border-top: var(--rule);
        padding: 0 16px;
        gap: 28px;
        overflow-x: auto;
        scrollbar-width: none;
        white-space: nowrap;
        align-items: center;
        height: 36px;
    }
    .header-nav::-webkit-scrollbar {
        display: none;
    }

    .nav-item.active::after {
        bottom: -10px;
    }

    /* 左カラムはスマホでは非表示にします。 */
    .section-sidebar {
        display: none;
    }

    /* メイン画像を横幅いっぱいにします。 */
    .visual-stage {
        grid-column: 1;
        grid-row: 2;
    }

    .click-zone {
        cursor: pointer;
    }

    .scroll-indicator {
        display: none;
    }

    /* サムネイルは4列のまま表示します。 */
    .preview-nav {
        grid-column: 1;
        grid-row: 3;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        height: 44px;
    }

    /* 右カラムの文章は画像の下に移動します。 */
    .content-sidebar {
        grid-column: 1;
        grid-row: 4;
        border-left: none;
        border-top: var(--rule-thick);
        min-height: 0;
        overflow: visible;
        height: auto;
    }

    .content-panels {
        position: static;
        overflow: visible;
        flex: none;
        min-height: 0;
    }

    .content-panel {
        position: static;
        display: none;
        opacity: 1;
        transform: none;
        pointer-events: auto;
        transition: none;
    }

    .content-panel.active {
        display: flex;
    }

    .content-list {
        overflow-y: visible;
        max-height: none;
    }
}
