@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;0,600;1,400&family=Inter:wght@400;500;600&display=swap");

:root {
  --bg: #faf9f7;
  --surface: #ffffff;
  --surface-warm: #f5f3ef;
  --border: #e8e4de;
  --border-light: #f0ece6;
  --text: #1a1a1a;
  --text-soft: #4a4a4a;
  --muted: #8a8580;
  --accent: #2c2c2c;
  --accent-soft: #5c5c5c;
  --highlight: #c9a87c;
  --shadow: 0 1px 3px rgba(26, 26, 26, 0.06);
  --shadow-md: 0 4px 20px rgba(26, 26, 26, 0.08);
  --opening-tonight: #c45c4a;
  --opening-today: #c4923a;
  --opening-soon: #6b9e78;
  --on-view: #5a7d9a;
  --closing-soon: #9b7bb8;
  --editors-pick: #c9a227;
  --radius: 10px;
  --radius-sm: 6px;
  --filters-width: 380px;
  --list-width: 360px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

#app {
  display: grid;
  grid-template-columns: var(--filters-width) minmax(0, 1fr) var(--list-width);
  height: 100vh;
  min-height: 0;
}

.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  position: relative;
  z-index: 20;
}

.list-sidebar {
  background: var(--surface);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  position: relative;
  z-index: 20;
}

.list-sidebar-header {
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}

.list-view-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.list-view-tab {
  flex: 1 1 0;
  min-width: 0;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--border-light);
  border-radius: 100px;
  background: var(--surface-warm);
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.list-view-tab[data-list-view="plan"] {
  padding-right: 18px;
}

.list-clear-btn {
  flex-shrink: 0;
  white-space: nowrap;
  margin-left: auto;
}

.list-view-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.plan-tab-count {
  position: absolute;
  top: 4px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.22);
  font-size: 0.6rem;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
}

.list-view-tab:not(.active) .plan-tab-count {
  background: var(--highlight);
  color: #111;
}

.plan-tab-count.hidden {
  display: none;
}

.list-sidebar-toolbar {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.list-toolbar-row {
  min-height: 20px;
  display: flex;
  align-items: center;
}

.list-toolbar-row.hidden {
  display: none;
}

.list-toolbar-plan {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.list-toolbar-plan.hidden {
  display: none;
}

.list-sidebar-toolbar .list-actions-group {
  margin: 0;
}

.list-sidebar-footer {
  flex-shrink: 0;
  padding: 12px 16px 14px;
  border-top: 1px solid var(--border-light);
  background: var(--surface);
}

.list-footer-actions {
  display: flex;
  gap: 6px;
}

.list-footer-actions.hidden {
  display: none;
}

.list-footer-btn {
  flex: 1 1 0;
  min-width: 0;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--border-light);
  border-radius: 100px;
  background: var(--surface-warm);
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.list-footer-btn:hover:not(:disabled) {
  border-color: var(--muted);
  color: var(--text);
  background: var(--surface);
}

.list-footer-btn:active:not(:disabled) {
  background: var(--border-light);
}

.list-footer-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.list-footer-btn-share {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.list-footer-btn-share:hover:not(:disabled) {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  filter: brightness(0.95);
}

.list-footer-btn-icon {
  flex-shrink: 0;
  display: block;
}

.list-sidebar-footer .plan-share-status {
  margin: 8px 0 0;
  padding: 0;
  text-align: left;
}

.list-actions-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  line-height: 1.4;
}

.list-actions-group.hidden {
  display: none;
}

.list-action {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.35;
  cursor: pointer;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition: color 0.15s, text-decoration-color 0.15s;
}

.list-action:hover:not(:disabled) {
  color: var(--text);
  text-decoration-color: var(--muted);
}

.list-action.active {
  color: var(--accent);
  font-weight: 600;
  text-decoration-color: var(--highlight);
}

.list-action:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.list-action-muted {
  color: var(--muted);
}

.list-action-danger {
  color: #a85a4a;
}

.list-action-danger:hover:not(:disabled) {
  color: #8f4538;
}

.list-action-dot {
  color: var(--border);
  padding: 0 7px;
  font-size: 0.72rem;
  user-select: none;
}

.plan-share-status {
  margin: 0;
  padding: 0 16px 8px;
  font-size: 0.72rem;
  color: var(--muted);
  text-align: left;
}

.plan-share-status.hidden {
  display: none;
}

.shared-plan-banner {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 8px;
  padding: 8px 10px;
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--muted);
  background: rgba(250, 249, 247, 0.75);
  border: 1px solid rgba(232, 228, 222, 0.55);
  border-radius: var(--radius-sm);
}

.shared-plan-banner-text {
  margin: 0;
  flex: 1;
  min-width: 0;
}

.shared-plan-banner-dismiss {
  flex-shrink: 0;
  margin: -2px -2px 0 0;
  padding: 0;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.shared-plan-banner-dismiss:hover {
  color: var(--text);
  background: rgba(0, 0, 0, 0.05);
}

.shared-plan-banner.hidden {
  display: none;
}

.shared-plan-banner.is-error {
  color: #8a3b2a;
  border-color: rgba(180, 90, 70, 0.35);
  background: rgba(255, 248, 246, 0.9);
}

.plan-select-banner {
  margin: 0 0 8px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: rgba(250, 249, 247, 0.75);
  border: 1px solid rgba(232, 228, 222, 0.55);
}

.plan-select-banner.hidden {
  display: none !important;
}

.plan-select-filter {
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.35;
}

.plan-select-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
}

.plan-select-hint {
  margin: 6px 0 0;
  font-size: 0.68rem;
  color: var(--muted);
  line-height: 1.35;
}

.plan-select-count {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-soft);
  margin-right: 10px;
}

.plan-select-status {
  margin: 6px 0 0;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--highlight);
  line-height: 1.35;
}

.plan-select-status.hidden {
  display: none;
}

