:root {
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

/* 追加：縦スクロールバーを常に確保して横幅の変化をなくす */
html {
  overflow-y: scroll;
}
/* ===== ベース ===== */

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: #FFFAF0;
  color: #333333;
  line-height: 1.7;
}

 
/* ===== 全共通（全ページで共有）===== */
.page {
  padding: 16px 8px;
}


header {
  position: relative;    /* 追加：lang-switch / top-menu の基準 */
  text-align: center;
  margin-bottom: 4px;
  min-height: 100px;     /* 追加：ロゴ＋タイトル分の高さを確保 */
}

header .logo-link {
  display: inline-block;
}

header .logo {
  width: 200px;          /* 好きな横幅に変えてOK */
  height: 60px;          /* アスペクトに合わせて調整 */
  display: block;
}


h1 {
  font-size: 1.5rem;
  margin: 0;
  line-height: 1.2;
  color: #1d4ed8;
  font-weight: 700;
}

h2 {
  font-size: 1.2rem;
  margin: 0 0 8px;
  color: #2563eb;
  font-weight: 600;
}

h3 {
  font-size: 1.05rem;
  margin: 0 0 8px;
  color: #2563eb;
  font-weight: 600;
}

p {
  margin: 4px 0 8px;
  font-size: 0.96rem;
}

section {
  margin-bottom: 28px;
}

section:last-of-type {
  margin-bottom: 0;
}

a {
  color: #2563eb;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

hr {
  border: 0;
  border-top: 1px solid #e5e7eb;
  margin: 16px 0 12px;
}

footer {
  margin-top: 32px;
  text-align: center;
  font-size: 0.85rem;
  color: #6b7280;
}

/* ===== 汎用ユーティリティ ===== */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.25rem; }
.mb-4 { margin-bottom: 1rem; }
.text-xs { font-size: 0.75rem; }
.text-gray-500 { color: #6b7280; }

.small-note {
  font-size: 0.85rem;
  color: #6b7280;
  margin-top: 4px;
}

.contact {
  margin-top: 8px;
  font-size: 0.9rem;
}

/* ===== カード共通レイアウト ===== */
.card {
  max-width: 768px;
  margin: 0 auto;
  background-color: #FFFAF0;
  border-radius: 0.5rem;
  box-shadow: 0 8px 24px rgba(15,23,42,0.06);
  padding: 20px 28px;
}



/* ===== ボタン共通 ===== */
.btn-primary {
  background-color: #2563eb;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
}
.btn-primary:hover { background-color: #1d4ed8; }

.btn-secondary {
  border: 1px solid #d1d5db;
  border-radius: 0.25rem;
  background-color: #fff;
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0.4rem 0.8rem;
}
.btn-secondary:hover { background-color: #f9fafb; }

.btn-secondary-sm {
  border: 1px solid #d1d5db;
  border-radius: 0.25rem;
  background-color: #fff;
  cursor: pointer;
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
}
.btn-secondary-sm:hover { background-color: #f9fafb; }

/* ===== 汎用レイアウト補助 ===== */
.center-block {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.section-sep {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
}

.hidden {
  display: none;
}

/* ===== テキスト補助 ===== */
.notice-text {
  font-size: 0.75rem;
  color: #6b7280;
  font-style: italic;
  margin-bottom: 0.5rem;
}

.count-text {
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 0.25rem;
}



/* ヘッダー内のサブテキスト（"price-tag image archive & quiz project" 用） */
header p {
  margin: 2px 0 0;
  line-height: 1.4;
  font-size: 0.75rem;   /* .text-xs 相当 */
  color: #6b7280;       /* .text-gray-500 相当 */
}


/* ===== index.html 専用 ===== */

/* メインサイトへのボタン行 */
.entry-link {
  margin-top: 0;
  margin-bottom: 5px;
}

.entry-btn {
  display: inline-block;
  padding: 4px 10px;
  font-size: 0.85rem;
  border-radius: 999px;
  border: 1px solid #bfdbfe;
  text-decoration: none;
  background-color: #eff6ff;
  color: #1d4ed8;
}

.entry-btn:hover {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}

/* ===============================
   CLS対策 + 遅延読み込み統合版
   =============================== */

/* 画像ラップ */
.img-wrap {
  position: relative;
  overflow: hidden;
  text-align: center;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  margin: 12px 0 8px;
}

/* 画像本体 */
.img-wrap img {
  display: block;
  width: 100%;
  height: auto;
  background-color: #f3f4f6;    /* ロード前のプレースホルダー */
  object-fit: contain;          /* はみ出し防止 */
  transition: opacity 0.4s ease;
  opacity: 0;                   /* ロード前非表示 */
}

/* ロード完了後にフェードイン */
.img-wrap img:is([loading="lazy"]):not([src=""]) {
  opacity: 1;
}



/* ===== site_map terms.html 専用 ===== */
/* 箇条書き */
ul.list-disc {
  list-style-type: disc;
  list-style-position: inside;
  margin: 0.5em 0;      /* 上下に0.5emの余白（左右0） */
  padding-left: 0.1em;    /* 左に少しインデントを確保 */
}



/* ===== gallery: main.css 相当のレイアウトを再現 ===== */



/* 640px 以上で 3 列（sm:grid-cols-3） */
@media (min-width: 640px) {
  #gallery-container {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ===== Notice Bar（告知バー） ===== */
#notice-bar {
  display: none; /* JSで切り替え前提 */
  background-color: #fef3c7; /* 淡い黄色 */
  color: #92400e;
  text-align: center;
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  border-bottom: 1px solid #fcd34d;
  position: sticky;
  top: 0;
  z-index: 50;
}

.consent-type, .timestamp {
  margin-left: 0.5rem;
}




@media (max-width: 640px) {
  .section-sep pre code {
    white-space: pre-wrap;   /* 改行を維持しつつ折り返し */
    word-wrap: break-word;   /* 長い1語も折り返し */
  }
}







/* ===== ラッフルJS連携 ===== */


/* raffle result: 1クラスで統一 */
.result {
  color: #111827; /* ok: 黒 */
}

.result[data-variant="info"] {
  color: #6b7280; /* info: グレー */
}

.result[data-variant="err"] {
  color: #dc2626; /* err: 赤 */
}
.result[data-variant="ok"] {
  color: #10b981; /* 緑系（tailwindのemerald） */
  font-weight: 600;
}


