:root {
  --bg: #f7f1e8;
  --surface: #fffaf3;
  --ink: #2b2118;
  --ink-soft: #6b5a4a;
  --line: #e4d7c5;
  --coffee: #6f4428;
  --coffee-soft: #efe0cf;
  --food: #b0563f;
  --food-soft: #f6dfd6;
  --accent: #2f5d50;
  --demo: #8a6d00;
  --demo-bg: #fff3c4;
  --shadow: 0 6px 24px rgba(43, 33, 24, .14);
  --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1c1713; --surface: #26201a; --ink: #f1e8dc; --ink-soft: #bfae99; --line: #3d3329;
    --coffee: #d9a77c; --coffee-soft: #3a2c21; --food: #e79a84; --food-soft: #40281f;
    --accent: #8cc4b2; --demo: #ffd75e; --demo-bg: #3a3214; --shadow: 0 6px 24px rgba(0,0,0,.5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1c1713; --surface: #26201a; --ink: #f1e8dc; --ink-soft: #bfae99; --line: #3d3329;
  --coffee: #d9a77c; --coffee-soft: #3a2c21; --food: #e79a84; --food-soft: #40281f;
  --accent: #8cc4b2; --demo: #ffd75e; --demo-bg: #3a3214; --shadow: 0 6px 24px rgba(0,0,0,.5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
button { font: inherit; color: inherit; cursor: pointer; }

.demo-bar {
  background: var(--demo-bg); color: var(--demo);
  text-align: center; font-size: 12px; padding: 6px 16px; font-weight: 600;
}

/* header */
.site-header {
  display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: flex-end; justify-content: space-between;
  padding: 20px 16px 12px; max-width: 1200px; margin: 0 auto;
}
.brand-kicker { margin: 0; font-size: 12px; color: var(--ink-soft); letter-spacing: .08em; }
.brand-name {
  margin: 2px 0 0; font-size: 26px; line-height: 1.3; letter-spacing: .04em;
  font-family: "Hiragino Mincho ProN", "Noto Serif JP", "Yu Mincho", serif; font-weight: 600;
}
.tentative { font-size: 14px; color: var(--ink-soft); font-weight: 400; }
.event-card {
  display: grid; gap: 0; text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px 14px; min-width: 0;
}
.event-label { font-size: 11px; color: var(--accent); font-weight: 700; letter-spacing: .06em; }
.event-title { font-weight: 700; font-size: 14px; letter-spacing: .02em; }
.event-meta { font-size: 12px; color: var(--ink-soft); }

/* controls */
.controls {
  position: sticky; top: 0; z-index: 500;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
  padding: 10px 16px; background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(6px); border-bottom: 1px solid var(--line);
  max-width: 1200px; margin: 0 auto;
}
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line); background: var(--surface); border-radius: 999px;
  padding: 5px 12px; font-size: 13px; display: inline-flex; gap: 6px; align-items: center;
}
.chip .count { font-size: 11px; color: var(--ink-soft); }
.chip.is-on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip.is-on .count { color: inherit; opacity: .7; }
.toggle { font-size: 13px; display: inline-flex; gap: 6px; align-items: center; color: var(--ink-soft); }
.view-switch { margin-left: auto; display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.vs-btn { border: 0; background: var(--surface); padding: 5px 14px; font-size: 13px; }
.vs-btn.is-on { background: var(--coffee); color: #fff; }

/* layout */
.layout { max-width: 1200px; margin: 0 auto; padding: 12px 16px 24px; }
.map-wrap, .list-wrap { min-width: 0; }
#map {
  height: calc(100vh - 230px); min-height: 380px;
  border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden;
  background: var(--coffee-soft);
}
.map-note { margin: 6px 2px 0; font-size: 12px; color: var(--ink-soft); }
.layout[data-view="map"] .list-wrap { display: none; }
.layout[data-view="list"] .map-wrap { display: none; }

@media (min-width: 900px) {
  .view-switch { display: none; }
  .layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; }
  .layout .list-wrap, .layout .map-wrap { display: block !important; }
  #map { height: calc(100vh - 210px); position: sticky; top: 62px; }
  .list-wrap { max-height: calc(100vh - 170px); overflow: auto; padding-right: 4px; }
}

