body {
  margin: 0;
  font-size: 16px;
}

/* ヘッダー */
.app-header{
  position:absolute;
  top:0;
  left:0;
  right:0;

  /* ① viewport-fit=cover でステータスバー領域までページが描画されるため、
     その分をpadding-topで確保してタイトルがステータスバーに隠れないようにする */
  padding-top: env(safe-area-inset-top, 0px);
  height: calc(54px + env(safe-area-inset-top, 0px));
  box-sizing: border-box;

  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;

  z-index:1000;

  color:white;

  font-family:"M PLUS 1p",sans-serif;

  box-shadow:0 2px 10px rgba(0,0,0,.2);

  background: repeating-linear-gradient(
    90deg,
    #1b5e20 0px,
    #1b5e20 22px,
    #388e3c 22px,
    #388e3c 44px
  );
}

.title{
  font-size:24px;
  font-weight:800;
  line-height:1;
}

/* タイトル行（タイトル＋ヘルプボタン） */
.title-row {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ヘルプボタン */
.help-btn {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.9);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0,0,0,.15);
  flex-shrink: 0;
}

.subtitle{
  margin-top:4px;
  font-size:11px;
  font-weight:400;
  opacity:.9;
  letter-spacing:.5px;
}

/* 地図（デフォルト＝ブラウザ表示：タブバーとの間に隙間を作らない） */
#map {
  width:100%;
  height:calc(100dvh - 165px - env(safe-area-inset-top, 0px));
  margin-top:calc(112px + env(safe-area-inset-top, 0px));
}

/* ホーム画面起動（スタンドアロン）時のみ：
   タブバーが下に移動した分、Googleの著作権表示のための
   余白（今回はさらに広めに約20px）を残しつつ地図を拡張 */
html.is-standalone #map {
  /* ① タブバーの位置・アイコンは変更せず、地図の高さだけを調整して
     Googleの著作権表示（Google/利用規約）が確実に見えるよう
     タブバー上端との間に大きめの余白を確保する（170px→200px） */
  height:calc(100dvh - 200px - env(safe-area-inset-top, 0px));
}

/* 現在地ボタン・再読み込みボタン */
.button-area {
  position: absolute;
  bottom: 85px;
  right: 10px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.location-btn {
  padding: 0;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
}

.location-btn svg {
  width: 18px;
  height: 18px;
}

/* ① 再読み込みボタン（ピンが表示されない場合の手動リカバリー手段）
   現在地ボタンと同じ直径に揃える */
.reload-btn {
  padding: 0;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
}

.reload-btn svg {
  width: 16px;
  height: 16px;
}

.reload-btn.spinning svg {
  animation: reload-spin 0.8s linear;
}

@keyframes reload-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

button {
  font-size: 18px;
  padding: 12px 16px;
  border-radius: 10px;
  border: none;
  background: white;
  box-shadow: 0 1px 3px rgba(0,0,0,.15);
}

/* ①ストリートビュー(ペグマン)・ズームコントロール一式ともに常時非表示。
   Google純正のズームボタンには廃止済みのpanControlの影響などで
   意図せず方向パッドが混ざり込む可能性があるため、Google純正コントロールには
   一切頼らず、独自の.zoom-control-areaに置き換える。 */
.gm-svpc,
.gm-bundled-control {
  display: none !important;
}

/* ①独自ズームボタン(＋/－)。#mapがposition:relativeではないため、
   絶対配置の基準はページ(body)側になる。#mapのmargin-top(ヘッダー+検索バー分)
   と同じだけオフセットすることで、見た目上は地図の右上角に配置する */
.zoom-control-area {
  position: absolute;
  top: calc(160px + env(safe-area-inset-top, 0px));
  right: 10px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 1px;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,.3);
}

.zoom-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: white;
  color: #333;
  font-size: 20px;
  line-height: 1;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
}

.zoom-btn:active {
  background: #f2f2f2;
}

/* ①②タッチ操作端末(スマホ・タブレット)ではピンチズームが使えるため、
   独自ズームボタンは非表示にする（ブラウザが直接判定するため確実） */
