/* ============== mostredifotografia.it ============== */

@import url('https://api.fontshare.com/v2/css?f[]=switzer@300,400,500,600,700&f[]=jetbrains-mono@400,500&display=swap');

:root {
  --bg: #f7f5f1;
  --bg-2: #efeae1;
  --paper: #fdfbf7;
  --ink: #161614;
  --ink-2: #2b2a28;
  --muted: #8b8275;
  --muted-2: #b8b1a3;
  --rule: #1a1a1a;
  --rule-soft: #d9d3c6;
  --accent: #c84a1a;
  --accent-soft: rgba(200, 74, 26, 0.08);
  --current-tint: #f0ead8;

  --font-sans: "Switzer", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --header-h: 64px;
  --filter-h: 52px;
  --sidebar-w: 460px;
  --detail-w: 520px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
  padding: 0;
}

a { color: inherit; text-decoration: none; }

/* ============== Layout shell ============== */

.app {
  display: grid;
  grid-template-rows: var(--header-h) auto 1fr;
  height: 100vh;
}

.app-body {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 0;
  border-top: 1px solid var(--rule);
}
.app-body.with-detail {
  grid-template-columns: var(--sidebar-w) var(--detail-w) 1fr;
}

/* ============== Header ============== */

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.brand-mark {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
}
.brand-mark .dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  margin: 0 2px;
  transform: translateY(-1px);
}
.brand-tld {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.header-meta .sep { color: var(--muted-2); }
.header-meta strong { color: var(--ink); font-weight: 500; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.icon-btn {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 4px;
  color: var(--ink-2);
  position: relative;
}
.icon-btn:hover { background: var(--bg-2); }
.icon-btn .badge {
  position: absolute;
  top: 4px; right: 4px;
  background: var(--accent);
  color: white;
  font-family: var(--font-mono);
  font-size: 9px;
  border-radius: 8px;
  padding: 1px 4px;
  line-height: 1;
}

/* ============== Filter bar ============== */

.filterbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding: 10px 20px 10px 24px;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
  gap: 10px 16px;
  min-height: var(--filter-h);
}
.filterbar .filter-chips {
  flex: 1 1 auto;
  min-width: 0;
}
.filter-sep {
  width: 1px;
  height: 18px;
  background: var(--rule-soft);
  margin: 0 4px;
  flex: 0 0 auto;
}
.filterbar-left {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.filterbar-left .count {
  background: var(--ink);
  color: var(--bg);
  padding: 3px 7px;
  border-radius: 3px;
  font-weight: 500;
}
.filter-chips {
  display: flex; flex-wrap: wrap; gap: 6px;
  align-items: center;
}
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 999px;
  border: 1px solid var(--rule-soft);
  background: transparent;
  color: var(--ink-2);
  transition: all 120ms;
  white-space: nowrap;
}
.chip:hover { border-color: var(--ink); }
.chip.active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}
.chip .x { opacity: 0.6; font-size: 13px; line-height: 1; }
.chip-weekend.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.sort-select {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.sort-select select {
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 500;
  color: var(--ink);
  border: 1px solid var(--rule-soft);
  background: var(--bg);
  padding: 5px 26px 5px 10px;
  border-radius: 4px;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23161614' stroke-width='1.4' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  cursor: pointer;
}

/* ============== Sidebar ============== */

.sidebar {
  border-right: 1px solid var(--rule);
  background: var(--paper);
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
  position: relative;
}
.sidebar::-webkit-scrollbar { width: 8px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--rule-soft); border-radius: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }

.month-block { padding: 0; }

.month-head {
  position: sticky;
  top: 0;
  background: var(--paper);
  z-index: 5;
  padding: 18px 22px 10px;
  border-bottom: 1px solid var(--rule-soft);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.month-head-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.month-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.month-title h2 {
  font-size: 22px;
  margin: 0;
  letter-spacing: -0.02em;
  font-weight: 600;
}
.month-title .year {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}
.month-count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Gantt timeline */
.gantt {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 0 6px;
}
.gantt-axis {
  position: relative;
  height: 14px;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--muted);
}
.gantt-axis .tick {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  text-align: center;
}
.gantt-axis .tick.major { color: var(--ink); }
.gantt-track {
  position: relative;
  height: 6px;
  background: var(--bg-2);
  border-radius: 2px;
}
.gantt-bar {
  position: absolute;
  top: 0; bottom: 0;
  background: var(--ink);
  border-radius: 2px;
  cursor: pointer;
  transition: opacity 120ms;
}
.gantt-bar.current {
  background: var(--accent);
}
.gantt-bar.dim { opacity: 0.35; }
.gantt-bar:hover { opacity: 1 !important; height: 10px; top: -2px; }
.gantt-today {
  position: absolute;
  top: -3px; bottom: -3px;
  width: 1px;
  background: var(--accent);
  z-index: 2;
}
.gantt-today::before {
  content: '';
  position: absolute;
  top: -3px;
  left: -3px;
  width: 7px; height: 7px;
  background: var(--accent);
  border-radius: 50%;
}

