/* ===========================================================================
   実店舗チェッカー

   原則:
   - 洗練は「薄い文字 + 大きな余白」では作らない。
     typography / spacing / alignment / hierarchy / proportion で作る。
   - 本文に #999 相当の淡いグレーを使わない。通常本文は #525252 以上。
   - 情報階層は4段階に固定し、中途半端なグレーを増やさない。
   - 英字を装飾目的で使わない。
   =========================================================================== */

:root {
  --bg: #ffffff;
  --surface: #ffffff;

  /* 本文の明度はこの4段階だけ。中間のグレーを増やさない。
     L1 見出し・店名 / L2 リード・本文 / L3 メタ / L4 placeholder */
  --text: #111111;
  --text-strong: #454545;
  --text-2: #454545;
  --text-3: #6b6b67;
  --placeholder: #858581;

  --border: #dadad6;
  --border-strong: #cececa;

  /* アイコンは文字より必ず弱く。矢印が店名より強く見えないこと */
  --icon: #8a8a86;

  /* ブランドアクセント。ロゴのチェックにだけ使い、他へ広げない */
  --accent: #176b57;

  --ease: cubic-bezier(0.2, 0.6, 0.3, 1);
  --dur: 160ms;
  --dur-fast: 110ms;
  --hover-tint: rgba(17, 17, 17, 0.038);
  --press-tint: rgba(17, 17, 17, 0.07);

  /* 状態色。装飾ではなく判定の意味にだけ使う。
     dot は text よりわずかに彩度を上げる（背景 badge には戻さない） */
  --ok: #18734d;
  --ok-dot: #1f9d68;
  --delivery: #52677f;
  --delivery-dot: #71839a;
  --unknown: #8a621f;
  --unknown-dot: #c18b36;
  --hold: #6b6b67;
  --hold-dot: #6b6b67;

  --r-sm: 10px;
  --r-md: 12px;
  --r-lg: 14px;

  --font: "Inter", "Noto Sans JP", -apple-system, BlinkMacSystemFont,
    "Hiragino Sans", "Yu Gothic Medium", "Segoe UI", Roboto, sans-serif;

  --column: 720px;
  --gutter: 20px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 450;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
svg { display: block; }

:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; border-radius: 4px; }

