/* 共通スタイル（ナオセル風）
   基準：naoseru_com/DESIGN.md（青=構造／赤=行動／黄=最重要CTA） */

:root {
  --blue: #1B8CCD;
  --blue-heading: #1867C0;
  --red: #D61439;
  --yellow: #FFE400;
  --yellow-ink: #332F00;
  --yellow-pale: #FEF9C3;
  --aqua: #C4E8F0;
  --line-green: #00B900;
  --footer-bg: #424242;
  --text: #1F2937;
  --gray: #6B7280;
  --gray-light: #9CA3AF;
  --border: #E5E7EB;
  --shadow-cta: 0 25px 50px -12px rgba(0, 0, 0, .25);
  --app-width: 640px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: #fff;
  padding-top: 64px;   /* 固定ヘッダー分 */
  padding-bottom: 72px; /* 下部固定ナビ分 */
}

img { max-width: 100%; display: block; }

em {
  font-style: normal;
  font-weight: 700;
  background: linear-gradient(transparent 70%, var(--yellow) 71%);
}

/* ===== ヘッダー（全幅） ===== */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 64px;
  background: #fff;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .1);
}

.wordmark {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: .02em;
  color: var(--blue);
  text-decoration: none;
}

.wordmark span { color: var(--red); }

/* ===== 下部固定ナビ（全幅・リンク群は中央寄せ） ===== */
.app-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 56px;
  background: #fff;
  z-index: 40;
  display: flex;
  justify-content: center;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, .15);
}

.app-nav a {
  flex: 1;
  max-width: calc(var(--app-width) / 3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 12px;
  color: rgba(0, 0, 0, .6);
  text-decoration: none;
}

.app-nav svg { width: 22px; height: 22px; }

/* ===== ボタン3種 ===== */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 310px;
  min-height: 56px;
  margin: 0 auto;
  padding: 0 24px;
  border: none;
  border-radius: 6px;
  font-family: inherit;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.btn--yellow {
  background: var(--yellow);
  color: var(--yellow-ink);
  box-shadow: var(--shadow-cta);
}

.btn--red {
  background: var(--red);
  color: #fff;
  box-shadow: var(--shadow-cta);
}

.btn--outline {
  background: transparent;
  color: var(--red);
  border: 1px solid var(--red);
}

.btn--white-outline {
  background: transparent;
  color: #fff;
  border: 1px solid #fff;
}

/* 申込（赤）と競合させないための、情報ページ向けの控えめなボタン。 */
.btn--blue-outline {
  background: transparent;
  color: var(--blue);
  border: 1px solid var(--blue);
}

/* ===== セクション共通 ===== */
.section { padding: 48px 20px 0; scroll-margin-top: 64px; }

.hero { scroll-margin-top: 64px; }

.container { max-width: 1000px; margin: 0 auto; }

.section-title {
  font-size: clamp(22px, 3.5vw, 28px);
  font-weight: 700;
  color: var(--blue-heading);
  text-align: center;
  line-height: 1.5;
}

.section-lead {
  text-align: center;
  color: var(--gray);
  font-size: 14px;
  margin-top: 8px;
}

.section-cta { margin-top: 36px; }

.section-more {
  margin-top: 24px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
}

.section-more a { color: var(--blue); }

/* ===== ヒーロー ===== */
.hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  color: #fff;
  padding: 56px 20px 64px;
}

.hero-bg { position: absolute; inset: 0; z-index: 0; }

.hero-bg__base { width: 100%; height: 100%; display: block; }

/* ガジェットパターンの代替：白の微細ドット */
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .13) 1.5px, transparent 1.6px);
  background-size: 28px 28px;
}

.hero-icon {
  position: absolute;
  width: 170px;
  height: 170px;
  top: 50%;
  transform: translateY(-50%);
}

.hero-icon--left { left: 5%; }
.hero-icon--right { right: 5%; }

@media (max-width: 899px) {
  .hero-icon { display: none; }
}

.hero-inner { position: relative; z-index: 1; }

.hero-title {
  font-size: clamp(26px, 5vw, 46px);
  font-weight: 900;
  letter-spacing: .12em;
  line-height: 1.6;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .3);
}

.hero-cta { margin-top: 28px; }

.hero-copy {
  margin-top: 16px;
  font-size: 14px;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .35);
}

/* ===== 型番検索ボックス（main.js互換構造） ===== */
.search-box {
  position: relative;
  max-width: 480px;
  margin: 28px auto 0;
  text-align: left;
}

.search-input {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid rgba(60, 60, 60, .26);
  border-radius: 6px;
  background: #fff;
  font-family: inherit;
  font-size: 16px;
  color: var(--text);
}

.search-input::placeholder { color: var(--gray-light); }

.search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 30;
  display: none;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .18);
  max-height: 320px;
  overflow-y: auto;
}

.search-results.active { display: block; }

.search-result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: #F0F8FC; }

.result-name { font-size: 15px; font-weight: 700; color: var(--text); }
.result-name strong { color: var(--red); }
.result-brand { font-size: 12px; font-weight: 400; color: var(--gray); margin-left: 4px; }
.result-meta { font-size: 12px; color: var(--gray-light); }
.result-price { text-align: right; white-space: nowrap; }
.result-price-label { font-size: 11px; color: var(--gray-light); }
.result-price-value { font-size: 16px; font-weight: 700; color: var(--red); }
.result-price-yen { font-size: 12px; }
.search-no-result { padding: 14px 16px; font-size: 13px; color: var(--gray); }