.month-list { padding: 6px 0 18px; }

.event-card {
  display: grid;
  grid-template-columns: 84px 1fr auto;
  gap: 14px;
  padding: 16px 22px 16px 20px;
  border-bottom: 1px solid var(--rule-soft);
  position: relative;
  cursor: pointer;
  transition: background 120ms;
  border-left: 3px solid transparent;
}
.event-card:hover { background: var(--bg); }
.event-card.selected {
  background: var(--bg);
  border-left-color: var(--ink);
}
.event-card.current {
  background: var(--current-tint);
  border-left-color: var(--accent);
}
.event-card.current.selected { background: #ece3cb; }

.event-thumb {
  width: 84px; height: 84px;
  background: var(--bg-2);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
  background-size: cover;
  background-position: center;
}
.event-thumb.no-img {
  background:
    repeating-linear-gradient(135deg, transparent 0 6px, rgba(0,0,0,0.04) 6px 7px),
    var(--bg-2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.event-thumb.no-img::after {
  content: 'NO IMG';
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--muted);
  letter-spacing: 0.08em;
}

.event-body { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.event-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.event-eyebrow .city {
  color: var(--ink);
  font-weight: 500;
}
.event-eyebrow .type-tag::before {
  content: '/ ';
  color: var(--muted-2);
}
.event-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.012em;
  line-height: 1.22;
  color: var(--ink);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.event-card.current .event-title { font-size: 18px; }
.event-sede {
  font-size: 12px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.event-dates {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-2);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}
.event-dates .dash { color: var(--muted); }
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 2px;
  color: var(--accent);
  background: rgba(200, 74, 26, 0.12);
  font-weight: 500;
}
.status-pill .dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent);
  animation: blink 2s infinite;
}
@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0.35; }
}

.event-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
}
.like-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px 4px 6px;
  border-radius: 999px;
  border: 1px solid var(--rule-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-2);
  transition: all 150ms;
  background: var(--paper);
}
.like-btn:hover { border-color: var(--accent); color: var(--accent); }
.like-btn.liked {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.like-btn svg { width: 12px; height: 12px; }
.like-btn.liked svg { fill: white; }

.event-num {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* ============== Detail panel ============== */

.detail-panel {
  background: var(--paper);
  border-right: 1px solid var(--rule);
  overflow-y: auto;
  min-height: 0;
  position: relative;
  animation: slideIn 240ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
@keyframes slideIn {
  from { transform: translateX(-12px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
.detail-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(0,0,0,0.55);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  z-index: 4;
}
.detail-close:hover { background: rgba(0,0,0,0.8); }

.detail-hero {
  height: 280px;
  background: var(--bg-2);
  background-size: cover;
  background-position: center;
  position: relative;
}
.detail-hero.no-img {
  background:
    repeating-linear-gradient(135deg, transparent 0 10px, rgba(0,0,0,0.05) 10px 11px),
    var(--bg-2);
  display: flex; align-items: center; justify-content: center;
}
.detail-hero.no-img::after {
  content: 'IMMAGINE NON DISPONIBILE';
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.06em;
}
.detail-hero-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 20px 24px 16px;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  color: white;
}
.detail-hero-overlay .eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.9;
}

.detail-body {
  padding: 24px 28px 32px;
}
.detail-status {
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
  flex-wrap: wrap;
}

.detail-title {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 18px;
}
.detail-author {
  font-size: 14px;
  color: var(--muted);
  margin-top: -10px;
  margin-bottom: 18px;
  font-style: italic;
}

.detail-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 18px;
  padding: 16px 0;
  border-top: 1px solid var(--rule-soft);
  border-bottom: 1px solid var(--rule-soft);
  margin-bottom: 20px;
}
.meta-item .label {
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 4px;
  display: block;
}
.meta-item .value {
  font-size: 13px;
  color: var(--ink);
  font-weight: 500;
}
.meta-item .value.mono { font-family: var(--font-mono); font-size: 12px; }

.detail-description {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-2);
  text-wrap: pretty;
  margin-bottom: 20px;
}

.detail-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 4px;
  transition: all 150ms;
}
.btn.primary {
  background: var(--ink);
  color: var(--paper);
}
.btn.primary:hover { background: var(--accent); }
.btn.secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--rule-soft);
}
.btn.secondary:hover { border-color: var(--ink); }

