/* Gig Finder: photocopied gig poster. Black stage, bone-white ink, amp red for action,
   acid yellow for anything that matched. */

:root {
  --paper: #0f0e0d;
  --surface: #191715;
  --surface-2: #221f1c;
  --ink: #efe9dd;
  --muted: #a39b8f;
  --rule: #34302b;
  --red: #ff3b30;
  --red-deep: #c4231b;
  --on-red: #0f0e0d;
  --acid: #d9ff3a;
  --on-acid: #0f0e0d;
  --warn: #ffb547;
  --warn-wash: #2e2210;
  --good-wash: #1d2410;
  --focus: #d9ff3a;
  --display: "Anton", "Impact", "Arial Narrow", sans-serif;
  --body: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
:root { padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
html { scroll-padding-top: env(safe-area-inset-top, 0px); -webkit-text-size-adjust: 100%; background: var(--paper); }
body {
  margin: 0;
  background-color: var(--paper);
  background-image: var(--grain), radial-gradient(ellipse 80% 50% at 50% -10%, #2a1412 0%, transparent 70%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.5;
}
::selection { background: var(--acid); color: var(--on-acid); }
a { color: var(--ink); text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
a:hover { color: var(--acid); text-decoration-color: var(--acid); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 1px; }
img, svg { max-width: 100%; }
.nobr { white-space: nowrap; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.wrap { max-width: 68rem; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2.5rem); }

/* Masthead */
.masthead {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem 1.5rem;
  padding: 1.25rem 0 1rem;
  border-bottom: 4px solid var(--ink);
  position: relative;
}
.masthead::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -10px; height: 2px; background: var(--red);
}
.wordmark {
  font-family: var(--display); font-weight: 400; font-size: 2rem; line-height: 1;
  text-transform: uppercase; letter-spacing: 0.02em;
  color: var(--ink); text-decoration: none;
  display: inline-block; transform: rotate(-2deg);
}
.wordmark span { color: var(--red); margin: 0 0.05em; }
.wordmark:hover { color: var(--ink); }
.nav { display: flex; gap: 0.35rem 1.5rem; flex-wrap: wrap; }
.nav a {
  color: var(--ink); text-decoration: none; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.06em; font-size: 0.875rem; padding: 0.3rem 0; border-bottom: 3px solid transparent;
}
.nav a:hover { color: var(--acid); }
.nav a[aria-current="page"] { border-bottom-color: var(--red); }

/* The search sentence */
.sentence {
  margin: clamp(2.5rem, 7vw, 4.5rem) 0 0;
  font-family: var(--display); font-weight: 400;
  font-size: clamp(2.1rem, 6vw, 4.4rem);
  text-transform: uppercase;
  line-height: 1.25;
  letter-spacing: 0.01em;
  max-width: 22ch;
}
.sentence p { margin: 0; }
.blank {
  font: inherit; letter-spacing: inherit; text-transform: inherit;
  color: var(--acid);
  background: transparent;
  border: 0;
  border-bottom: 0.08em solid var(--red);
  border-radius: 0;
  padding: 0 0.1em;
  margin: 0 0.05em;
  min-width: 0;
  vertical-align: baseline;
}
.blank::placeholder { color: var(--acid); opacity: 0.35; }
.blank:focus { outline: none; background: rgba(217, 255, 58, 0.1); }
.blank:focus-visible { outline: none; }
.blank-genre { width: 8.5ch; }
.blank-num { width: 2.4ch; text-align: center; -moz-appearance: textfield; }
.blank-num::-webkit-inner-spin-button, .blank-num::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.blank-place { width: 9ch; }
.blank-date { font-family: var(--body); font-weight: 800; font-size: 0.42em; width: auto; padding-bottom: 0.1em; text-transform: none; letter-spacing: 0; vertical-align: 0.35em; }
select.blank { appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 0.15em; }
select.blank option { background: var(--surface); color: var(--ink); }

.sentence .sentence-actions, .sentence .hint {
  font-family: var(--body); font-size: 1rem; font-weight: 400; text-transform: none; letter-spacing: 0; line-height: 1.5;
}
.sentence .hint { font-size: 0.9375rem; }
.sentence-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.5rem; margin: 2rem 0 0; }

.btn {
  font-family: var(--body); font-weight: 900; text-transform: uppercase; letter-spacing: 0.06em;
  background: var(--red); color: var(--on-red);
  border: 2px solid var(--red); border-radius: 0;
  padding: 0.8rem 1.6rem; cursor: pointer;
  font-size: 1.0625rem; line-height: 1.2;
  box-shadow: 5px 5px 0 var(--ink);
  transition: transform 80ms ease, box-shadow 80ms ease;
}
.btn:hover { background: var(--acid); border-color: var(--acid); color: var(--on-acid); }
.btn:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--ink); }
.btn:disabled { opacity: 0.55; cursor: progress; transform: none; }
.btn-quiet {
  font: inherit; font-weight: 700; background: none; border: 0; color: var(--ink);
  padding: 0.25rem 0; cursor: pointer; text-decoration: underline; text-decoration-color: var(--red);
  text-decoration-thickness: 2px; text-underline-offset: 0.2em;
}
.btn-quiet:hover { color: var(--acid); text-decoration-color: var(--acid); }
.btn-outline {
  font: inherit; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.9375rem;
  background: none; color: var(--ink);
  border: 2px solid var(--ink); border-radius: 0; padding: 0.5rem 1rem; cursor: pointer;
}
.btn-outline:hover { border-color: var(--acid); color: var(--acid); }
.hint { color: var(--muted); font-size: 0.9375rem; margin: 0.9rem 0 0; max-width: 60ch; }

