/* ==== カラー変数 ==== */
:root {
    --accent:             #d97757;
    --accent-light:       #f5e6de;
    --accent-dark:        #b85e3a;
    --accent-blue:        #4285f4;
    --accent-blue-light:  #e8f0fe;
    --accent-blue-dark:   #2c6fd4;
    --accent-purple-light:#ede8f5;
    --accent-green:       #27ae60;
    --accent-green-light: #e8f5ee;
    --accent-green-dark:  #1e8449;
    --accent-brown:       #d4aa88;
    --accent-brown-light: #f0e4b0;
    --body-bg:            #f0ede8;
    --body-bg-hover:      #e8e6dc;
    --container-bg:       #faf9f5;
    --hover-bg:           #e8f0fe;
    --text-main:          #141413;
    --text-sub:           #b0aea5;
    --text-mid:           #7d7b77;
    --line-color:         #d0cec8;
    --panel-border:       #e8e6dc;
}

/* ==== ベース ==== */
html { scroll-behavior: smooth; }

*, *::before, *::after {
    box-sizing: border-box;
}
body {
    margin: 0;
    font-family: 'Sawarabi Gothic', 'Meiryo UI', 'Meiryo', sans-serif;
    background-color: var(--body-bg);
    color: var(--text-main);
    font-size: 0.88rem;
    transition: background-color 1s ease-out;
    user-select: none;
}
body:hover {
    background-color: var(--body-bg-hover);
}

/* ==== プログレスバー ==== */
#progress-bar {
    position: fixed;
    top: 0; left: 0;
    height: 3px;
    width: 0%;
    background: var(--accent);
    z-index: 999;
    transition: width 0.1s linear;
    pointer-events: none;
}

/* ==== レイアウト ==== */
.page-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ==== ヘッダー ==== */
.site-header {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    z-index: 100;
    background: transparent;
    border-bottom: none;
    transition: background 0.4s ease, border-color 0.4s ease;
}
.site-header.scrolled {
    background: rgba(250,249,245,0.35);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--panel-border);
}
.site-header .inner {
    /* max-width: 1200px; */ /* ヒーロースライダーの最大横幅設定 */
    /* margin: 0 auto; */ /* ヒーロースライダーの中央寄せ設定 */
    padding: 0 1.0rem;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* --- ロゴ --- */
.site-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}
.site-logo img {
    height: 48px;
    width: auto;
    display: block;
    transition: opacity 0.3s;
}
.site-logo-text {
    font-family: 'Sawarabi Gothic', 'Meiryo UI', 'Meiryo', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: #fff;
    transition: color 0.4s ease;
    -webkit-text-stroke: 0.5px currentColor;
    line-height: 1;
}
.site-header.scrolled .site-logo-text { color: var(--text-main); }
.site-logo:hover img { opacity: 0.75; }
.site-header:not(.scrolled) .site-logo img {
    mix-blend-mode: screen;
    filter: invert(1);
}
.site-header.scrolled .site-logo img { mix-blend-mode: multiply; }

/* ==== ハンバーガーメニュー ==== */
.btn-menu {
    background: rgba(255,255,255,0.15);
    border: 1.5px solid rgba(255,255,255,0.4);
    cursor: pointer;
    padding: 0;
    color: #fff;
    transition: all 0.3s ease;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    flex-shrink: 0;
}
.site-header.scrolled .btn-menu {
    color: var(--text-main);
    background: rgba(20,20,19,0.06);
    border-color: rgba(20,20,19,0.15);
}
.btn-menu:hover {
    background: rgba(255,255,255,0.28);
    transform: scale(1.05);
}
.site-header.scrolled .btn-menu:hover { background: rgba(20,20,19,0.1); }

/* --- ナビパネル --- */
#menu-panel {
    position: fixed;
    top: 0; right: -100%;
    width: 300px;
    height: 100vh;
    background: rgba(250,249,245,0.97);
    backdrop-filter: blur(16px);
    box-shadow: -4px 0 24px rgba(0,0,0,0.12);
    z-index: 200;
    transition: right 0.35s ease;
    padding: 0 1.5rem 2rem;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
#menu-panel.open { right: 0; }

/* --- ヘッダーボタン --- */
.btn-contact {
    transition: transform 0.3s ease, background 0.3s ease;
    margin-left: auto;
    margin-right: 0.5rem;
    text-decoration: none;
}
.btn-contact:hover { transform: scale(1.15); }
.site-header:not(.scrolled) .btn-contact { color: #fff; }

/* --- ×ボタン --- */
.btn-menu-close {
    align-self: flex-end;
    margin-top: calc((72px - 48px) / 2);
    margin-bottom: calc((72px - 48px) / 2 + 1rem);
    color: var(--text-main) !important;
    background: rgba(20,20,19,0.06) !important;
    border-color: rgba(20,20,19,0.15) !important;
}
.btn-menu-close:hover {
    background: rgba(20,20,19,0.12) !important;
    transform: scale(1.05);
}

/* --- メニューリスト --- */
.menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.menu-list li { border-bottom: 1px solid var(--panel-border); }
.menu-list li a {
    display: block;
    padding: 1rem 0;
    color: var(--text-main);
    text-decoration: none;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    transition: color 0.2s;
}
.menu-list li a:hover { color: var(--accent); }

/* --- メニューお問い合わせボタン --- */
.menu-contact {
    text-align: center;
    padding-top: 1.5rem;
}

/* --- メニューオーバーレイ --- */
.menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.25);
    z-index: 150;
    backdrop-filter: blur(2px);
}
.menu-overlay.open { display: block; }