.plan-select-banner .list-action-danger {
  color: #a85a4a;
}

.plan-select-banner .list-action-danger:hover:not(:disabled) {
  color: #8f4538;
}

.plan-select-banner .list-action-danger:hover:not(:disabled) {
  color: #8f4538;
}

.bulk-selected-group {
  margin-bottom: 14px;
}

.bulk-selected-heading {
  margin: 0 0 8px;
  padding: 0 2px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-soft);
  line-height: 1.3;
}

.bulk-selected-empty {
  margin: 0;
  padding: 2px 2px 4px;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.4;
}

.bulk-browse-group {
  margin-bottom: 14px;
}

.bulk-browse-heading {
  margin: 0 0 10px;
  padding: 0 2px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
  line-height: 1.3;
}

.list-empty-msg {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.45;
  padding: 8px 4px;
}

.plan-list-group {
  margin-bottom: 18px;
}

.plan-list-group:last-child {
  margin-bottom: 0;
}

.plan-list-group-heading {
  margin: 0 0 10px;
  padding: 0 2px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
}

.plan-list-group:first-child .plan-list-group-heading {
  padding-top: 0;
}

.list-sidebar-title {
  margin: 0 0 10px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}

.list-search {
  width: 100%;
  box-sizing: border-box;
}

.sidebar-header {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}

.sidebar-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sidebar-header h1 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.filters-toggle {
  display: none;
  flex-shrink: 0;
  background: var(--surface-warm);
  border: 1px solid var(--border);
  color: var(--text-soft);
  padding: 6px 12px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.filters-toggle:hover,
.filters-toggle[aria-expanded="true"] {
  border-color: var(--highlight);
  background: var(--surface);
  color: var(--text);
}

.controls {
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.section-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

#date-filters {
  flex-wrap: wrap;
  gap: 6px;
}

#date-filters .filter-btn {
  flex: 0 0 auto;
  padding: 7px 12px;
  font-size: 0.74rem;
  white-space: nowrap;
}

.filter-btn {
  background: var(--surface-warm);
  border: 1px solid transparent;
  color: var(--text-soft);
  padding: 7px 14px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  background: var(--border-light);
  color: var(--text);
}

.filter-btn.active {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow);
}

.day-strip {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.day-strip::-webkit-scrollbar {
  display: none;
}

.day-chip {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 52px;
  padding: 10px 8px;
  background: var(--surface-warm);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.day-chip:hover {
  border-color: var(--border);
  background: var(--surface);
}

.day-chip.active {
  background: var(--surface);
  border-color: var(--highlight);
  box-shadow: var(--shadow);
}

.day-chip .day-name {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2px;
}

.day-chip.active .day-name {
  color: var(--highlight);
}

.day-chip .day-num {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1;
  color: var(--text);
}

.schedule-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.time-quick-wrap {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.time-quick {
  flex-wrap: nowrap;
  gap: 4px;
}

.time-quick .filter-btn {
  flex: 1 1 0;
  min-width: 0;
  padding: 6px 6px;
  font-size: 0.74rem;
  white-space: nowrap;
  text-align: center;
}

.time-range-panel {
  margin-top: 8px;
  padding: 12px;
  background: var(--surface-warm);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
}

.time-range-panel.hidden {
  display: none;
}

.neighborhood-chips {
  flex-wrap: wrap;
  gap: 6px;
}

.hood-filter-section {
  margin-bottom: 4px;
}

.hood-filter-section > .field-label {
  margin: 0 0 6px;
}

.hood-select-banner {
  margin-top: 8px;
}

.neighborhood-chips .filter-btn {
  flex: 0 0 auto;
  padding: 7px 12px;
  font-size: 0.74rem;
  white-space: nowrap;
}

.time-range-hint {
  font-size: 0.72rem;
  color: var(--muted);
  margin: 8px 0 0;
  line-height: 1.4;
}

.calendar-wrap {
  position: relative;
}

.calendar-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.calendar-toggle:hover {
  border-color: var(--muted);
}

.calendar-toggle svg {
  flex-shrink: 0;
  opacity: 0.5;
}

.calendar-popup {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow-md);
}

.calendar-popup.hidden {
  display: none;
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.calendar-header button {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--surface-warm);
  border-radius: 50%;
  color: var(--text);
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.15s;
  line-height: 1;
}

.calendar-header button:hover {
  background: var(--border);
}

#cal-month-label {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.1rem;
  font-weight: 600;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 4px;
}

.calendar-weekdays span {
  text-align: center;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding: 4px 0;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.cal-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  border-radius: 50%;
  font-size: 0.82rem;
  color: var(--text-soft);
  cursor: pointer;
  transition: all 0.15s ease;
}

.cal-day:hover:not(:disabled) {
  background: var(--surface-warm);
  color: var(--text);
}

.cal-day.today {
  font-weight: 600;
  color: var(--text);
}

.cal-day.selected {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

.cal-day.other-month {
  color: var(--border);
}

.cal-day:disabled {
  cursor: default;
  visibility: hidden;
}

.field-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 6px;
}

.time-range {
  display: flex;
  gap: 10px;
}

.time-range.hidden {
  display: none;
}

.time-range-field {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.72rem;
  color: var(--muted);
}

.time-range-field select {
  padding: 8px 10px;
  padding-right: 32px;
  font-size: 0.85rem;
}

select,
input[type="search"] {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238a8580' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

select:focus,
input[type="search"]:focus {
  outline: none;
  border-color: var(--highlight);
  box-shadow: 0 0 0 3px rgba(201, 168, 124, 0.2);
}

input[type="search"]::placeholder {
  color: var(--muted);
}

.checkbox-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  font-size: 0.8rem;
}

.checkbox-row label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: var(--text-soft);
}

.checkbox-row input {
  accent-color: var(--accent);
  width: 15px;
  height: 15px;
}

