:root {
  --bg: #fdf6ec;
  --card: #ffffff;
  --ink: #37302a;
  --accent: #b06a2f;
  --accent-dark: #8d5220;
  --accent2: #4a7db5;
  --border: #ecdcc8;
  --muted: #7a7264;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Hiragino Maru Gothic ProN", "Hiragino Sans", "Noto Sans JP", sans-serif;
  background: var(--bg);
  color: var(--ink);
}

/* サイトヘッダー（ロゴ帯）— 参考: boku-boardgame.net の雰囲気 */
.site-header { background: #fff; }

.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--ink);
  min-width: 0;
}

.brand-mark {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--accent);
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  box-shadow: 0 2px 6px rgba(176, 106, 47, 0.35);
}

.brand-text { display: flex; flex-direction: column; min-width: 0; }

.brand-title {
  margin: 0;
  font-size: 1.45rem;
  font-weight: bold;
  letter-spacing: 0.02em;
  line-height: 1.25;
  white-space: nowrap;
}

.brand-sub {
  color: var(--muted);
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-badges { margin-left: auto; display: flex; gap: 6px; flex: none; }

.hbadge {
  padding: 4px 10px;
  border-radius: 999px;
  background: #fbf0e1;
  color: var(--accent-dark);
  font-size: 0.75rem;
  font-weight: bold;
  white-space: nowrap;
}

.hbadge.hb-blue { background: #e8f1fb; color: #3574b8; }
.hbadge.hb-yellow { background: #fdf3d8; color: #9a7b1e; }

@media (max-width: 720px) { .header-badges { display: none; } }
@media (max-width: 480px) {
  .brand-title { font-size: 1.25rem; }
  .brand-sub { font-size: 0.7rem; }
  .brand-mark { width: 40px; height: 40px; font-size: 1.3rem; }
}

.header-strip {
  height: 4px;
  background: linear-gradient(90deg, var(--accent) 0%, #f2b544 50%, var(--accent2) 100%);
}

/* グローバルナビ */
.gnav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 4px rgba(90, 74, 46, 0.06);
}

.gnav-inner {
  max-width: 1080px;
  margin: 0 auto;
  height: 46px;
  display: flex;
  justify-content: center;
  align-items: stretch;
  overflow-x: auto;
  scrollbar-width: none;
}
.gnav-inner::-webkit-scrollbar { display: none; }

.gnav-item {
  appearance: none;
  background: none;
  border: none;
  font: inherit;
  font-size: 0.92rem;
  color: var(--ink);
  padding: 0 15px;
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  display: flex;
  align-items: center;
}
.gnav-item:hover { color: var(--accent); }
.gnav-item.active { color: var(--accent); font-weight: bold; }
.gnav-item.active::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--accent);
}
@media (max-width: 480px) {
  .gnav-inner { justify-content: flex-start; }
  .gnav-item { padding: 0 11px; font-size: 0.88rem; }
}

/* 検索まわり */
.searchbar {
  position: sticky;
  top: 46px;
  z-index: 15;
  background: var(--bg);
  padding: 10px 16px 8px;
}

.locrow {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 720px;
  margin: 0 auto 8px;
}

.geobtn {
  padding: 9px 16px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.95rem;
  font-weight: bold;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(176, 106, 47, 0.3);
}
.geobtn:disabled { opacity: 0.6; }

.loclabel {
  font-size: 0.88rem;
  color: var(--muted);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.searchbox {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 720px;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 6px 6px 14px;
  box-shadow: 0 2px 6px rgba(120, 90, 40, 0.06);
}
.searchbox input {
  flex: 1; min-width: 0;
  border: 0; outline: 0;
  font-size: 1rem;
  background: transparent;
  color: var(--ink);
}
.placego {
  padding: 7px 16px;
  border: 0;
  border-radius: 999px;
  background: var(--accent2);
  color: #fff;
  font-size: 0.9rem;
  font-weight: bold;
  cursor: pointer;
  white-space: nowrap;
}

.searchsub {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
}
.radiuslabel, .openonly { font-size: 0.9rem; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.radiuslabel select {
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 0.95rem;
}
.kwinput {
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 0.95rem;
  width: 180px;
}

/* 結果バー */
.resultbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  max-width: 720px;
  margin: 0 auto;
  padding: 2px 16px 6px;
}
.resultbar .status { margin: 0; text-align: left; }
.sortlabel {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  font-size: 0.85rem;
  color: var(--muted);
  white-space: nowrap;
}
.sortlabel select {
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 0.9rem;
}
.filterbtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  font-size: 0.92rem;
  cursor: pointer;
  white-space: nowrap;
}
.filterbtn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

main { max-width: 720px; margin: 0 auto; padding: 0 16px 24px; }
main.map-on { max-width: 1180px; }

.status { text-align: center; color: var(--muted); }
.status.loading::after {
  content: " ⏳";
  display: inline-block;
  animation: status-pulse 1s ease-in-out infinite;
}
@keyframes status-pulse {
  0%, 100% { opacity: 0.25; transform: rotate(0deg); }
  50% { opacity: 1; transform: rotate(20deg); }
}
.note { font-size: 0.8rem; color: var(--muted); margin: 14px 2px 0; line-height: 1.6; }

.list { display: flex; flex-direction: column; gap: 12px; }

/* マップ */
.spotsmap {
  height: 380px;
  border: 1px solid var(--border);
  border-radius: 14px;
  z-index: 0;
  background: #eef3ee;
}
.mapnote { margin: 6px 2px 10px; font-size: 0.8rem; color: var(--muted); }
main.map-on .listlayout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.card.active-card { outline: 2px solid var(--accent); outline-offset: -2px; }
.spotmarker-wrap { background: none; border: none; }
.spotmarker {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  font-size: 16px;
  background: #fff;
  border: 2px solid #90a4ae;
  box-shadow: 0 1px 4px rgba(0,0,0,0.35);
}
.spotmarker.mk-center { border-color: #1e88e5; background: #e3f2fd; }
.spotmarker.mk-cafe { border-color: var(--accent); background: #fbf0e1; }
.spotmarker.mk-fastfood { border-color: #e53935; background: #ffebee; }
.spotmarker.mk-bakery { border-color: #d9a441; background: #fdf6d8; }
.spotmarker.mk-sweets { border-color: #8e24aa; background: #f3e5f5; }

@media (min-width: 900px) {
  main.map-on .listlayout {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    grid-template-areas: "list map";
    align-items: start;
  }
  main.map-on #list { grid-area: list; max-height: calc(100vh - 260px); overflow-y: auto; padding-right: 2px; }
  main.map-on #mapwrap { grid-area: map; }
  main.map-on .mapsticky { position: sticky; top: 190px; }
  main.map-on .spotsmap { height: calc(100vh - 260px); min-height: 420px; }
}

/* 店舗カード */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 0 2px 6px rgba(120, 90, 40, 0.06);
  display: flex;
  gap: 12px;
}
.card .thumb {
  flex: none;
  width: 62px; height: 62px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.7rem;
}
.th-cafe { background: linear-gradient(135deg, #fbf0e1, #f3ddba); }
.th-fastfood { background: linear-gradient(135deg, #ffe7dd, #ffcdb8); }
.th-bakery { background: linear-gradient(135deg, #fdf6d8, #f9e9a8); }
.th-sweets { background: linear-gradient(135deg, #f6e3f7, #eccdf2); }

.card .card-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.card h2 { margin: 0 0 2px; font-size: 1.08rem; line-height: 1.35; }
.card .topline {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 0.9rem;
}
.card .dist { color: var(--accent2); font-weight: bold; white-space: nowrap; }
.card .addr { margin: 2px 0 0; font-size: 0.88rem; color: var(--muted); line-height: 1.5; }
.card .hours { margin: 2px 0 0; font-size: 0.85rem; color: var(--muted); }

.chips { margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  background: #fdf0e4;
  color: #8a6d3b;
  font-size: 0.78rem;
}
.chip-open { background: #e7f6ec; color: #1e7d3a; font-weight: bold; }
.chip-closed { background: #f3ece4; color: #8a7f6a; }
.chip-chain { background: #e8f1fb; color: #3574b8; }
.chip-amenity { background: #e6f4e2; color: #33691e; font-weight: bold; }
a.chip-link { text-decoration: none; cursor: pointer; }
a.chip-link:hover { filter: brightness(0.94); text-decoration: underline; }

.card .actions { margin: 8px 0 0; display: flex; gap: 8px; flex-wrap: wrap; }
.gmaplink, .sitelink {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid var(--accent2);
  border-radius: 999px;
  color: var(--accent2);
  font-size: 0.85rem;
  text-decoration: none;
}
.sitelink { border-color: var(--border); color: var(--muted); }

footer {
  margin-top: 36px;
  text-align: center;
  background: var(--ink);
  color: #cfc8ba;
  font-size: 0.8rem;
  padding: 20px 16px 30px;
}
footer .foot-brand { margin: 0 0 6px; color: #fff; font-size: 0.95rem; font-weight: bold; }
footer p { margin: 0; }

@media (max-width: 560px) {
  .sortlabel { font-size: 0; gap: 0; }
  .sortlabel select { font-size: 0.9rem; }
}