.wrap { max-width: var(--column); margin: 0 auto; padding-inline: var(--gutter); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* --- header --------------------------------------------------------------- */

.site-header > .wrap { height: 56px; display: flex; align-items: center; }

.logo { display: inline-flex; align-items: center; gap: 8px; transition: opacity var(--dur) var(--ease); }
.logo-mark { width: 22px; height: 22px; flex: none; color: var(--text); }

/* ブランドアクセントはロゴのチェック1箇所だけ。面積は画面の1%未満に留める */
.logo-check { stroke: var(--accent); }

.logo-type {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* --- hero ----------------------------------------------------------------- */

.hero { padding-top: 14px; }

.hero h1 {
  margin: 0;
  font-size: 36px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.04em;
  color: var(--text);
}

.hero h1 .line { display: block; }
.hero-lead .line { display: block; }

.hero-lead {
  margin: 12px 0 0;
  /* 改行位置は .line の span で決めているので、ここは
     意図しない折り返しを防ぐための余裕込みの上限にする（1行目が最長で約343px） */
  max-width: 23em;
  font-size: 16px;
  font-weight: 450;
  line-height: 1.7;
  color: var(--text-2);
}

/* --- search: 1行。普通のUIサイズに戻す ------------------------------------ */

.search {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 66px;
  margin-top: 20px;
  padding: 0 11px 0 16px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  /* 白い面としてわずかに浮かせる。カード化はしない */
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.search:focus-within {
  border-color: var(--text);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

.search-icon { flex: none; color: var(--icon); }

.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.01em;
  outline: 0;
}

.search input::placeholder { color: var(--placeholder); font-weight: 450; }
.search input::-webkit-search-cancel-button { display: none; }

.search-go {
  flex: none;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border: 0;
  border-radius: var(--r-md);
  background: var(--text);
  color: #fff;
  cursor: pointer;
  transition: opacity var(--dur) var(--ease), transform var(--dur-fast) var(--ease);
}

.search-go:active { transform: scale(0.95); }

.search-note {
  margin: 8px 2px 0;
  font-size: 13px;
  font-weight: 450;
  color: var(--text-3);
}

/* --- status: dot + 日本語ラベル ------------------------------------------- */

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
}

.status-dot {
  width: 6px; height: 6px; flex: none; border-radius: 50%;
  background: var(--dot, currentColor);
}

.status[data-tone="ok"] { color: var(--ok); --dot: var(--ok-dot); }
.status[data-tone="delivery"] { color: var(--delivery); --dot: var(--delivery-dot); }
.status[data-tone="unknown"] { color: var(--unknown); --dot: var(--unknown-dot); }
.status[data-tone="hold"] { color: var(--hold); --dot: var(--hold-dot); }

/* --- section -------------------------------------------------------------- */

.section { margin-top: 28px; }

.section-title {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.025em;
  color: var(--text);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-head .section-title { margin-bottom: 0; }

.section-more {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
}

.section-more svg { color: var(--icon); transition: transform var(--dur) var(--ease); }
.section-more { transition: color var(--dur) var(--ease); }
.section-more:active { opacity: 0.6; }

/* --- 店舗リスト: カードで囲わない ----------------------------------------- */

.list { list-style: none; margin: 0; padding: 0; }
.list > li { border-bottom: 1px solid var(--border); }
.list > li:first-child { border-top: 1px solid var(--border); }

.item { position: relative; display: block; padding: 18px 0; transition: opacity var(--dur-fast) var(--ease); }
a.item:active { opacity: 0.6; }

.item-name {
  display: block;
  margin-top: 8px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: -0.025em;
  color: var(--text);
}

.item-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 2px;
  font-size: 14px;
  font-weight: 450;
  color: var(--text-3);
}

.item-foot svg { flex: none; color: var(--icon); transition: transform var(--dur) var(--ease); }

.empty { padding: 18px 0; font-size: 15px; color: var(--text-2); }

/* --- 情報リスト（確認した情報・送客） ------------------------------------- */

.rows { list-style: none; margin: 0; padding: 0; }
.rows > li { border-bottom: 1px solid var(--border); }
.rows > li:first-child { border-top: 1px solid var(--border); }

.row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 0;
  position: relative;
  transition: opacity var(--dur-fast) var(--ease);
}

a.row:active { opacity: 0.6; }

.row-body { flex: 1; min-width: 0; }

.row-title {
  display: block;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.02em;
  color: var(--text);
}

.row-sub {
  display: block;
  margin-top: 1px;
  font-size: 14px;
  font-weight: 450;
  line-height: 1.5;
  color: var(--text-2);
}

.row-none { flex: none; font-size: 13px; font-weight: 500; color: var(--text-3); }
.row svg { flex: none; color: var(--icon); transition: transform var(--dur) var(--ease); }

li[data-found="no"] .row-title { color: var(--text-2); font-weight: 500; }

/* --- result --------------------------------------------------------------- */

.back {
  transition: color var(--dur) var(--ease);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
}

.result-kicker {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-3);
}

.result-name {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.035em;
  color: var(--text);
}

.verdict { margin-top: 20px; }

.verdict-conclusion {
  margin: 10px 0 0;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.038em;
  color: var(--text);
}

.verdict-detail {
  margin: 10px 0 0;
  max-width: 24em;
  font-size: 16px;
  font-weight: 450;
  line-height: 1.7;
  color: var(--text-strong);
}

.verdict-note {
  margin: 14px 0 0;
  padding-left: 12px;
  border-left: 2px solid var(--border-strong);
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--text-2);
}

/* --- 店舗情報 -------------------------------------------------------------- */

.facts { margin: 0; }

.fact {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}

.fact:first-child { border-top: 1px solid var(--border); }

.fact dt { font-size: 14px; font-weight: 500; color: var(--text-3); }
.fact dd { margin: 0; font-size: 15px; line-height: 1.6; color: var(--text); word-break: break-word; }
.fact dd a { border-bottom: 1px solid var(--border-strong); }

/* --- 参考情報 -------------------------------------------------------------- */

.reference { margin-top: 18px; padding-left: 12px; border-left: 2px solid var(--border-strong); }

