/* ================================================================
   にこぽのへや 共通スタイル
   配色はにこぽ本体（クリーム白 #fffdf6 / こげ茶 #3d2e23 / ほっぺ #f6b8c4）
   を基準に設計。全ページこの1枚を読み込む。
   ================================================================ */

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

:root {
  --cream: #fffdf6;
  --ink: #3d2e23;
  --sub: #7d6f63;
  --line: #eee1cf;
  --card: #ffffff;
  --mint: #3fbfa0;
  --mint-deep: #0f8a6d;
  --mint-soft: #e7f7f1;
  --pink: #f6b8c4;
  --pink-deep: #d96f88;
  --pink-soft: #fdeef2;
  --sora: #6ec3f0;
  --sora-soft: #ecf6fd;
  --lemon: #ffd97a;
  --lemon-soft: #fff7e0;
  --shadow: 0 12px 32px rgba(93, 74, 55, .10);
  --shadow-sm: 0 6px 18px rgba(93, 74, 55, .08);
  --radius: 18px;
}

html { scroll-behavior: smooth; }

body {
  font-family: "BIZ UDPGothic", "Hiragino Maru Gothic ProN", "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
  background:
    radial-gradient(900px 500px at 85% -100px, rgba(255, 217, 122, .18), transparent 60%),
    radial-gradient(800px 500px at -100px 300px, rgba(110, 195, 240, .12), transparent 60%),
    linear-gradient(180deg, #fff8e9, #f4faf5 55%, #fff5f8);
  background-attachment: fixed;
  color: var(--ink);
  line-height: 1.85;
  min-height: 100vh;
  -webkit-text-size-adjust: 100%;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--mint-deep); }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--sora);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------------- ヘッダー ---------------- */

.site-header {
  max-width: 1040px;
  margin: 14px auto 0;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}
.brand img { width: 44px; height: 38px; }
.brand strong { font-size: 1.18rem; font-weight: 900; letter-spacing: .04em; }

.global-nav { display: flex; flex-wrap: wrap; gap: 8px; }
.global-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .8);
  border: 1.5px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  font-size: .92rem;
  font-weight: 700;
}
.global-nav a:hover { border-color: var(--mint); background: var(--mint-soft); }
.global-nav a[aria-current="page"] { border-color: var(--mint); background: var(--mint-soft); color: var(--mint-deep); }

/* ---------------- レイアウト ---------------- */

main { max-width: 1040px; margin: 0 auto; padding: 18px 14px 70px; }
.narrow { max-width: 860px; }

.section { margin-top: 34px; }
.section > h2 {
  font-size: 1.3rem;
  line-height: 1.4;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section > h2::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 18px 0 0 -2px var(--pink), 36px 0 0 -4px var(--lemon);
  margin-right: 28px;
  flex: none;
}
.section > .section-lead { color: var(--sub); font-size: .95rem; margin-bottom: 16px; }

/* ---------------- ヒーロー（トップ） ---------------- */

.hero {
  margin-top: 12px;
  padding: 34px 26px;
  background: rgba(255, 255, 255, .75);
  border: 1.5px solid rgba(255, 255, 255, .9);
  border-radius: 26px;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 24px;
  align-items: center;
}
.hero-copy h1 {
  font-size: clamp(1.5rem, 4.2vw, 2.2rem);
  line-height: 1.45;
  letter-spacing: .02em;
  margin-bottom: 12px;
}
.hero-copy .accent { color: var(--mint-deep); }
.hero-copy p { color: var(--sub); font-size: 1rem; }
.hero-nikopo { width: 240px; margin-inline: auto; }
.hero-nikopo img { width: 100%; filter: drop-shadow(0 14px 22px rgba(93, 74, 55, .16)); }

.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 22px;
  border-radius: 999px;
  border: 0;
  background: var(--mint);
  color: #fff;
  font: inherit;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(63, 191, 160, .35);
  transition: transform .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(63, 191, 160, .4); }
.btn.ghost {
  background: #fff;
  color: var(--mint-deep);
  border: 2px solid var(--mint);
  box-shadow: none;
}
.btn.ghost:hover { background: var(--mint-soft); }
.btn:disabled { background: #cfc6bb; box-shadow: none; cursor: not-allowed; transform: none; }

/* ---------------- SNSチップ ---------------- */

.sns-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.sns-row a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 5px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1.5px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  font-size: .88rem;
  font-weight: 700;
}
.sns-row a:hover { border-color: var(--sora); background: var(--sora-soft); }

/* ---------------- カード ---------------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
  gap: 14px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
a.card:hover { transform: translateY(-3px); border-color: var(--mint); box-shadow: var(--shadow); }
.card .card-emoji { font-size: 1.7rem; line-height: 1; }
.card h3 { font-size: 1.05rem; line-height: 1.5; }
.card p { color: var(--sub); font-size: .88rem; flex: 1; }
.card .card-go { color: var(--mint-deep); font-size: .85rem; font-weight: 900; }

.badge {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 12px;
  font-size: .75rem;
  font-weight: 900;
  letter-spacing: .04em;
}
.badge.live { background: var(--mint-soft); color: var(--mint-deep); border: 1px solid #bfe8da; }
.badge.soon { background: var(--lemon-soft); color: #9a7414; border: 1px solid #f2ddad; }
.badge.ext { background: var(--sora-soft); color: #2477a8; border: 1px solid #cfe8f7; }

/* ---------------- ステップ（はじめての方へ） ---------------- */

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; counter-reset: step; }
.step {
  position: relative;
  padding: 22px 20px 20px;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
a.step:hover { border-color: var(--pink-deep); box-shadow: var(--shadow); transform: translateY(-3px); transition: .15s; }
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: -13px;
  left: 16px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--pink);
  color: #7c3a4c;
  font-weight: 900;
  display: grid;
  place-items: center;
  border: 2.5px solid #fff;
  box-shadow: var(--shadow-sm);
}
.step h3 { font-size: 1.02rem; }
.step p { color: var(--sub); font-size: .88rem; flex: 1; }
.step .card-go { color: var(--mint-deep); font-size: .85rem; font-weight: 900; }