@media (pointer: coarse) {
  .zoom-control-area {
    display: none !important;
  }
}

/* Google InfoWindow */
.gm-style .gm-style-iw {
  font-size: 18px !important;
  line-height: 1.7;
  max-width: 260px;
}

/* スマホ向け */
@media (max-width: 768px) {
  .gm-style .gm-style-iw {
    font-size: 20px !important;
  }
  button {
    font-size: 20px;
    padding: 14px 18px;
  }
}

/* 検索バー（固定表示） */
.search-bar-fixed {
  position: absolute;
  top: calc(54px + env(safe-area-inset-top, 0px));
  left: 10px;
  right: 10px;
  z-index: 999;
  padding: 8px 0;
}

.search-bar-inner {
  position: relative;
}

.search-bar-fixed input {
  width: 100%;
  padding: 12px 40px 12px 16px;
  border: none;
  border-radius: 25px;
  box-sizing: border-box;
  font-size: 16px;
  -webkit-appearance: none;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
}

.search-clear-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: #bbb;
  border: none;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  font-size: 14px;
  padding: 0;
  line-height: 26px;
  text-align: center;
  color: white;
  display: none;
  box-shadow: none;
  cursor: pointer;
  z-index: 1;
}

/* 下タブ（デフォルト＝ブラウザ表示） */
.tab-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 53px;
  background: white;
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 999;
  box-shadow: 0 -2px 10px rgba(0,0,0,.2);
  background: repeating-linear-gradient(
    90deg,
    #1b5e20 0px,
    #1b5e20 22px,
    #388e3c 22px,
    #388e3c 44px
  );
}

/* ホーム画面起動（スタンドアロン）時のみ：
   実機のセーフエリア問題対策として、タブバーを少し下げる */
html.is-standalone .tab-bar {
  bottom: -23px;
}

/* ホーム画面起動時のみ：タブバー本体・地図本体の位置は変更せず、
   タブバー下端から画面最下部までの隙間を同じ緑ストライプの装飾で埋める。
   ※上側（地図とタブバーの間）の隙間埋めは、Google著作権表示を誤って
   覆い隠してしまったため撤去済み。 */
html.is-standalone .tab-bar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  background: repeating-linear-gradient(
    90deg,
    #1b5e20 0px,
    #1b5e20 22px,
    #388e3c 22px,
    #388e3c 44px
  );
  /* タブバー下端から画面最下部（セーフエリア）までを埋める。
     余裕を持って40px確保（見えない範囲まで伸びても問題ない） */
  bottom: -40px;
  height: 40px;
}

/* ※地図とタブバーの間の隙間を緑色で埋める対応は、Google著作権表示が
   隠れる原因になったため撤去済み（今後は#map側の余白調整のみで対応）。 */
.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  font-size: 13px;
  color: white;
  text-shadow: 0 1px 3px rgba(0,0,0,.5);
  font-family: "Zen Kaku Gothic New", sans-serif;
  font-weight: 700;
}

.tab-item:active {
  transform: scale(.95);
}

.tab-disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* 店舗カード */
/* 店舗カード（デフォルト＝ブラウザ表示） */
.bottom-sheet {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 63px;
  background: white;
  border-radius: 20px 20px 0 0;
  padding: 24px 16px 0 16px;
  z-index: 999;
  box-shadow: 0 -2px 15px rgba(0,0,0,.2);
  /* ① 高さは内容に応じて自動調整。最大は地図エリアを埋める高さまで
     広がるようにする（歓迎店など情報量の多いカードはこの上限まで
     広がりスクロールが機能し、情報の少ない一般店舗は自然と
     半分以下の高さに収まる）。 */
  max-height: calc(100dvh - 175px - env(safe-area-inset-top, 0px));
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: .3s;
}

/* ヘッダー（取っ手・閉じるボタン・店名）は常に固定表示 */
.card-header {
  flex-shrink: 0;
}