.reference-title { margin: 0 0 3px; font-size: 13px; font-weight: 700; color: var(--text); }
.reference-body { margin: 0; font-size: 14.5px; line-height: 1.65; color: var(--text-2); }
.reference-caveat { margin: 5px 0 0; font-size: 13px; line-height: 1.65; color: var(--text-3); }

/* --- 送客 ------------------------------------------------------------------ */

.actions { display: flex; flex-direction: column; gap: 14px; }

.action-group-label {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}

.action {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 50px;
  padding: 0 14px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}

.action + .action { margin-top: 8px; }
.action span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- meta / feedback ------------------------------------------------------- */

.checked-at {
  margin: 22px 0 0;
  font-size: 13px;
  font-weight: 450;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

.feedback { margin-top: 0; }

.feedback-toggle {
  min-height: 44px;
  padding: 11px 0;
  border: 0;
  background: none;
  color: var(--text-2);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: color var(--dur) var(--ease);
}

.feedback-form { margin-top: 8px; }

.feedback-form textarea {
  width: 100%;
  min-height: 82px;
  padding: 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  resize: vertical;
  outline: 0;
}

.feedback-form textarea:focus { border-color: var(--text); }
.feedback-actions { display: flex; gap: 8px; margin-top: 8px; }

.btn {
  height: 42px;
  padding: 0 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease), opacity var(--dur) var(--ease);
}

.btn-primary { border-color: var(--text); background: var(--text); color: #fff; }

/* --- searching ------------------------------------------------------------- */

.progress { padding-top: 16px; }

.progress-query {
  margin: 0 0 18px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.03em;
}

.steps { list-style: none; margin: 0; padding: 0; }

.step {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 7px 0;
  font-size: 15px;
  font-weight: 450;
  color: var(--text-3);
  transition: color 200ms ease;
}

.step[data-state="active"] { color: var(--text); font-weight: 600; }
.step[data-state="done"] { color: var(--text-2); }

.step-icon {
  position: relative;
  flex: none;
  width: 14px; height: 14px;
  margin-top: 6px;
  border: 1.5px solid var(--border-strong);
  border-radius: 50%;
}

.step[data-state="done"] .step-icon { border-color: var(--ok); background: var(--ok); }

.step[data-state="done"] .step-icon::after {
  content: "";
  position: absolute; left: 4px; top: 1.5px;
  width: 2.5px; height: 6px;
  border: solid #fff;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}

.step[data-state="active"] .step-icon {
  border-color: var(--text);
  border-top-color: transparent;
  animation: spin 700ms linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.step-detail { display: block; font-size: 13.5px; font-weight: 450; color: var(--text-3); }

/* --- sticky search (結果画面) ---------------------------------------------- */

.sticky-search {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 20;
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.sticky-search .inner { max-width: var(--column); margin: 0 auto; }
.sticky-search .search { height: 54px; margin-top: 0; }
.sticky-search .search-go { width: 38px; height: 38px; }

body.has-sticky .site-footer { padding-bottom: calc(86px + env(safe-area-inset-bottom)); }

/* --- 固定ページ: 一覧 / このサービスと免責事項 / 運営者情報 ---------------- */

.page-title {
  margin: 4px 0 8px;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.03em;
  color: var(--text);
}

.page-lead {
  margin: 0 0 18px;
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

/* 読み物。カードで囲わず、1行の長さだけ本文用に詰める */
.prose { max-width: 34em; }

.prose-section { margin-top: 26px; }

.prose-title {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: -0.02em;
  color: var(--text);
}

.prose-section p {
  margin: 0 0 10px;
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--text-2);
}

.prose-section p:last-child { margin-bottom: 0; }

.prose-term { font-weight: 700; color: var(--text-strong); }

.prose-more { margin: 28px 0 0; }

.prose-more a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text);
}

.prose-more svg { color: var(--icon); transition: transform var(--dur) var(--ease); }
.prose-more a { transition: color var(--dur) var(--ease); }
.prose-more a:active { opacity: 0.6; }

/* 運営者情報の定義リスト。狭い画面では縦積みにして横スクロールさせない */
.def { margin: 0 0 4px; }

.def > div {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}

.def > div:first-child { border-top: 1px solid var(--border); }

.def dt {
  flex: none;
  min-width: 5.5em;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.7;
  color: var(--text-3);
}

.def dd {
  flex: 1 1 14em;
  min-width: 0;
  margin: 0;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--text);
  overflow-wrap: anywhere;
}

.def dd a { border-bottom: 1px solid var(--border-strong); transition: border-color var(--dur) var(--ease); }
.def-unset { color: var(--text-3); }

/* --- ページ送り ------------------------------------------------------------ */

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
}

