﻿/* ============================================================
   JPANNAI site styles 窶・mobile-first
   - Tap targets >= 44px, fluid typography, safe-area-inset 蟇ｾ蠢・
   - 隕冶ｪ榊庄閭ｽ縺ｪ繝輔か繝ｼ繧ｫ繧ｹ謖・ｨ呻ｼ・CAG 2.4.7・・
   - CSP 貅匁侠・亥､夜Κ CSS 縺ｮ縺ｿ繝ｻ繧､繝ｳ繝ｩ繧､繝ｳ JS 荳堺ｽｿ逕ｨ・・
   ============================================================ */
:root {
  --bg: #fafafa;
  --fg: #1f2937;
  --muted: #5b6470;
  --border: #d8dde3;
  --accent: #1d4ed8;        /* AA 豈・5.6:1 on #fff */
  --accent-hover: #1e40af;
  --accent-soft: #e0ecff;
  --warn-bg: #fff8e1;
  --warn-border: #f3d27a;
  --danger: #b91c1c;
  --card: #fff;
  --radius: 8px;
  --radius-sm: 6px;
  --tap: 44px;              /* 譛蟆上ち繝・・繧ｿ繝ｼ繧ｲ繝・ヨ */
  --maxw: 1024px;
  --pad-x: clamp(14px, 4vw, 24px);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 2px 8px rgba(15, 23, 42, 0.06);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans",
               "Noto Sans CJK JP", "Noto Sans CJK KR", "Apple SD Gothic Neo", sans-serif;
  background: var(--bg); color: var(--fg); line-height: 1.6;
  font-size: 16px;          /* iOS 縺ｧ input 縺梧僑螟ｧ縺輔ｌ縺ｪ縺・怙菴弱し繧､繧ｺ */
  /* iOS 縺ｮ繝弱ャ繝∝ｯｾ蠢・*/
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}
img, iframe { max-width: 100%; }

/* 繧ｹ繧ｭ繝・・繝ｪ繝ｳ繧ｯ・医く繝ｼ繝懊・繝・繧ｹ繧ｯ繝ｪ繝ｼ繝ｳ繝ｪ繝ｼ繝繝ｼ・・*/
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: #fff;
  padding: 10px 16px; border-radius: 0 0 var(--radius-sm) 0;
  text-decoration: none; font-weight: 600; z-index: 100;
}
.skip-link:focus { left: 0; }

/* 繧ｹ繧ｯ繝ｪ繝ｼ繝ｳ繝ｪ繝ｼ繝繝ｼ蟆ら畑繝・く繧ｹ繝・*/
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* 繧ｰ繝ｭ繝ｼ繝舌Ν縺ｪ繝輔か繝ｼ繧ｫ繧ｹ謖・ｨ・*/
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad-x); }

/* ============================================================
   Header / Navigation
   ============================================================ */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
  position: sticky; top: 0; z-index: 50;
  /* iOS 繝弱ャ繝・*/
  padding-top: max(10px, env(safe-area-inset-top));
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
}
.brand {
  font-weight: 700;
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.25rem);
  color: var(--fg);
  text-decoration: none;
  min-height: var(--tap);
  display: inline-flex; align-items: center;
  letter-spacing: 0.01em;
}
.brand:hover { color: var(--accent); }