/* ② 店名を除く下部エリアはカード内スクロールを可能にする */
.card-scroll-area {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-bottom: 20px;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

/* ホーム画面起動（スタンドアロン）時のみ：
   タブバーの新しい上端（-23px+53px=30px）+10pxの間隔に合わせる */
html.is-standalone .bottom-sheet {
  bottom: 40px;
  max-height: calc(100dvh - 200px - env(safe-area-inset-top, 0px));
}

/* 店舗カード内 */
.bottom-title {
  font-size: 26px;
  font-family: "M PLUS 1p", sans-serif;
  font-weight: 900;
  color: #222;
  line-height: 26px;
  /* 拡大した閉じる（×）ボタンと1行目の文字が重ならないよう、
     全角1文字分（フォントサイズ相当の26px）だけ右側の折り返し幅を狭める */
  padding-right: 26px;
  box-sizing: border-box;
}

.bottom-info {
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.6;
  font-family: "M PLUS 1p", sans-serif;
  color: #555;
}

/* ⑤ 店名・推しクラブ行のみ余分な行間をなくし、以降の表示スペースを確保 */
.team-line {
  display: inline-block;
  line-height: 14px;
}

.detail-btn {
  position: sticky;
  bottom: 0;
  margin: 28px auto 0;
  display: block;
  width: 65%;
  font-size: 14px;
  padding: 8px 12px;
  background: #f5f5f5;
  border: 1px solid #ccc;
  color: #333;
  box-shadow: none;
}

/* 周辺表示ボタン */
/* スタジアムカードの主ボタン「周辺のお店を見る」
   カード内で最も目立つ操作（緑の塗り・幅いっぱい）。「ここに行く」「お気に入り」より上に置く */
.show-area-wrap {
  margin-top: 12px;
}

.show-area-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 13px 14px;
  font-size: 15px;
  font-family: "M PLUS 1p", sans-serif;
  font-weight: 700;
  background: #2e7d32;
  color: #fff;
  border: none;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
  cursor: pointer;
}

/* 圏内に掲載店がないとき：押しても何も出ない行き止まりを避けるため、押せない状態にする */
.show-area-btn:disabled {
  background: #e6e9e6;
  color: #6b736b;
  box-shadow: none;
  cursor: default;
}

.show-area-caption {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
  font-family: "M PLUS 1p", sans-serif;
  color: #555;
}

.close-btn {
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 16px;
  line-height: 1;
  width: 28px;
  height: 28px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  box-shadow: none;
  border-radius: 50%;
  color: #888;
  z-index: 1000;
}

/* ② スワイプ開閉ジェスチャーを廃止したため、カード上部の閉じる
   ボタンをやや目立つデザインに変更する */
.card-close-btn {
  width: 30px;
  height: 30px;
  font-size: 18px;
  background: #f0f0f0;
  color: #555;
}

.shop-image-gallery {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-bottom: 10px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.shop-image-item {
  flex: 0 0 auto;
  width: 85%;
  max-width: 320px;
  height: 140px;
  object-fit: cover;
  border-radius: 12px;
  background: #eee;
  scroll-snap-align: start;
}

/* ⑤ 営業時間等の注意文言 */
.shop-notice {
  margin-top: 8px;
  font-size: 11px;
  line-height: 1.5;
  font-family: "M PLUS 1p", sans-serif;
  color: #999;
}

/* 出発地セット行 */
.origin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 10px 0 4px;
  padding: 8px 12px;
  background: #f0f7ff;
  border-radius: 10px;
}

.origin-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-family: "M PLUS 1p", sans-serif;
  color: #333;
  cursor: pointer;
}

.origin-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #4285F4;
  cursor: pointer;
}


/* カード内アクション行（出発地・ここに行く・保存） */
.card-action-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: stretch;
  margin-top: 8px;
  gap: 8px;
}

/* ① お気に入りボタンを出発地・ここに行くとは別の2行目に配置 */
.card-action-row-secondary {
  display: flex;
  margin-top: 8px;
}

/* 出発地ボタン（保存ボタンと高さ・フォントを揃える） */
/* ③ 出発地・ここに行く・お気に入り 共通ベーススタイル
   （デザインは統一し、配色のみボタンごとに変える） */
.origin-toggle-btn,
.go-here-btn,
.save-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 20px;
  cursor: pointer;
  font-family: "M PLUS 1p", sans-serif;
  user-select: none;
  box-shadow: none;
  line-height: 1;
  white-space: nowrap;
}