.map-legend {
  position: absolute;
  bottom: 16px;
  left: 16px;
  z-index: 1000;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  font-size: 0.68rem;
  max-width: calc(100% - 32px);
}

.map-legend .legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text-soft);
  white-space: nowrap;
}

.map-legend .legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.legend-item--mobile {
  display: none;
}

.detail-panel.hidden {
  display: none !important;
  pointer-events: none;
  visibility: hidden;
}

.detail-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: auto;
  z-index: 1200;
  width: min(400px, 100%);
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: -8px 0 32px rgba(26, 26, 26, 0.12);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.detail-panel.is-open {
  transform: translateX(0);
  pointer-events: auto;
}

.detail-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: var(--text-soft);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.detail-close:hover {
  border-color: var(--muted);
  color: var(--text);
  background: #fff;
}

.detail-panel-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.detail-hero {
  position: relative;
  background: var(--surface-warm);
  border-bottom: 1px solid var(--border-light);
}

.detail-hero-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.detail-hero-placeholder {
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.detail-hero-badges {
  position: absolute;
  left: 16px;
  bottom: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.detail-badge {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 100px;
  color: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.detail-main {
  padding: 22px 20px 24px;
}

.detail-artist {
  margin: 0 0 6px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
}

.detail-exhibition {
  margin: 0 0 8px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.15rem;
  font-style: italic;
  line-height: 1.35;
  color: var(--text-soft);
}

.detail-venue {
  margin: 0 0 20px;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.4;
}

.detail-facts {
  display: grid;
  gap: 10px;
  margin: 0 0 18px;
  padding: 0;
}

.detail-fact {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 10px;
  align-items: start;
  font-size: 0.8rem;
  line-height: 1.45;
}

.detail-fact dt {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.detail-fact dd {
  margin: 0;
  color: var(--text-soft);
}

.detail-about {
  padding-top: 20px;
  border-top: 1px solid var(--border-light);
}

.detail-about-label {
  margin: 0 0 10px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.detail-about-text {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--text-soft);
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 4px;
}

.detail-action {
  display: inline-flex;
  align-items: center;
  padding: 9px 16px;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--surface);
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.detail-action:hover {
  border-color: var(--muted);
  background: var(--surface-warm);
}

.detail-action-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.detail-action-primary:hover {
  background: #1a1a1a;
  border-color: #1a1a1a;
  color: #fff;
}

.directions-menu {
  position: relative;
}

.directions-menu-btn {
  cursor: pointer;
}

.directions-menu-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 20;
  min-width: 148px;
  padding: 6px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-md);
}

.directions-menu-panel.hidden {
  display: none;
}

.directions-menu-item {
  display: block;
  padding: 8px 12px;
  border-radius: calc(var(--radius-sm) - 2px);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--text);
  white-space: nowrap;
}

.directions-menu-item:hover {
  background: var(--surface-warm);
  color: var(--text);
}

.show-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px 16px 16px;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}

.show-card {
  position: relative;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 12px 12px 44px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-shadow: var(--shadow);
}

.show-card-media {
  position: relative;
  width: 88px;
  height: 88px;
  flex-shrink: 0;
  background: var(--surface-warm);
  border-radius: var(--radius-sm);
}

.show-card-img {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--surface-warm);
  display: block;
}

.show-card-img[data-src]:not([src]) {
  visibility: hidden;
}

.show-card-img-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface-warm);
}

.show-card-plan {
  position: absolute;
  bottom: 10px;
  right: 10px;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: var(--surface);
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: var(--shadow);
  white-space: nowrap;
}

.show-card-plan.in-plan {
  background: var(--highlight);
  border-color: var(--highlight);
  color: #111;
}

.show-card-body {
  min-width: 0;
}

.show-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 6px;
}

.show-card.in-plan {
  border-color: rgba(201, 168, 124, 0.55);
}

.show-card.bulk-selected {
  border-color: var(--highlight);
  background: rgba(201, 168, 124, 0.12);
  box-shadow: var(--shadow-md);
}

.bulk-mode-list .show-card {
  cursor: pointer;
}

.bulk-mode-list .show-card-plan {
  display: none;
}

.show-card-bulk-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid var(--border-light);
  border-radius: 100px;
  background: var(--surface);
  color: var(--muted);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.show-card-bulk-remove:hover {
  color: var(--text);
  border-color: var(--muted);
  background: var(--surface-warm);
}

.bulk-selected-group .show-card {
  cursor: pointer;
}

.bulk-browse-group .show-card,
.bulk-mode-list .plan-list-group .show-card {
  cursor: pointer;
}

.bulk-mode-list .show-card.plan-sortable-card {
  cursor: pointer;
}

.show-card.plan-sortable-card {
  cursor: grab;
}

.show-card.plan-dragging {
  opacity: 0.55;
  cursor: grabbing;
}

.show-card:hover,
.show-card.focused,
.show-card.selected {
  border-color: var(--highlight);
  box-shadow: var(--shadow-md);
}

.show-card.selected {
  background: var(--surface-warm);
}

.show-card .badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 100px;
  color: #fff;
}

.show-card h3 {
  margin: 0 0 4px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.25;
}

.show-card .venue {
  color: var(--muted);
  font-size: 0.78rem;
  margin: 0 0 6px;
}

.show-card .meta {
  font-size: 0.75rem;
  color: var(--text-soft);
  line-height: 1.45;
}

.date-range {
  color: var(--text-soft);
  font-variant-numeric: tabular-nums;
}

.show-card .time-tag {
  font-weight: 600;
  color: var(--text);
}

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

.map-toolbar {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 1000;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  max-width: calc(100% - 32px);
}

.map-toolbar button {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-soft);
  padding: 7px 10px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.map-toolbar button:hover {
  border-color: var(--muted);
  color: var(--text);
}