/* ==== ヒーロースライダー ==== */
#hero {
    margin-top: 0;
    position: relative;
}
#hero-slider {
    position: relative;
    width: 100%;
    height: 100vh;
    max-height: 500px;
    overflow: hidden;
}
.hero-slide {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    opacity: 0;
    transform: translateX(100%);
    transition: transform 600ms ease, opacity 600ms ease;
}
.hero-slide.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}
.hero-slide.prev {
    transform: translateX(-100%);
}
.hero-slide.active[data-link]:not([data-link=""]) {
    cursor: pointer;
}
.hero-slide.reverse {
    transform: translateX(-100%);
}
.hero-slide.reverse.active {
    transform: translateX(0);
}
.hero-slide.reverse.prev {
    transform: translateX(100%);
}
.hero-slide img {
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: center 70%;
    display: block;
    background: var(--body-bg);
    min-height: 300px;
}
/* --- キャプション --- */
.slide-caption {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    z-index: 2;
    padding: 5rem 1.5rem 2rem;
    background: linear-gradient(transparent, rgba(20,20,19,0.72));
    color: #fff;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    box-sizing: border-box;
}
.slide-caption-main h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    line-height: 1.2;
}
.slide-caption-main p {
    font-size: 1.05rem;
    opacity: 0.9;
    line-height: 1.5;
    margin-top: 0.3rem;
    margin-bottom: 0;
}
.slide-caption-meta {
    text-align: right;
    white-space: nowrap;
    flex-shrink: 0;
    align-self: flex-end;
}
.slide-date {
    display: block;
    font-size: 0.75rem;
    opacity: 0.65;
}
.slide-location {
    display: block;
    font-size: 0.75rem;
    opacity: 0.65;
}

/* --- スライドナビ --- */
.hero-nav-prev,
.hero-nav-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 48px; height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(4px);
    color: #fff;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
}
.hero-nav-prev { left: 1.0rem; }
.hero-nav-next { right: 1.0rem; }
.hero-nav-prev:hover,
.hero-nav-next:hover { background: rgba(255,255,255,0.28); }

/* --- ページネーション --- */
.hero-pagination {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 6px;
    align-items: center;
}
.hero-pagination-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    padding: 0;
    transition: background 0.3s, transform 0.3s;
}
.hero-pagination-dot.active {
    background: var(--accent);
    transform: scale(1.3);
}

/* ==== セクション共通 ==== */
.section { padding: 1.25rem 0; }
.section-label {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: var(--accent);
    text-transform: uppercase;
    margin-top: 0;
    margin-bottom: 0.3rem;
    display: block;
}
.section-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-main);
    margin-top: 0.2rem;
    margin-bottom: 1.25rem;
    line-height: 1.4;
}

/* --- セクションリード文 --- */
.section-lead {
    font-size: 0.9rem;
    line-height: 1.8;
    max-width: 600px;
    margin-bottom: 2rem;
    color: var(--text-sub);
}
.section-lead-dark {
    font-size: 0.9rem;
    line-height: 1.8;
    max-width: 600px;
    margin-bottom: 2rem;
    color: rgba(255,255,255,0.65);
}
#story .section-title { color: #fff; }
#lifeline .section-title { color: #fff; }

/* ==== カード ==== */
.card {
    background: var(--container-bg);
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(20,20,19,0.07);
    padding: 1.5rem;
}
.sub-card {
    background: var(--body-bg);
    border-radius: 12px;
    border: 1px solid var(--panel-border);
    padding: 1.25rem;
}
.card-blue { background: var(--accent-light); }

/* ==== カードグリッド ==== */
.card-grid {
    display: grid;
    grid-template-columns: 3fr 2fr; /* テキストエリアと画像エリア割合を定める */
    gap: 1.25rem; /* テキストと画像の間隔 */
    align-items: start; /* テキストと画像の揃え:上揃え */
}
.card-grid .about-text         { order: 1; }
.card-grid .card-grid-img-link {
  order: 4;
  grid-column: 2;
  grid-row: 1 / -1; 
}
.card-grid .about-actions      {
  order: 2;
  margin-top: 0.75rem;
}

/* --- カードグリッド画像 --- */
.card-grid-img {
    width: 100%;
    height: 100%;
    min-height: 200px;
    max-height: 450px;
    object-fit: cover;
    border-radius: 0;
    display: block;
    border: none;
}