/* ---------------- 更新履歴 ---------------- */

.history {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  display: grid;
  gap: 10px;
}
.history-item {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  font-size: .92rem;
  color: var(--sub);
}
.history-item time { color: var(--mint-deep); font-weight: 900; }

/* ---------------- 下層ページ共通 ---------------- */

.crumb {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--mint-deep);
  font-size: .9rem;
  font-weight: 900;
  text-decoration: none;
  margin-bottom: 6px;
}
.crumb:hover { text-decoration: underline; }

.page-hero {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 24px;
  background: rgba(255, 255, 255, .75);
  border: 1.5px solid rgba(255, 255, 255, .9);
  border-radius: 22px;
  box-shadow: var(--shadow);
}
.page-hero img { width: 96px; }
.page-hero h1 { font-size: clamp(1.4rem, 3.6vw, 1.9rem); line-height: 1.4; margin-bottom: 4px; }
.page-hero .lead { color: var(--sub); font-size: .95rem; }

.prose { max-width: 760px; }
.prose h2 {
  font-size: 1.18rem;
  margin: 30px 0 10px;
  padding-left: 12px;
  border-left: 5px solid var(--mint);
  border-radius: 3px;
  line-height: 1.5;
}
.prose h2.pink { border-left-color: var(--pink-deep); }
.prose p, .prose li { color: #5d5044; font-size: .96rem; }
.prose p + p { margin-top: 10px; }
.prose ul, .prose ol { padding-left: 1.5em; display: grid; gap: 6px; margin: 10px 0; }
.prose strong { color: var(--ink); }

.box {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  margin-top: 14px;
}
.box.mint { background: var(--mint-soft); border-color: #cdeade; }
.box.pink { background: var(--pink-soft); border-color: #f4d7de; }
.box.lemon { background: var(--lemon-soft); border-color: #f2e2b8; }

.note-small { font-size: .85rem; color: var(--sub); }

/* ---------------- スタンプ・ギャラリー ---------------- */

.stamp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
}
.stamp-grid figure {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  display: grid;
  gap: 8px;
  justify-items: center;
}
.stamp-grid img { width: 100%; max-width: 150px; }
.stamp-grid figcaption { font-size: .8rem; color: var(--sub); font-weight: 700; }

.face-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.face-grid figure {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 14px 12px;
  display: grid;
  gap: 8px;
  justify-items: center;
  box-shadow: var(--shadow-sm);
}
.face-grid img { width: 110px; }
.face-grid figcaption { font-size: .82rem; color: var(--sub); font-weight: 700; }

/* ---------------- フォーム ---------------- */

label { display: block; font-size: .84rem; font-weight: 900; color: #5d5044; margin: 14px 0 5px; }
input, textarea, select {
  width: 100%;
  border: 1.5px solid #e3d5c2;
  border-radius: 12px;
  padding: 11px 12px;
  font: inherit;
  background: #fff;
  color: var(--ink);
}
input:focus, textarea:focus, select:focus { outline: 3px solid rgba(110, 195, 240, .5); border-color: var(--sora); }
textarea { min-height: 170px; resize: vertical; }
.form-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.form-status { font-weight: 900; margin-top: 10px; font-size: .92rem; }
.form-status.ok { color: var(--mint-deep); }
.form-status.err { color: #c2565f; }

/* ---------------- フッター ---------------- */

.site-footer {
  max-width: 1040px;
  margin: 0 auto;
  padding: 10px 14px 30px;
  color: var(--sub);
  font-size: .88rem;
}
.footer-card {
  background: rgba(255, 255, 255, .8);
  border: 1.5px solid rgba(255, 255, 255, .95);
  border-radius: 22px;
  box-shadow: var(--shadow-sm);
  padding: 22px 24px;
  display: grid;
  gap: 14px;
}
.footer-nav { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.footer-nav a { color: #6d5f52; text-decoration: none; font-weight: 700; min-height: 34px; display: inline-flex; align-items: center; }
.footer-nav a:hover { color: var(--mint-deep); text-decoration: underline; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 6px 16px; border-top: 1px dashed var(--line); padding-top: 12px; }
.footer-legal a { color: var(--sub); text-decoration: none; min-height: 34px; display: inline-flex; align-items: center; }
.footer-legal a:hover { text-decoration: underline; }
.copyright { text-align: center; margin-top: 14px; }

/* ---------------- 404 ---------------- */

.lost { text-align: center; padding: 50px 20px; }
.lost img { width: 180px; margin: 0 auto 18px; }
.lost h1 { font-size: 1.5rem; margin-bottom: 10px; }
.lost p { color: var(--sub); margin-bottom: 22px; }

/* ---------------- レスポンシブ ---------------- */

@media (max-width: 720px) {
  .hero { grid-template-columns: 1fr; padding: 26px 20px 30px; text-align: center; }
  .hero-nikopo { width: 180px; order: -1; }
  .hero-actions, .sns-row { justify-content: center; }
  .steps { grid-template-columns: 1fr; gap: 20px; }
  .page-hero { grid-template-columns: 72px minmax(0, 1fr); padding: 20px 16px; }
  .page-hero img { width: 72px; }
  .history-item { grid-template-columns: 1fr; gap: 0; }
  main { padding-inline: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .card, .step { transition: none; }
}
