/* 背景地図だけを白・グレー中心にする。店舗ピンや操作部の色は変えない。 */
body { height: 100dvh; }
#map { background: #eef0f2; }
#map .leaflet-tile-pane { filter: saturate(0.2); }

/* 既存のRemyカラーを保った、カテゴリーと簡潔な店舗一覧。 */
.category-tabs {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 0 0 6px;
  margin-bottom: 7px;
  scrollbar-width: thin;
  scrollbar-color: #756327 transparent;
  overscroll-behavior-x: contain;
}
.category-button {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 7px 13px;
  border: 1px solid #42454e;
  border-radius: 20px;
  background: #252830;
  color: #e4e5e9;
  font: inherit;
  font-size: .82rem;
  cursor: pointer;
  white-space: nowrap;
}
.category-button[aria-pressed="true"] {
  color: #121316;
  background: var(--gold);
  border-color: var(--gold);
  font-weight: bold;
}
.category-count { margin-left: 5px; font-size: .72rem; opacity: .8; }
.browse-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}
.browse-controls .list-order { margin: 0; }
.map-toggle {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 6px 12px;
  border: 1px solid var(--gold);
  border-radius: 6px;
  background: transparent;
  color: var(--gold-light);
  font: inherit;
  font-size: .8rem;
  cursor: pointer;
}
.search-note { margin-top: 6px; }
.shop-list { display: flex; flex-direction: column; gap: 8px; }
.shop-card { display: block; flex: 0 0 auto; padding: 0; }
.shop-card .card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  margin: 0;
  list-style: none;
  cursor: pointer;
  min-height: 66px;
  border-radius: 6px;
}
.shop-card .card-header::-webkit-details-marker { display: none; }
.summary-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.shop-card .shop-name { font-size: .95rem; }
.shop-kind { font-size: .78rem; color: var(--text-sub); line-height: 1.4; }
.detail-chevron {
  color: var(--gold);
  font-size: 1.5rem;
  flex-shrink: 0;
  transition: transform .15s;
  line-height: 1;
}
.shop-card[open] .detail-chevron { transform: rotate(90deg); }
.shop-card[open] .card-header { border-bottom: 1px solid #343843; border-radius: 6px 6px 0 0; }
.shop-details { padding: 12px 14px 14px; }
.shop-card:not([open]) .shop-details { display: none; }
.detail-number { color: var(--gold-light); font-size: .76rem; margin-bottom: 7px; }
.shop-details .shop-info { margin-bottom: 12px; }
.popup-kind { color: var(--gold-light); font-size: .78rem; margin-bottom: 7px; }
.empty-state { margin: 0; }
@media (max-width: 380px) {
  .category-button { padding-inline: 11px; }
  .shop-card .card-header { padding: 11px 12px; }
  .shop-details { padding-inline: 12px; }
  .map-toggle { padding-inline: 9px; }
}

/* ナイト／デイと地域の大きな切り替え。ヘッダー直下で地図の文脈を先に選べる。 */
.map-mode-controls {
  flex: 0 0 auto;
  padding: 9px 12px 8px;
  background: #18191d;
  border-bottom: 1px solid #2e3038;
}
.mode-tabs,
.region-tabs {
  display: flex;
  gap: 7px;
}
.mode-tabs { margin-bottom: 7px; }
.mode-button,
.region-button {
  min-height: 38px;
  border: 1px solid #4a4e58;
  border-radius: 7px;
  background: #252830;
  color: #e4e5e9;
  font: inherit;
  cursor: pointer;
}
.mode-button {
  flex: 1 1 50%;
  padding: 9px 12px;
  color: var(--gold-light);
  font-size: 1rem;
  font-weight: bold;
}
.region-tabs { overflow-x: auto; scrollbar-width: thin; scrollbar-color: #756327 transparent; }
.region-button {
  flex: 1 0 auto;
  padding: 7px 11px;
  font-size: .8rem;
  white-space: nowrap;
}
.mode-button[aria-pressed="true"],
.region-button[aria-pressed="true"] {
  background: var(--gold);
  border-color: var(--gold);
  color: #121316;
  font-weight: bold;
}

/* 日中の企業詳細。カードは会社ごとに一つ、拠点情報だけを中で分ける。 */
.company-description {
  margin: 0 0 10px;
  color: #e4e5e9;
  font-size: .84rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.company-info { margin-bottom: 11px; }
.locations-heading {
  margin: 12px 0 6px;
  color: var(--gold-light);
  font-size: .82rem;
}
.location-detail {
  margin-top: 8px;
  padding: 10px;
  border: 1px solid #343843;
  border-radius: 6px;
  background: #191b20;
}
.location-name {
  margin: 0 0 5px;
  color: #f1f2f4;
  font-size: .84rem;
  line-height: 1.4;
}
.location-info,
.verification-note,
.popup-location-label {
  font-size: .78rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.location-info { color: var(--text-sub); }
.location-buttons { margin-top: 9px; }
.company-buttons { margin-top: 12px; }
.verification-note {
  margin: 11px 0 0;
  padding-left: 8px;
  border-left: 2px solid var(--gold);
  color: var(--gold-light);
}
.popup-location-label { margin: -3px 0 6px; color: var(--text-sub); }

/* ロゴを残しつつ、正式な長い名称はモバイルで自然に改行する。 */
.logo-title > span:not(.sr-only) {
  white-space: normal;
  line-height: 1.28;
  overflow-wrap: anywhere;
}

/* prepare_site.py が挿入する JavaScript 無効時のデイ静的フォールバック。 */
.static-day-partners {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #3a3d46;
}
.static-day-partners > h2 {
  margin: 0 0 10px;
  color: var(--gold-light);
  font-size: 1rem;
}
.static-partner-card {
  margin: 8px 0;
  border: 1px solid #343843;
  border-left: 4px solid var(--gold);
  border-radius: 7px;
  background: #1e2025;
}
.static-partner-card > summary {
  padding: 11px 12px;
  color: var(--gold-light);
  cursor: pointer;
  font-weight: bold;
}
.static-partner-card > :not(summary) { margin: 0 12px 11px; }
.partner-location {
  padding: 9px;
  border: 1px solid #343843;
  border-radius: 6px;
  background: #191b20;
}
.partner-location + .partner-location { margin-top: 8px; }
.partner-location h3 { margin: 0 0 4px; font-size: .84rem; }
.partner-location p { margin: 0; color: var(--text-sub); font-size: .8rem; line-height: 1.5; }
.partner-location a { color: var(--gold-light); }

@media (max-width: 430px) {
  .brand-logo { width: 72px; height: 43px; }
  .logo-title { gap: 8px; }
  .logo-title > span:not(.sr-only) { font-size: clamp(.74rem, 3.4vw, .96rem); }
  .map-mode-controls { padding: 7px 9px; }
  .mode-tabs,
  .region-tabs { gap: 5px; }
  .mode-tabs { margin-bottom: 5px; }
  .mode-button { min-height: 36px; padding: 7px 5px; font-size: .88rem; }
  .region-button { min-height: 33px; padding: 6px 8px; font-size: .74rem; }
}

/* 高さ568〜736px級の携帯も含め、操作部に押し出されず一覧をスクロールできる。 */
@media (max-height: 750px) {
  header { min-height: 43px; padding-block: 4px; }
  .brand-logo { width: 58px; height: 34px; }
  .logo-title > span:not(.sr-only) { font-size: clamp(.68rem, 2.8vw, .82rem); }
  .shop-count { padding: 2px 7px; font-size: .7rem; }
  .map-region { height: clamp(96px, 27dvh, 130px); }
  .map-mode-controls { padding-block: 5px; }
  .mode-tabs { margin-bottom: 4px; }
  .mode-button { min-height: 31px; padding-block: 5px; font-size: .83rem; }
  .region-button { min-height: 28px; padding-block: 4px; font-size: .7rem; }
  .search-bar { padding-block: 5px; }
  .category-tabs { margin-bottom: 4px; padding-bottom: 3px; }
  .category-button { min-height: 31px; padding-block: 4px; }
  .search-note { display: none; }
  .browse-controls { margin-top: 5px; }
  .shop-list { min-height: 72px; }
}

@media (max-height: 500px) and (orientation: landscape) {
  .logo-title > span:not(.sr-only) { font-size: .72rem; }
  .map-mode-controls { display: flex; gap: 12px; align-items: center; }
  .mode-tabs, .region-tabs { flex: 1 1 50%; min-width: 0; }
  .mode-tabs { margin-bottom: 0; }
  .map-region { height: clamp(80px, 20dvh, 100px); }
}
