/* ===== minimal reset ===== */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img { max-width: 100%; height: auto; display: block; }

/* ===== tokens ===== */
:root {
  --mx: 1120px;
  --gap: 16px;
  --border: #e9e9e9;

  --ink: #666;
  --ink-strong: #333;
}

/* =========================
   Layout
========================= */
.container{
  max-width: var(--mx);
  margin: 0 auto;
  padding: 24px;
}

/* ===== header: 白地 + 極薄シャドウ + テキストナビ ===== */
.site-header{
  position: sticky;
  top: 0;
  background: #fff;
  /* グレー線の代わりに影で分離 */
  border-bottom: none;
  box-shadow: 0 1px 6px rgba(0,0,0,0.07);
  z-index: 50;
}

.topnav.split{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 24px;
  /* スマホで詰まったときに 2段に折り返して逃がす */
  flex-wrap: wrap;
}

/* 左：テキストメニュー（中庸ウェイト＋ちょい字間） */
.nav-left{
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1 1 auto;     /* ← こっちが縮む側 */
  min-width: 0;
}
.navlink{
  color: var(--ink);
  text-decoration: none;
  font: 16px/1.6 ui-sans-serif, system-ui, -apple-system, "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  font-weight: 500;
  letter-spacing: 0.05em;
  transition: color 0.2s ease, opacity 0.2s ease;
  padding: 4px 2px;
}
.navlink:hover{
  color: var(--ink-strong);
  opacity: 0.9;
  text-decoration: underline;
  text-underline-offset: 3px; }

/* 右：ロゴ（絶対に潰さない） */
.brand-logo{
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;     /* ← 縮ませない。ロゴ死守 */
}

h1, h2, h3{
  color: var(--ink);
}

h1.page-title{
  font-size: 25px;   /* 好みで調整 */
  line-height: 1.2;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin: 16px 0 16px; /* ← 上も付ける。10pxは単位必須 */
}

h2.page-title{
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin: 48px 0 16px;
}

h3.page-title{
  font-size: 14px;
  line-height: 1.3;
  font-weight: 600;
  margin: 0;
}

/* =========================
works詳細ページ：画像幅を揃えて中央寄せ
========================= */
figure{
  margin: 0;
}

/* 画像中央寄せ */
.stack {
  text-align: center;
}

.stack img {
  width: 100%;              /* ここで表示幅を統一。任意で調整可。画面幅の90%まで */
  max-width: 800px;        /* ただし800pxを超えない */
  margin: 30px auto;       /* 上下余白＋左右中央 */
}

/* 説明テキストは左寄せ */
.stack p{
  text-align: left;
}

/* ===== backlink: 一覧に戻るリンク ===== */
.backlink {
  text-align: center;
  margin: 60px 0 40px;
}
.backlink a {
  display: inline-block;
  text-decoration: none;
  color: #333;
  font: 15px/1.6 system-ui, -apple-system, "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}
.backlink a:hover {
  color: #000;
  border-color: #999;
}

/* ===== footer: コピーライトのみ ===== */
.site-footer {
  text-align: center;
  padding: 20px 10px;
  font-size: 12px;
  color: #777;
  border-top: 1px solid var(--border);
  margin-top: 40px;
}



/* === SP: 1段目=ロゴ / 2段目=メニュー === */
@media (max-width: 640px){
  /* 親を折り返し可能にして中央基調へ */
  .site-header .topnav.split{
    display: flex;
    flex-wrap: wrap;     /* 2段に折り返す */
    justify-content: center;
    row-gap: 8px;
    padding: 12px 16px;
  }

  /* 1段目：ロゴ（幅100%を取って中央） */
  .site-header .brand-logo{
    order: 0;            /*  並び順の指定 */
    flex: 0 0 100%;      /* 1行を占有 */
    display: flex ;
    justify-content: center;
    margin: 0;
    float: none !important;         /* 旧テンプレ対策 */
  }


  /* 2段目：メニュー（中央寄せ） */
  .site-header .nav-left{
    order: 1;
    flex: 0 0 100%;
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    margin: 0;
    float: none !important;
    min-width: 0;
  }

  /* 念のため、子直下に残ってる“右寄せ”の対策 */
  .site-header .topnav.split > *{
    margin-left: 0 !important;
  }
}


/* === 全端末でロゴとメニューの比率を固定 === */
.site-header .brand-logo img {
  height: clamp(25px, 1.6vw, 27px); /* メニュー文字16pxに対して約1.6〜1.7倍 */
  width: auto;
}