.map-toolbar button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.map-toolbar button.map-bulk-btn-remove.active {
  background: #a85a4a;
  border-color: #a85a4a;
  color: #fff;
}

.leaflet-container.bulk-mode {
  cursor: crosshair;
}

.leaflet-container.hood-mode {
  cursor: crosshair;
}

.area-bounds-active,
.area-bounds-preview {
  pointer-events: none;
}

.select-rect-preview {
  pointer-events: none;
}

.map-wrap {
  position: relative;
  min-height: 0;
  min-width: 0;
  background: var(--surface-warm);
  overflow: hidden;
  z-index: 1;
  display: flex;
  flex-direction: column;
}

.map-collapse-toggle {
  display: none;
}

.map-wrap-body {
  flex: 1;
  min-height: 0;
  position: relative;
}

.leaflet-popup-content-wrapper {
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light);
}

.leaflet-popup-content {
  margin: 14px 16px;
  line-height: 1.45;
  font-size: 0.84rem;
  min-width: 220px;
  color: var(--text);
}

.leaflet-popup-tip {
  box-shadow: none;
}

.popup-img {
  width: 100%;
  max-height: 130px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
}

.popup-title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  font-size: 1.05rem;
  margin: 0 0 6px;
}

.popup-links a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.popup-links a:hover {
  color: var(--highlight);
}

.neighborhood-group {
  margin-bottom: 16px;
}

.neighborhood-group h4 {
  margin: 0 0 8px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  text-transform: capitalize;
  letter-spacing: 0.02em;
}

.mobile-top,
.mobile-sheet,
.mobile-mode-banner-slot,
.mobile-filters-modal,
.mobile-map-dismiss {
  display: none;
}