.origin-toggle-btn {
  background: #f0f7ff;
  color: #2c5f9e;
  border: 1px solid #b3d4f5;
}

.go-here-btn {
  background: #e8f0fe;
  color: #1a56c4;
  border: 1px solid #aac6f7;
}

.save-toggle-btn {
  background: #fff8e1;
  color: #b8860b;
  border: 1px solid #f0d98c;
}

.go-here-btn:disabled {
  opacity: 0.4;
  pointer-events: none;
}

.origin-toggle-btn input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: #4285F4;
  cursor: pointer;
  margin: 0;
}

.origin-toggle-btn.active {
  background: #bbdefb;
  color: #1a3f6f;
  border-color: #90caf9;
}

.save-toggle-btn.saved {
  background: #ffd54f;
  color: #7a5c00;
  border-color: #ffd54f;
}

/* 保存リスト画面 */
.saved-screen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: white;
  z-index: 2000;
  display: flex;
  flex-direction: column;
}

.saved-header {
  position: relative;
  padding-top: env(safe-area-inset-top, 0px);
  height: calc(54px + env(safe-area-inset-top, 0px));
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(
    90deg,
    #1b5e20 0px,
    #1b5e20 22px,
    #388e3c 22px,
    #388e3c 44px
  );
  color: white;
  flex-shrink: 0;
}

.saved-title {
  font-size: 20px;
  font-weight: 800;
  font-family: "M PLUS 1p", sans-serif;
}

.saved-header .close-btn {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  font-size: 28px;
}

.saved-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px 16px;
}

.saved-empty {
  text-align: center;
  color: #999;
  margin-top: 60px;
  font-family: "M PLUS 1p", sans-serif;
}

.saved-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 12px;
  border-bottom: 1px solid #eee;
}

.saved-item-main {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.saved-item-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: #1b5e20;
  flex: none;
}

.saved-item-icon .icon-inline {
  width: 100%;
  height: 100%;
}

.saved-item-text {
  display: flex;
  flex-direction: column;
}

.saved-item-name {
  font-size: 16px;
  font-weight: 700;
  font-family: "M PLUS 1p", sans-serif;
  color: #222;
}

.saved-item-sub {
  font-size: 12px;
  color: #888;
  font-family: "M PLUS 1p", sans-serif;
}

.saved-item-remove {
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 16px;
  background: #f5f5f5;
  color: #999;
  box-shadow: none;
}

/* 使い方画面 */
.help-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px 32px;
  font-family: "M PLUS 1p", sans-serif;
}

.help-section {
  margin-bottom: 22px;
}

/* ②「⚽使い方」と直後のセクションの行間を詰める */
.help-section-tight {
  margin-bottom: 4px;
}

.help-section h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
  color: #1b5e20;
}

.help-section p {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: #444;
}

.help-section ul {
  margin: 0;
  padding-left: 1.2em;
  font-size: 14px;
  line-height: 1.7;
  color: #444;
}

.help-section li {
  margin-bottom: 4px;
}

.help-pin-list {
  list-style: none;
  padding-left: 0;
}

.help-pin-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.help-pin-list img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex-shrink: 0;
}

/* ⑤ 初回ピン読み込み中のローディング画面（サッカーボールが弾む演出） */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3000;
  background: linear-gradient(180deg, #eafaf0 0%, #ffffff 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  transition: opacity .4s ease;
}

.loading-overlay.hide {
  opacity: 0;
  pointer-events: none;
}

.loading-ball-area {
  position: relative;
  width: 80px;
  height: 110px;
}

.loading-shadow {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 46px;
  height: 10px;
  transform: translateX(-50%);
  background: rgba(27,94,32,.25);
  border-radius: 50%;
  animation: loading-shadow-scale 1s cubic-bezier(.5,0,.7,.4) infinite;
}

@keyframes loading-ball-bounce {
  0%   { top: 0;   }
  50%  { top: 62px; }
  100% { top: 0;   }
}