/* --- カードグリッド画像リンク --- */
.card-grid-img-link {
    display: block;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid var(--line-color);
    position: relative;
}

/* --- カードグリッド画像オーバーレイ --- */
.card-grid-img-link:hover .card-grid-img { transform: scale(1.03); transition: transform 0.4s ease; }
.card-grid-img-link:hover .card-grid-img { transform: scale(1.03); filter: blur(3px); transition: transform 0.4s ease, filter 0.4s ease; }
.card-grid-img-overlay {
    position: absolute;
    inset: 0;
    background: rgba(20,20,19,0.45);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    opacity: 0;
    transition: opacity 0.4s ease;
}
.card-grid-img-link:hover .card-grid-img-overlay { opacity: 1; }

/* ==== About ==== */
.about-text p {
    line-height: 1.8;
    color: var(--text-main);
    margin-bottom: 0.8rem;
}
.about-text p:last-child { margin-bottom: 0; }

#lifeline {
    background: var(--text-main);
    padding: 4rem 0;
}

/* --- チップス --- */
.section-chip {
    display: inline-block;
    background: var(--accent-light);
    color: var(--accent-dark);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 8px;
    border: 1px solid var(--accent-dark);
    margin: 0 0.05rem;
    box-sizing: border-box;
}
.works-tag {
    display: inline-block;
    background: var(--accent-green);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 8px;
    border: 1px solid var(--accent-green-dark);
    margin: 0 0.05rem;
    box-sizing: border-box;
}

/* --- lifelineグリッド（黒背景内） --- */
#lifeline .card-grid {
    align-items: start;
    grid-template-columns: 3fr 2fr;
}

/* --- lifelineグリッド内order（.card-gridの汎用order定義を上書き） --- */
#lifeline .card-grid .lifeline-text {
  order: 1;
}
#lifeline-detail-chart {
  order: 2;
}

/* --- lifeline詳細チャート接続口 --- */
/* 20260424削除予定 #lifeline-detail-chart {
    order: 2;
    grid-column: 2;
    grid-row: 1 / -1;
    width: 100%;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
} */
#lifeline-detail-chart {
  grid-column: auto;
  grid-row: auto;
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  height: 260px;

}

/* --- lifelineチャート本体 --- */
/* 20260424削除予定 ##lifelineChart {
  width: 100%;
  height: 260px !important;
  overflow: hidden;
}*/
#lifelineChart {
  width: 100%;
  max-width: 400px;
  height: 260px !important;
  margin: 0 auto;
  overflow: hidden;
}

.ilc-svg {
    width: 100%;
    height: 100%;
}

/* --- 4分野線表接続口 --- */
.field-chart-placeholder {
    margin-top: 1rem;
    height: 48px;
    background: var(--body-bg);
    border-radius: 6px;
    border: 1px solid var(--panel-border);
}

/* ==== Works ==== */
.works-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    align-items: start;
}
.work-card {
    background: var(--container-bg);
    border-radius: 12px;
    border: 1px solid var(--line-color);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.work-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(20,20,19,0.1);
    background: var(--hover-bg);
}
.work-card-img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--body-bg);
    color: var(--text-sub);
    font-size: 0.82rem;
}
img.work-card-img {
    display: block;
    object-fit: cover;
}
.work-card-body { padding: 0 0.75rem 1rem; }
.work-card-meta { /* タグと日付を横並びにする */
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.5rem;
  margin-bottom: 0.25rem;
}
.work-tag {
    font-size: 0.72rem;
    color: var(--accent-green);
    font-weight: 700;
    margin-bottom: 0.25rem;
}
.work-card-body h3 {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}
.work-card-body p {
    font-size: 0.78rem;
    color: var(--text-sub);
    line-height: 1.5;
}
.work-link {
    display: inline-block;
    margin-top: 0.6rem;
    font-size: 0.78rem;
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
}
.work-link:hover { text-decoration: underline; }

/* --- Worksカード：日付 --- */
.work-card-date {
  display: block;
  font-size: 0.72rem;
  color: var(--text-main);
}

/* --- Worksカード：リンク文字色制御 --- */
a.work-card {
  color: inherit;
  text-decoration: none;
}
a.work-card h3 {
  color: var(--text-main);
  transition: color 0.2s;
}
a.work-card:hover h3 {
  color: var(--accent-blue);
}

/* ==== WIPカード ==== */
.work-card-img.wip {
    position: relative;
    background: #FFFFFF;  /* 1) ダミー画面背景 */
    overflow: hidden;
}
.wip-dummy {
    position: absolute;
    inset: 0;
    padding: 1rem;
    opacity: 0.2;
    filter: blur(1px);
}
.wip-dummy-bar {
    height: 10px;
    background: #b0aea5;  /* ダミー画面パーツ */
    border-radius: 4px;
    margin-bottom: 0.5rem;
}
.wip-dummy-bar.short { width: 60%; }
.wip-dummy-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    margin-top: 0.5rem;
}
.wip-dummy-grid div {
    height: 36px;
    background: #b0aea5;
    opacity: 0.6;
}
.wip-label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    color: #141414;                /* 文字 */
    background: #ebf801;        /* 黄色矩形 */
    padding: 0.4rem 1rem;
    letter-spacing: 0.15em;
    opacity: 0;
    transition: opacity 1.2s ease;  /* ゆっくり出現 */
    transition-delay: 1s;
    margin: auto;
    width: fit-content;
    height: fit-content;
    border-radius: 4px;
}
.wip-label.visible { opacity: 1; }

