/* =========================================
   0. 変数定義（アクセントカラー）
   ========================================= */
:root {
    /* 同人誌の表紙に合わせた「インダストリアル・オレンジ」 */
    --accent-color: #e67e22;
    /* 本文の色 */
    --text-color: #333;
    /* フォント設定 */
    --font-base: 'IBM Plex Sans', 'Zen Kaku Gothic New', sans-serif;
}

/* =========================================
   1. ベース設定
   ========================================= */
html {
    overflow-y: scroll; /* 常に縦スクロールバーの場所を確保 */
}

body {
    background-color: #f5f5f5;
    color: var(--text-color);
    font-family: var(--font-base);
    margin: 0;
    padding: 0;
}

/* リンクの基本設定 */
a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--accent-color) !important;
}

/* =========================================
   2. ヘッダー（サイトタイトル）
   ========================================= */
.header__title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: #2d3436;
    letter-spacing: 0.3em;
    
    margin: 0; /* 下の余白なし */
    padding: 4.5rem 1rem;
    
    /* 背景：明るい方眼紙スタイル（ここは残す） */
    /* ベースは白 */
    background-color: #fdfdfd;
    
    /* 罫線は薄い青緑（シアン）で図面っぽさを演出 */
    background-image:
        linear-gradient(rgba(0, 184, 148, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 184, 148, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    
    /* 下線はシンプルにグレーで区切る */
    border-bottom: 1px solid #ccc;
    
    position: relative;
}

/* 以前の装飾ライン（差し色）はすべて削除して無効化 */
.header__title::before,
.header__title::after {
    content: none;
    display: none;
}
/* =========================================
   3. ナビゲーション（タイル）
   ========================================= */
.header__list {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0 auto; /* 上余白なし */
    max-width: 1000px;
    width: 100%;
}

.header__item {
    flex: 1;
    display: flex;
}

.header__item a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.8rem 0;
    text-align: center;
    text-decoration: none;
    color: #444 !important;
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    transition: all 0.2s ease;
}

/* 左の重なる線を消す */
.header__item:not(:first-child) a {
    border-left: none;
}

/* ホバー時の挙動 */
.header__item a:hover {
    background-color: #333;
    border-color: #333;
}

.header__item a:hover .header__main-text,
.header__item a:hover .header__sub-text {
    color: var(--accent-color) !important;
}

.header__main-text {
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.15em;
}

.header__sub-text {
    font-size: 0.65rem;
    color: #888;
    margin-top: 0.2rem;
}

/* =========================================
   4. メインコンテンツ共通レイアウト
   ========================================= */
.main-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Top画像エリア */
.top-hero {
    text-align: center;
    margin-top: 1.5rem;
    margin-bottom: 4rem; /* 修正：数値抜けを修正 */
}

