/* ==========================================
   全ページ共通（色・文字・ヘッダー・メニュー・フッター）
   ヘッダーとフッターのHTMLは public/partials/ にある
   ========================================== */

:root {
  --night: #000000;   /* ページの背景 */
  --sea: #453e7a;     /* 帯状のセクション、画像が無いときの下地 */
  --mist: #736e87;    /* 罫線・点線・枠線 */
  --lamp: #b3314d;    /* 主要ボタン・消印・いいね済み */
  --paper: #f4f1f8;   /* 夜の上の文字色、絵葉書の紙 */
  --paper-soft: rgba(244, 241, 248, 0.8);
  --door: #18162b;    /* 猫ギミックの背景（黒に海の紫を35%重ねた色） */
  --font-main: "Hina Mincho", serif;
  --font-hand: "Yomogi", cursive;
  --header-h: 94px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--night);
  color: var(--paper);
  font-family: var(--font-main);
  overflow-x: hidden;
}

a { color: var(--paper); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 4px; }
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--lamp);
  outline-offset: 3px;
}
button, input, textarea { font-family: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }

.wrap {
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 40px;
  padding-right: 40px;
}

.section-title {
  margin: 0;
  font-weight: 400;
  font-size: 40px;
  letter-spacing: 0.1em;
}

.text-link {
  font-size: 15px;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* 読み進めバー */
.progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 200;
  width: 0;
  height: 3px;
  background: var(--lamp);
}

/* ---------- ヘッダー ---------- */
.site-header {
  position: relative;
  z-index: 20;
  max-width: 1360px;
  min-height: var(--header-h);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 32px;
  padding-top: 22px;
  padding-bottom: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand img { width: 50px; height: 50px; object-fit: contain; }
.brand span { font-size: 24px; letter-spacing: 0.1em; }
.brand:hover { text-decoration: none; }

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 26px;
  font-size: 15px;
}
/* 今いるページ */
.nav-links a[aria-current="page"],
.footer-nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--lamp);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}
.mobile-menu-nav a[aria-current="page"] { color: var(--paper); border-bottom-color: var(--lamp); }
.mobile-menu-nav a[aria-current="page"]::after {
  content: "";
  width: 8px;
  height: 8px;
  margin-left: auto;
  border-radius: 50%;
  background: var(--lamp);
}

.nav-contact {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--lamp);
}

.menu-btn {
  display: none;
  width: 48px;
  height: 48px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: transparent;
  border: 1px solid var(--mist);
}
.menu-btn span { display: block; width: 22px; height: 1px; background: var(--paper); }

/* スマホのメニュー（開いた状態） */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  flex-direction: column;
  background: var(--night);
  overflow-y: auto;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu-lights {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.mobile-menu-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 20px;
}
.menu-close {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--mist);
  color: var(--paper);
}
.mobile-menu-nav {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  padding: 8px 20px 0;
}
.mobile-menu-nav a {
  display: flex;
  align-items: center;
  min-height: 60px;
  padding: 14px 4px;
  border-bottom: 1px dotted var(--mist);
  font-size: 22px;
  letter-spacing: 0.08em;
}
.mobile-menu-nav .mobile-menu-contact {
  margin-top: 28px;
  justify-content: center;
  min-height: 56px;
  border-bottom: 0;
  background: var(--lamp);
  font-size: 18px;
  letter-spacing: 0.1em;
}
.mobile-menu-foot {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 20px 28px;
}
.mobile-menu-foot a { font-size: 13px; text-decoration: underline; text-underline-offset: 4px; }
.mobile-menu-foot p { margin: 0; font-family: var(--font-hand); font-size: 15px; color: var(--paper-soft); }

/* トースト（リンクのコピー完了） */
.toast {
  position: fixed;
  left: 50%;
  bottom: 10%;
  z-index: 400;
  padding: 10px 20px;
  background: var(--lamp);
  color: var(--paper);
  font-size: 14px;
  transform: translateX(-50%);
  transition: opacity 0.5s;
}

/* 現在地（パンくず） */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  font-size: 13px;
  color: var(--paper-soft);
}
.breadcrumb a { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- フッター ---------- */
.site-footer { border-top: 1px solid var(--sea); }
.footer-inner {
  max-width: 1360px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding-top: 44px;
  padding-bottom: 36px;
}
.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.footer-top .brand img { width: 54px; height: 54px; }
.footer-top .brand span { font-size: 22px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 14px; }

/* 猫ギミック（仕組みは admin-door.css と game-door.js） */
.site-footer .admin-door {
  width: 100% !important;
  max-width: none;
  height: 104px;
  margin: 0;
  border-radius: 0;
  background: var(--door);
}

.copyright {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: rgba(244, 241, 248, 0.7);
}
.copyright p { margin: 0; }

/* ---------- スクロールで表示 ---------- */
.reveal { opacity: 0; translate: 0 24px; transition: opacity 0.8s ease, translate 0.8s ease; }
.reveal.active { opacity: 1; translate: 0 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; translate: none; transition: none; }
}

/* ---------- スマホ（768px以下） ---------- */
@media (max-width: 768px) {
  .wrap { padding-left: 20px; padding-right: 20px; }
  .nav-links { display: none; }
  .menu-btn { display: inline-flex; }

  /* 猫ギミックは高さも魚・猫も3/4に縮める */
  .site-footer .admin-door { height: 78px; }
  .site-footer .admin-fish { width: 60px; height: 45px; }
  .site-footer .admin-cat { width: 68px; height: 68px; }
}