/* ==== 記事挿絵ダミー ==== */
.card-grid-img-link:has(img[src=""]) {
    pointer-events: none;
    cursor: default;
    overflow: hidden;
    min-height: 200px;
    background: var(--body-bg);
    border: 1px solid var(--line-color);
}
.card-grid-img-link:has(img[src=""]) img {
    display: none;
}
.card-grid-img-link:has(img[src=""])::after {
    content: '準備中';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1rem;
    font-weight: 700;
    color: #141414;
    background: #ebf801;
    padding: 0.4rem 1rem;
    letter-spacing: 0.15em;
    border-radius: 4px;
    white-space: nowrap;
}

/* --- 記事挿絵ダミー：ロゴ版（.card-grid-img-logoを追加で指定） --- */
.card-grid-img-link.card-grid-img-logo:has(img[src=""]) {
    pointer-events: none;
    cursor: default;
}
.card-grid-img-link.card-grid-img-logo:has(img[src=""])::after {
    content: '';                /* 「準備中」テキストを非表示 */
    background: none;
}
.card-grid-img-link.card-grid-img-logo:has(img[src=""])::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('/images/nonak_logo.svg') center / 50% no-repeat;
    opacity: 0.12;              /* ロゴの濃さ調整 */
    z-index: 1;
}

@media (hover: hover) {
    @keyframes wip-pulse {
        0%, 100% { transform: scale(1); }
        50%       { transform: scale(1.08); }
    }
    .wip-label.visible {
        animation: wip-pulse 2s ease-in-out infinite;
    }
    .work-card:hover .wip-label.visible {
        animation-duration: 0.6s;
    }
}

/* ==== Story ==== */
#story {
    background: var(--text-main);
    color: #fff;
    padding: 4rem 0;
}
.timeline-preview {
    position: relative;
    height: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    margin-bottom: 3rem;
}
.timeline-year {
    position: absolute;
    bottom: -1.4rem;
    font-size: 0.72rem;
    color: rgba(255,255,255,0.35);
    transform: translateX(-50%);
}

/* ==== NEWS ==== */
#news {
  background: var(--container-bg);
}
.news-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.news-item {
    position: relative;
    background: var(--body-bg);
    border-radius: 12px;
    border: 1px solid var(--panel-border);
    border-left: 8px solid var(--news-rank-color, var(--text-sub));
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: var(--text-main);
    transition: background 0.2s, border-left-color 0.2s;
    overflow: hidden;
}
.news-item::before,
.news-item::after {
    content: '';
    position: absolute;
    border-radius: 12px;
    border: 1px solid var(--news-rank-color, var(--text-sub));
    inset: 0 0 0 -8px;
    opacity: 0;
    clip-path: inset(0 10% 10% 0);
    pointer-events: none;
}
.news-item:hover {
    background: var(--news-rank-bg, var(--body-bg));
    border-left-color: var(--news-rank-dark, #888780);
}
.news-item:hover::before {
    opacity: 1;
    animation: border-run-tb 0.4s ease forwards;
}
.news-item:hover::after {
    opacity: 1;
    animation: border-run-lr 0.4s ease 0.4s forwards;
}
.news-item-date {
    font-size: 0.72rem;
    color: var(--text-main);
    white-space: nowrap;
}
.news-item-title {
    font-size: 0.92rem;
    font-weight: 700;
    flex: 1;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- NEWSフォールバック --- */
.news-fallback {
    font-size: 0.9rem;
    color: var(--text-sub);
    line-height: 1.8;
    margin: 0;
}

/* --- NEWSアイテム内詳細ボタン --- */
.news-item-btn {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 999px;
    white-space: nowrap;
    color: #fff;
    background: var(--news-rank-color, var(--text-sub));
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    text-decoration: none;
    display: inline-block;
    flex-shrink: 0;
}
.news-item:hover .news-item-btn {
    background: var(--news-rank-dark, #888780);
}
.news-item-btn:active { transform: scale(0.96); }

/* --- 序列カラー定義 --- */
.news-rank-1 {
    --news-rank-color: var(--accent);
    --news-rank-dark:  var(--accent-dark);
    --news-rank-bg:    var(--panel-border);
}
.news-rank-2 {
    --news-rank-color: #f5c518;
    --news-rank-dark:  #c9a000;
    --news-rank-bg:    var(--panel-border);
}
.news-rank-3 {
    --news-rank-color: var(--text-sub);
    --news-rank-dark:  #888780;
    --news-rank-bg:    var(--panel-border)
}

/* ==== ボタン ==== */
/* btn-primary  : メインアクション（accent色・白文字）          */
/* btn-shine    : きらーん演出。btn-primaryと組み合わせて使う   */
/* btn-disabled : 非活性状態                                    */

/* --- メインボタン --- */
.btn-primary {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1.5rem;
    font-size: 0.88rem;
    font-weight: 700;
    color: #fff;
    background: var(--accent);
    border: 1.5px solid var(--accent);
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(217,119,87,0.3);
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.1s;
}
.btn-primary:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    box-shadow: 0 4px 16px rgba(217,119,87,0.4);
}
.btn-primary:active { transform: scale(0.96); }

/* --- きらーん演出 --- */
.btn-shine::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 125%;
    width: 40%;
    height: 200%;
    background: linear-gradient(to left, rgba(255,255,255,0), rgba(255,255,255,0.6), rgba(255,255,255,0));
    animation: shine 6s infinite;
    z-index: 2;
}
.btn-shine:hover::before {
    animation: shine-hover 0.6s ease-in-out;
}
.btn-shine::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent-dark);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.5s ease;
    z-index: 0;
}
.btn-shine:hover::after {
    transform: scaleX(1);
    transition-delay: 0.3s;
}
.btn-shine span {
    position: relative;
    z-index: 3;
}