.hero-frame {
    position: relative;
    display: inline-block;
    max-width: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.top-hero__img {
    display: block;
    width: auto;
    max-width: 900px;
    height: auto;
}

.hero-caption {
    position: absolute;
    bottom: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 0.75rem;
    padding: 6px 14px;
    border-top-left-radius: 8px;
    font-family: var(--font-base);
    letter-spacing: 0.05em;
    pointer-events: none;
}

/* =========================================
   5. コンテンツボックス（News, Post）
   ========================================= */
.news,
.post {
    max-width: 100%;
    margin: 0 auto 2rem;
    background: #fff;
    padding: 3rem 2rem; /* 左右余白調整 */
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    
    /* 左右のアクセントライン */
    border-left: 6px solid var(--accent-color);
    border-right: 6px solid var(--accent-color);
    border-radius: 0; /* 四角く */
}

/* Update History見出し */
.news__heading {
    font-size: 1.25rem;
    letter-spacing: 0.1em;
    color: #333;
    margin-bottom: 1.5rem;
    padding-bottom: 0;
    border-bottom: none; /* 下線なし */
    display: block;
    text-align: left;
}

/* Newsリスト（サイズアップ） */
.news__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.news__item {
    display: flex;
    padding: 1rem 0; /* 上下の余白も少し広げてゆったりさせる */
    border-bottom: 1px solid #eee;
    align-items: baseline; /* 文字のベースラインを揃える */
}

.news__item:last-child {
    border-bottom: none;
}

.news__date {
    /* 文字を大きくしたので、日付エリアの幅も広げる */
    width: 150px; 
    
    font-size: 1rem; /* 0.85rem -> 1rem に拡大 */
    color: #888;
    font-family: var(--font-base);
    flex-shrink: 0; /* 幅が縮まないように */
}

.news__link {
    flex: 1;
    color: #333;
    text-decoration: none;
    
    /* Aboutページに合わせて大きく */
    font-size: 1.1rem; /* 0.95rem -> 1.1rem に拡大 */
    line-height: 1.6;
    
    transition: color 0.2s;
}

.news__link:hover {
    color: #888;
    text-decoration: underline;
}

/* =========================================
   6. 個別記事ページ (About / Works詳細)
   ========================================= */
.post__content {
    max-width: 720px;
    margin: 0 auto;
    font-size: 1.1rem; 
    line-height: 2;
}

/* タイトルを囲むヘッダーエリア */
.post__header {
    text-align: left; 
    
    /* ★修正：本文と同じ幅（720px）にして中央に配置 */
    max-width: 720px;
    margin: 0 auto 3rem auto; /* 上0 左右auto 下3rem */
    
    border-bottom: 1px solid #eee;
    padding-bottom: 1.5rem;
}

/* 記事タイトル（About / News） */
.post__title {
    text-align: left;
    font-size: 2rem;
    font-weight: 700;
    
    /* オレンジ棒用の設定を削除し、シンプルに戻す */
    display: block; 
    /* gap: 0.8rem;  <-- 削除 */
    /* display: flex; <-- 削除 */
    
    margin-bottom: 0.5rem;
    letter-spacing: 0.1em;
    border-bottom: none;
    line-height: 1.4;
}


.post__meta {
    color: #999;
    font-family: var(--font-base);
    font-size: 0.9rem;
}

/* 見出し装飾 */
.post__content h3 {
    border-left: 4px solid #333;
    padding-left: 1rem;
    margin: 2rem 0 1rem;
    font-size: 1.2rem;
    color: #333;
}

/* 戻るボタン */
.post__back-btn {
    display: inline-block;
    color: #999;
    text-decoration: none;
    border: 1px solid #ddd;
    padding: 10px 30px;
    border-radius: 30px;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.post__back-btn:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #fff !important;
}

/* Works詳細ページのレイアウト */
@media (min-width: 768px) {
    .work-detail__container {
        display: flex;
        gap: 3rem;
        align-items: flex-start;
    }
    .work-detail__image-box {
        flex: 0 0 300px;
    }
    .work-detail__info-box {
        flex: 1;
    }
}

.work-detail__image {
    width: 100%;
    height: auto;
    border-radius: 2px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1), 0 8px 16px rgba(0,0,0,0.1);
}

.work-detail__footer {
    margin-top: 4rem;
    text-align: left;
}

@media (max-width: 767px) {
    .work-detail__image-box {
        max-width: 80%;
        margin: 0 auto 2rem;
    }
    .work-detail__footer {
        text-align: center;
    }
}

/* =========================================
   7. Works一覧ページ
   ========================================= */
/* WorksやJournalの「Main Contents」「Logs」などの見出し */
/* WorksとJournalで共通の見出しスタイル */
.works-section .section-title,
.journal-section .section-title {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-bottom: 2rem;
    
    /* フレックスボックスで棒と文字を並べる */
    display: flex;
    align-items: center;
    gap: 0.8rem; /* 棒と文字の間隔を統一 */
    
    width: fit-content;
    border-bottom: none;
    line-height: 1.2; /* 行間を揃える */
}

/* 左のオレンジ棒（WorksとJournal共通） */
.works-section .section-title::before,
.journal-section .section-title::before {  /* ★ここを追加！ */
    content: '';
    display: block;
    width: 6px;
    height: 24px;
    background-color: var(--accent-color);
    transform: skewX(-15deg);
    flex-shrink: 0; /* 縮まないように固定 */
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 2rem;
}

.work-card {
    background: #fff;
    text-decoration: none;
    color: #333;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.work-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    opacity: 1;
}

.work-card__image-container {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background-color: #eee;
    position: relative;
}

.work-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.work-card:hover .work-card__img {
    opacity: 0.85;
    transform: none; /* ズームなし */
}

/* NO PHOTO */
.work-card__no-photo {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #eee;
    color: #aaa;
    font-size: 0.8rem;
    font-weight: bold;
    letter-spacing: 0.1em;
}

/* バッジ */
.work-badge {
    position: absolute;
    top: 0;
    left: 0;
    background-color: var(--accent-color);
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    padding: 4px 10px;
    border-bottom-right-radius: 4px;
    z-index: 10;
    letter-spacing: 0.05em;
}