@media (max-width: 800px) {
  #app.mobile-layout {
    display: block;
    position: relative;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
  }

  #app.mobile-layout .sidebar {
    display: none;
  }

  #app.mobile-layout .list-sidebar {
    display: none;
  }

  #app.mobile-layout .map-collapse-toggle {
    display: none;
  }

  #app.mobile-layout .map-wrap {
    position: fixed;
    inset: 0;
    z-index: 1;
    border: none;
    display: flex;
    flex-direction: column;
  }

  #app.mobile-layout .mobile-top {
    display: block;
  }

  #app.mobile-layout .mobile-top[hidden] {
    display: none;
  }

  #app.mobile-layout .mobile-sheet {
    display: flex;
  }

  #app.mobile-layout .mobile-mode-banner-slot {
    display: block;
  }

  .mobile-map-dismiss {
    position: fixed;
    top: var(--mobile-top-height, 120px);
    left: 0;
    right: 0;
    bottom: var(--mobile-sheet-height, 72px);
    z-index: 580;
    background: transparent;
    cursor: default;
    touch-action: manipulation;
  }

  .mobile-map-dismiss.hidden,
  #app.mobile-layout .mobile-map-dismiss.hidden {
    display: none !important;
    pointer-events: none;
  }

  #app.mobile-layout .mobile-map-dismiss:not(.hidden) {
    display: block;
    pointer-events: auto;
  }

  #app.mobile-layout .map-wrap-body {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  #app.mobile-layout #map {
    flex: 1;
    min-height: 0;
  }

  #app.mobile-layout .detail-panel {
    display: none !important;
  }

  .mobile-top {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 500;
    background: linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.97) 0%,
      rgba(255, 255, 255, 0.94) 85%,
      rgba(255, 255, 255, 0) 100%
    );
    padding: max(8px, env(safe-area-inset-top)) 12px 10px;
    pointer-events: none;
  }

  .mobile-top > * {
    pointer-events: auto;
  }

  .mobile-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .mobile-top-title {
    margin: 0;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--text);
    min-width: 0;
  }

  .mobile-search-filter-btn {
    position: relative;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.96);
    color: var(--text-soft);
    cursor: pointer;
    box-shadow: var(--shadow);
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-search-filter-btn:active {
    background: var(--surface-warm);
  }

  .mobile-search-filter-icon {
    display: block;
  }

  .mobile-filters-badge:not(.hidden)::after {
    content: "";
    position: absolute;
    top: 8px;
    right: 8px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--opening-tonight);
    border: 1.5px solid #fff;
  }

  .mobile-filters-search-slot .list-search {
    width: 100%;
    margin: 0;
  }

  .mobile-filters-chips {
    padding: 0 16px 4px;
    border-bottom: 1px solid var(--border-light);
  }

  .mobile-filters-chips .mobile-chips-scroll {
    overflow-x: auto;
    scrollbar-width: none;
    margin-bottom: 6px;
  }

  .mobile-filters-chips .mobile-chips-scroll::-webkit-scrollbar {
    display: none;
  }

  .mobile-filters-chips .mobile-chips-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    padding-bottom: 2px;
  }

  .mobile-filters-chips .mobile-chips-row .filter-btn {
    flex: 0 0 auto;
    padding: 6px 12px;
    font-size: 0.76rem;
  }

  .mobile-filters-chips #date-filters {
    flex-wrap: nowrap;
  }

  .mobile-filters-chips #date-filters .filter-btn {
    flex: 0 0 auto;
    min-width: 0;
    padding: 6px 10px;
    font-size: 0.74rem;
  }

  .mobile-filters-chips .mobile-chips-scroll:last-child {
    margin-bottom: 8px;
  }

  .mobile-shared-banner-slot .shared-plan-banner {
    margin: 4px 0 0;
    padding: 8px 10px;
    font-size: 0.72rem;
  }

  .mobile-mode-banner-slot {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(var(--mobile-sheet-height, 88px) + 8px);
    z-index: 550;
    pointer-events: none;
  }

  #app.mobile-layout .mobile-mode-banner-slot .plan-select-banner,
  #app.mobile-layout .mobile-mode-banner-slot .hood-select-banner {
    pointer-events: auto;
    margin: 0;
    box-shadow: var(--shadow-md);
    border-radius: var(--radius);
  }

  .mobile-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 600;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -8px 32px rgba(26, 26, 26, 0.14);
    height: 88px;
    max-height: 92dvh;
    padding-bottom: env(safe-area-inset-bottom);
    touch-action: none;
  }

  .mobile-sheet[data-mode="show"] {
    touch-action: pan-y;
  }

  .mobile-sheet.is-dragging {
    transition: none;
  }

  .mobile-sheet-handle {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    padding: 12px 20px 10px;
    margin: 0;
    border: none;
    background: transparent;
    cursor: grab;
    touch-action: none;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-sheet-handle:active,
  .mobile-sheet.is-dragging .mobile-sheet-handle {
    cursor: grabbing;
  }

  .mobile-sheet-handle-bar {
    display: block;
    width: 44px;
    height: 5px;
    border-radius: 999px;
    background: var(--muted);
    pointer-events: none;
  }

  .mobile-show-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
  }

  .mobile-sheet[data-mode="show"] .mobile-show-scroll:not(.hidden) {
    flex: 1;
    min-height: 0;
  }

  .mobile-show-scroll.hidden {
    display: none;
  }

  .mobile-show-scroll-content.mobile-detail-active {
    padding: 0;
  }

  .mobile-show-detail {
    --md-p: 0;
    --md-pad: 16px;
    --md-gap: 12px;
    --md-col-w: minmax(162px, 46%);
    --md-img-h-compact-min: 148px;
    --md-img-h-expanded: min(52vh, 460px);
    padding-bottom: 8px;
  }

  .mobile-detail-toolbar {
    flex-shrink: 0;
    padding: 0 14px 8px;
    border-bottom: 1px solid var(--border-light);
  }

  .mobile-detail-toolbar.hidden {
    display: none;
  }

  .mobile-detail-back {
    display: block;
    margin: 0;
    padding: 8px 2px 4px;
    background: none;
    border: none;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--accent);
    cursor: pointer;
    line-height: 1.3;
  }

  .mobile-detail-back:active {
    opacity: 0.7;
  }

  /* Compact: image + buttons left, intro + facts right */
  .mobile-show-detail[data-layout="compact"] .mobile-detail-header {
    display: grid;
    grid-template-columns: var(--md-col-w) 1fr;
    grid-template-rows: auto auto;
    column-gap: var(--md-gap);
    row-gap: 8px;
    align-items: stretch;
    padding: 4px var(--md-pad) 12px;
  }

  .mobile-show-detail[data-layout="compact"] .mobile-detail-left {
    grid-column: 1;
    grid-row: 1 / span 2;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 100%;
  }

  .mobile-show-detail[data-layout="compact"] .mobile-detail-intro {
    grid-column: 2;
    grid-row: 1;
  }

  .mobile-show-detail[data-layout="compact"] .mobile-detail-facts {
    grid-column: 2;
    grid-row: 2;
  }

  /* Expanded: full-width hero, then stacked content */
  .mobile-show-detail[data-layout="expanded"] .mobile-detail-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 4px var(--md-pad) 14px;
  }

  .mobile-show-detail[data-layout="expanded"] .mobile-detail-left {
    display: contents;
  }

  .mobile-show-detail[data-layout="expanded"] .mobile-detail-media {
    order: 1;
  }

  .mobile-show-detail[data-layout="expanded"] .mobile-detail-intro {
    order: 2;
  }

  .mobile-show-detail[data-layout="expanded"] .mobile-detail-actions {
    order: 3;
  }

  .mobile-show-detail[data-layout="expanded"] .mobile-detail-facts {
    order: 4;
  }

  .mobile-detail-media {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    background: var(--surface-warm);
    border: 1px solid var(--border-light);
    box-shadow: 0 2px 12px rgba(26, 26, 26, 0.08);
  }

  .mobile-show-detail[data-layout="compact"] .mobile-detail-media {
    flex: 1 1 auto;
    min-height: var(--md-img-h-compact-min);
    display: flex;
    flex-direction: column;
  }

  .mobile-show-detail[data-layout="expanded"] .mobile-detail-media {
    width: 100%;
    border-radius: 12px;
  }

  .mobile-detail-img {
    width: 100%;
    display: block;
    object-fit: cover;
  }

  .mobile-show-detail[data-layout="compact"] .mobile-detail-img,
  .mobile-show-detail[data-layout="compact"] .mobile-detail-img-empty {
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
    min-height: var(--md-img-h-compact-min);
    max-height: none;
  }

  .mobile-show-detail[data-layout="expanded"] .mobile-detail-img {
    height: var(--md-img-h-expanded);
    min-height: 200px;
    max-height: var(--md-img-h-expanded);
  }

  .mobile-detail-img-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: var(--surface-warm);
  }

  .mobile-detail-badges {
    position: absolute;
    left: 8px;
    bottom: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    pointer-events: none;
  }

  .mobile-detail-badges .detail-badge {
    font-size: 0.6rem;
    padding: 3px 8px;
  }

  .mobile-detail-intro {
    min-width: 0;
  }

  .mobile-detail-intro .detail-artist {
    margin: 0 0 3px;
    font-size: 1.05rem;
    line-height: 1.2;
  }

  .mobile-show-detail[data-layout="expanded"] .mobile-detail-intro .detail-artist {
    font-size: 1.65rem;
  }

  .mobile-detail-intro .detail-exhibition {
    margin: 0 0 3px;
    font-size: 0.88rem;
    line-height: 1.3;
  }

  .mobile-show-detail[data-layout="expanded"] .mobile-detail-intro .detail-exhibition {
    font-size: 1.1rem;
  }

  .mobile-detail-intro .detail-venue {
    margin: 0;
    font-size: 0.76rem;
    line-height: 1.35;
  }

  .mobile-show-detail[data-layout="compact"] .mobile-detail-actions {
    flex: 0 0 auto;
    flex-wrap: nowrap;
    gap: 6px;
    width: 100%;
  }

  .mobile-show-detail[data-layout="compact"] .mobile-detail-actions > .detail-action,
  .mobile-show-detail[data-layout="compact"] .mobile-detail-actions > .directions-menu {
    flex: 1 1 0;
    min-width: 0;
  }

  .mobile-show-detail[data-layout="compact"] .mobile-detail-actions > .directions-menu {
    display: flex;
  }

  .mobile-show-detail[data-layout="compact"] .mobile-detail-actions .directions-menu-btn {
    flex: 1;
    min-width: 0;
    width: 100%;
  }

  .mobile-detail-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
  }

  .mobile-detail-actions .detail-action {
    padding: 8px 12px;
    font-size: 0.76rem;
    line-height: 1.25;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 36px;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
  }

  .mobile-show-detail[data-layout="compact"] .mobile-detail-actions .detail-action,
  .mobile-show-detail[data-layout="compact"] .mobile-detail-actions .directions-menu-btn {
    padding: 8px 6px;
    font-size: 0.72rem;
    line-height: 1.2;
    min-height: 34px;
    flex: 1 1 0;
  }

  .mobile-show-detail[data-layout="compact"] .mobile-action-long {
    display: none;
  }

  .mobile-show-detail[data-layout="expanded"] .mobile-action-short {
    display: none;
  }

  .mobile-show-detail[data-layout="expanded"] .mobile-detail-actions .detail-action {
    padding: 9px 16px;
    font-size: 0.8rem;
    min-height: 38px;
    flex: 0 1 auto;
  }

  .mobile-detail-facts {
    margin: 0;
    padding: 0;
    gap: 6px;
  }

  .mobile-show-detail[data-layout="compact"] .mobile-detail-facts {
    display: grid;
    gap: 4px;
  }

  .mobile-show-detail[data-layout="compact"] .mobile-detail-facts .detail-fact {
    display: grid;
    grid-template-columns: 52px 1fr;
    gap: 6px;
    align-items: start;
    font-size: 0.72rem;
    line-height: 1.35;
  }

  .mobile-show-detail[data-layout="compact"] .mobile-detail-facts .detail-fact dt {
    font-size: 0.62rem;
  }

  .mobile-show-detail[data-layout="expanded"] .mobile-detail-facts {
    display: grid;
    gap: 10px;
  }

  .mobile-show-detail[data-layout="expanded"] .mobile-detail-facts .detail-fact {
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: 10px;
    font-size: 0.8rem;
    line-height: 1.45;
  }

  .mobile-detail-about {
    padding: 16px var(--md-pad) 24px;
    border-top: 1px solid var(--border-light);
  }

  .mobile-detail-about .detail-about-label {
    margin: 0 0 10px;
  }

  .mobile-detail-about .detail-about-text {
    margin: 0;
  }

  .mobile-sheet-body {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .mobile-sheet[data-state="peek"]:not(.is-dragging) .show-list,
  .mobile-sheet[data-state="peek"]:not(.is-dragging) .mobile-show-scroll,
  .mobile-sheet[data-state="peek"]:not(.is-dragging) .list-sidebar-footer {
    display: none !important;
  }

  .mobile-sheet[data-state="peek"]:not(.is-dragging) .list-sidebar-header .shared-plan-banner,
  .mobile-sheet[data-state="peek"]:not(.is-dragging) .list-sidebar-header .list-sidebar-toolbar,
  .mobile-sheet[data-state="peek"]:not(.is-dragging) .list-sidebar-header .plan-select-banner {
    display: none !important;
  }

  .mobile-sheet[data-state="peek"]:not(.is-dragging) .list-sidebar-header .list-view-tabs {
    margin-bottom: 0;
  }

  .mobile-sheet[data-state="peek"]:not(.is-dragging) .list-sidebar-header {
    border-bottom: none;
  }

  .mobile-sheet.is-dragging .mobile-sheet-body {
    display: flex;
  }

  .mobile-sheet[data-mode="show"] .mobile-sheet-body .list-sidebar-header,
  .mobile-sheet[data-mode="show"] .mobile-sheet-body .list-sidebar-toolbar,
  .mobile-sheet[data-mode="show"] .mobile-sheet-body .show-list,
  .mobile-sheet[data-mode="show"] .mobile-sheet-body .list-sidebar-footer {
    display: none !important;
  }

  .mobile-sheet-body.hidden {
    display: none;
  }

  .mobile-sheet-body .list-sidebar-header {
    flex-shrink: 0;
    padding: 0 14px 8px;
    border-bottom: 1px solid var(--border-light);
  }

  .mobile-sheet-body .list-sidebar-toolbar {
    padding-top: 8px;
  }

  .mobile-sheet-body .list-search {
    display: none;
  }

  .mobile-sheet-body .show-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px 12px;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
  }

  .mobile-sheet-body .show-card {
    grid-template-columns: 68px minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 8px 10px;
    padding: 10px;
    margin-bottom: 8px;
    max-width: 100%;
    box-sizing: border-box;
  }

  .mobile-sheet-body .show-card-media {
    grid-row: 1;
    grid-column: 1;
    width: 68px;
    height: 68px;
  }

  .mobile-sheet-body .show-card-img,
  .mobile-sheet-body .show-card-img-empty {
    width: 68px;
    height: 68px;
  }

  .mobile-sheet-body .show-card-body {
    grid-row: 1;
    grid-column: 2;
    min-width: 0;
  }

  .mobile-sheet-body .show-card h3 {
    font-size: 0.95rem;
    line-height: 1.25;
  }

  .mobile-sheet-body .show-card .venue,
  .mobile-sheet-body .show-card .meta {
    font-size: 0.74rem;
  }

  .mobile-sheet-body .show-card-plan {
    position: static;
    grid-row: 2;
    grid-column: 1 / -1;
    width: 100%;
    margin: 0;
    min-height: 36px;
    padding: 8px 12px;
    font-size: 0.76rem;
    box-shadow: none;
    border-radius: 100px;
  }

  .mobile-sheet-body .list-sidebar-footer {
    flex-shrink: 0;
    padding: 10px 14px 12px;
    border-top: 1px solid var(--border-light);
    background: var(--surface);
  }

  .mobile-sheet-body .list-footer-btn {
    min-height: 36px;
    font-size: 0.76rem;
  }

  .mobile-sheet-body .plan-share-status {
    font-size: 0.72rem;
  }

  .mobile-filters-modal {
    position: fixed;
    inset: 0;
    z-index: 700;
    display: flex;
    align-items: flex-end;
  }

  .mobile-filters-modal.hidden {
    display: none !important;
  }

  #app.mobile-layout .mobile-filters-modal:not(.hidden) {
    display: flex;
  }

  .mobile-filters-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(26, 26, 26, 0.4);
  }

  .mobile-filters-panel {
    position: relative;
    width: 100%;
    max-height: 88dvh;
    background: var(--surface);
    border-radius: 16px 16px 0 0;
    display: flex;
    flex-direction: column;
    padding-bottom: env(safe-area-inset-bottom);
  }

  .mobile-filters-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 16px 8px;
    border-bottom: 1px solid var(--border-light);
  }

  .mobile-filters-title {
    margin: 0;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 1.25rem;
    font-weight: 600;
  }

  .mobile-filters-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--muted);
    cursor: pointer;
    padding: 4px 8px;
  }

  .mobile-filters-search-slot {
    padding: 12px 16px 4px;
  }

  .mobile-filters-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 12px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .mobile-filters-footer {
    display: flex;
    gap: 10px;
    padding: 12px 16px 16px;
    border-top: 1px solid var(--border-light);
  }

  .mobile-filters-clear,
  .mobile-filters-apply {
    flex: 1;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
  }

  .mobile-filters-clear {
    background: var(--surface-warm);
    border: 1px solid var(--border);
    color: var(--text-soft);
  }

  .mobile-filters-apply {
    background: var(--accent);
    border: 1px solid var(--accent);
    color: #fff;
  }

  #app.mobile-layout .map-legend {
    bottom: calc(var(--mobile-sheet-height, 88px) + 12px);
    left: 10px;
    padding: 6px 10px;
  }

  #app.mobile-layout .legend-item--desktop {
    display: none;
  }

  #app.mobile-layout .legend-item--mobile {
    display: flex;
  }

  #app.mobile-layout .map-toolbar {
    top: calc(var(--mobile-top-height, 56px) + 8px);
  }

  @media (prefers-reduced-motion: reduce) {
    .mobile-sheet {
      transition: none;
    }

    .mobile-sheet-handle {
      cursor: pointer;
    }

    .mobile-show-detail[data-layout="expanded"] {
      --md-img-h-expanded: min(52vh, 460px);
    }

    .mobile-detail-about {
      opacity: 1;
    }
  }
}