.pager-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text);
}

.pager-link[aria-disabled="true"] { color: var(--text-3); }
.pager-link { transition: color var(--dur) var(--ease); }
a.pager-link:active { opacity: 0.6; }

.pager-count {
  font-size: 13.5px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

/* --- hover: タッチ端末で残留しないよう、必ずこの条件で囲う --------------- */

@media (hover: hover) and (pointer: fine) {
  .logo:hover { opacity: 0.7; }

  /* フォーカス表示を上書きしないよう、:focus-within のときは効かせない */
  .search:not(:focus-within):hover { border-color: var(--text-3); }

  .search-go:hover { opacity: 0.85; }

  /* 行は面で受ける。拡大・影・発光は使わない。
     ホバー面が hairline に密着すると区切り線が消えて見えるので上下2px内側に収める */
  .item::before,
  .row::before {
    content: "";
    position: absolute;
    top: 2px; bottom: 2px; left: -8px; right: -8px;
    border-radius: var(--r-sm);
    background: transparent;
    transition: background-color var(--dur) var(--ease);
    pointer-events: none;
  }

  a.item:hover::before,
  a.row:hover::before { background: var(--hover-tint); }
  a.item:active::before,
  a.row:active::before { background: var(--press-tint); }

  /* 矢印は進行方向へわずかに動かすだけ */
  a.item:hover .item-foot svg { transform: translateX(3px); }
  a.row:hover svg { transform: translateX(2px); }

  .back:hover { color: var(--text); }
  .action:hover { border-color: var(--text-3); background: var(--hover-tint); }
  .btn:hover { border-color: var(--text-3); }
  .btn-primary:hover { border-color: var(--text); opacity: 0.88; }
  .feedback-toggle:hover { color: var(--text); }

  .section-more:hover { color: var(--text); }
  .section-more:hover svg { transform: translateX(3px); }
  .prose-more a:hover svg { transform: translateX(3px); }
  .pager-link:hover { color: var(--text); }

  .site-links a:hover { color: var(--text); border-color: var(--text-3); }
  .def dd a:hover,
  .inline-error a:hover { border-color: var(--text-3); }
}

/* --- footer ---------------------------------------------------------------- */

.site-footer {
  margin-top: 36px;
  padding: 24px var(--gutter);
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--text-3);
}

.site-footer > div { max-width: var(--column); margin: 0 auto; padding: 0; }
.site-footer p { margin: 0 0 4px; }

.site-links { display: flex; flex-wrap: wrap; gap: 4px 18px; }

.site-links { margin-top: 10px; }
.site-links a {
  color: var(--text-2);
  border-bottom: 1px solid var(--border-strong);
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.inline-error {
  margin-top: 12px;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--text-2);
}

.inline-error a { border-bottom: 1px solid var(--border-strong); transition: border-color var(--dur) var(--ease); }

/* --- dev only: 開発時のみ右下に小さく ------------------------------------- */

.devnote {
  position: fixed;
  right: 12px; bottom: 12px;
  z-index: 40;
  padding: 4px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  pointer-events: none;
}

body.has-sticky .devnote { bottom: 86px; }

/* --- motion ---------------------------------------------------------------- */

@keyframes enter {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

main { animation: enter 200ms ease-out both; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* --- responsive ------------------------------------------------------------ */

@media (max-width: 374px) {
  :root { --gutter: 16px; }
  .hero h1 { font-size: 32px; }
}

/* リード文は意味の切れ目で span 分割している。
   375〜389px では1行目（最長）が 16px だと枠を 8px 超えて折り返すため、
   この幅でだけ詰める。語中で折り返させないことを優先する。 */
@media (max-width: 389px) {
  .hero-lead { font-size: 15px; }
}

@media (min-width: 760px) {
  :root { --gutter: 24px; }
  .hero { padding-top: 32px; }
  .hero h1 { font-size: 46px; }
  .section { margin-top: 40px; }
  .result-name { font-size: 28px; }
  .verdict-conclusion { font-size: 32px; }
}