/* 繝翫ン: 繝｢繝舌う繝ｫ縺ｧ縺ｯ讓ｪ繧ｹ繧ｯ繝ｭ繝ｼ繝ｫ蜿ｯ閭ｽ縺ｪ繝斐Ν迥ｶ繝懊ち繝ｳ鄒､・医ち繝・・縺励ｄ縺吶＞・・*/
.site-nav {
  width: 100%;
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a {
  color: var(--fg);
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 999px;
  min-height: var(--tap);
  display: inline-flex; align-items: center;
  font-size: 0.95rem;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.site-nav a:hover { color: var(--accent); background: var(--accent-soft); }
.site-nav a[aria-current="page"] {
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  /* 濶ｲ隕壹↓萓晏ｭ倥＠縺ｪ縺・ｦ冶ｦ夊ｭ伜挨・・CAG 1.4.1・・*/
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

/* 險隱槫・譖ｿ: 繝｢繝舌う繝ｫ縺ｧ縺ｯ繝翫ン縺ｨ蜷悟・縺ｫ荳ｦ縺ｶ縲ゅョ繧ｹ繧ｯ繝医ャ繝励〒縺ｯ邵ｦ邱壹〒蛹ｺ蛻・ｋ */
.lang-switch {
  display: inline-flex;
  gap: 4px;
  margin-left: auto;
  padding-left: 8px;
  flex-shrink: 0;
}
.lang-switch a {
  padding: 8px 10px;
  border-radius: 999px;
  min-height: var(--tap);
  display: inline-flex; align-items: center;
  font-size: 0.9rem;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}
.lang-switch a:hover { background: var(--accent-soft); color: var(--accent); }
.lang-switch a[aria-current="page"] {
  color: var(--accent);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

@media (min-width: 720px) {
  .site-nav { width: auto; flex-wrap: wrap; overflow: visible; padding-bottom: 0; }
  .lang-switch {
    margin-left: 4px;
    padding-left: 12px;
    border-left: 1px solid var(--border);
  }
}

/* ============================================================
   Hero / Search form
   ============================================================ */
.hero { padding: clamp(20px, 5vw, 36px) 0; }
.hero h1 {
  margin: 0 0 8px;
  font-size: clamp(1.4rem, 1rem + 2.4vw, 2rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.hero p { color: var(--muted); margin: 0 0 16px; }

.search-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  max-width: 560px;
}
.search-form input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 16px;          /* iOS 閾ｪ蜍輔ぜ繝ｼ繝謚第ｭ｢ */
  min-height: var(--tap);
  background: #fff;
}
.search-form input:focus { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 0; }
.search-form button {
  width: 100%;
  padding: 12px 16px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  min-height: var(--tap);
  transition: background-color 0.15s ease;
}
.search-form button:hover { background: var(--accent-hover); }

@media (min-width: 480px) {
  .search-form { grid-template-columns: 1fr auto; }
  .search-form button { width: auto; padding: 12px 22px; }
}

/* ============================================================
   Lists (categories / chains / stores)
   ============================================================ */
.category-list, .chain-list, .store-list {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
}
@media (min-width: 600px) {
  .category-list, .chain-list, .store-list {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }
}
.category-list a, .chain-list a, .store-list a {
  display: block;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--fg);
  text-decoration: none;
  min-height: var(--tap);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, transform 0.05s ease, box-shadow 0.15s ease;
}
/* hover はマウス端末のみで発火（タッチ端末で sticky :hover が複数カードに残り
   "中央列だけ青枠" のように見える事象を防ぐ）。
   タッチ端末では :active のみで押下フィードバックを行う。 */
@media (hover: hover) and (pointer: fine) {
  .category-list a:hover, .chain-list a:hover, .store-list a:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
  }
}
.category-list a:active, .chain-list a:active, .store-list a:active {
  transform: scale(0.995);
}
.chain-list p, .store-list .addr {
  color: var(--muted);
  margin: 4px 0 0;
  font-size: 0.9rem;
  display: block;
}
.store-list .chain { color: var(--muted); font-weight: 400; }

/* カテゴリボタン内の登録件数バッジ */
.category-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.category-list__name { font-weight: 600; }
.category-list__count {
  flex: none;
  color: var(--muted);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  padding: 2px 8px;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 999px;
  white-space: nowrap;
}

/* ============================================================
   Breadcrumb
   ============================================================ */
.breadcrumb {
  color: var(--muted);
  margin: 14px 0 8px;
  font-size: 0.88rem;
  word-break: break-word;
  line-height: 1.7;
}
.breadcrumb a {
  color: var(--muted);
  text-decoration: underline;
  text-decoration-color: rgba(91, 100, 112, 0.35);
  text-underline-offset: 2px;
}
.breadcrumb a:hover { color: var(--accent); }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  padding: 24px 0;
  padding-bottom: max(24px, calc(24px + env(safe-area-inset-bottom)));
  border-top: 1px solid var(--border);
  margin-top: 48px;
  color: var(--muted);
}
.site-footer .site-disclaimer {
  margin: 0 0 12px;
  padding: 12px 14px;
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--muted);
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  border-radius: var(--radius-sm);
}

/* ============================================================
   Nearby (GPS 譛霑大ｺ苓・讀懃ｴ｢)
   ============================================================ */
.nearby-control {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  align-items: center;
  padding: 12px 0 4px;
}
.nearby-control .btn-primary {
  padding: 12px 22px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  min-height: var(--tap);
  flex: 1 1 auto;            /* 繝｢繝舌う繝ｫ縺ｧ蜈ｨ蟷・√ョ繧ｹ繧ｯ繝医ャ繝励〒蜀・ｮｹ蟷・*/
  transition: background-color 0.15s ease;
}
.nearby-control .btn-primary:disabled { background: #99a1ad; cursor: progress; }
.nearby-control .btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.nearby-radius {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.95rem;
}
.nearby-radius select {
  padding: 10px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  font-size: 16px;           /* iOS 繧ｺ繝ｼ繝謚第ｭ｢ */
  min-height: var(--tap);
}
@media (min-width: 480px) {
  .nearby-control .btn-primary { flex: 0 0 auto; }
}
.nearby-privacy {
  width: 100%;
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}
.nearby-status { min-height: 1.4em; padding: 6px 0; color: var(--muted); }
.nearby-status.is-error { color: var(--danger); font-weight: 600; }
.nearby-results { margin-top: 16px; }
.nearby-results h2 { font-size: 1.1rem; margin: 8px 0 12px; }
.nearby-results .empty {
  padding: 16px;
  color: var(--muted);
  background: #fff;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  list-style: none;
}

.muted { color: var(--muted); }
.hero-nearby {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.hero-nearby-title {
  margin: 0 0 4px;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
}
.hero-nearby > .muted { margin: 0 0 4px; }
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 18px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--fg);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  min-height: var(--tap);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* CTA 繝懊ち繝ｳ: 繝帙・繝縺ｮ縲瑚ｿ代￥縺ｮ蠎励阪↑縺ｩ縲∫岼邇画ｩ溯・繧貞ｼｷ隱ｿ縺吶ｋ荳谺｡CTA */
.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 560px;
  padding: 14px 20px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 1.02rem;
  min-height: 52px;
  box-shadow: var(--shadow-md);
  transition: background-color 0.15s ease, transform 0.05s ease;
}
.btn-cta:hover { background: var(--accent-hover); color: #fff; }
.btn-cta:active { transform: scale(0.99); }
.btn-cta__icon { font-size: 1.2rem; line-height: 1; }
@media (min-width: 480px) {
  .btn-cta { width: auto; }
}

/* 髮ｻ隧ｱ逡ｪ蜿ｷ縲後ち繝・・縺励※逋ｺ菫｡縲阪・繧ｿ繝ｳ */
.store-phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: #f0f7ff;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  min-height: var(--tap);
  font-size: 1rem;
}
.store-phone:hover { background: var(--accent); color: #fff; }
.store-phone__icon { font-size: 1.05rem; line-height: 1; }
.store-phone__num { font-variant-numeric: tabular-nums; }
