:root {
  --background: #080808;
  --surface: #101010;
  --surface-strong: #151515;
  --border: #2d2d2d;
  --text: #f2efe7;
  --muted: #a7a39b;
  --gold: #c69a46;
  --gold-light: #e0bd72;
  --danger: #e27f72;
  --success: #76b889;
  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 75% 5%, rgba(198, 154, 70, 0.08), transparent 28rem),
    var(--background);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(8, 8, 8, 0.94);
  backdrop-filter: blur(14px);
}

.header-inner {
  width: min(calc(100% - 32px), var(--max-width));
  min-height: 86px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand img {
  display: block;
  width: min(390px, 54vw);
  height: 68px;
  object-fit: contain;
  object-position: left center;
}

.header-action,
.ticket-link,
.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gold);
  border-radius: 999px;
  padding: 10px 18px;
  background: transparent;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.header-action:hover,
.ticket-link:hover,
.primary-button:hover {
  background: var(--gold);
  color: #090909;
  transform: translateY(-1px);
}

.secondary-button {
  border-color: #444;
  color: var(--muted);
}

.secondary-button:hover {
  border-color: var(--gold);
  color: var(--text);
}

main {
  width: min(calc(100% - 32px), var(--max-width));
  margin: 0 auto;
}

.hero {
  min-height: 360px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  align-items: end;
  gap: 48px;
  padding: 72px 0 58px;
  border-bottom: 1px solid var(--border);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold-light);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(2.7rem, 7vw, 5.8rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
  text-transform: uppercase;
}

.hero-text {
  max-width: 690px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.2rem);
}

.update-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(16, 16, 16, 0.78);
}

.status-dot {
  width: 10px;
  height: 10px;
  margin-top: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--muted);
  box-shadow: 0 0 0 4px rgba(167, 163, 155, 0.12);
}

.status-dot.ok {
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(118, 184, 137, 0.12);
}

.status-dot.warning {
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(198, 154, 70, 0.12);
}

.status-dot.error {
  background: var(--danger);
  box-shadow: 0 0 0 4px rgba(226, 127, 114, 0.12);
}

.update-label {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#last-updated {
  display: block;
  font-size: 0.95rem;
}

.alert-panel {
  display: grid;
  grid-template-columns: minmax(250px, 1fr) minmax(460px, 1.5fr);
  gap: 36px;
  align-items: center;
  padding: 34px 0;
  border-bottom: 1px solid var(--border);
}

.alert-copy h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  line-height: 1;
  letter-spacing: -0.035em;
  text-transform: uppercase;
}

.alert-copy p:last-child {
  max-width: 540px;
  margin: 14px 0 0;
  color: var(--muted);
}

.alert-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(130px, 1fr)) auto auto;
  gap: 10px;
  align-items: end;
}

.alert-message {
  grid-column: 2;
  margin-top: -18px;
  color: var(--muted);
  font-size: 0.88rem;
}

.alert-message.success {
  color: var(--success);
}

.alert-message.error {
  color: var(--danger);
}

.alert-message.saved {
  color: var(--gold-light);
}

.calendar {
  padding: 64px 0 84px;
}

.calendar-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.calendar-heading h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

.results-count {
  margin: 0;
  color: var(--muted);
}

.quick-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 14px;
}

.filter-chip {
  border: 1px solid #3a3a3a;
  border-radius: 999px;
  padding: 8px 13px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.filter-chip:hover,
.filter-chip.active {
  border-color: var(--gold);
  color: var(--text);
}

.filter-chip.active {
  background: rgba(198, 154, 70, 0.13);
}

.filters {
  display: grid;
  grid-template-columns: minmax(240px, 1.6fr) repeat(3, minmax(150px, 0.8fr)) auto;
  align-items: end;
  gap: 12px;
  margin-bottom: 30px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}

.field {
  display: grid;
  gap: 7px;
}

.field span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.field em {
  color: #777;
  font-style: normal;
  font-weight: 600;
  text-transform: none;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid #393939;
  border-radius: 9px;
  padding: 0 12px;
  background: #0b0b0b;
  color: var(--text);
  outline: none;
}

.field input,
.field select {
  height: 46px;
}

.field textarea {
  min-height: 92px;
  padding-top: 11px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(198, 154, 70, 0.12);
}

.reset-button {
  height: 46px;
  border: 1px solid #3a3a3a;
  border-radius: 9px;
  padding: 0 14px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.reset-button:hover {
  border-color: var(--gold);
  color: var(--text);
}

.notice,
.loading-card,
.empty-state {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  background: var(--surface);
  color: var(--muted);
}

.notice {
  margin-bottom: 20px;
}

.notice.warning {
  border-color: rgba(198, 154, 70, 0.55);
}

.notice.error {
  border-color: rgba(226, 127, 114, 0.6);
}

.event-grid {
  display: grid;
  gap: 18px;
}

.event-card {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  min-height: 220px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  transition: border-color 160ms ease, transform 160ms ease;
}

.event-card:hover {
  border-color: #4a4334;
  transform: translateY(-2px);
}

.event-card.new-alert-match {
  border-color: rgba(118, 184, 137, 0.7);
  box-shadow: 0 0 0 1px rgba(118, 184, 137, 0.12);
}

.event-media {
  min-height: 220px;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(198, 154, 70, 0.24), rgba(8, 8, 8, 0.18)),
    #161616;
}

.event-image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
}