/* --- ヘッダー内ボタン --- */
.btn-sm {
    padding: 0.35rem 1rem;
    font-size: 0.78rem;
}

/* --- 非活性 --- */
.btn-disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* --- サブボタン（カード内小型） --- */
.btn-sub {
    display: inline-block;
    background: var(--accent-light);
    color: var(--accent-dark);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 999px;
    margin: 0.2rem;
    text-decoration: none;
    transition: transform 0.1s, box-shadow 0.1s;
    cursor: pointer;
}
.btn-sub:hover { background: var(--accent); color: #fff; }
.btn-sub:active {
    transform: translateY(2px);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.15);
}

/* ==== フォーム ==== */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
    flex: 1;
}
.form-row {
    display: flex;
    gap: 1rem;
}
.form-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-main);
}
.form-required { color: var(--accent); }
.form-input {
    padding: 0.6rem 0.9rem;
    border: 1.5px solid var(--panel-border);
    border-radius: 8px;
    background: var(--container-bg);
    font-family: 'Sawarabi Gothic', 'Meiryo UI', 'Meiryo', sans-serif;
    font-size: 0.88rem;
    color: var(--text-main);
    transition: border-color 0.2s;
    width: 100%;
    box-sizing: border-box;
}
.form-input:focus {
    outline: none;
    border-color: var(--accent);
}
.form-textarea {
    resize: vertical;
    min-height: 120px;
}

@media (max-width: 767px) {
    .form-row { flex-direction: column; gap: 0; }
    .works-grid { grid-template-columns: 1fr; }
    body:not([data-page="news"]) .article-meta {
      display: none;
    }
    .article-rule { display: none; }
}

/* ==== フッター ==== */
.site-footer {
    background: var(--text-main);
    padding: 2rem 1rem 1rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

/* --- SNSアイコン --- */
.footer-sns {
    display: flex;
    justify-content: center;
    gap: 1rem;
}
.sns-btn {
    width: 48px; height: 48px;
    border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.07);
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.sns-btn:hover {
    background: rgba(217,119,87,0.2);
    border-color: var(--accent);
    color: #fff;
}

/* --- フッターメニュー --- */
.footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1.5rem;
}
.footer-nav a {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.4);
    text-decoration: underline;
    transition: color 0.2s;
}
.footer-nav a:hover { color: rgba(255,255,255,0.8); }

/* --- コピーライト --- */
.footer-copy {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.4);
    letter-spacing: 0.1em;
    align-self: flex-end;
    margin-top: 0.5rem;
}

/* ==== msgモーダル ==== */
.msg-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(20,20,19,0.6);
    z-index: 500;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}
.msg-modal-overlay.open { display: flex; }
.msg-modal {
    position: relative;
    width: 320px;
    max-width: 90vw;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 16px 48px rgba(0,0,0,0.3);
    background: var(--container-bg);
}
.msg-modal-close {
    position: absolute;
    top: 12px; right: 12px;
    z-index: 10;
    background: rgba(20,20,19,0.15);
    border: none;
    border-radius: 50%;
    width: 32px; height: 32px;
    cursor: pointer;
    font-size: 0.85rem;
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
}
.msg-modal-close:hover { background: rgba(20,20,19,0.3); }

