:root {
  --accent: #FF7A30;
  --accent-dark: #E25E12;
  --bg: #FFF8F2;
  --card: #FFFFFF;
  --ink: #2A2118;
  --ink-soft: #857a6f;
  --border: #F0E4D8;
  --sheet-collapsed: 46vh;
  --sheet-expanded: 82vh;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  background: var(--bg);
  color: var(--ink);
}

.topbar {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  padding: 14px 16px 10px;
}

.brand {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.tagline {
  font-size: 12.5px;
  opacity: 0.92;
  margin-top: 2px;
}

.searchbar {
  position: relative;
  padding: 10px 12px 0;
  background: var(--accent-dark);
}

.searchbar input {
  width: 100%;
  padding: 11px 38px 11px 14px;
  border: none;
  border-radius: 12px;
  font-size: 14.5px;
  outline: none;
  background: #fff;
}

.clear-btn {
  position: absolute;
  right: 24px;
  top: 20px;
  border: none;
  background: transparent;
  color: var(--ink-soft);
  font-size: 14px;
  cursor: pointer;
}

.chips {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  overflow-x: auto;
  background: var(--accent-dark);
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }

.chip {
  flex: 0 0 auto;
  padding: 7px 14px;
  border-radius: 999px;
  border: none;
  background: rgba(255,255,255,0.25);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.chip.active {
  background: #fff;
  color: var(--accent-dark);
}

#map {
  position: absolute;
  top: 128px;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}

.leaflet-div-icon {
  background: transparent;
  border: none;
}

.marker-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: var(--accent);
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.marker-pin span {
  transform: rotate(45deg);
  font-size: 16px;
}
.marker-pin.selected {
  background: var(--accent-dark);
  width: 42px;
  height: 42px;
}
.marker-pin.selected span { font-size: 20px; }

.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--sheet-collapsed);
  background: var(--card);
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.12);
  z-index: 2;
  display: flex;
  flex-direction: column;
  transition: height 0.25s ease;
  touch-action: none;
}
.sheet.expanded { height: var(--sheet-expanded); }

.sheet-handle {
  width: 40px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 10px auto 4px;
  cursor: grab;
}

.sheet-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 16px 10px;
  font-weight: 700;
  font-size: 15px;
  border-bottom: 1px solid var(--border);
}

.count {
  color: var(--accent-dark);
  background: #FFEEE0;
  padding: 1px 9px;
  border-radius: 999px;
  font-size: 12.5px;
}

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

.card {
  display: flex;
  gap: 12px;
  padding: 12px 6px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.card:last-child { border-bottom: none; }
.card.highlight { background: #FFF4EA; border-radius: 12px; }

.card-thumb {
  flex: 0 0 68px;
  width: 68px;
  height: 68px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  background: #FFEEDD;
}

.card-body { flex: 1; min-width: 0; }

.card-title {
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.card-title .branch {
  font-weight: 500;
  font-size: 12.5px;
  color: var(--ink-soft);
}

.card-tags {
  margin-top: 3px;
  display: flex;
  gap: 6px;
  align-items: center;
}
.tag-category {
  font-size: 11.5px;
  color: var(--accent-dark);
  background: #FFEEE0;
  padding: 1px 7px;
  border-radius: 6px;
  font-weight: 600;
}
.tag-channel {
  font-size: 11.5px;
  color: var(--ink-soft);
}
.tag-channel::before { content: "📺 "; }

.card-desc {
  margin-top: 5px;
  font-size: 12.5px;
  color: var(--ink-soft);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.empty-state {
  padding: 40px 16px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 13.5px;
}