.work-card__info {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.work-card__title {
    font-size: 1.1rem;
    margin: 0 0 0.5rem;
    font-weight: 600;
    line-height: 1.4;
    color: #333;
}

.work-card__date {
    font-size: 0.8rem;
    color: #999;
    margin-top: auto; /* 日付を底に固定 */
    padding-top: 0.5rem;
}

/* 区切り線 */
.works-divider {
    border: none;
    border-top: 2px dashed #ccc;
    width: 90%;
    margin: 4rem auto 2rem;
    position: relative;
    overflow: visible;
}

.works-divider::after {
    content: '+';
    position: absolute;
    top: -0.8rem;
    left: 50%;
    transform: translateX(-50%);
    background-color: #f5f5f5;
    padding: 0 1rem;
    color: #ccc;
    font-size: 1.2rem;
    font-weight: bold;
}

/* =========================================
   8. Journalページ（テキストアーカイブ）
   ========================================= */
.journal-layout {
    max-width: 900px; /* 前回修正した幅 */
    margin: 0 auto;
    
    /* ★修正：ここを 4rem から 2rem に変更 */
    padding-top: 2rem; 
}
.journal-section {
    margin-bottom: 6rem;
}

/* --- Area 1: Main Contents (Works統一デザイン) --- */
.main-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem; /* カード間の隙間 */
}

.main-item__link {
    display: flex; /* 横並びレイアウト */
    justify-content: space-between; /* 両端揃え */
    align-items: stretch; /* 高さを揃える */
    text-decoration: none;
    color: var(--text-color);
    
    /* Worksカードと同じ装飾ルール */
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05); /* Worksと同じ影 */
    transition: all 0.3s ease; /* ふわっと動く */
    
    overflow: hidden;
    border: none; /* 枠線なし（影で見せる） */
}

/* ホバー時の挙動（Worksと同じ浮き上がり） */
.main-item__link:hover {
    transform: translateY(-4px); /* 少し上に浮く */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1); /* 影を濃く */
    opacity: 1; /* Worksに合わせて透明度は変えない */
}

/* --- テキストエリア --- */
.main-item__content {
    flex: 1;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 2;
}

/* タイトル（Worksカードに合わせてシンプル化） */
.main-item__title {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 0.8rem 0;
    line-height: 1.4;
    color: var(--text-color);
    transition: color 0.2s;
    
    /* 以前の「オレンジ棒」や「斜体」は削除 */
    display: block;
}

/* ホバー時にタイトルだけ色を変える */
.main-item__link:hover .main-item__title {
    color: var(--accent-color);
}

.main-item__meta {
    font-size: 0.9rem;
    color: #888;
    font-family: var(--font-base);
}

.main-item__date {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #ccc; /* Worksの日付色に寄せる */
}

.main-item__desc {
    margin: 0;
    line-height: 1.6;
    color: #666;
}

/* --- 画像エリア（右側） --- */
.main-item__image-box {
    flex: 0 0 35%; /* カードの35%を画像にする */
    position: relative;
    background-color: #eee;
    /* 画像の境界線を斜めにする装飾（お好みで削除可） */
    clip-path: polygon(10% 0, 100% 0, 100% 100%, 0% 100%);
    margin-left: -20px; /* 斜めにした分、少し左に食い込ませる */
}

.main-item__img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 枠いっぱいにトリミング */
    transition: transform 0.3s ease;
}

/* ホバー時に画像が少しズーム（Worksと同じ演出） */
.main-item__link:hover .main-item__img {
    transform: scale(1.05);
}

/* スマホ対応 */
@media (max-width: 600px) {
    .main-item__link {
        flex-direction: column-reverse; /* スマホでは画像を上に */
    }
    .main-item__image-box {
        flex: 0 0 180px; /* 高さ固定 */
        width: 100%;
        clip-path: none; /* 斜めカット解除 */
        margin-left: 0;
    }
    .main-item__content {
        padding: 1.5rem;
    }
}
/* --- Area 2: Logs --- */
.log-list {
    list-style: none;
    padding: 0;
    margin: 0;
    border-top: 1px solid #eee;
}

.log-item {
    display: flex;
    align-items: baseline;
    padding: 0.6rem 0;
    border-bottom: 1px solid #eee;
    font-size: 0.95rem;
}

.log-item__date {
    color: #999;
    margin-right: 1rem;
    font-family: var(--font-base);
    flex-shrink: 0;
    font-feature-settings: "tnum";
}

.log-item__marker {
    color: var(--accent-color);
    font-weight: bold;
    margin-right: 0.8rem;
    font-size: 0.9rem;
}

.log-item__link {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s;
}

.log-item__link:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

/* スマホ対応 */
@media (max-width: 600px) {
    .main-item__link {
        padding: 1.5rem;
    }
    .main-item__content {
        max-width: 100%;
    }
    .main-item__bg-image {
        width: 100%;
        opacity: 0.15;
    }
}

/* =========================================
   9. フッター
   ========================================= */
.footer {
    margin-top: 5rem;
    padding-bottom: 3rem;
}

