:root {
  --bg:         #0f0f0f;
  --surface:    #1a1a1a;
  --surface2:   #242424;
  --border:     #2e2e2e;
  --text:       #e8e8e8;
  --text-muted: #888;
  --accent:     #c8a95e;
  --accent-dim: #8a6e33;
  --red:        #e05555;
  --green:      #4caf7d;
  --blue:       #5b9bd5;
  --purple:     #9b6dff;
  --orange:     #e07a30;
  --radius:     10px;
  --shadow:     0 4px 24px rgba(0,0,0,0.5);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

#calendar-app {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* ── Header ── */
.cal-header { margin-bottom: 1.5rem; }

.cal-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.cal-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.cal-view-toggle { display: flex; gap: 0.25rem; }

.view-btn {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.4rem 0.65rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.15s;
}
.view-btn.active, .view-btn:hover {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}

.cal-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.filter-group { display: flex; gap: 0.25rem; flex-wrap: wrap; }

.filter-btn {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.15s;
  white-space: nowrap;
}
.filter-btn.active, .filter-btn:hover {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}

.filter-toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  cursor: pointer;
  margin-left: auto;
}

/* ── List View ── */
.cal-list { display: flex; flex-direction: column; gap: 0; }

.cal-date-group { margin-bottom: 1.5rem; }

.cal-date-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.5rem;
}

.cal-entry {
  display: flex;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
  border-radius: 6px;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}
.cal-entry:hover { background: var(--surface2); }

.entry-thumb {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--surface2);
}
.entry-thumb-placeholder {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

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

.entry-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.2rem;
}

.entry-type-pill {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  flex-shrink: 0;
}
.entry-type-pill.event   { background: rgba(91,155,213,0.2); color: var(--blue); }
.entry-type-pill.release { background: rgba(155,109,255,0.2); color: var(--purple); }

.entry-game {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.entry-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.entry-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

.entry-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.entry-badges {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
  margin-top: 0.35rem;
}

.badge {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.badge-green  { background: rgba(76,175,125,0.2); color: var(--green); }
.badge-blue   { background: rgba(91,155,213,0.2); color: var(--blue); }
.badge-purple { background: rgba(155,109,255,0.2); color: var(--purple); }
.badge-red    { background: rgba(224,85,85,0.2); color: var(--red); }
.badge-orange { background: rgba(224,122,48,0.2); color: var(--orange); }
.badge-gray   { background: rgba(136,136,136,0.15); color: var(--text-muted); }

.entry-actions {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

/* ── Grid View ── */
.cal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.grid-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.grid-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.grid-card-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  background: var(--surface2);
}
.grid-card-img-placeholder {
  width: 100%;
  height: 140px;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.grid-card-body { padding: 0.85rem; }

.grid-card-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.4rem;
}

.grid-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}
.grid-card-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}
.grid-card-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}
.grid-card-badges { margin-bottom: 0.75rem; display: flex; gap: 0.3rem; flex-wrap: wrap; }
.grid-card-actions { display: flex; flex-direction: column; gap: 0.4rem; }

/* ── Calendar Month View ── */
.cal-month { display: block; }
.cal-month.hidden { display: none; }

.month-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.month-nav button {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  cursor: pointer;
}
.month-nav h2 { font-size: 1rem; font-weight: 600; }

.month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.month-day-header {
  text-align: center;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  padding: 0.4rem 0;
}
.month-day {
  min-height: 80px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.35rem;
}
.month-day.other-month { opacity: 0.35; }
.month-day.today { border-color: var(--accent); }
.month-day-num {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}
.month-day.today .month-day-num { color: var(--accent); }
.month-event-dot {
  font-size: 0.65rem;
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.month-event-dot.event   { background: rgba(91,155,213,0.25); color: var(--blue); }
.month-event-dot.release { background: rgba(155,109,255,0.25); color: var(--purple); }

/* ── Buttons ── */
.btn {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  font-family: inherit;
}
.btn-primary  { background: var(--accent); color: #000; }
.btn-primary:hover  { background: #e0c07a; }
.btn-secondary { background: var(--surface2); border: 1px solid var(--border); color: var(--text); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--text-muted); }
.btn-disabled { background: var(--surface2); border: 1px solid var(--border); color: var(--text-muted); cursor: default; opacity: 0.6; pointer-events: none; }

/* ── Modal ── */
.cal-modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; }
.cal-modal.hidden { display: none; }

.cal-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.75);
  cursor: pointer;
}