@media (min-width: 801px) and (max-width: 1100px) {
  :root {
    --filters-width: 360px;
    --list-width: 320px;
  }
}

/* Confirm dialog */
.confirm-dialog {
  position: fixed;
  inset: 0;
  z-index: 2100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.confirm-dialog.hidden {
  display: none !important;
}

.confirm-dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 26, 26, 0.45);
}

.confirm-dialog-panel {
  position: relative;
  width: min(100%, 320px);
  padding: 22px 20px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.confirm-dialog-title {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.25;
}

.confirm-dialog-message {
  margin: 10px 0 0;
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--text-soft);
}

.confirm-dialog-message.hidden {
  display: none;
}

.confirm-dialog-actions {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}

.confirm-dialog-btn {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: var(--surface-warm);
  color: var(--text-soft);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.confirm-dialog-btn:hover {
  border-color: var(--muted);
  color: var(--text);
}

.confirm-dialog-ok {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.confirm-dialog-ok:hover {
  border-color: var(--accent);
  color: #fff;
  filter: brightness(0.95);
}

/* Browse art overlay */
.browse-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: #0f0f0f;
  display: flex;
  flex-direction: column;
  color: #fff;
}

.browse-overlay.hidden {
  display: none !important;
}

.browse-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 14px 56px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.browse-mode-tabs {
  display: flex;
  gap: 6px;
  padding: 4px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.08);
}

