/* ============================================
   riku class 共通スタイル
   全ページ共通のデザイン設定（色・フォント・ヘッダー・フッター）
   ここを直せば全ページに反映されます
   ============================================ */

* { font-synthesis: none; }

:root {
  --bg-main: #FAF9F0;
  --text-main: #141413;
  --text-muted: #555555;
  --border-color: #E8E6DC;
  --accent-color: #D97757;
  --accent-hover: #C56345;
  --font-serif: 'Shippori Mincho', serif;
  --font-sans: 'Noto Sans JP', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  overscroll-behavior: none;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

a { text-decoration: none; color: inherit; }

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* ===== ヘッダー ===== */
header {
  flex: 0 0 auto;
  padding: clamp(0.5rem, 1.5vh, 1rem) 0;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.logo { display: flex; align-items: center; transition: opacity 0.2s; }
.logo:hover { opacity: 0.7; }

.logo img {
  height: clamp(100px, 13vh, 140px);
  margin: clamp(-34px, -4.4vh, -22px) 0 clamp(-34px, -4.4vh, -22px) clamp(-54px, -7vh, -36px);
  width: auto;
  display: block;
}

.nav-links { display: flex; gap: 2rem; font-size: 0.9rem; }
.nav-links a:hover { color: var(--text-muted); }
.nav-links a.current { color: var(--accent-color); }

/* ===== ハンバーガーメニュー（モバイル） ===== */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  gap: 4px;
  width: 20px;
  height: 20px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}
.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-main);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease, width 0.2s ease;
}
.menu-toggle.active span:nth-child(1) { transform: translateY(6px) rotate(45deg); width: 100%; }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); width: 100%; }

.mobile-nav {
  display: none;
  flex-direction: column;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 160px;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 16px 32px rgba(0,0,0,0.09);
  padding: 0.2rem 1rem;
  z-index: 40;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  padding: 0.75rem 0;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-main);
  border-top: 1px solid var(--border-color);
  transition: color 0.2s ease;
}
.mobile-nav a:first-child { border-top: none; }
.mobile-nav a:hover { color: var(--accent-color); }

/* ===== 共通パーツ ===== */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color 0.2s ease;
}
.back-link:hover { color: var(--accent-color); }

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-main);
}
.card-link .arrow { transition: transform 0.2s ease; }

/* ===== フッター ===== */
footer {
  flex: 0 0 auto;
  border-top: 1px solid var(--border-color);
  padding: clamp(0.5rem, 1.4vh, 0.9rem) 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ===== モバイル共通 ===== */
@media (max-width: 860px) {
  .nav-links { display: none; }
  .menu-toggle { display: flex; }

  .logo img {
    height: clamp(112px, 13.6vh, 152px);
    margin: clamp(-37px, -4.6vh, -24px) 0 clamp(-37px, -4.6vh, -24px) clamp(-58px, -7.6vh, -39px);
  }
}