.detail-mini-timeline {
  padding: 14px 0;
  border-top: 1px solid var(--rule-soft);
}
.detail-mini-timeline .label {
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 8px;
  display: flex; justify-content: space-between;
}

/* ============== Map ============== */

.map-wrap {
  position: relative;
  min-height: 0;
  background: var(--bg);
}
#map {
  width: 100%;
  height: 100%;
  background: var(--bg-2);
}

/* leaflet override for clean look */
.leaflet-container {
  font-family: var(--font-sans);
  background: var(--bg);
}
.leaflet-control-attribution {
  font-family: var(--font-mono);
  font-size: 9px;
  background: rgba(247, 245, 241, 0.85) !important;
  color: var(--muted) !important;
}
.leaflet-control-attribution a { color: var(--ink-2) !important; }
.leaflet-control-zoom {
  border: 1px solid var(--rule) !important;
  border-radius: 4px !important;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04) !important;
}
.leaflet-control-zoom a {
  background: var(--paper) !important;
  color: var(--ink) !important;
  border-color: var(--rule-soft) !important;
  font-family: var(--font-sans) !important;
  font-weight: 400 !important;
}
.leaflet-control-zoom a:hover {
  background: var(--bg-2) !important;
}

/* Map search */
.map-search {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  max-width: 420px;
  z-index: 500;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 4px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  padding: 0 12px;
  height: 42px;
  gap: 10px;
}
.map-search svg { flex: 0 0 auto; color: var(--muted); }
.map-search input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--ink);
  min-width: 0;
}
.map-search input::placeholder { color: var(--muted); }
.map-search .clear {
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--bg-2);
  color: var(--muted);
  font-size: 14px;
}
.map-search .clear:hover { background: var(--rule-soft); color: var(--ink); }

.map-search-suggestions {
  position: absolute;
  top: 48px;
  left: 0; right: 0;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 4px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  overflow: hidden;
  max-height: 280px;
  overflow-y: auto;
}
.map-search-suggestions .sugg {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  font-size: 13px;
  border-bottom: 1px solid var(--rule-soft);
  cursor: pointer;
}
.map-search-suggestions .sugg:last-child { border-bottom: none; }
.map-search-suggestions .sugg:hover { background: var(--bg); }
.map-search-suggestions .sugg .count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}

/* Map pins */
.poi-pin {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 2.5px solid var(--ink);
  background: var(--paper);
  background-size: cover;
  background-position: center;
  box-shadow: 0 3px 8px rgba(0,0,0,0.2);
  cursor: pointer;
  position: relative;
  transition: transform 150ms, border-color 150ms;
}
.poi-pin::after {
  content: '';
  position: absolute;
  bottom: -7px;
  left: 50%;
  transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 7px solid var(--ink);
}
.poi-pin.current {
  border-color: var(--accent);
}
.poi-pin.current::after { border-top-color: var(--accent); }
.poi-pin.no-img {
  background:
    repeating-linear-gradient(45deg, var(--bg-2) 0 3px, var(--paper) 3px 6px);
}
.poi-pin:hover {
  transform: scale(1.1);
  z-index: 1000 !important;
}
.poi-pin.selected {
  transform: scale(1.25);
  border-width: 3px;
  z-index: 1001 !important;
}
.poi-pin .num-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--paper);
}

/* City label cluster (when same coords, e.g. Milano has 3) */
.city-cluster-count {
  position: absolute;
  bottom: -6px; right: -6px;
  background: var(--accent);
  color: white;
  font-family: var(--font-mono);
  font-size: 10px;
  min-width: 18px; height: 18px;
  border-radius: 9px;
  border: 1.5px solid var(--paper);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600;
  padding: 0 4px;
}