.event-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  padding: 26px;
}

.event-main {
  min-width: 0;
}

.event-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 13px;
}

.badge {
  display: inline-flex;
  border: 1px solid #3d3d3d;
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.badge.gold {
  border-color: rgba(198, 154, 70, 0.6);
  color: var(--gold-light);
}

.badge.new {
  border-color: rgba(118, 184, 137, 0.6);
  color: var(--success);
}

.badge.cancelled {
  border-color: rgba(226, 127, 114, 0.55);
  color: var(--danger);
}

.event-card h3 {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2.1rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.artist-line {
  margin: 11px 0 0;
  color: var(--gold-light);
  font-weight: 700;
}

.lineup-details summary {
  cursor: pointer;
  list-style: none;
}

.lineup-details summary::-webkit-details-marker {
  display: none;
}

.lineup-more {
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

.lineup-full {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.event-meta {
  display: grid;
  gap: 5px;
  margin: 22px 0 0;
  color: var(--muted);
}

.event-meta p {
  margin: 0;
}

.event-actions {
  min-width: 150px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.ticket-link {
  width: 100%;
  white-space: nowrap;
}

.source-link {
  color: var(--muted);
  font-size: 0.8rem;
  text-align: right;
}

.source-link a {
  color: var(--gold-light);
}

.site-footer {
  width: min(calc(100% - 32px), var(--max-width));
  margin: 0 auto;
  padding: 34px 0 50px;
  display: grid;
  grid-template-columns: 1fr minmax(280px, 520px);
  gap: 40px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer strong {
  color: var(--text);
  text-transform: uppercase;
}

.site-footer p {
  margin: 5px 0 0;
}

.disclaimer {
  text-align: right;
}

.submission-dialog {
  width: min(calc(100% - 28px), 720px);
  max-height: min(900px, calc(100vh - 32px));
  padding: 0;
  overflow: auto;
  border: 1px solid #3c3c3c;
  border-radius: 18px;
  background: var(--surface-strong);
  color: var(--text);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.72);
}

.submission-dialog::backdrop {
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(5px);
}

.dialog-close-form {
  position: sticky;
  top: 0;
  z-index: 2;
  height: 0;
  margin: 0;
  text-align: right;
}

.dialog-close {
  width: 42px;
  height: 42px;
  margin: 12px;
  border: 1px solid #444;
  border-radius: 50%;
  background: #111;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
}

.dialog-content {
  padding: 38px;
}

.dialog-content h2 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

.dialog-intro {
  margin: 18px 0 28px;
  color: var(--muted);
}

.submission-form {
  display: grid;
  gap: 16px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-note,
.form-feedback {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.form-feedback {
  color: var(--danger);
}

@media (max-width: 980px) {
  .hero,
  .alert-panel {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .update-card {
    max-width: 420px;
  }

  .alert-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .alert-message {
    grid-column: 1;
    margin-top: -18px;
  }

  .filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .field-search {
    grid-column: 1 / -1;
  }

  .reset-button {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .header-inner {
    min-height: 72px;
  }

  .brand img {
    width: 210px;
    height: 52px;
  }

  .header-action {
    padding: 9px 12px;
    font-size: 0.82rem;
  }

  .hero {
    min-height: auto;
    padding: 54px 0 42px;
  }

  .alert-panel {
    gap: 24px;
  }

  .alert-form,
  .filters,
  .form-row {
    grid-template-columns: 1fr;
  }

  .alert-message {
    margin-top: 0;
  }

  .calendar {
    padding-top: 48px;
  }

  .calendar-heading {
    align-items: start;
    flex-direction: column;
  }

  .field-search {
    grid-column: auto;
  }

  .event-card {
    grid-template-columns: 1fr;
  }

  .event-media,
  .event-image {
    min-height: 190px;
    max-height: 260px;
  }

  .event-content {
    grid-template-columns: 1fr;
  }

  .event-actions {
    align-items: stretch;
  }

  .source-link {
    text-align: left;
  }

  .site-footer {
    grid-template-columns: 1fr;
  }

  .disclaimer {
    text-align: left;
  }

  .dialog-content {
    padding: 32px 20px 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

/* Kingdom Circuit Master v5 refinements */
.site-header {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 110%, rgba(198, 154, 70, 0.11), transparent 42%),
    rgba(8, 8, 8, 0.97);
}

.site-header::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
}

.header-inner {
  position: relative;
  min-height: 258px;
  display: grid;
  place-items: center;
  padding: 18px 0 20px;
}

.brand {
  position: relative;
  z-index: 1;
  justify-self: center;
}

.brand img {
  width: min(520px, 60vw);
  height: auto;
  max-height: none;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 18px 42px rgba(0, 0, 0, 0.38));
}

.header-actions {
  position: absolute;
  z-index: 2;
  top: 22px;
  right: 0;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 330px;
  padding: 64px 0 52px;
  isolation: isolate;
}

.hero::before {
  position: absolute;
  z-index: -2;
  inset: -120px -12vw -10px;
  content: "";
  pointer-events: none;
  background:
    radial-gradient(ellipse 15% 88% at 18% 0%, rgba(224, 189, 114, 0.13), transparent 68%),
    radial-gradient(ellipse 18% 92% at 56% -4%, rgba(198, 154, 70, 0.10), transparent 70%),
    radial-gradient(ellipse 14% 76% at 86% 0%, rgba(224, 189, 114, 0.08), transparent 68%);
  filter: blur(5px);
  transform: rotate(-2deg);
}

.hero::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  pointer-events: none;
  opacity: 0.13;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.018), transparent),
    repeating-linear-gradient(112deg, transparent 0 44px, rgba(255, 255, 255, 0.012) 45px 46px);
}

.hero-copy,
.update-card {
  position: relative;
  z-index: 1;
}

.filter-dock {
  margin-bottom: 30px;
}

.filter-dock .filters {
  margin-bottom: 0;
}

@media (min-width: 981px) {
  .filter-dock {
    position: sticky;
    z-index: 30;
    top: 12px;
    margin-right: -12px;
    margin-left: -12px;
    padding: 12px;
    border: 1px solid rgba(56, 52, 45, 0.72);
    border-radius: 18px;
    background: rgba(8, 8, 8, 0.88);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.30);
    backdrop-filter: blur(18px);
  }
}

.badge.announced {
  border-color: rgba(224, 189, 114, 0.72);
  background: rgba(198, 154, 70, 0.10);
  color: #f2d694;
}

.event-media {
  position: relative;
}

.event-media::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background: linear-gradient(145deg, transparent 44%, rgba(8, 8, 8, 0.32));
}

.event-image {
  transition: transform 260ms ease;
}

.event-image--artist {
  object-position: 50% 30%;
}

.event-image--event_artwork,
.event-image--fallback {
  object-position: center;
}

.event-card:hover .event-image {
  transform: scale(1.018);
}

@media (max-width: 980px) {
  .header-inner {
    min-height: 224px;
  }

  .brand img {
    width: min(520px, 68vw);
  }

  .hero {
    min-height: 300px;
    padding-top: 56px;
  }
}

@media (max-width: 720px) {
  .header-inner {
    min-height: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 15px 0 13px;
  }

  .brand img {
    width: min(430px, 91vw);
    height: auto;
  }

  .header-actions {
    position: static;
    align-self: center;
    margin-top: -2px;
  }

  .header-action {
    padding: 8px 13px;
    font-size: 0.8rem;
  }

  .hero {
    min-height: auto;
    padding: 38px 0 34px;
    gap: 30px;
  }

  .hero-text {
    margin-top: 18px;
  }

  .filter-dock {
    margin-bottom: 26px;
  }

  .quick-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }

  .filter-chip {
    flex: 0 0 auto;
  }

  .event-image--artist {
    object-position: 50% 27%;
  }
}