/* --- msgモーダル内ダミー背景 --- */
.msg-modal-screen {
    height: 200px;
    overflow: hidden;
    filter: blur(3px);
    opacity: 0.5;
}
.msg-dummy-screen {
    background: #f0f0f0;
    height: 100%;
    padding: 1.5rem;
}
.msg-dummy-avatar {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: #ccc;
    margin-bottom: 0.75rem;
}
.msg-dummy-name {
    width: 120px; height: 14px;
    background: #ccc;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}
.msg-dummy-bio {
    width: 180px; height: 10px;
    background: #ddd;
    border-radius: 4px;
    margin-bottom: 1rem;
}
.msg-dummy-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}
.msg-dummy-stats span {
    width: 40px;
    height: 10px;
    background: #ddd;
    border-radius: 4px;
}
.msg-dummy-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
}
.msg-dummy-grid div {
    height: 50px;
    background: #ddd;
}

/* --- msgモーダルCTAボタン --- */
.msg-modal-cta {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 8rem;        /* ボタンの縦位置調整 */
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
}
.msg-modal-cta.visible {
    opacity: 1;
    pointer-events: auto;
}

/* --- ブラウザ風ダミー画面 --- */
.msg-dummy-browser-bar {
    display: flex;
    gap: 5px;
    padding: 0.6rem 0.75rem;
    background: #e0e0e0;
    border-radius: 6px 6px 0 0;
}
.msg-dummy-browser-bar span {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: #bbb;
}
.msg-dummy-browser-body {
    background: #f8f8f8;
    padding: 1rem;
    border-radius: 0 0 6px 6px;
}

/* --- msgモーダルメッセージ --- */
.msg-modal-message {
    padding: 1.5rem 1.5rem 2rem;
    text-align: center;
}
.msg-modal-label {
    font-size: 0.75rem;
    color: var(--text-sub);
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}
.msg-modal-quit {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: 0.05em;
}

/* ==== ヒーロー浮きバナー ==== */
.hero-banner {
    position: absolute;
    bottom: 3.5rem; /* 浮きバナー：下辺からの位置 */
    right: 1.2rem; /* 浮きバナー：右辺からの位置 */
    z-index: 10;
    display: flex;
    flex-direction: row; /* バナー内並び順：columnで縦並び */
    align-items: center; /* バナー内要素の縦位置：centerで中央揃え */
    gap: 0.75rem;
    padding: 0.5rem 0.5rem;
    background: rgba(250,249,245,0.18);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    border: 1.5px solid rgba(250,249,245,0.3);
    text-decoration: none;
    color: #fff;
    transition: background 0.3s ease;
}
.hero-banner::before,
.hero-banner::after {
    content: '';
    position: absolute;
    border-radius: 12px;
    border: 3px solid var(--accent);
    inset: 0;
    opacity: 0;
    clip-path: inset(0 10% 10% 0); /* ボーダーアニメーションの起点設定：上右下左 */
}
/* --- ホバー時のボーダーアニメーション --- */
.hero-banner:hover::before {
    opacity: 1;
    animation: border-run-tb 0.4s ease forwards; /* 上下方向 */
}
.hero-banner:hover::after {
    opacity: 1;
    animation: border-run-lr 0.4s ease 0.4s forwards; /* 左右方向 */
}
.hero-banner:hover { background: rgba(252, 211, 46, 0.28); }
.hero-banner-text {
    display: flex;
    flex-direction: column; /* バナー内要素の並び順：columnで縦並び */
    gap: 0.1rem; /* バナー内要素の間隔 */
}
.hero-banner-label {
    font-size: 1rem;
    font-weight: 1000;
    letter-spacing: 0.15em;
    color: var(--accent);
    text-transform: uppercase;
}
.hero-banner-title {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}
.hero-banner-thumb {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    padding: 4px;
    background: var(--accent-light);
    flex-shrink: 0;
    border: 1.5px solid rgba(250,249,245,0.4);
    opacity: 0.6;
}
.hero-banner-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(0) invert(1);
}
.hero-banner.hidden { display: none; }

/* ==== navパネル内「ぶわー」バナー ==== */
.nav-banner {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.5rem;
  padding-right: 0;
  margin: 1.5rem 0;
  /* もともとの設定値：ヒーローバナーと同様 background: var(--body-bg); */
  background: var(--accent-green-light);
  border: 1.5px solid var(--panel-border);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text-main);
  transition: transform 3.0s ease, background 0.5s ease;
  /* ホバーでぶわーっと拡大する秒数設定 */
}

.nav-banner::before,
.nav-banner::after {
  content: '';
  position: absolute;
  border-radius: 12px;
  /* もともとの設定値：ヒーローバナーと同様 border: 3px solid var(--accent); */
  border: 3px solid #44AF35;
  inset: 0;
  opacity: 0;
  clip-path: inset(0 10% 10% 0);
}

.nav-banner:hover {
  background: var(--accent-green-light);
  transform: scale(1.2);
  /* ホバーでぶわーっと拡大する倍率設定 */
}

.nav-banner:hover::before {
  opacity: 1;
  animation: border-run-tb 0.4s ease forwards;
}

.nav-banner:hover::after {
  opacity: 1;
  animation: border-run-lr 0.4s ease 0.4s forwards;
}

.nav-banner .hero-banner-label {
  color: #44AF35;
}

