.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 15;
  height: var(--sheet-max-height);
  background: var(--surface);
  border-radius: var(--radius-sheet) var(--radius-sheet) 0 0;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  transform: translateY(calc(100% - var(--peek-height)));
  transition: transform 320ms cubic-bezier(.2, .8, .2, 1);
  touch-action: none;
}

.sheet.dragging {
  transition: none;
}

.sheet.expanded {
  transform: translateY(0);
}

.grabber-btn {
  border: none;
  background: transparent;
  padding: 10px 0 6px;
  display: flex;
  justify-content: center;
  flex: none;
  touch-action: none;
  cursor: grab;
}

.grabber-btn:active {
  cursor: grabbing;
}

.grabber {
  width: 40px;
  height: 4px;
  border-radius: 4px;
  background: var(--line);
  display: block;
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px 10px;
  flex: none;
}

.sheet-head h2 {
  font-size: var(--text-xl);
  font-weight: 700;
}

.sort-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  border: none;
  background: var(--paper-dim);
  color: var(--ink-soft);
  border-radius: var(--radius-pill);
  padding: 6px 12px;
  font-size: var(--text-xs);
  font-weight: 700;
  transition: background-color 140ms ease, color 140ms ease;
}

.sort-pill:hover {
  background: var(--marigold);
  color: var(--ink);
}

.sort-pill .material-symbols-outlined {
  font-size: 16px;
}

.cafe-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 18px 10px;
  padding: 9px 14px;
  background: var(--paper);
  border-radius: var(--radius-pill);
  flex: none;
}

.cafe-search .material-symbols-outlined {
  color: var(--ink-soft);
  font-size: 20px;
}

.cafe-search input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-size: var(--text-sm);
  color: var(--ink);
}

.cafe-search input::placeholder {
  color: var(--ink-soft);
  opacity: 0.75;
}

#cafeList {
  flex: 1;
  overflow-y: auto;
  padding: 0 14px 24px;
}

#cafeList .empty-message {
  padding: 24px 12px;
  text-align: center;
  color: var(--ink-soft);
  font-size: var(--text-sm);
}

.cafe-card {
  display: flex;
  gap: 12px;
  padding: 10px;
  margin-bottom: 8px;
  border-radius: var(--radius-card);
  background: var(--paper);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.cafe-card:hover {
  border-color: var(--line);
}

.cafe-card.active {
  background: var(--sage-bg);
  border-color: var(--sage);
}

.cafe-photo {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 12px;
  flex: none;
  background: linear-gradient(135deg, var(--wood), var(--marigold));
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.cafe-photo.no-photo::after {
  content: "coffee";
  font-family: "Material Symbols Outlined";
  font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 24;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: var(--paper);
  text-shadow: 0 1px 4px rgba(46, 27, 15, 0.35);
}

.cafe-photo .favorite-btn {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  color: var(--rust);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  z-index: 2;
  transition: background-color 140ms ease, transform 140ms ease;
}

.cafe-photo .favorite-btn:hover {
  transform: scale(1.1);
}

.cafe-photo .favorite-btn:active {
  transform: scale(0.9);
}

.cafe-photo .favorite-btn .material-symbols-outlined {
  font-size: 14px;
  color: var(--rust);
  font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 24;
}

.cafe-photo .favorite-btn.saved {
  background: var(--rust);
}

.cafe-photo .favorite-btn.saved .material-symbols-outlined {
  color: var(--surface);
  font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 24;
}

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

.cafe-body h4 {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 700;
  margin: 0 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cafe-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: var(--text-xs);
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
  flex-wrap: wrap;
}

.cafe-meta .rating {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--ink);
  font-weight: 600;
}

.cafe-meta .rating .material-symbols-outlined {
  font-size: 14px;
  color: var(--marigold-deep);
  font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 24;
}

.rating-count {
  color: var(--ink-soft);
  font-weight: 500;
  margin-left: 1px;
}

.cafe-tags {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.tag {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--paper-dim);
  color: var(--ink-soft);
}

.tag.open {
  background: var(--sage-bg);
  color: var(--sage);
}

.tag.closed {
  background: var(--rust-bg);
  color: var(--rust);
}

.route-btn {
  margin-top: 8px;
  border: none;
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  font-size: var(--text-xs);
  font-weight: 700;
  background: var(--ink);
  color: var(--paper);
  transition: transform 140ms ease, background-color 140ms ease;
}

.route-btn:hover {
  transform: scale(1.03);
}

.route-btn.active {
  background: var(--marigold);
  color: var(--ink);
}

.route-btn.unroute {
  background: transparent;
  color: var(--rust);
  border: 1px solid var(--rust);
  margin-left: 6px;
}