@keyframes loading-shadow-scale {
  0%   { transform: translateX(-50%) scale(0.6); opacity: .5; }
  50%  { transform: translateX(-50%) scale(1);   opacity: .25; }
  100% { transform: translateX(-50%) scale(0.6); opacity: .5; }
}

.loading-text {
  font-size: 14px;
  font-family: "M PLUS 1p", sans-serif;
  font-weight: 700;
  color: #1b5e20;
  letter-spacing: .5px;
}

/* ①絵文字→Featherアイコン風SVGへの置き換えに伴う共通スタイル。
   stroke="currentColor" のため、配置先の color(ブランドカラー)を
   そのまま継承する（origin/go-here/save各ボタンの配色もそのまま反映される）。 */

/* 文中・ボタンラベル内などにインラインで置く小アイコン（本文の絵文字と同等サイズ） */
.icon-inline {
  width: 1.1em;
  height: 1.1em;
  vertical-align: -0.2em;
  flex: none;
}

/* 下タブのアイコン（絵文字だった⚽🏪📋⭐の置き換え） */
.tab-icon {
  width: 20px;
  height: 20px;
  flex: none;
  margin-bottom: 3px;
}

/* 下タブのラベル文字。フォントの行間メトリクスに幅を持たせず、
   アイコンとの間隔を安定させる */
.tab-label {
  line-height: 1;
}

/* ローディング画面のサッカーボール（旧・絵文字⚽の置き換え） */
.loading-ball {
  position: absolute;
  left: 50%;
  top: 0;
  width: 48px;
  height: 48px;
  transform: translateX(-50%);
  color: #1b5e20;
  animation: loading-ball-bounce 1s cubic-bezier(.5,0,.7,.4) infinite;
}

/* お気に入りの星アイコン：未保存はアウトライン、保存済みは塗りに切替 */
.icon-star-filled {
  fill: currentColor;
}

/* ── 区分バッジ（店舗カード見出し上）──
   ドットの色は地図ピンの色（歓迎店=青／一般店舗=赤）に合わせている */
.shop-type-badge {
  align-items: center;
  gap: 5px;
  margin-bottom: 4px;
  padding: 2px 10px 2px 8px;
  border-radius: 999px;
  background: #f1f3f1;
  color: #444;
  font-family: "M PLUS 1p", sans-serif;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

.shop-type-badge .type-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
}