.nav-banner .hero-banner-title {
  color: var(--text-main);
}

.nav-banner .hero-banner-thumb {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  padding: 4px;
  background: #FFFFFF;
  /* background: var(--accent-green-light); */
  flex-shrink: 0;
  border: 1.5px solid var(--panel-border);
  opacity: 0.6;
}

.nav-banner .hero-banner-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: none;
  opacity: 1;
}

@keyframes border-run-tb {
    0%   { clip-path: inset(0 0 100% 0); }
    100% { clip-path: inset(0 0 0 0); }
}
@keyframes border-run-lr {
    0%   { clip-path: inset(0 100% 0 0); }
    100% { clip-path: inset(0 0 0 0); }
}

/* ==== アニメーション ==== */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-6px); }
}
@keyframes shine-hover {
    0%   { left: 125%; }
    100% { left: -75%; }
}
@keyframes shine {
    0%        { left: 125%; }
    30%, 100% { left: -75%; }
}

/* ==== フェードイン ==== */
.fadein {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.fadein.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==== 記事ページ（第2層以下共通） ==== */

/* --- タイトル帯（白カード外・ページ背景色のまま） --- */
.page-eyebrow {
    padding: 1.5rem 0 0.5rem; /* 上下余白を詰める */
}
/* page-eyebrowの設定が無い場合 */
.page-eyebrow-no-crumb {
    padding-bottom: 1.5rem; /* 下辺にパディングをとる */
}
.page-eyebrow-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-main);   /* 黒フォント（可読性） */
    line-height: 1.4;
    margin-top: 0.2rem;
    margin-bottom: 0.5rem;
}

/* --- パンくず --- */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: var(--text-main);   /* 黒フォント（可読性） */
}
.breadcrumb a {
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.2s;
}
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb-sep { opacity: 0.4; }

/* --- 記事メタ行（チップス＋日付） --- */
.article-meta {
    display: flex;
    align-items: center;       /* 上下中央揃え */
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.article-date {
    font-size: 0.78rem;
    color: var(--text-main);
}

/* --- 罫線 --- */
.article-rule {
    border: none;
    border-top: 1px solid var(--panel-border);
    margin: 0 0 1rem 0;                 /* 罫線と画像のマージン調整：罫線下に1rem */
}

/* --- 記事本文コンテナ（floatベース） --- */
.article-content {
    overflow: hidden;          /* clearfixの代替 */
}
.article-content::after {
    content: '';
    display: table;
    clear: both;
}

/* --- 記事見出し（h3・本文内に混在） --- */
.article-content h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
    margin-top: 0.75rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

/* --- 記事画像（float） --- */
/* 幅・float方向はHTML側でstyle属性にて指定 */
/* 例：style="float:left; width:40%; margin:0 1.25rem 1rem 0;" */
.article-img {
    border-radius: 12px;
    border: 1px solid var(--panel-border);
    overflow: hidden;
    display: block;
}
.article-img img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* --- 記事画像（ページ幅いっぱい） --- */
.article-img-full {
    border-radius: 12px;
    border: 1px solid var(--panel-border);
    overflow: hidden;
    display: block;
    width: 100%;
    margin-bottom: 1rem;
    clear: both;
}
.article-img-full img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* --- 記事画像：WIP --- */
.article-img.wip {
    position: relative;
    background: #FFFFFF;
    overflow: hidden;
    min-height: 160px;
}

/* --- 記事挿絵ダミー（floatコンテナ内） --- */
.article-img:has(img[src=""]) {
    background: var(--body-bg);
    border: 1px solid var(--line-color);
    position: relative;
    min-height: 160px;
}
.article-img:has(img[src=""]) img { display: none; }
.article-img:has(img[src=""])::after {
    content: '準備中';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1rem;
    font-weight: 700;
    color: #141414;
    background: #ebf801;
    padding: 0.4rem 1rem;
    letter-spacing: 0.15em;
    border-radius: 4px;
    white-space: nowrap;
}

/* --- 記事挿絵ダミー：ロゴ版 --- */
.article-img.article-img-logo:has(img[src=""]) {
    background: #ffffff;
}
.article-img.article-img-logo:has(img[src=""])::after {
    content: '';
    background: none;
}
.article-img.article-img-logo:has(img[src=""])::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('/images/nonak_logo.svg') center / 50% no-repeat;
    opacity: 0.12;
    z-index: 1;
}

/* --- 続きあり：下辺二重波線 --- */
.article-img-continues-bottom {
    position: relative;
    overflow: hidden;
}
.article-img-continues-bottom::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 70px;
    background:
        url('/images/wavy-bottom.svg') bottom/100% 22px no-repeat,
        linear-gradient(transparent, rgba(240,237,232,0.92));
    pointer-events: none;
}

/* --- 記事本文 --- */
.article-body p {
    line-height: 1.6;          /* 本文行間：詰め気味 */
    color: var(--text-main);
    margin-bottom: 0.75rem;
}
.article-body p:last-child { margin-bottom: 0; }