.cal-modal-box {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  /* WIDE ON A DESKTOP, NARROW ON A PHONE.
     Roger, 2026-08-09: "smaller is needed for mobile, but for a computer screen I'd love
     the wider size."

     560px was a phone width being served to everybody. These descriptions are long and
     structured; at 560 they became a column of short broken lines with the map and the
     buttons pushed well below the fold. The clamp gives a phone the full width it has and
     a desktop something worth reading, without a breakpoint to maintain. */
  width: clamp(320px, 92vw, 1000px);
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
  padding: 1.5rem;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1rem;
}
.modal-type-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.5rem;
}
.modal-title { font-size: 1.3rem; font-weight: 700; margin-bottom: 0.25rem; }
.modal-subtitle { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 0.75rem; }
.modal-detail-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}
.modal-detail-item { font-size: 0.82rem; color: var(--text-muted); }
.modal-detail-item strong { color: var(--text); }
.modal-description {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1rem;
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
}
.modal-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.modal-ticket-types { margin: 0.75rem 0; }
.modal-ticket-types h4 { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.5rem; }
.ticket-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}
.ticket-row:last-child { border-bottom: none; }
.ticket-price { color: var(--accent); font-weight: 600; }

.cal-loading { color: var(--text-muted); padding: 2rem; text-align: center; }
.cal-empty { color: var(--text-muted); padding: 2rem; text-align: center; font-size: 0.9rem; }

/* Subscribe form */
.subscribe-banner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-top: 2rem;
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}
.subscribe-banner p { flex: 1; font-size: 0.85rem; color: var(--text-muted); min-width: 200px; }
.subscribe-banner select, .subscribe-banner input[type="email"] {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.4rem 0.65rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-family: inherit;
}

@media (max-width: 600px) {
  .cal-entry { flex-wrap: wrap; }
  .entry-actions { width: 100%; }
  .cal-header-top { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
}

/* ══════════════════════════════════════════════════════════════════════════
   CASTLE BACKGROUND

   The storefront behind the calendar instead of flat colour. Roger: the old
   BinderPOS calendar had a background and it read better than white.

   The whole problem with a photographic background is contrast — a busy image
   under text makes both harder to read. So the photo is not the surface the
   content sits on; it sits BEHIND a scrim, and every box the eye needs to land
   on is made deliberately more solid than it was on flat colour.
   ══════════════════════════════════════════════════════════════════════════ */

body {
  /* Fixed, so the castle stays put while the calendar scrolls over it —
     the alternative drags the building up the screen and reads as a mistake. */
  /* Scrim graded top-to-bottom: light enough at the top that the castle actually
     reads, heavier further down where the content is dense. A flat 0.85 hid the
     building completely, which defeats the point of having it there. */
  background:
    linear-gradient(rgba(10,10,10,0.45) 0%, rgba(10,10,10,0.72) 45%, rgba(10,10,10,0.86) 100%),
    url('/static/img/castle-bg.jpg') center top / cover no-repeat fixed,
    var(--bg);
}

/* iOS ignores background-attachment: fixed and stretches the image instead.
   A separate fixed layer behaves the same everywhere. */
@supports (-webkit-touch-callout: none) {
  body { background-attachment: scroll; }
}

/* ── Boxes have to win against the photo ──
   Slightly translucent rather than opaque, so the stonework still reads
   through and the page does not look like panels pasted onto a picture.
   The blur is what keeps text legible over the busy areas. */
.grid-card,
.month-day,
.cal-modal-box,
/* The list is one panel, not a stack of them — the rows are separated by
   dividers, and giving each its own translucent card would turn a clean list
   into a pile of floating slabs. */
.cal-list {
  /* LIGHTER than the scrimmed background, not darker. A dark panel on a dark
     backdrop has no edge — the eye needs the box to lift off the photo, and the
     way to do that is contrast in the other direction plus a visible rim. */
  background: rgba(34, 34, 37, 0.94);
  backdrop-filter: blur(10px) saturate(0.9);
  -webkit-backdrop-filter: blur(10px) saturate(0.9);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.65);
}

/* The list panel needs breathing room now that it is a panel rather than bare
   rows sitting on the page background. */
.cal-list {
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
}
.cal-list .cal-entry:last-child { border-bottom: none; }