.browse-mode-tab {
  padding: 8px 18px;
  border: none;
  border-radius: 100px;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.browse-mode-tab.active {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.browse-mode-tab:hover:not(.active) {
  color: rgba(255, 255, 255, 0.85);
}

.browse-mode-tabs.hidden {
  display: none;
}

.browse-back-gallery {
  position: absolute;
  left: 14px;
  top: 12px;
  z-index: 4;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 100px;
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.browse-back-gallery:hover {
  background: rgba(0, 0, 0, 0.55);
  border-color: rgba(255, 255, 255, 0.35);
}

.browse-back-gallery.hidden {
  display: none;
}

.browse-close {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 3;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 1.25rem;
  cursor: pointer;
}

.browse-gallery {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.browse-gallery.hidden {
  display: none !important;
}

.browse-gallery-behind {
  flex: 1;
  min-height: 0;
  filter: brightness(0.4);
  pointer-events: none;
}

.browse-gallery-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.browse-gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 10px;
}

.browse-gallery-empty {
  grid-column: 1 / -1;
  padding: 48px 20px;
  text-align: center;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.85rem;
}

.browse-gallery-cell {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}

.browse-gallery-cell.in-plan {
  outline: 2px solid #c9a87c;
  outline-offset: -2px;
}

.browse-gallery-open {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

.browse-gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: rgba(255, 255, 255, 0.04);
}

.browse-gallery-img[data-src]:not([src]) {
  opacity: 0;
}

.browse-gallery-add {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: background 0.2s, transform 0.15s;
}

.browse-gallery-add:hover {
  background: rgba(0, 0, 0, 0.75);
  transform: scale(1.05);
}

.browse-gallery-add.in-plan {
  background: #c9a87c;
  color: #111;
}

.browse-gallery-sentinel {
  height: 1px;
}

.browse-slides {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
}

.browse-slides.hidden {
  display: none !important;
}

.browse-slides-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  top: 57px;
  z-index: 5;
  background: #0f0f0f;
  animation: browse-detail-in 0.22s ease-out;
}

@keyframes browse-detail-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.browse-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
}

.browse-prev {
  left: 16px;
}

.browse-next {
  right: 16px;
}

.browse-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 56px 72px 0;
}

