:root {
  --bg: #f6f4ef;
  --panel: #ffffff;
  --ink: #1f2933;
  --muted: #6b7280;
  --line: #e7e2d8;
  --accent: #c2410c;
  --accent-soft: #fff1e6;
  --shadow: 0 8px 28px rgba(46, 35, 20, 0.1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

button, input, select { font: inherit; }

.app {
  display: flex;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.sidebar {
  width: 390px;
  flex: 0 0 390px;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border-right: 1px solid var(--line);
  box-shadow: 2px 0 16px rgba(46, 35, 20, 0.05);
  z-index: 5;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 20px 14px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #e4572e, #c2410c);
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 1px;
  box-shadow: 0 6px 16px rgba(194, 65, 12, 0.28);
}

.brand h1 {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
  font-weight: 750;
}

.brand p {
  margin: 3px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.notice {
  margin: 0 20px 12px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: #9a3412;
  font-size: 11px;
  line-height: 1.5;
}

.search-wrap {
  position: relative;
  margin: 0 20px 12px;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  pointer-events: none;
}

.search-wrap input {
  width: 100%;
  height: 40px;
  padding: 0 12px 0 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfaf7;
  color: var(--ink);
  outline: none;
}

.search-wrap input:focus {
  border-color: #e4572e;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(228, 87, 46, 0.12);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 20px 12px;
}

.filter-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 12px;
  cursor: pointer;
  transition: all .15s ease;
}

.filter-btn:hover { border-color: #d6ccc0; color: var(--ink); }

.filter-btn.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 20px 10px;
  border-bottom: 1px solid var(--line);
}

.toolbar select {
  flex: 1;
  min-width: 0;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf7;
  color: var(--ink);
  outline: none;
}

.count {
  flex: 0 0 auto;
  font-size: 12px;
  color: var(--muted);
}

.shop-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px 16px;
}

.shop-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  padding: 11px 10px;
  margin-bottom: 4px;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}

.shop-item:hover { background: #faf7f1; }

.shop-item.active {
  background: #fff7f0;
  border-color: #f0c3a6;
}

.shop-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.shop-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.shop-city {
  flex: 0 0 auto;
  font-size: 11px;
  color: var(--muted);
}

.shop-episode {
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
}

.dish-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}

.dish-tag {
  font-size: 11px;
  color: #7c3f1d;
  background: #fff1e6;
  border-radius: 5px;
  padding: 2px 6px;
}

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

.empty {
  padding: 36px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.side-footer {
  flex: 0 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
}

.side-footer a { color: var(--accent); text-decoration: none; }
.side-footer a:hover { text-decoration: underline; }

.map-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 100vh;
  overflow: hidden;
}

#map {
  width: 100%;
  height: 100%;
}

.map-overlay {
  position: absolute;
  z-index: 10;
}

.legend {
  top: 18px;
  right: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 11px 13px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  font-size: 11px;
  color: var(--ink);
}

.legend-row { display: flex; align-items: center; gap: 7px; }
.legend-dot { width: 9px; height: 9px; border-radius: 50%; }

.map-tip {
  top: 18px;
  left: 18px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  font-size: 12px;
  color: var(--muted);
}

.detail {
  left: 18px;
  bottom: 18px;
  width: 320px;
  padding: 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.detail[hidden] { display: none; }

.detail-close {
  position: absolute;
  top: 8px;
  right: 10px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.detail-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .3px;
}

.detail h2 {
  margin: 7px 0 4px;
  font-size: 19px;
  line-height: 1.3;
}

.detail-meta {
  font-size: 12px;
  color: var(--muted);
}

.detail-dishes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.detail-note {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}

.detail-nav {
  display: inline-block;
  margin-top: 12px;
  font-size: 12px;
  color: var(--accent);
  text-decoration: none;
}

.detail-nav:hover { text-decoration: underline; }

@media (max-width: 760px) {
  .app { flex-direction: column; }
  .sidebar {
    order: 2;
    width: 100%;
    flex: 0 0 45vh;
    height: 45vh;
    border-right: 0;
    border-top: 1px solid var(--line);
  }
  .map-wrap {
    order: 1;
    flex: 0 0 55vh;
    height: 55vh;
  }
  .brand { padding: 12px 16px 8px; }
  .notice { margin: 0 16px 8px; }
  .search-wrap { margin: 0 16px 8px; }
  .filters { padding: 0 16px 8px; }
  .toolbar { padding: 0 16px 8px; }
  .legend { top: 10px; right: 10px; padding: 8px 10px; }
  .map-tip { top: 10px; left: 10px; font-size: 11px; }
  .detail { left: 10px; right: 10px; bottom: 10px; width: auto; padding: 14px; }
}
