/* admin.css — the band's calendar admin and the sign-in card: the plain
   theme with Whirligig's colours folded in, so the admin feels like the
   same band as the website without leaving the design system.

   The accent is the logo's green: it fills every primary button (add,
   save, continue) and marks links and the chosen option. Red is kept
   for one thing, deleting a gig, so it always means "careful".

   Measured: #2f6a17 on #fffaf2 6.3:1, on #f7f1e6 5.9:1, white on it
   6.6:1; #8fcf68 on #1a1e27 9.0:1, #0e1a07 on it 9.7:1. */

:root {
  --rst-bg: light-dark(#f7f1e6, #12151c);
  --rst-surface: light-dark(#fffaf2, #1a1e27);
  --rst-surface-2: light-dark(#efe5d3, #161a22);
  --rst-line: light-dark(#dccfb8, #2c3240);
  --rst-accent: light-dark(#2f6a17, #8fcf68);
  --rst-accent-strong: light-dark(#24540f, #a9dd8a);
  --rst-accent-soft: light-dark(#e4eed8, #1f2b1b);
  --rst-on-accent: light-dark(#ffffff, #0e1a07);
  --rst-header-rule: light-dark(#c9dbb8, #33452a);
  --rst-radius: 8px;
  --rst-radius-sm: 6px;
}

/* The band's own marks: the logo on the sign-in card,
   and the website's serif for headings. */
:root { --wg-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif; }
[rst-shell-brand] { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 600; text-decoration: none; }
[rst-shell-brand]:hover { color: var(--rst-accent); }
[rst-shell-brand] .icon { width: 1.1em; height: 1.1em; }
/* The admin's own pages, beside the way back. */
.admin-nav { display: flex; gap: 0.25rem 1.25rem; margin-inline-start: 1.25rem; padding-inline-start: 1.25rem; border-inline-start: 1px solid var(--rst-line); }
.admin-nav a { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--rst-text-muted); font-weight: 600; text-decoration: none; }
.admin-nav a:hover { color: var(--rst-accent); }
.admin-nav a[aria-current="page"] { color: var(--rst-text); text-decoration: underline; text-decoration-color: var(--rst-accent); text-decoration-thickness: 2px; text-underline-offset: 0.45em; }
.narrow-only { display: none; }
[rst-shell-account] .who-icon { display: none; }
[rst-shell-account] .who-icon .icon { width: 1.5rem; height: 1.5rem; }
.menu-who { display: none; margin: 0; padding: 0.5rem 0.75rem; color: var(--rst-text-muted); font-size: 0.9rem; overflow-wrap: anywhere; }
@media (max-width: 560px) {
  .wide-only { display: none; }
  /* The way back is its arrow alone, named for a screen reader. */
  .narrow-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  [rst-shell-brand] { min-height: 2.75rem; min-width: 2.75rem; flex-shrink: 0; }
  .admin-nav { flex-shrink: 0; }
  /* One line on a phone: the address gives way first. */
  [rst-shell-topbar] [rst-shell-bar] { flex-wrap: nowrap; gap: 0.5rem; }
  /* The account menu is its icon alone; the address still names it. */
  [rst-shell-account] .who { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  [rst-shell-account] .who-icon { display: inline-flex; }
  [rst-shell-account] [rst-caret] { display: none; }
  .menu-who { display: block; }
  .admin-nav { margin-inline-start: 0.25rem; padding-inline-start: 0.6rem; gap: 0.7rem; font-size: 0.94rem; }
}
@media (max-width: 370px) { .admin-nav { gap: 0.55rem; font-size: 0.9rem; } }
/* The signed-in menu sits at the bar's end. */
[rst-shell-bar] > [rst-shell-account] { margin-inline-start: auto; min-width: 0; }
/* A long address shortens rather than crowding the way back. */
[rst-shell-account] .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: min(45vw, 22rem); }
[rst-page-header] h1, .gig-dialog h1, [rst-signin] h1, [rst-error] h1, [rst-empty] h2 {
  font-family: var(--wg-serif); letter-spacing: -0.01em;
}
/* tokens.css sizes the mark as a 3rem square icon; the band's mark is
   a wordmark, so it takes a width and keeps its own shape. */
[rst-signin-mark] { inline-size: min(100%, 15rem); block-size: auto; }
[rst-signin-mark] > picture { block-size: auto; }
[rst-signin-mark] img { display: block; width: 100%; height: auto; }
[rst-signin-pitch] { font-family: var(--wg-serif); font-weight: 600; letter-spacing: -0.01em; }
/* The logo already says Whirligig; the name stays for screen readers. */
[rst-signin-name] {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

.back { margin: 0 0 0.5rem; }
.back a { color: var(--rst-text-muted); text-decoration: none; }
.back a:hover { color: var(--rst-accent); }

/* The gig list, drawn as the website draws it (site.css): a date tile,
   filled red for a public dance, outlined teal for a private function,
   the venue, and its hours. The whole tile is a link to the gig. */
.gig-rows { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: 0.6rem; }
.gig-rows .year-break {
  margin: 0.75rem 0 -0.15rem; padding-bottom: 0.4rem; border-bottom: 1px solid var(--rst-line);
  font: 700 0.85rem/1 system-ui, sans-serif; letter-spacing: 0.14em; color: var(--rst-text);
}
.gig-rows .year-break:first-child { margin-top: 0; }
.gig-tile {
  display: grid; grid-template-columns: auto 1fr; gap: 1.1rem; align-items: center;
  padding: 0.8rem 1.1rem 0.8rem 0.8rem; color: var(--rst-text); text-decoration: none;
  background: var(--rst-surface); border: 1px solid var(--rst-line); border-radius: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.gig-tile:hover { border-color: var(--rst-accent); box-shadow: 0 6px 18px -12px rgb(0 0 0 / 0.35); }
.gig-tile .date-tile {
  display: grid; justify-items: center; align-content: center;
  width: 4.25rem; aspect-ratio: 1; border-radius: 10px; line-height: 1;
  background: light-dark(#b8322a, #ff8a70); color: light-dark(#ffffff, #1d0c08);
}
.gig-tile .dt-wd, .gig-tile .dt-m { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.gig-tile .dt-d { font: 700 1.8rem/1.05 var(--wg-serif); }
.gig-tile-body { display: grid; gap: 0.25rem; min-width: 0; }
.gig-tile-title { font: 600 clamp(1.1rem, 2.4vw, 1.3rem)/1.25 var(--wg-serif); color: var(--rst-text); overflow-wrap: anywhere; }
.gig-tile-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.6rem; color: var(--rst-text-muted); font-size: 0.95rem; }
.gig-tile.gig-booked { background: transparent; border-style: dashed; padding-block: 0.55rem; }
.gig-tile.gig-booked:hover { border-style: solid; }
.gig-tile.gig-booked .date-tile {
  width: 3.9rem; background: transparent; color: light-dark(#1a6b64, #6fd3c6);
  box-shadow: inset 0 0 0 2px light-dark(#1a6b64, #6fd3c6);
}
.gig-tile.gig-booked .dt-d { font-size: 1.5rem; }
.gig-tile.gig-booked .gig-tile-title { font-size: clamp(1rem, 2.1vw, 1.1rem); }

/* The form shows only the fields for the kind that's picked. CSS, not
   script: with scripts off it still works, and with no :has() support
   every field simply shows. */
.gig-form:has(input[name="kind"][value="private"]:checked) .only-public,
.gig-form:has(input[name="kind"][value="public"]:checked) .only-private { display: none; }
.only-public, .only-private { display: contents; }
/* A new venue's name and postcode show only when "+ New venue" is
   chosen. With no :has() support they simply always show. */
.gig-form:not(:has(#venue_id option[value="new"]:checked)) .new-venue { display: none; }
.new-venue { display: grid; gap: 1.1rem; padding: 1rem; border: 1px dashed var(--rst-line); border-radius: var(--rst-radius); }
.gig-form:has(input[name="kind"][value="private"]:checked) .new-venue { display: none; }
.field-problem { color: var(--rst-tone-negative-fg); margin: -0.5rem 0 0; font-size: 0.9rem; }

/* The gig form, tightened. Its public-only fields sit in a wrapper that
   display: contents hands to the form's flex column, so the field's own
   top and bottom margins (tokens.css) would add to the form's gap: drop
   them and let the gap alone space the form. */
.gig-form { gap: 1.1rem; }
.gig-form [rst-field] { margin: 0; }
.gig-form [rst-field-row] { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 0.9rem; }
.gig-form [rst-field-row] > [rst-field] { min-inline-size: 0; }
/* Buttons sit at the end, the primary action last, on the right. */
.gig-form [rst-form-foot] { justify-content: flex-end; flex-wrap: wrap; margin-block-start: 0.4rem; }
/* Delete and Share sit apart, at the start; Delete is the one red thing. */
.gig-form .foot-aside { display: flex; gap: 0.5rem; margin-inline-end: auto; }
.gig-form .foot-aside .icon { width: 1.1em; height: 1.1em; }
/* On a phone: Delete and Share on one row, Cancel and the primary below. */
@media (max-width: 560px) { .gig-form .foot-aside { flex-basis: 100%; } }
.gig-form .delete { color: light-dark(#b8322a, #ff8a70); border-color: currentColor; }
.gig-form .delete:hover { background: light-dark(#fbe9e6, #2e1f1c); }

/* "Link copied", from share.js where there's no share sheet. */
.share-toast {
  position: fixed; left: 50%; bottom: calc(1.5rem + env(safe-area-inset-bottom)); z-index: 2147483647; margin: 0;
  translate: -50% 0.5rem; opacity: 0; pointer-events: none;
  padding: 0.6rem 1.1rem; border-radius: 999px;
  background: var(--rst-text); color: var(--rst-bg); font-weight: 600;
  transition: opacity 180ms ease-out, translate 220ms cubic-bezier(0.16, 1, 0.3, 1);
}
.share-toast.is-shown { opacity: 1; translate: -50% 0; }

/* Plain links in the admin's own markup take the band's red, not the
   browser's blue. */
.gig-rows a, .export a, [rst-stage-foot] a { color: var(--rst-accent); }
/* Delete is the one red thing. */
.gig-rows a[href$="/delete"] { color: light-dark(#b8322a, #ff8a70); }
.gig-rows a:hover, .export a:hover, [rst-stage-foot] a:hover { color: var(--rst-accent-strong); }

.export { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 0.4rem; font-size: 0.9rem; }

/* ── The audit trail: who changed what ──────────────────────────────── */

.changes {
  list-style: none; margin: 1rem 0 0; padding: 0;
  background: var(--rst-surface); border: 1px solid var(--rst-line); border-radius: var(--rst-radius);
}
/* One line an entry: what was done on the left, who and when on the
   right; on a phone the two stack. */
.change { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.15rem 1rem; padding: 0.6rem 1rem; }
.change + .change { border-top: 1px solid var(--rst-line); }
.change-link { min-width: 0; flex: 1 1 18rem; color: inherit; text-decoration: none; overflow-wrap: anywhere; }
.change-link:hover strong, .change-link:focus-visible strong { text-decoration: underline; text-underline-offset: 0.2em; }
.change-link strong { color: var(--rst-accent-strong); }
.change-deleted .change-link strong { color: light-dark(#a0281d, #ff8a7f); }
.change-what { color: var(--rst-text-muted); }
.change-meta { color: var(--rst-text-muted); font-size: 0.9rem; white-space: nowrap; }

/* An entry's detail: each field as a git diff. */
.diff-field { margin-top: 1.25rem; }
.diff-field h2 { margin: 0 0 0.4rem; font: 600 1rem/1.3 var(--wg-serif); }
.diff {
  border: 1px solid var(--rst-line); border-radius: var(--rst-radius); overflow: hidden;
  font: 0.85rem/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.diff-line { display: grid; grid-template-columns: 1.6rem 1fr; white-space: pre-wrap; overflow-wrap: anywhere; }
.diff-line > :last-child { padding: 0.1rem 0.75rem 0.1rem 0; }
.diff-sign { text-align: center; padding-top: 0.1rem; user-select: none; color: var(--rst-text-muted); }
.diff del, .diff ins { text-decoration: none; }
.diff-same { color: var(--rst-text-muted); }
.diff-removed { background: light-dark(#ffebe9, #3a1d1d); color: light-dark(#6e1a12, #ffd7d2); }
.diff-removed .diff-sign { color: light-dark(#a0281d, #ff8a7f); }
.diff-removed .diff-word { background: light-dark(#ffc1bc, #7a2a26); }
.diff-added { background: light-dark(#e6ffec, #17301d); color: light-dark(#14451f, #cdf5d6); }
.diff-added .diff-sign { color: light-dark(#1a7f37, #6fdd8b); }
.diff-added .diff-word { background: light-dark(#abf2bc, #24613a); }
.diff-word { font-weight: inherit; border-radius: 2px; }
.gig-history { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--rst-line); }
.gig-history h2 { margin: 0; font: 600 1.15rem/1.3 var(--wg-serif); }

/* ── Finding a gig: Future / Past / All, and a search ──────────────── */

.gig-find { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1.5rem; margin: 1.25rem 0 0; }
.gig-find search { flex: 1 1 16rem; max-width: 24rem; margin-inline-start: auto; }
.gig-find .add-gig { display: inline-flex; align-items: center; gap: 0.4rem; }
.gig-find .add-gig .icon { width: 1.1em; height: 1.1em; }
.gig-find { margin-top: 0.25rem; }
.gig-count { margin: 0.9rem 0 0; color: var(--rst-text-muted); }

/* ── Add, edit and delete, in a dialog over the list (dialog.js) ──── */

.gig-dialog {
  box-sizing: border-box; /* a dialog sizes its content box by default */
  width: min(38rem, calc(100vw - 2rem)); max-height: calc(100dvh - 3rem);
  padding: 1.5rem 1.75rem 1.75rem; overflow: auto;
  color: var(--rst-text); background: var(--rst-surface);
  border: 1px solid var(--rst-line); border-radius: calc(var(--rst-radius) * 1.5);
  box-shadow: 0 30px 70px -24px light-dark(rgb(27 31 42 / 0.45), rgb(0 0 0 / 0.7));
}
.gig-dialog::backdrop { background: light-dark(rgb(27 31 42 / 0.4), rgb(0 0 0 / 0.6)); }
.gig-dialog [rst-page-header] { padding-right: 2.5rem; }
.gig-dialog-close {
  position: absolute; top: 0.9rem; right: 0.9rem;
  display: grid; place-items: center; width: 2.75rem; height: 2.75rem;
  border: 0; border-radius: 50%; background: transparent; color: var(--rst-text-muted); cursor: pointer;
}
.gig-dialog-close:hover { background: var(--rst-surface-2); color: var(--rst-text); }
/* On a phone the dialog is a sheet from the bottom, where thumbs are. */
@media (max-width: 640px) {
  .gig-dialog {
    width: 100%; max-width: 100%; margin: auto 0 0; max-height: 92dvh;
    border-radius: 16px 16px 0 0; padding: 1.25rem 1.1rem calc(1.5rem + env(safe-area-inset-bottom));
  }
}
@media (prefers-reduced-motion: no-preference) {
  .gig-dialog[open] { transition: opacity 220ms cubic-bezier(0.16, 1, 0.3, 1), translate 260ms cubic-bezier(0.16, 1, 0.3, 1); }
  @starting-style { .gig-dialog[open] { opacity: 0; translate: 0 1rem; } }
}

/* ── Media: the brand kit (/media) ─────────────────────────────────────────── */

.media { padding-bottom: 3rem; }
.media img { display: block; max-width: 100%; height: auto; }
.media-head { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; margin-bottom: 1rem; }
.media-head h1 { margin: 0 0 0.5rem; font: 600 clamp(1.6rem, 4vw, 2.2rem)/1.2 var(--wg-serif); letter-spacing: -0.01em; }
.media-head p { margin: 0; max-width: 40rem; color: var(--rst-text-muted); }
.media-badge { width: 7.5rem; flex: none; }
.media-badge img { width: 100%; height: auto; }
.media-section { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--rst-line); }
.media-section h2 { margin: 0 0 0.4rem; font: 600 1.4rem/1.25 var(--wg-serif); }
.media-note { margin: 0 0 1.25rem; max-width: 44rem; color: var(--rst-text-muted); }
.downloads { color: var(--rst-text-muted); font-size: 0.92rem; }
.downloads a { color: var(--rst-accent); font-weight: 600; }

.tiles { display: grid; gap: 1rem; }
.tiles-3 { grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.tiles-4 { grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); }
.tiles-5 { grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); }
.tile { margin: 0; border: 1px solid var(--rst-line); border-radius: var(--rst-radius); overflow: hidden; background: var(--rst-surface); }
.tile-art { display: grid; place-items: center; padding: 2rem 1.5rem; min-height: 9rem; }
.tile-square .tile-art { aspect-ratio: 1; padding: 1.5rem; }
.tile-art img { width: 100%; height: auto; }
.tile-square .tile-art img { width: 82%; }
.tile figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.25rem 1rem; padding: 0.7rem 0.9rem; border-top: 1px solid var(--rst-line); }
.tile-light .tile-art { background: #f7f1e6; }
.tile-dark .tile-art { background: #12151c; }
.tile-white .tile-art { background: #ffffff; }
/* Hovered, or tabbed into, a tile drops its ground for a chequer, so
   what's transparent in the file shows as transparent. */
.tile:hover .tile-art, .tile:focus-within .tile-art {
  background: repeating-conic-gradient(#d6d6d6 0 25%, #ffffff 0 50%) 0 0 / 16px 16px;
}

.icon-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem; }
.icon-strip { display: flex; align-items: center; gap: 1.5rem; padding: 1.5rem; border-radius: var(--rst-radius); border: 1px solid var(--rst-line); }
.icon-strip-light { background: #f1f3f4; }
.icon-strip-dark { background: #202124; }
.icon-row + .downloads { margin-top: 0.8rem; }

.formats { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1.25rem; align-items: end; }
.format { margin: 0; }
.format figcaption { margin-top: 0.5rem; font-size: 0.92rem; color: var(--rst-text-muted); }
.format figcaption a { color: var(--rst-accent); }
.frame { position: relative; overflow: hidden; border-radius: 10px; display: grid; place-items: center; background: #12151c; }
.frame .photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(0.62); }
.format-share .frame .photo { filter: none; }
.frame .mark { position: relative; height: auto; }
.mark-wide { width: 72%; }
.mark-round { width: 52%; }
.format-1x1 .frame { aspect-ratio: 1; }
.format-4x5 .frame { aspect-ratio: 4 / 5; }
.format-9x16 .frame { aspect-ratio: 9 / 16; max-height: 26rem; margin-inline: auto; }
.format-9x16 .mark-round { width: 70%; }
.format-16x9 .frame { aspect-ratio: 16 / 9; }
.format-cover { grid-column: span 2; }
.format-cover .frame { aspect-ratio: 820 / 312; }
.format-cover .mark-wide { width: 46%; }
.format-share .frame { aspect-ratio: 1200 / 630; }
@media (max-width: 560px) { .format-cover { grid-column: auto; } }

.media-photo { margin: 0; max-width: 40rem; }
.media-photo img { border-radius: var(--rst-radius); }
.media-photo figcaption { margin-top: 0.5rem; }
.media-photo a { color: var(--rst-accent); font-weight: 600; }

.swatches { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem 1.5rem; }
.swatches li { display: grid; grid-template-columns: 3.25rem 1fr; gap: 0 0.9rem; align-items: center; font-size: 0.95rem; color: var(--rst-text-muted); }
.swatches strong { color: var(--rst-text); }
.swatch { grid-row: span 2; width: 3.25rem; aspect-ratio: 1; border-radius: 10px; border: 1px solid var(--rst-line); }
.sw-lime { background: #b5e02a; } .sw-green { background: #2f5a0c; } .sw-red { background: #b8322a; }
.sw-orange { background: #e8742a; } .sw-gold { background: #f0b429; }
.sw-teal { background: #1a6b64; } .sw-cream { background: #f7f1e6; } .sw-ink { background: #1b1f2a; }

/* ── A gig's own page ──────────────────────────────────────────────── */

.show-head { display: grid; gap: 1rem; margin: 0.5rem 0 0; }
.show-tile { cursor: default; }
.show-tile:hover { border-color: var(--rst-line); box-shadow: none; }
.show-tile.gig-booked:hover { border-style: dashed; }
.show-tile .gig-tile-title { margin: 0; font-size: clamp(1.4rem, 3.4vw, 1.9rem); }
.show-tile .gig-tile-meta, .show-date { margin: 0; }
.show-date { color: var(--rst-text-muted); font-size: 0.95rem; }
.show-date a { color: var(--rst-accent); }
.show-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.show-actions [rst-btn] { display: inline-flex; align-items: center; gap: 0.4rem; }
.show-actions .icon { width: 1.1em; height: 1.1em; }
.show-actions .delete { color: light-dark(#b8322a, #ff8a70); border-color: currentColor; margin-inline-start: auto; }
.show-actions .delete:hover { background: light-dark(#fbe9e6, #2e1f1c); }

.posters { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--rst-line); }
.posters h2 { margin: 0; font: 600 1.15rem/1.3 var(--wg-serif); }
.posters-note { margin: 0.35rem 0 1rem; color: var(--rst-text-muted); max-width: 44rem; }
.poster-sizes {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 1rem; align-items: end;
}
.poster-size { display: grid; gap: 0.5rem; }
.poster-thumb { display: block; border-radius: 8px; overflow: hidden; box-shadow: 0 6px 18px -10px rgb(0 0 0 / 0.5); }
.poster-thumb img { display: block; width: 100%; height: auto; }
.poster-story .poster-thumb { max-width: 9rem; }
.poster-size p { margin: 0; font-size: 0.9rem; color: var(--rst-text-muted); }
.poster-size p strong { color: var(--rst-text); }
.poster-download { justify-self: start; }

/* ── Venues ────────────────────────────────────────────────────────── */

.venues-note { margin: 0.25rem 0 1rem; color: var(--rst-text-muted); max-width: 44rem; }
.venue-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.venue-row {
  display: grid; gap: 0.25rem; padding: 0.8rem 1rem; color: var(--rst-text); text-decoration: none;
  background: var(--rst-surface); border: 1px solid var(--rst-line); border-radius: 12px;
}
.venue-row:hover { border-color: var(--rst-accent); }
.venue-row-name { font: 600 1.15rem/1.3 var(--wg-serif); }
.venue-row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.5rem; color: var(--rst-text-muted); font-size: 0.92rem; }
.venue-title { margin: 0.25rem 0 0.75rem; font: 600 clamp(1.4rem, 3.4vw, 1.9rem)/1.2 var(--wg-serif); }
.venue-form { max-width: 50rem; gap: 1.1rem; }
.venue-form [rst-field] { margin: 0; }
.venue-place { margin: 0; padding: 0; border: 0; display: grid; gap: 0.75rem; min-width: 0; }
.venue-place legend { padding: 0; margin-bottom: 0.25rem; font-weight: 600; }
.venue-place-note { margin: 0; color: var(--rst-text-muted); font-size: 0.95rem; }
.venue-map { position: relative; border-radius: 10px; overflow: hidden; border: 1px solid var(--rst-line); cursor: crosshair; touch-action: none; }
.venue-map img { display: block; width: 100%; height: auto; }
.venue-pin {
  position: absolute; width: 2.6rem; height: 3.7rem; padding: 0; border: 0; background: none;
  translate: -50% -100%; cursor: grab; touch-action: none;
}
.venue-pin svg { display: block; width: 100%; height: 100%; filter: drop-shadow(0 3px 3px rgb(0 0 0 / 0.3)); }
.venue-pin.is-dragging { cursor: grabbing; }
.venue-pin.is-dragging svg { translate: 0 -4px; }
.venue-pin:focus-visible { outline: 3px solid var(--rst-accent); outline-offset: 2px; border-radius: 6px; }
.venue-moved { margin: 0; color: var(--rst-accent); font-weight: 600; }
.venue-latlon { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }
.venue-form [rst-form-foot] { justify-content: flex-end; }
.venue-gigs { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--rst-line); }
.venue-gigs h2 { margin: 0 0 0.5rem; font: 600 1.15rem/1.3 var(--wg-serif); }
.venue-gigs ul { margin: 0; padding-left: 1.1rem; display: grid; gap: 0.3rem; }
.venue-gigs a { color: var(--rst-accent); }
/* ── People ─────────────────────────────────────────────────────────── */

.people-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; max-width: 44rem; }
.person-row {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.7rem 1rem;
  background: var(--rst-surface); border: 1px solid var(--rst-line); border-radius: 12px;
}
.person-who { display: grid; gap: 0.1rem; min-width: 0; }
.person-name { font: 600 1.1rem/1.3 var(--wg-serif); }
.person-you { font: 400 0.9rem var(--rst-font); color: var(--rst-text-muted); }
.person-email { color: var(--rst-text-muted); font-size: 0.92rem; overflow-wrap: anywhere; }
.person-remove { flex: none; display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 0.25rem; color: light-dark(#b8322a, #ff8a70); font-weight: 600; }
.person-form { max-width: 34rem; }

/* ── The notes editor (static/editor.js): the textarea, made rich ──── */

.rich { border: 1px solid var(--rst-line); border-radius: var(--rst-radius); background: var(--rst-surface); overflow: hidden; }
.rich:focus-within { border-color: var(--rst-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--rst-accent) 25%, transparent); }
[aria-invalid="true"] + .rich, .rich:has([aria-invalid="true"]) { border-color: var(--rst-tone-negative-fg); }
.rich-bar { display: flex; flex-wrap: wrap; gap: 0.25rem; padding: 0.3rem; border-bottom: 1px solid var(--rst-line); background: color-mix(in srgb, var(--rst-line) 25%, var(--rst-surface)); }
.rich-btn {
  min-width: 2.25rem; min-height: 2.25rem; padding: 0 0.6rem; border: 1px solid transparent; border-radius: var(--rst-radius-sm);
  background: none; color: var(--rst-text); font: 600 0.9rem/1 var(--rst-font); cursor: pointer;
}
.rich-btn.is-bold { font-weight: 800; }
.rich-btn.is-italic { font-style: italic; font-family: var(--wg-serif); font-size: 1.05rem; }
.rich-btn:hover { background: var(--rst-surface); border-color: var(--rst-line); }
.rich-btn[aria-pressed="true"] { background: color-mix(in srgb, var(--rst-accent) 14%, var(--rst-surface)); border-color: var(--rst-accent); color: var(--rst-accent); }
.rich-text { min-height: 6.5rem; padding: 0.65rem 0.8rem; outline: none; white-space: pre-wrap; word-wrap: break-word; line-height: 1.5; }
.rich-text > * { margin: 0; }
.rich-text > * + * { margin-top: 0.6rem; }
.rich-text ul, .rich-text ol { padding-inline-start: 1.4rem; }
.rich-text a { color: var(--rst-accent); }
/* ProseMirror's own needs. */
.ProseMirror { position: relative; font-variant-ligatures: none; font-feature-settings: "liga" 0; }
.ProseMirror li { position: relative; }
.ProseMirror-hideselection *::selection { background: transparent; }
.ProseMirror-selectednode { outline: 2px solid var(--rst-accent); }

/* A venue whose map is asked for but not here: said plainly, not a
   blank map with a pin on it. */
.venue-waiting {
  display: flex; gap: 0.85rem; align-items: flex-start; padding: 1rem 1.1rem;
  border: 1px dashed var(--rst-line); border-radius: 10px; background: var(--rst-surface);
}
.venue-waiting > .icon { width: 1.5rem; height: 1.5rem; flex: none; margin-top: 0.1rem; color: var(--rst-text-muted); }
.venue-waiting p { margin: 0; color: var(--rst-text-muted); }
.venue-waiting p + p { margin-top: 0.4rem; }
.venue-waiting .venue-waiting-title { color: var(--rst-text); font-weight: 600; }
.venue-waiting time { color: var(--rst-text); text-decoration: underline dotted; text-underline-offset: 0.2em; }
.venue-waiting a { color: var(--rst-accent); font-weight: 600; }