.footer__copyright {
    max-width: 700px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid #ddd;
    text-align: center;
    color: #888;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
}

/* =========================================
   画像比較ツール (Embedded Style)
   ========================================= */
.compare-tool-container {
    margin: 3rem 0;
    padding: 1.5rem;
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 6px;
}

/* コントロールエリア */
.compare-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px dashed #ccc;
}

.file-btn {
    cursor: pointer;
    background: #fff;
    border: 1px solid #ccc;
    color: #333;
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    transition: all 0.2s;
    font-weight: 500;
}

.file-btn:hover {
    background: #eee;
    border-color: #999;
}

.file-input {
    display: none; /* inputタグは隠す */
}

.reset-btn {
    background: transparent;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}

.reset-btn:hover {
    background: var(--accent-color);
    color: #fff;
}

/* 表示エリア */
.compare-view {
    display: flex;
    gap: 1rem;
    align-items: flex-start; /* 上端を揃える */
}

.view-box {
    flex: 1;
    width: 50%; /* 確実に半分こにする */
}

.view-label {
    text-align: center;
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 0.5rem;
    font-weight: bold;
    letter-spacing: 0.05em;
}

.img-wrapper {
    width: 100%;
    min-height: 200px; /* 画像がない時の高さ */
    background-color: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
    border-radius: 2px;
    overflow: hidden;
}

/* 写真本体 */
.compare-photo {
    width: 100%;
    height: auto;
    display: block;
    /* 写真なので補間を効かせる（デフォルト） */
}

.placeholder {
    color: #bbb;
    font-size: 0.85rem;
}

/* スマホ対応 */
@media (max-width: 600px) {
    .compare-view {
        flex-direction: column;
    }
    .view-box {
        width: 100%;
        margin-bottom: 1rem;
    }
}

/* --- プルダウン(Select)用スタイル --- */
.select-label {
    font-size: 0.8rem;
    font-weight: bold;
    color: #666;
    margin-right: 0.5rem;
}

.select-wrapper {
    position: relative;
    display: inline-block;
}

.compare-select {
    appearance: none; /* デフォルトの見た目を消す */
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 0.6rem 2.5rem 0.6rem 1rem;
    font-size: 0.9rem;
    color: #333;
    cursor: pointer;
    font-family: var(--font-base);
}

.compare-select:hover {
    border-color: var(--accent-color);
}

.compare-select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(230, 126, 34, 0.2);
}

/* プルダウンの矢印を自作 */
.select-wrapper::after {
    content: '▼';
    font-size: 0.7rem;
    color: #999;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

/* =========================================
   Journal: 特設サイト (Middle Page)
   ========================================= */

/* ヘッダーエリア（表紙と概要） */
.special-cover {
    background: #fff;
    border: 1px solid #ccc;
    padding: 2rem;
    margin-bottom: 4rem;
    position: relative;
    /* ドッグイヤー装飾 */
    overflow: hidden;
}

.special-cover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    border-top: 20px solid var(--accent-color);
    border-right: 20px solid transparent;
}

.special-cover__inner {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
}

.special-cover__img-box {
    flex: 0 0 240px; /* 画像幅固定 */
    border: 1px solid #eee;
    padding: 10px;
    background: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.special-cover__img {
    width: 100%;
    height: auto;
    display: block;
}

.special-cover__info {
    flex: 1;
}

.special-cover__title {
    font-size: 2rem;
    margin: 0 0 1rem;
    line-height: 1.3;
    border-bottom: 2px solid #333;
    padding-bottom: 1rem;
    font-weight: 700;
}

.special-cover__meta {
    font-family: var(--font-base);
    color: #888;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.special-cover__desc {
    line-height: 1.8;
}

/* 目次リスト */
.special-index__head {
    font-size: 1.2rem;
    font-family: 'Courier New', monospace;
    border-bottom: 1px dashed #ccc;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.special-index__list {
    list-style: none;
    padding: 0;
}

.special-index__item {
    border-bottom: 1px solid #eee;
}

.special-index__link {
    display: flex;
    align-items: center;
    padding: 1rem;
    color: var(--text-color);
    text-decoration: none;
    transition: background 0.2s;
}

.special-index__link:hover {
    background-color: #f9f9f9;
    color: var(--accent-color) !important;
}

.special-index__num {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: #ccc;
    margin-right: 1.5rem;
    width: 30px;
}

.special-index__text {
    flex: 1;
    font-weight: 700;
}

/* スマホ対応 */
@media (max-width: 700px) {
    .special-cover__inner {
        flex-direction: column;
    }
    .special-cover__img-box {
        flex: 0 0 auto;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
}