/* Days outside the month were dimmed with opacity, which over a photo makes the
   PHOTO show through and the cell look broken rather than inactive. Dim the text
   instead and leave the panel intact. */
.month-day.other-month {
  opacity: 1;
  background: rgba(26, 26, 26, 0.55);
}
.month-day.other-month .month-day-num,
.month-day.other-month .month-event-dot { opacity: 0.4; }

/* Today should be obvious at a glance across a busy grid. */
.month-day.today {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 2px 16px rgba(200, 169, 94, 0.25);
}

/* Event chips sit inside an already-translucent cell, so they need to be solid
   or they turn to mush against the stonework. */
.month-event-dot {
  background-color: rgba(0, 0, 0, 0.35);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

/* The header sits over the brightest part of the photo — the sky. */
.cal-header h1 { text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8); }

.cal-header {
  background: rgba(24, 24, 26, 0.80);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--radius);
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.07);
}

/* Someone who has turned down motion or transparency in their OS has said they
   find this sort of thing uncomfortable. Take them at their word. */
@media (prefers-reduced-transparency: reduce) {
  body { background: var(--bg); }
  .grid-card, .month-day, .cal-modal-box, .cal-list, .cal-header {
    background: var(--surface);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

/* ── Day drill-down ──
   Clicking a day opens it in place, under its own week. Not a modal: a modal
   covers the calendar, and the usual reason for opening a day is to see it
   against the days around it. */

.month-day.has-entries { cursor: pointer; transition: border-color 0.12s, transform 0.12s; }
.month-day.has-entries:hover {
  border-color: var(--accent-dim);
  transform: translateY(-1px);
}
.month-day.has-entries:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* The open day stays marked while its panel is showing, so it is obvious which
   cell the panel below belongs to. */
.month-day.is-open {
  border-color: var(--accent);
  background: rgba(52, 46, 30, 0.92);
}

.day-expand {
  /* Span the full week row — the panel belongs to the week, not to one column. */
  grid-column: 1 / -1;
  margin: 0.35rem 0 0.6rem;
  background: rgba(34, 34, 37, 0.96);
  border: 1px solid var(--accent-dim);
  border-radius: var(--radius);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  animation: day-expand-in 0.16s ease-out;
}

@keyframes day-expand-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .day-expand { animation: none; }
  .month-day.has-entries:hover { transform: none; }
}

.day-expand-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.9rem;
  background: rgba(200, 169, 94, 0.10);
  border-bottom: 1px solid var(--border);
}
.day-expand-head h3 { font-size: 0.95rem; font-weight: 600; color: var(--accent); }
.day-expand-count { font-size: 0.75rem; color: var(--text-muted); margin-right: auto; }
.day-expand-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
}
.day-expand-close:hover { color: var(--text); background: var(--surface2); }

.day-expand-body { padding: 0.25rem 0.9rem 0.6rem; }
.day-expand-body .cal-entry:last-child { border-bottom: none; }

/* Generic hidden. `render()` has always added `.hidden` to the list element when
   switching to calendar view, but only `.cal-month.hidden` and `.cal-modal.hidden`
   were ever defined — so the list was never actually hidden. It went unnoticed
   because the list had no background of its own; giving it a panel made a stale
   "Loading…" box appear above the calendar. */
.hidden { display: none !important; }

/* The expanded day carries text, so it has to be solid. The month CELLS can afford
   to let the stonework through — an empty cell reading as a window onto the photo
   is fine, a paragraph over a lit archway is not. */
.day-expand {
  background: #1e1e21;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* ── Month view: icons, not titles ──
   Six event titles in a day cell is unreadable at any column width; six icons is a
   glance. The name is on hover, and clicking the day expands the full list. */

.month-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  align-content: flex-start;
}

.month-icon {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
  border: 1px solid color-mix(in srgb, var(--chip) 55%, transparent);
  background: color-mix(in srgb, var(--chip) 22%, rgba(0,0,0,0.35));
  border-radius: 6px;
  cursor: pointer;
  padding: 0;
  transition: transform 0.1s, border-color 0.1s;
}
.month-icon:hover {
  transform: scale(1.15);
  border-color: var(--chip);
  z-index: 2;
}
.month-icon:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.month-icon img { width: 18px; height: 18px; object-fit: contain; }

.month-icon-more {
  font-size: 11px;
  color: var(--text-muted);
  align-self: center;
  padding-left: 2px;
}

