﻿/* ============================
   変数
============================ */
:root {
  --primary-color: #006633; 
  --accent-color: #e8f5e9;
  --border-color: #ccc;
  --text-color: #333;
  --header-text: #fff;
  --bg-light: #f9fbf9;
}

/* ============================
   ベース
============================ */
* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Helvetica Neue", Arial, "Hiragino Sans", Meiryo, sans-serif;
  font-size: 14px;
  color: var(--text-color);
  background: var(--bg-light);
  line-height: 1.4;
  padding-bottom: 60px;
  opacity: 0;
}

body.modal-open {
    overflow: hidden;
}

/* 読み込み完了（スピナー非表示）と同時にふわっと表示 */
body.ss-fade-in {
  opacity: 1;
  transition: opacity 0.5s ease-out;
}

.last-mod {
	font-size: 12px;
	font-color: #333;
	text-align: right;
	margin: 0;
}

/* ============================
   ▼ スクロール時のふわっと 
============================ */
.fade-target {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.fade-target.show {
  opacity: 1;
  transform: translateY(0);
}



/* ============================
   レイアウト
============================ */
/* ヘッダーだけ特別扱い */
.sticky-header .container {
  max-width: none;
  width: 100%;
  padding-left: 0;     /* ← ロゴを左端へ */
  padding-right: 12px; /* ← ハンバーガーは少し余白 */
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 12px;
}

.main-wrapper {
  padding: 15px 0;
  display: flex;
  justify-content: center;
}

.content-narrow {
  max-width: 950px;
  width: 95%;
}
.content-middle {
  max-width: 1100px;
  width: 95%;
}
.content-wide {
  max-width: 1300px;
  width: 95%;
}
/* ============================
   ヘッダー（共通）
============================ */
.sticky-header {
  position: sticky;
  top: 0;
  left: 0;       /* 追加：基準位置を明確にする */
  width: 100%;   /* 追加：横幅を画面いっぱいに広げる */  z-index: 1000;
  background: var(--primary-color);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  padding: 8px 0;
  height: 51px;
  color: var(--header-text);
}
#header-container {
  position: sticky;
  top: 0;
  z-index: 1001;
}

/* ▼ パターン①（トップ・bairitsu） */
.header-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 35px;
}

.header-left,
.header-right {
  flex: 0 0 45px;
  display: flex;
  align-items: center;
}

.header-right { justify-content: flex-end; }

.header-center-title {
  flex: 1;
  text-align: center;
  margin: 0;
  font-size: 1.2rem;
  white-space: nowrap;
}

.header-left,
.header-logo {
  margin-left: 8px;
}

/* ▼ パターン②（criteria） */
.filter-main-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.header-logo {
  flex: 0 0 45px;
}

.group-crop {
  flex: 0 0 200px;
}

.group-filters {
  display: flex;
  gap: 8px;
  flex: 1;
}

/* ============================
   ロゴ
============================ */
.logo-img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

/* ============================
   ハンバーガー（両対応）
============================ */
.hamburger,
.hamburger2 {
  width: 30px;
  cursor: pointer;
  z-index: 1600;
  margin-right: 4px;
}

.hamburger span,
.hamburger2 span {
  display: block;
  height: 3px;
  background: #fff;
  margin: 6px 0;
  transition: 0.4s;
}

.hamburger.active span:nth-child(1),
.hamburger2.active span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.hamburger.active span:nth-child(2),
.hamburger2.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3),
.hamburger2.active span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* ============================
  メニュー
============================ */
.nav-menu {
  position: fixed;
  top: 72px;
  right: -260px;
  width: 260px;
  height: calc(100% - 72px);
  background: #fff;
  box-shadow: -2px 0 8px rgba(0,0,0,0.2);
  transition: right 0.4s;
  z-index: 1500;
  border-radius: 16px 0 0 16px; /* ← 右側に出るメニューなので左側だけ丸める */

  overflow-y: auto; /* 縦方向にスクロールできるようにする */
  overscroll-behavior: contain; /* メニューの端で止まり、背後のスクロールを防ぐ */
  transform: translateY(-20px);
}

.nav-menu.active { right: 0; }

.nav-menu ul {
  list-style: none;
  padding: 0;
  line-height: 1.1;
  font-size: 12px;
}

.nav-menu a {
  text-decoration: none;
  color: #333;
  font-size: 16px;
}

.menu-title {
  font-size: 16px;
  padding: 15px;
  border-bottom: 1px solid #ccc;
  text-align: center;
}

/* ============================
   オーバーレイ
============================ */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 900;
  display: none;
}

.overlay.active {
  display: block;
}

/* ============================
   フォーム・ボタン
============================ */
.form-select {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: #fff;
}

.crop-main {
  font-weight: bold;
  border-color: var(--primary-color);
  background: var(--accent-color);
  height: 30px;
}

.btn-clear {
  padding: 0 12px;
  background: #fff;
  border: 1px solid #fff;
  cursor: pointer;
  font-weight: bold;
}

/* ============================
   テキストUI
============================ */
.section-title {
  padding-left: 12px;
  border-left: 4px solid var(--primary-color);
  margin: 30px 0 10px;
  font-weight: 700;
  line-height: 1.4;
}
.lead-text {
  margin-bottom: 15px;
}

.text-center {
  text-align: center;
}

/* ============================
   カード
============================ */
.card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.card2 {
  background: #fff;
  border: 1px solid #ddd;
/*  border-left: 5px solid #0a3d2e;  */
  border-radius: 12px;
  padding: 10px 20px;
  margin: 0 auto 25px 20px;
  max-width: 500px;
/*  box-shadow: 0 2px 6px rgba(0,0,0,0.15); */
  
  /* フェードイン防止の強制表示（不要なら後で削れます） */
/*  opacity: 1;
  transform: none;
*/
}

.card2 ul {
  list-style: none;
  padding-left: 30px;
  margin: 10px 5px 0px 0px; 
}

.card3 {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px 20px 0;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.card4 {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 10px 20px;
  margin: 0 auto 25px 0;
  max-width: 500px;
}

/* ============================
   テーブル（ベース）
============================ */
.table-wrapper {
  overflow-x: auto;
  background: #fff;
  border: 1px solid var(--border-color);
  margin-top: 15px;
  
  border-radius: 8px;
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  border: 1px solid var(--border-color);
  padding: 8px;
  font-size: 13px;
}

th {
  background: #f2f2f2;
  text-align: center;
}

/* ============================
   フッター
============================ */
footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--primary-color);
  color: #fff;
  text-align: center;
  font-size: 11px;
  padding: 4px 0;
  z-index: 999;
}

footer p {
  margin: 0;
}

/* ============================
   スマホ
============================ */
@media (max-width: 768px) {

  .header-center-title {
    font-size: 0.9rem;
  }

  .filter-main-row {
    flex-wrap: wrap;
  }

  .group-filters {
    flex: 0 0 100%;
  }

  .hamburger,
  .hamburger2 {
    position: absolute;
    right: 8px;
    z-index: 2000;
  }
}