/* list */
.shop-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.shop-card {
  display: flex; gap: 12px; align-items: flex-start; text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; transition: transform .12s ease, box-shadow .12s ease;
}
.shop-card:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.sc-icon {
  flex: 0 0 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-size: 18px;
  background: var(--coffee-soft);
}
.cat-food .sc-icon { background: var(--food-soft); }
.sc-main { display: grid; min-width: 0; }
.sc-name { font-weight: 700; line-height: 1.45; overflow-wrap: anywhere; }
.sc-area { font-size: 12px; color: var(--ink-soft); }
.nopin { margin-left: 8px; font-size: 11px; color: var(--ink-soft); border: 1px dashed var(--line); padding: 0 6px; border-radius: 6px; }
.sc-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.tag { font-size: 11px; padding: 1px 8px; border-radius: 999px; background: var(--coffee-soft); color: var(--coffee); }
.cat-food .tag, .d-tags .tag.food { background: var(--food-soft); color: var(--food); }
.perm { font-size: 11px; padding: 1px 8px; border-radius: 999px; border: 1px solid currentColor; }
.perm-tbd { color: var(--demo); }
.perm-ok { color: var(--accent); }
.perm-ng { color: var(--food); }
.empty { color: var(--ink-soft); padding: 24px; text-align: center; }

/* pins */
.pin { background: none; border: 0; }
.pin span {
  display: grid; place-items: center; width: 34px; height: 34px; font-size: 16px;
  border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  background: var(--surface); border: 2px solid var(--coffee); box-shadow: var(--shadow);
}
.pin i { transform: rotate(45deg); font-style: normal; line-height: 1; }
.pin-coffee span { border-color: var(--coffee); }
.pin-food span { border-color: var(--food); }
.pin-area span { border-style: dashed; opacity: .85; }
.pin-venue span { width: 40px; height: 40px; background: var(--accent); color: #fff; border-color: #fff; font-size: 18px; }

/* sheet */
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.28); z-index: 900; }
.sheet {
  position: fixed; z-index: 1000; left: 0; right: 0; bottom: 0;
  max-height: 82vh; overflow: auto; background: var(--surface);
  border-radius: 20px 20px 0 0; box-shadow: var(--shadow);
  transform: translateY(105%); transition: transform .22s ease;
  padding-bottom: env(safe-area-inset-bottom);
}
.sheet.is-open { transform: translateY(0); }
@media (min-width: 900px) {
  .sheet {
    left: auto; top: 0; right: 0; bottom: 0; width: 420px; max-height: none;
    border-radius: 0; transform: translateX(105%);
  }
  .sheet.is-open { transform: translateX(0); }
}
.sheet-inner { padding: 22px 20px 28px; position: relative; }
.sheet-close {
  position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--bg); font-size: 18px; line-height: 1;
}
.d-cat { margin: 0; font-size: 12px; color: var(--coffee); font-weight: 700; letter-spacing: .06em; }
.d-cat.cat-food { color: var(--food); }
.d-name {
  margin: 4px 40px 8px 0; font-size: 22px; line-height: 1.4;
  font-family: "Hiragino Mincho ProN", "Noto Serif JP", "Yu Mincho", serif; font-weight: 600;
}
.d-tags { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 12px; }
.d-intro { margin: 0 0 16px; padding: 10px 14px; border-left: 3px solid var(--coffee); background: var(--bg); border-radius: 0 10px 10px 0; }
.d-intro-empty { margin: 0 0 16px; font-size: 13px; color: var(--ink-soft); }
.d-info { margin: 0; }
.row { display: grid; grid-template-columns: 6.5em 1fr; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); }
.row dt { color: var(--ink-soft); font-size: 13px; }
.row dd { margin: 0; overflow-wrap: anywhere; }
.d-fes { margin: 16px 0 0; font-size: 13px; color: var(--accent); font-weight: 600; }
.demo-box { margin-top: 20px; padding: 10px 14px; background: var(--demo-bg); border-radius: 10px; font-size: 13px; }
.demo-title { margin: 0 0 4px; color: var(--demo); font-weight: 700; font-size: 12px; }
.demo-box .row { grid-template-columns: 7.5em 1fr; border-color: rgba(0,0,0,.08); }

/* footer */
.site-footer {
  max-width: 1200px; margin: 0 auto; padding: 20px 16px 40px; font-size: 13px; color: var(--ink-soft);
  border-top: 1px solid var(--line);
}
.site-footer p { margin: 0 0 6px; }
.small { font-size: 11px; color: var(--ink-soft); }

/* gallery（イメージイラスト） */
.gallery {
  display: grid; grid-auto-flow: column; grid-auto-columns: 78%; gap: 8px;
  overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 0 14px; padding-bottom: 4px;
}
.gallery figure { margin: 0; position: relative; scroll-snap-align: start; }
.gallery img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: #f6f6f6; border-radius: 10px; border: 1px solid var(--line); }
.gallery figcaption {
  position: absolute; left: 8px; bottom: 8px; font-size: 10px; color: #fff;
  background: rgba(0,0,0,.45); padding: 1px 6px; border-radius: 4px;
}