/* Ad banners */
.ad-banner {
  margin: 0 22px 14px;
  padding: 18px 16px;
  background: var(--paper);
  border: 1px dashed var(--muted-2);
  border-radius: 4px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ad-banner .ad-label {
  position: absolute;
  top: 6px;
  right: 8px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
}
.ad-banner.ad-rect {
  height: 130px;
  align-items: center;
  justify-content: center;
  background:
    repeating-linear-gradient(135deg, transparent 0 8px, rgba(0,0,0,0.02) 8px 9px),
    var(--paper);
}
.ad-banner .ad-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
}
.ad-banner .ad-sub {
  font-size: 11px;
  color: var(--muted);
}
.ad-mid {
  background: linear-gradient(135deg, #2b2a28 0%, #4a423a 100%);
  color: #f2ece1;
  border: none;
  padding: 22px 20px;
}
.ad-mid .ad-label { color: rgba(255,255,255,0.6); }
.ad-mid .ad-title { color: #fff; font-size: 16px; }
.ad-mid .ad-sub { color: rgba(255,255,255,0.7); }
.ad-mid .ad-cta {
  margin-top: 8px;
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 8px 14px;
  background: var(--accent);
  color: white;
  border-radius: 2px;
}

.map-ad {
  position: absolute;
  bottom: 30px;
  left: 16px;
  z-index: 500;
  width: 240px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 14px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}
.map-ad .ad-label {
  position: absolute; top: 4px; right: 6px;
  font-family: var(--font-mono); font-size: 9px;
  color: var(--muted); letter-spacing: 0.1em;
}
.map-ad .ad-title { font-size: 13px; font-weight: 600; margin-top: 6px; }
.map-ad .ad-sub { font-size: 11px; color: var(--muted); margin-top: 4px; }
.map-ad .ad-close {
  position: absolute; top: 4px; left: 6px;
  width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 14px;
  border-radius: 50%;
}
.map-ad .ad-close:hover { background: var(--bg-2); color: var(--ink); }

/* Empty state */
.empty {
  padding: 60px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.empty h3 {
  font-size: 16px; color: var(--ink); margin: 0 0 6px;
  font-weight: 500;
}

/* Misc */
.divider-thick {
  border-top: 1px solid var(--rule);
  margin: 0;
}

/* Hide Tweaks panel toggle area styles override */
.event-card-skel { display: none; }

ins.adsbygoogle { display: block; }

.app-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  font-family: var(--font-mono);
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.1em;
}

/* ============== Cookie Banner ============== */

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2000;
  background: var(--ink);
  color: var(--bg);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 2px solid var(--accent);
}

.cookie-banner-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(247, 245, 241, 0.85);
}

.cookie-banner-text a {
  color: var(--bg);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-banner-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.cookie-banner .btn.secondary {
  background: transparent;
  color: var(--bg);
  border-color: rgba(247, 245, 241, 0.3);
  white-space: nowrap;
}
.cookie-banner .btn.secondary:hover {
  border-color: var(--bg);
  background: transparent;
}

.cookie-banner .btn.primary {
  background: var(--accent);
  color: white;
  border: none;
  white-space: nowrap;
}
.cookie-banner .btn.primary:hover {
  background: #e0541f;
}

@media (max-width: 768px) {
  .cookie-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
  }
  .cookie-banner-actions {
    width: 100%;
  }
  .cookie-banner-actions .btn {
    flex: 1;
    justify-content: center;
  }
}

/* ============== Mobile ============== */

@keyframes slideUpMobile {
  from { transform: translateY(16px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

@media (max-width: 768px) {
  /* Titolo compatto */
  .header {
    padding: 0 16px;
  }
  .header-meta {
    display: none;
  }

  /* Nascondi filtri */
  .filterbar {
    display: none;
  }

  /* App body: solo lista, occupa tutto */
  .app-body,
  .app-body.with-detail {
    grid-template-columns: 1fr;
  }

  /* Nascondi mappa */
  .map-wrap {
    display: none;
  }

  /* Sidebar full-width */
  .sidebar {
    border-right: none;
  }

  /* Quando detail apre: nasconde sidebar, detail occupa tutto in flow normale */
  .app-body.with-detail .sidebar {
    display: none;
  }

  .detail-panel {
    position: relative;
    border-right: none;
    animation: slideUpMobile 260ms cubic-bezier(0.2, 0.7, 0.2, 1);
  }

  /* Tasto chiudi più grande e visibile su mobile */
  .detail-close {
    top: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
  }

  /* Pulsanti azioni: wrappano se serve */
  .detail-actions {
    flex-wrap: wrap;
  }
  .btn {
    flex: 1 1 auto;
    justify-content: center;
  }
}