/* ===== グリッド ===== */
.grid-3 { display: grid; gap: 40px 24px; margin-top: 36px; }

@media (min-width: 768px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

.grid-cat {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 36px;
}

@media (min-width: 768px) {
  .grid-cat { grid-template-columns: repeat(3, 1fr); gap: 16px; }
}

/* ===== 円形メディア ===== */
.circle-media {
  position: relative;
  width: 170px;
  height: 170px;
  margin: 0 auto;
  border-radius: 9999px;
  overflow: visible;
  border: 1px solid var(--blue);
  padding: 4px;
}

.circle-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 9999px;
}

.circle-media--sm { width: min(26vw, 140px); height: min(26vw, 140px); }

/* ===== 特徴・流れ ===== */
.feature, .flow-step { text-align: center; }

.feature-title {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.5;
  margin-top: 16px;
}

.feature-text {
  font-size: 14px;
  color: var(--gray);
  margin-top: 8px;
  text-align: left;
}

.flow-badge {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 34px;
  height: 34px;
  border-radius: 9999px;
  background: var(--blue);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.flow-label {
  color: var(--red);
  font-weight: 700;
  letter-spacing: .08em;
  margin-top: 16px;
}

.flow-label + .feature-title { margin-top: 2px; }

/* ===== カテゴリカード =====
   写真を全面に敷き、暗い重ねの上へ白文字を置く。特徴・流れの丸写真と
   見た目を分け、押せるカードだと分かるようにしている。 */
.cat {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 14px;
  background: #0F1723;
  text-decoration: none;
  color: #fff;
  transition: transform .25s ease, box-shadow .25s ease;
}

.cat-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

/* 家電のように明るい写真でも白文字が読めるよう、下側を強めに沈める */
.cat-body {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 26px 34px 12px 12px;
  background: linear-gradient(to top, rgba(8, 14, 24, .94) 0%, rgba(8, 14, 24, .82) 42%, rgba(8, 14, 24, 0) 100%);
}

.cat-name { font-size: 15px; font-weight: 700; line-height: 1.35; }

/* 狭い画面では2行の内訳が写真をふさぐので、名前と件数だけにする */
.cat-meta {
  display: none;
  line-height: 1.45;
  color: rgba(255, 255, 255, .82);
  margin-top: 2px;
}

.cat-count {
  font-size: 12px;
  font-weight: 700;
  color: var(--aqua);
  margin-top: 4px;
}

.cat::after {
  content: "";
  position: absolute;
  right: 14px;
  bottom: 18px;
  width: 8px;
  height: 8px;
  border-right: 2px solid rgba(255, 255, 255, .92);
  border-bottom: 2px solid rgba(255, 255, 255, .92);
  transform: rotate(-45deg);
  transition: transform .25s ease;
}

.cat:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

@media (min-width: 768px) {
  /* 写真が4:3なので、横幅が取れる画面では切らずにそのまま見せる */
  .cat { aspect-ratio: 4 / 3; }
  .cat-body { padding: 30px 38px 14px 16px; }
  .cat-name { font-size: 17px; }
  .cat-meta {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    font-size: 12px;
  }
  .cat-count { font-size: 13px; }
  .cat::after { right: 16px; bottom: 20px; width: 9px; height: 9px; }
}

@media (hover: hover) {
  .cat:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 30px -18px rgba(0, 0, 0, .6);
  }
  .cat:hover .cat-photo { transform: scale(1.06); }
  .cat:hover::after { transform: rotate(-45deg) translate(2px, 2px); }
}

@media (prefers-reduced-motion: reduce) {
  .cat, .cat-photo, .cat::after { transition: none; }
  .cat:hover, .cat:hover .cat-photo { transform: none; }
  .cat:hover::after { transform: rotate(-45deg); }
}

/* ===== LINE誘導帯 ===== */
.line-band {
  background: var(--line-green);
  color: #fff;
  text-align: center;
  padding: 44px 20px;
  margin-top: 64px;
}

.line-band__title { font-size: 22px; font-weight: 900; }
.line-band__text { font-size: 14px; margin: 8px 0 24px; }

/* ===== フッター ===== */
.footer {
  background: var(--footer-bg);
  color: #fff;
  text-align: center;
  padding: 40px 20px 48px;
}

.footer-brand { font-size: 20px; font-weight: 900; }
.footer-tagline { font-size: 13px; color: rgba(255, 255, 255, .7); margin-top: 4px; }

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 20px;
  margin-top: 22px;
  font-size: 13px;
}

.footer-nav a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-info { font-size: 13px; color: rgba(255, 255, 255, .85); margin-top: 22px; }
.footer-license { font-size: 12px; color: rgba(255, 255, 255, .7); margin-top: 6px; }
.footer-copy { font-size: 11px; color: rgba(255, 255, 255, .5); margin-top: 16px; }

/* ===== 共有部品（複数ページで使用） ===== */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.breadcrumb {
  max-width: 880px;
  margin: 0 auto;
  padding: 12px 20px;
  font-size: 13px;
  color: var(--gray-light);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.breadcrumb a { color: var(--blue); text-decoration: none; }
.breadcrumb [aria-current="page"] { color: var(--gray); }

.prototype-note {
  background: var(--yellow-pale);
  border-radius: 8px;
  padding: 16px 20px;
  margin-top: 48px;
  font-size: 13px;
}

.prototype-note strong { display: block; color: var(--red); margin-bottom: 4px; }