/* ==== レスポンシブ ==== */
@media (max-width: 767px) {
    .swiper { max-height: 520px; }
    .card-grid { grid-template-columns: 1fr; }
    .card-grid .card-grid-img-link { grid-column: 1; grid-row: auto; order: 3; }
    .section { padding: 2.5rem 0; }
    .card { padding: 1.25rem; }
    .slide-caption {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    .slide-caption-main h2 { font-size: 1.6rem; text-align: center; }
    .slide-caption-main p { font-size: 0.9rem; text-align: center; }
    .slide-caption-meta { text-align: center; width: 100%; align-self: center; }
    .blog-item { flex-wrap: wrap; }
    .site-logo-text { font-size: 1.3rem; }
    .section-title { font-size: 1.3rem; }
    .footer-copy { align-self: center; }
    #lifeline .card-grid{ display:block; }
    #lifeline-detail-chart {
        grid-column: auto;
        grid-row: auto;
        width: 100%;
    }
    /* ライフラインチャートの旧仕様#lifeline .card-grid { grid-template-columns: 1fr; } */
    /* スマホ：ボタン中寄せ */
    .btn-primary { display: block; margin-left: auto; margin-right: auto; width: fit-content; }
    /* スマホサイズの場合はヘッダーお問い合わせボタン非表示 */
    .site-header .btn-primary { display: none; }
    /* ヒーロー浮きバナーを非表示 */
    .hero-banner { display: none; }
    /* nav-banner：スマホはhoverなしのため拡大・枠線を常時表示 */
    .nav-banner { transform: scale(1.2); }
    .nav-banner::before {
        opacity: 1;
        animation: border-run-tb 0.4s ease forwards;
    }
    .nav-banner::after {
        opacity: 1;
        animation: border-run-lr 0.4s ease 0.4s forwards;
    }
    /* お問い合わせボタン（contact） */
    .form-row { flex-direction: column; gap: 0; }
    .works-grid { grid-template-columns: 1fr; }
    .article-rule { display: none; }
    /* 記事ページ：スマホでfloat解除→記載順に縦積み */
    .article-img,
    .article-img-full { float: none !important; width: 100% !important; margin: 0 0 1rem 0 !important; }
    /* works詳細：スマホでメタ行・罫線を非表示 */
    body[data-page="works"] .article-meta,
    body[data-page="works"] .article-rule { display: none; }
}

/* ==== フォームモーダル（fm-*） ==== */
#form-modal {
    background: var(--container-bg);
    border-radius: 20px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.3);
    width: 520px;
    max-width: 92vw;
    position: relative;
    overflow: hidden;
}
.fm-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1.25rem 1.5rem 0;
}
.fm-header-icon {
    color: var(--text-main);
    font-size: 1.4rem;
}
.fm-step-indicator {
    font-size: 0.78rem;
    color: var(--text-sub);
    white-space: nowrap;
}
.fm-close {
    background: rgba(20,20,19,0.08);
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    flex-shrink: 0;
}
.fm-close:hover { background: rgba(20,20,19,0.15); }
.fm-indicator-wrap {
    padding: 0.75rem 1.5rem 0;
}
.fm-indicator-row {
    display: flex;
    align-items: center;
    margin-bottom: 0.6rem;
}
.fm-progress-track {
    height: 3px;
    background: var(--panel-border);
    border-radius: 999px;
}
.fm-progress-bar {
    height: 100%;
    background: var(--text-main);
    border-radius: 999px;
    transition: width 0.3s ease;
    width: 0%;
}
.fm-body {
    padding: 1.25rem 1.5rem 0;
}
.fm-description {
    font-size: 0.78rem;
    color: var(--text-sub);
    line-height: 1.6;
    margin-bottom: 0.75rem;
    min-height: 1.2em;
}
.fm-error {
    color: #d32f2f;
    font-size: 0.78rem;
    margin-top: 0.5rem;
    height: 1.2em;
    overflow: hidden;
}
.fm-confirm {
    padding: 1.25rem 1.5rem 0;
}
.fm-confirm-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.75rem;
}
.fm-confirm-list {
    background: var(--body-bg);
    border-radius: 10px;
    padding: 1rem;
    font-size: 0.82rem;
    line-height: 2;
    color: var(--text-main);
}
.fm-btn-area {
    padding: 1rem 1.5rem 1.5rem;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.5rem;
    border-top: 1px solid var(--panel-border);
    margin-top: 1rem;
}
.fm-thanks {
    padding: 2.5rem 1.5rem;
    text-align: center;
}
.fm-thanks-title {
    font-size: 1.2rem;
}
.fm-thanks-message {
    color: var(--text-sub);
    line-height: 1.8;
    font-size: 0.88rem;
}
.fm-thanks-btn-wrap {
    margin-top: 1.5rem;
}

/* ==== スクロールバー ==== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--body-bg); }
::-webkit-scrollbar-thumb {
    background: var(--accent-light);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--accent); }