/* Day cells need room for a couple of icon rows now. */
.month-day { min-height: 92px; }

/* Game icon standing in for a missing event image, in list and grid.
   Tinted per game so a row is identifiable before the title is read. */
.entry-thumb-placeholder,
.grid-card-img-placeholder {
  background: color-mix(in srgb, var(--chip, var(--surface2)) 20%, var(--surface2));
}
.entry-thumb-icon { object-fit: contain; padding: 6px; background: var(--surface2); }
.grid-card-img-placeholder img { width: 64px; height: 64px; object-fit: contain; }

/* ── EVENT DESCRIPTION ────────────────────────────────────────────────────────────────
   Now real HTML rather than escaped text, so it needs the elements styled. These
   descriptions are long, structured and emoji-heavy — headings, nested bullets, the odd
   link — and unstyled they run together into a wall. */
.modal-description { line-height: 1.55; font-size: .93rem; }
.modal-description > *:first-child { margin-top: 0; }
.modal-description p { margin: 0 0 .7rem; }
.modal-description strong { color: var(--text, #fff); font-weight: 700; }
.modal-description em { opacity: .9; }
.modal-description ul,
.modal-description ol { margin: 0 0 .7rem; padding-left: 1.35rem; }
.modal-description li { margin-bottom: .35rem; }
.modal-description li > ul,
.modal-description li > ol { margin-top: .35rem; }
.modal-description a { color: var(--accent, #d4a24a); text-decoration: underline; }
/* Anything pasted in from elsewhere stays inside the box rather than stretching it. */
.modal-description img { max-width: 100%; height: auto; border-radius: 4px; }
.modal-description table { max-width: 100%; display: block; overflow-x: auto; }

/* The address, not just the shop name — someone who has never been needs to get here. */
.modal-map-link {
  display: inline-block;
  margin-top: .2rem;
  font-size: .82rem;
  font-weight: 400;
  color: var(--accent, #d4a24a);
  text-decoration: none;
  border-bottom: 1px dotted currentColor;
}
.modal-map-link:hover { border-bottom-style: solid; }

/* ── MAP, ADD-TO-CALENDAR, SHARE ──────────────────────────────────────────────────────
   Roger, 2026-08-09, from a screenshot of the paid app: "any way to have that included
   like they do?" Losing these when the app goes would read as a downgrade even though
   the calendar itself is better. */
.modal-map {
  width: 100%;
  height: 300px;
  border: 0;
  border-radius: 6px;
  margin: 1rem 0 .5rem;
  display: block;
}

.modal-share {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border, #333);
}
.btn-ics {
  background: var(--accent, #d4a24a);
  color: #1a1a1a;
  border: 0;
  border-radius: 5px;
  padding: .55rem 1.1rem;
  font-weight: 700;
  font-size: .9rem;
  cursor: pointer;
}
.btn-ics:hover { filter: brightness(1.08); }

.share-icons { display: flex; gap: .45rem; margin-left: auto; }
.share-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border-radius: 5px; border: 1px solid var(--border, #333);
  background: transparent; color: var(--text, #eee);
  font-size: .95rem; font-weight: 700;
  cursor: pointer; text-decoration: none;
}
.share-btn:hover { background: rgba(255,255,255,.08); }

/* On a wide screen the details sit beside the map rather than under it, which is what
   fills the extra width usefully instead of just making the lines longer. */
@media (min-width: 900px) {
  .modal-map { height: 340px; }
  .modal-detail-row { display: flex; flex-wrap: wrap; gap: .4rem 2rem; }
}

/* Captured map image, not a live frame. The overlay says it is clickable — an image of a
   map that does nothing is a thing people poke at and then give up on. */
.modal-map-wrap {
  position: relative;
  display: block;
  margin: 1rem 0 .5rem;
  border-radius: 6px;
  overflow: hidden;
  line-height: 0;
}
.modal-map { width: 100%; height: auto; display: block; border: 0; }
.modal-map-cta {
  position: absolute; right: .6rem; top: .6rem;
  background: rgba(20,20,20,.82); color: #fff;
  font-size: .78rem; font-weight: 600; line-height: 1;
  padding: .4rem .6rem; border-radius: 4px;
}
.modal-map-wrap:hover .modal-map-cta { background: rgba(20,20,20,.95); }
.modal-address { font-size: .85rem; opacity: .75; }