/* Status and messages */
.status { margin: 3rem 0 0; padding: 1rem 0 0; border-top: 4px solid var(--ink); }
.status-line { margin: 0; font-weight: 800; font-size: 1.125rem; max-width: 65ch; }
.status-sub { margin: 0.25rem 0 0; color: var(--muted); font-size: 0.9375rem; max-width: 65ch; }
.bar { height: 6px; background: var(--rule); margin: 0.85rem 0 0; overflow: hidden; }
.bar > span {
  display: block; height: 100%; width: 30%;
  background: repeating-linear-gradient(-45deg, var(--red) 0 8px, var(--acid) 8px 16px);
  animation: slide 1.4s ease-in-out infinite;
}
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(340%); } }
@media (prefers-reduced-motion: reduce) { .bar > span { animation: none; width: 100%; opacity: 0.5; } }
.sources { display: flex; flex-wrap: wrap; gap: 0.35rem 1.25rem; margin: 0.7rem 0 0; padding: 0; list-style: none; font-size: 0.875rem; color: var(--muted); }
.sources b { color: var(--ink); font-weight: 800; }

.notice {
  margin: 1rem 0 0; padding: 0.75rem 1rem; border-left: 4px solid var(--warn);
  background: var(--warn-wash); color: var(--ink); max-width: 70ch; font-size: 0.9375rem;
}
.notice-good { border-left-color: var(--acid); background: var(--good-wash); }
.notice p { margin: 0; }
.notice p + p { margin-top: 0.35rem; }

/* Results */
.month {
  font-family: var(--display); font-weight: 400; text-transform: uppercase; letter-spacing: 0.03em;
  font-size: clamp(1.8rem, 4vw, 2.4rem); line-height: 1;
  margin: 3rem 0 1rem; padding: 0;
  display: flex; align-items: center; gap: 1rem;
}
.month::after { content: ""; flex: 1; height: 3px; background: var(--rule); }
.gigs { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }

/* Each gig is a ticket: a red date stub, a perforation, then the details. */
.gig {
  --notch: 11px;
  display: grid; grid-template-columns: 5.5rem 1fr;
  background: var(--surface);
  border: 1px solid var(--rule);
  position: relative;
}
.gig::before, .gig::after {
  content: ""; position: absolute; left: calc(5.5rem - var(--notch)); width: calc(var(--notch) * 2); height: calc(var(--notch) * 2);
  border-radius: 50%; background: var(--paper); border: 1px solid var(--rule);
}
.gig::before { top: calc(var(--notch) * -1 - 1px); border-top-color: transparent; border-left-color: transparent; border-right-color: transparent; }
.gig::after { bottom: calc(var(--notch) * -1 - 1px); border-bottom-color: transparent; border-left-color: transparent; border-right-color: transparent; }
.gig-date {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; line-height: 1;
  padding: 1.1rem 0.4rem; background: var(--red); color: var(--on-red);
  border-right: 3px dashed var(--paper);
}
.gig-date .day { font-family: var(--display); font-size: 3.1rem; font-weight: 400; letter-spacing: 0; }
.gig-date .dow { font-size: 0.8125rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.1em; margin-top: 0.35rem; }
.gig > div:last-child { padding: 1.05rem 1.25rem 1.15rem 1.4rem; min-width: 0; }
.gig-title {
  margin: 0; font-size: 1.375rem; line-height: 1.25; font-weight: 800;
  overflow-wrap: anywhere;
}
.gig-title .hit {
  color: var(--acid); font-weight: 900;
  text-transform: uppercase; letter-spacing: 0.01em;
}
.gig-title .other { color: var(--ink); font-weight: 500; }
.gig-matching { margin: 0.25rem 0 0; font-size: 0.9375rem; }
.gig-matching .hit { font-weight: 900; color: var(--acid); }
.gig-where { margin: 0.35rem 0 0; display: flex; flex-wrap: wrap; gap: 0 1rem; font-weight: 600; }
.gig-where .dist, .gig-where .time { color: var(--muted); font-weight: 400; }
.gig-why { margin: 0.5rem 0 0; font-size: 0.9rem; color: var(--muted); max-width: 65ch; }
.gig-why strong { color: var(--ink); font-weight: 800; }
.gig-notes { margin: 0.4rem 0 0; font-size: 0.9375rem; max-width: 65ch; }
.gig-links { margin: 0.85rem 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.6rem; }
.gig-links a {
  display: inline-block; text-decoration: none; font-weight: 900; font-size: 0.875rem;
  text-transform: uppercase; letter-spacing: 0.05em;
  background: var(--ink); color: var(--paper); padding: 0.45rem 0.8rem;
}
.gig-links a:hover { background: var(--acid); color: var(--on-acid); }
.gig-links a.venue-link { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.gig-links a.venue-link:hover { color: var(--acid); box-shadow: inset 0 0 0 2px var(--acid); background: transparent; }
.gig-links span { font-weight: 700; }
.gig-more { margin: 0.7rem 0 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.9rem; font-size: 0.875rem; }
.gig-more-label { color: var(--muted); font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.75rem; }
.gig-more a { font-weight: 700; }
.gig-tags { margin: 0 0 0.4rem; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.tag {
  display: inline-block; font-weight: 900; text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.07em;
  padding: 0.15rem 0.45rem; line-height: 1.3;
}
.tag-cancelled, .tag-soldout { background: var(--muted); color: var(--paper); }
.tag-warn { background: var(--warn); color: var(--paper); }
.tag-soon { color: var(--acid); box-shadow: inset 0 0 0 2px var(--acid); }
.gig-unavailable .gig-date { background: var(--surface-2); color: var(--muted); }
.gig-unavailable .gig-title, .gig-unavailable .gig-title .hit { color: var(--muted); }
.gig-unavailable .gig-links a:not(.resale-link):not(.venue-link) { background: var(--surface-2); color: var(--muted); }
.gig-links a.resale-link { background: var(--acid); color: var(--on-acid); }
.gig-links .price { font-weight: 900; color: var(--acid); }
.soldout-toggle { margin: 1.5rem 0 0; color: var(--muted); font-size: 0.9375rem; }
.tag-diy {
  display: inline-block; font-size: 0.75rem; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--acid); border: 2px solid currentColor; padding: 0 0.4rem; margin-left: 0.5rem; vertical-align: 0.2em;
  transform: rotate(-3deg);
}

.empty { margin: 2.5rem 0 0; max-width: 60ch; }
.empty h2 { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: 2.2rem; margin: 0 0 0.5rem; }
.empty p { margin: 0.5rem 0 0; }

.alert-cta {
  margin: 2.5rem 0 0; padding: 1.25rem 1.5rem; background: var(--surface-2); border-left: 6px solid var(--acid);
  display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; align-items: center; justify-content: space-between;
}
.alert-cta p { margin: 0; font-weight: 700; max-width: 50ch; }

/* Forms (alerts, add a show, admin) */
.page-head { margin: clamp(2.5rem, 6vw, 4rem) 0 0; max-width: 40rem; }
.page-head h1 {
  font-family: var(--display); font-weight: 400; text-transform: uppercase; letter-spacing: 0.01em;
  font-size: clamp(2.4rem, 6vw, 3.6rem); line-height: 1.05; margin: 0;
}
.page-head p { margin: 0.9rem 0 0; color: var(--muted); }
.form { margin: 2rem 0 0; max-width: 40rem; display: grid; gap: 1.25rem; }
.row { display: grid; gap: 1.25rem; grid-template-columns: 1fr 1fr; }
.field { display: grid; gap: 0.35rem; }
.field label, .field .label { font-weight: 800; }
.field .help { font-size: 0.875rem; color: var(--muted); margin: -0.15rem 0 0; font-weight: 400; }
.field input, .field textarea, .field select {
  font: inherit; color: var(--ink); background: var(--surface);
  border: 2px solid var(--rule); border-radius: 0; padding: 0.65rem 0.75rem; width: 100%;
}
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: 0.7; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--acid); box-shadow: 4px 4px 0 var(--red); }
.field input:disabled, .field select:disabled, .field textarea:disabled { opacity: 0.5; }
.field textarea { min-height: 6rem; resize: vertical; }
.inline { display: flex; gap: 0.5rem; }
.inline > :first-child { flex: 1; }
.inline select { width: auto; }
.honey { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-actions { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.form-msg { margin: 0; font-weight: 700; }
.form-msg.err { color: var(--warn); }
fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 1.25rem; }
legend {
  font-family: var(--display); font-weight: 400; text-transform: uppercase; letter-spacing: 0.03em;
  font-size: 1.6rem; padding: 0; margin: 0 0 0.25rem; color: var(--red);
}

/* Search mode switch */
.mode { display: inline-flex; margin: 0 0 1.1rem; border: 2px solid var(--ink); font-family: var(--body); text-transform: none; letter-spacing: 0; line-height: 1.2; }
.mode-btn {
  font: inherit; font-size: 0.875rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.06em;
  background: transparent; color: var(--ink); border: 0; padding: 0.5rem 0.95rem; cursor: pointer;
}
.mode-btn + .mode-btn { border-left: 2px solid var(--ink); }
.mode-btn[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.mode-btn:not([aria-pressed="true"]):hover { color: var(--acid); }
.like-chips { display: inline; }
.like-chip {
  font: inherit; font-size: 0.875rem; font-weight: 700; color: var(--ink); background: var(--surface-2);
  border: 1px solid var(--rule); padding: 0.1rem 0.5rem; margin: 0.15rem 0.3rem 0.15rem 0; cursor: pointer;
}
.like-chip:hover { border-color: var(--acid); color: var(--acid); }

/* Tune of the day: strip on the search page */
.totd-strip {
  margin: 1.5rem 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 1rem;
  padding: 0.6rem 0.9rem; background: var(--surface); border: 1px solid var(--rule); border-left: 6px solid var(--acid);
  font-size: 0.9375rem;
}
.totd-strip[hidden] { display: none; }
.totd-label { font-weight: 900; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.75rem; color: var(--acid); }
.totd-song { display: inline-flex; align-items: center; gap: 0.35rem; text-decoration: none; font-weight: 500; min-width: 0; }
.totd-song svg { color: var(--red); flex: none; }
.totd-song:hover svg { color: var(--acid); }
.totd-none { color: var(--muted); }
.totd-vote { margin-left: auto; font-weight: 700; font-size: 0.875rem; }

/* Tune of the day: its own page */
.totd {
  margin: 2rem 0 0; padding: clamp(1.25rem, 4vw, 2rem); background: var(--red); color: var(--on-red);
  position: relative; overflow: hidden;
}
.totd::after {
  content: ""; position: absolute; inset: 0; background-image: var(--grain); opacity: 0.6; pointer-events: none; mix-blend-mode: multiply;
}
.totd-kicker { margin: 0; font-weight: 900; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8125rem; }
.totd-title { margin: 0.6rem 0 0; font-family: var(--display); text-transform: uppercase; line-height: 1; overflow-wrap: anywhere; }
.totd-artist { display: block; font-size: clamp(2.6rem, 8vw, 4.8rem); }
.totd-track { display: block; font-size: clamp(1.5rem, 4.5vw, 2.4rem); margin-top: 0.3rem; opacity: 0.85; }
.totd-empty { margin: 0.5rem 0 0; font-weight: 600; max-width: 50ch; }
.btn.totd-watch {
  display: inline-flex; align-items: center; gap: 0.4rem; margin-top: 1.25rem; text-decoration: none;
  background: var(--paper); border-color: var(--paper); color: var(--ink); box-shadow: 5px 5px 0 var(--on-red);
  position: relative; z-index: 1;
}
.btn.totd-watch:hover { background: var(--acid); border-color: var(--acid); color: var(--on-acid); }
.tune-form { margin-top: 0; }
.tune-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.tune {
  display: grid; grid-template-columns: 2.6rem 1fr auto auto; align-items: center; gap: 0.75rem;
  background: var(--surface); border: 1px solid var(--rule); padding: 0.6rem 0.75rem;
}
.tune:first-child { border-color: var(--acid); }
.tune-rank { font-family: var(--display); font-size: 1.9rem; line-height: 1; color: var(--red); text-align: center; }
.tune:first-child .tune-rank { color: var(--acid); }
.tune-name { min-width: 0; overflow-wrap: anywhere; line-height: 1.3; }
.tune-name b { font-weight: 900; text-transform: uppercase; letter-spacing: 0.01em; }
.tune-name span { display: block; color: var(--muted); }
.tune-yt { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; color: var(--ink); box-shadow: inset 0 0 0 2px var(--rule); }
.tune-yt:hover { color: var(--acid); box-shadow: inset 0 0 0 2px var(--acid); }
.tune-vote {
  font: inherit; display: inline-flex; align-items: center; gap: 0.5rem; cursor: pointer;
  background: var(--red); color: var(--on-red); border: 0; padding: 0.5rem 0.75rem; min-width: 6.2rem; justify-content: center;
}
.tune-vote:hover { background: var(--acid); color: var(--on-acid); }
.tune-vote:disabled { background: transparent; color: var(--acid); box-shadow: inset 0 0 0 2px var(--acid); cursor: default; }
.tune-count { font-family: var(--display); font-size: 1.35rem; line-height: 1; }
.tune-vote-word { font-weight: 900; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.8125rem; }
.tune-empty { color: var(--muted); padding: 0.75rem 0; }

footer { margin: 4.5rem 0 0; padding: 1.25rem 0 2.5rem; border-top: 4px solid var(--ink); color: var(--muted); font-size: 0.875rem; }
footer p { margin: 0; max-width: 70ch; }
footer p + p { margin-top: 0.5rem; }

@media (max-width: 40rem) {
  .row { grid-template-columns: 1fr; }
  .gig { grid-template-columns: 4rem 1fr; --notch: 9px; }
  .gig::before, .gig::after { left: calc(4rem - var(--notch)); }
  .gig-date { padding: 0.9rem 0.25rem; }
  .gig-date .day { font-size: 2.3rem; }
  .gig > div:last-child { padding: 0.9rem 0.9rem 1rem 1.1rem; }
  .gig-title { font-size: 1.15rem; }
  .sentence { line-height: 1.3; }
  .blank-genre { width: 7.5ch; }
  .blank-date { font-size: 0.5em; }
  .wordmark { font-size: 1.7rem; }
  .tune { grid-template-columns: 1.6rem 1fr auto auto; gap: 0.5rem; padding: 0.55rem; }
  .tune-rank { font-size: 1.5rem; }
  .tune-yt { width: 2.2rem; height: 2.2rem; }
  .tune-vote { min-width: 0; padding: 0.5rem 0.55rem; }
  .tune-vote-word { display: none; }
  .totd-vote { margin-left: 0; }
}