.type-supporter .type-dot { background: #1a73e8; }
.type-general   .type-dot { background: #e53935; }
.type-stadium   .type-dot { background: #2e7d32; }

/* ── 読み込み失敗時の案内（ローディング画面の再利用） ── */
.loading-overlay.is-error .loading-ball-area {
  display: none;
}

.loading-overlay.is-error .loading-text {
  padding: 0 28px;
  text-align: center;
  line-height: 1.7;
}

.loading-retry-btn {
  font-size: 15px;
  padding: 10px 26px;
  color: #1b5e20;
  border: 1px solid #1b5e20;
  background: #fff;
}

/* ── トースト（画面下部の短いお知らせ） ── */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(90px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%) translateY(10px);
  max-width: calc(100% - 40px);
  padding: 10px 16px;
  border-radius: 10px;
  background: rgba(33, 33, 33, .92);
  color: #fff;
  font-family: "M PLUS 1p", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  z-index: 2500;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── 検索欄：プレースホルダーが収まらない端末では「…」で省略する ── */
.search-bar-fixed input {
  text-overflow: ellipsis;
}

.search-bar-fixed input::placeholder {
  text-overflow: ellipsis;
}

/* ── 店舗リンクのコピーボタン（カード内・お気に入りの隣） ── */
.card-action-row-secondary {
  flex-wrap: wrap;
  gap: 8px;
}

.copy-link-btn {
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 20px;
  cursor: pointer;
  font-family: "M PLUS 1p", sans-serif;
  user-select: none;
  box-shadow: none;
  line-height: 1;
  white-space: nowrap;
  background: #e8f5e9;
  color: #1b5e20;
  border: 1px solid #a5d6a7;
}

/* ── 初回バナー（検索バーの下） ──
   z-index は店舗カード・検索バー(999)より低くし、カードを開いたときはカードが手前に来る */
.intro-banner {
  position: absolute;
  top: calc(160px + env(safe-area-inset-top, 0px));
  left: 10px;
  right: 54px;
  z-index: 998;
  box-sizing: border-box;
  padding: 10px 44px 10px 14px;
  background: #fff;
  border: 1px solid #c8e6c9;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
  font-family: "M PLUS 1p", sans-serif;
  color: #1f2a1f;
}

.intro-lead {
  font-size: 14px;
  font-weight: 700;
  color: #1b5e20;
  line-height: 1.4;
}

.intro-legend {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.6;
}

.intro-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 5px;
  border-radius: 50%;
  vertical-align: -1px;
}

.intro-dot-gap {
  margin-left: 14px;
}

.dot-blue { background: #1a73e8; }
.dot-red  { background: #e53935; }

.intro-note {
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.6;
  color: #555;
}

.intro-more-btn {
  margin: 0 0 0 6px;
  padding: 4px 6px;
  font-size: 12px;
  font-family: "M PLUS 1p", sans-serif;
  font-weight: 700;
  color: #1b5e20;
  background: none;
  border: none;
  border-radius: 6px;
  box-shadow: none;
  text-decoration: underline;
  cursor: pointer;
}

.intro-close-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 36px;
  height: 36px;
  padding: 0;
  font-size: 18px;
  line-height: 36px;
  text-align: center;
  color: #666;
  background: none;
  border: none;
  border-radius: 50%;
  box-shadow: none;
  cursor: pointer;
}

/* ── フィルターチップ（検索バーの下） ──
   360px幅の端末でも3つが収まるよう、アイコンは付けず、状態は塗りと色で示す。
   それでも収まらない場合（文字サイズ拡大など）は横スクロールする。 */
.filter-chips {
  position: absolute;
  top: calc(112px + env(safe-area-inset-top, 0px));
  left: 10px;
  right: 10px;
  z-index: 998;
  display: flex;
  gap: 5px;
  padding: 2px 2px 4px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.filter-chips::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 34px;
  padding: 0 9px;
  border: 1px solid #388e3c;
  border-radius: 17px;
  background: #fff;
  color: #1f2a1f;
  font-family: "M PLUS 1p", sans-serif;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* サポーター歓迎店：常に表示。切り替えられないことが伝わるよう、薄い青の塗りにする */
.chip-supporter {
  border-color: #1a73e8;
  background: #e8f0fe;
}

.chip-count {
  color: #1a73e8;
}

.chip-count:empty {
  display: none;
}

.chip-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: none;
}

.chip-dot-square {
  border-radius: 2px;
}

.dot-green { background: #2e7d32; }

/* OFF：灰色の地・薄い文字・薄いドット */
.chip.off {
  border-color: #b9c0b9;
  background: #e6e9e6;
  color: #6b736b;
  box-shadow: none;
}

.chip.off .chip-dot {
  opacity: .4;
}

/* ── 検索欄：type="search" の標準の×ボタンは隠し、独自の×ボタンを使う ── */
.search-bar-fixed input[type="search"]::-webkit-search-cancel-button,
.search-bar-fixed input[type="search"]::-webkit-search-decoration,
.search-bar-fixed input[type="search"]::-webkit-search-results-button,
.search-bar-fixed input[type="search"]::-webkit-search-results-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}

/* ── 検索結果の件数表示（チップ行の下）──
   右側はズームボタン（幅約34px）を避けて空ける */
.search-status {
  position: absolute;
  top: calc(158px + env(safe-area-inset-top, 0px));
  left: 10px;
  right: 54px;
  z-index: 998;
  box-sizing: border-box;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid #c8e6c9;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
  font-family: "M PLUS 1p", sans-serif;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  color: #1f2a1f;
}

.search-status.is-empty {
  background: #fff8e1;
  border-color: #f0d98c;
}

.search-status .ss-note {
  margin-top: 2px;
  font-size: 12px;
  font-weight: 400;
  color: #555;
}

/* 検索中は、件数表示と重なる初回バナーを一時的に隠す（閉じた扱いにはしない） */
body.is-searching .intro-banner {
  display: none !important;
}