.browse-image {
  flex: 1;
  min-height: 0;
  max-height: 62vh;
  width: 100%;
  object-fit: contain;
  object-position: center bottom;
}

.browse-image.hidden {
  display: none;
}

.browse-placeholder {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.browse-placeholder.hidden {
  display: none;
}

.browse-info {
  padding: 20px 0 12px;
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}

.browse-counter {
  margin: 0 0 8px;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

.browse-title {
  margin: 0 0 6px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.25;
}

.browse-venue {
  margin: 0 0 6px;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.75);
}

.browse-meta {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.55);
}

.browse-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  padding: 16px 20px 24px;
}

.browse-action {
  padding: 12px 22px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: transparent;
  color: #fff;
}

.browse-add {
  background: #fff;
  color: #111;
  border-color: #fff;
}

.browse-add.in-plan {
  background: rgba(201, 168, 124, 0.95);
  border-color: rgba(201, 168, 124, 0.95);
  color: #111;
}

/* Plan drawer */
.plan-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 1900;
  width: min(380px, 100%);
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: -8px 0 32px rgba(26, 26, 26, 0.12);
  display: flex;
  flex-direction: column;
}

.plan-drawer.hidden {
  display: none !important;
}

.plan-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 18px 12px;
  border-bottom: 1px solid var(--border-light);
}

.plan-drawer-header h2 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.35rem;
}

.plan-drawer-close {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--text-soft);
}

.plan-drawer-empty {
  padding: 20px 18px;
  color: var(--muted);
  font-size: 0.85rem;
}

.plan-drawer-empty.hidden {
  display: none;
}

.plan-drawer-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px;
  min-height: 0;
}

.plan-drawer-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid transparent;
}

.plan-drawer-item:hover {
  background: var(--surface-warm);
  border-color: var(--border-light);
}

.plan-drawer-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.plan-drawer-thumb-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-warm);
  color: var(--muted);
  font-size: 0.75rem;
}

.plan-drawer-item-body {
  flex: 1;
  min-width: 0;
  font-size: 0.78rem;
  line-height: 1.35;
}

.plan-drawer-item-body strong {
  display: block;
  font-size: 0.82rem;
  color: var(--text);
}

.plan-drawer-item-body span {
  color: var(--muted);
}

.plan-drawer-remove {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  cursor: pointer;
  color: var(--muted);
}

.plan-drawer-footer {
  display: flex;
  gap: 8px;
  padding: 14px 16px;
  border-top: 1px solid var(--border-light);
}

.plan-share-btn,
.plan-clear-btn {
  flex: 1;
  padding: 10px 14px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

.plan-share-btn {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.plan-share-status {
  font-size: 0.75rem;
  color: var(--muted);
}

.plan-share-status.hidden {
  display: none;
}

.detail-plan-toggle.in-plan {
  background: var(--highlight);
  border-color: var(--highlight);
  color: #111;
}

.detail-action.detail-plan-toggle {
  cursor: pointer;
}

/* Shared plan page */
body.plan-page {
  background: var(--bg);
}

#plan-app {
  height: 100vh;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.plan-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.plan-header h1 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.5rem;
}

.plan-subtitle {
  margin: 4px 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.plan-home-link {
  font-size: 0.82rem;
  color: var(--text-soft);
  text-decoration: none;
  white-space: nowrap;
}

.plan-home-link:hover {
  color: var(--text);
}

.plan-layout {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  min-height: 0;
}

.plan-map-wrap {
  min-height: 0;
  min-width: 0;
}

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

.plan-list-sidebar {
  border-left: 1px solid var(--border);
  background: var(--surface);
  overflow-y: auto;
  min-height: 0;
}

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

.plan-card {
  display: grid;
  grid-template-columns: 28px 88px 1fr;
  gap: 10px 12px;
  padding: 12px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
}

.plan-card.focused {
  border-color: var(--highlight);
  box-shadow: 0 0 0 2px rgba(201, 168, 124, 0.25);
}

.plan-card-num {
  grid-row: 1 / span 2;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--highlight);
  line-height: 1;
  padding-top: 4px;
}

.plan-card-img {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.plan-card-img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-warm);
  color: var(--muted);
  font-size: 0.68rem;
}

.plan-card-body h2 {
  margin: 0 0 4px;
  font-size: 0.95rem;
  font-weight: 600;
}

.plan-card-title {
  margin: 0 0 4px;
  font-size: 0.82rem;
  font-style: italic;
  color: var(--text-soft);
}

.plan-card-venue {
  margin: 0 0 6px;
  font-size: 0.78rem;
  color: var(--muted);
}

.plan-card-meta {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--text-soft);
}

.plan-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.plan-pin-inner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

@media (max-width: 800px) {
  .browse-gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    padding: 8px;
  }

  .browse-stage {
    padding: 48px 56px 0;
  }

  .plan-layout {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(200px, 42%) 1fr;
  }

  .plan-list-sidebar {
    border-left: none;
    border-top: 1px solid var(--border);
  }

  .plan-drawer {
    width: 100%;
  }
}
