.tvmse-imx-detail {
  max-width: var(--width-l, 72rem);
  margin: 0 auto;
  padding-inline: var(--gutter, 1rem);
}

.tvmse-imx-detail--rich {
  padding-bottom: 3rem;
}

.tvmse-imx-detail__hero {
  margin: 0 0 1.5rem;
  border-radius: var(--tvmse-imx-card-radius, 0.75rem);
  overflow: hidden;
  background: var(--base-2, #f7f6f4);
}

.tvmse-imx-detail__hero-image {
  display: block;
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
}

.tvmse-imx-detail__hero picture,
.tvmse-imx-detail__gallery-cell picture {
  display: block;
  width: 100%;
  height: 100%;
}

.tvmse-imx-detail__gallery-cell picture img,
.tvmse-imx-detail__hero picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tvmse-imx-detail__gallery-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tvmse-imx-detail__hero-caption,
.tvmse-imx-detail__lightbox-caption {
  margin: 0;
  padding: 0.55rem 0.85rem;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 0.82rem;
  line-height: 1.45;
}

.tvmse-imx-detail__hero-caption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
}

.tvmse-imx-detail__hero {
  position: relative;
}

.tvmse-imx-detail__lightbox-figure {
  margin: 0;
}

.tvmse-imx-detail__lightbox-caption {
  padding: 0.75rem 1rem;
}

.tvmse-imx-detail__content-section {
  margin: 0 0 1.75rem;
}

.tvmse-imx-detail__header {
  margin-bottom: 1.75rem;
}

.tvmse-imx-detail__badge {
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--tvmse-imx-accent, var(--accent, #005e90));
}

.tvmse-imx-detail__badge-sub::before {
  content: "·";
  margin-inline: 0.35rem;
  opacity: 0.65;
}

.tvmse-imx-detail__badge-sub {
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
}

.tvmse-imx-detail__panel-note {
  margin: 0 0 0.85rem;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--tvmse-imx-muted, var(--contrast-2, rgba(0, 0, 0, 0.62)));
}

.tvmse-imx-detail__track-downloads {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.tvmse-imx-detail__track-download {
  display: inline-block;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-s, 0.35rem);
  background: var(--tvmse-imx-accent, var(--accent, #005e90));
  color: #fff;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
}

.tvmse-imx-detail__track-download:hover {
  color: #fff;
  filter: brightness(0.95);
}

.tvmse-imx-detail__panel--collapsible {
  border: 1px solid var(--base-3, #eceae6);
  border-radius: var(--radius-s, 0.35rem);
  padding: 0.65rem 0.85rem;
}

.tvmse-imx-detail__panel--collapsible > .tvmse-imx-detail__panel-title {
  margin: 0;
  cursor: pointer;
  list-style: none;
}

.tvmse-imx-detail__panel--collapsible > summary::-webkit-details-marker {
  display: none;
}

.tvmse-imx-detail__panel--collapsible > summary::after {
  content: "+";
  float: right;
  font-weight: 400;
}

.tvmse-imx-detail__panel--collapsible[open] > summary::after {
  content: "−";
}

.tvmse-imx-detail__panel-body {
  margin-top: 0.75rem;
}

.tvmse-imx-detail__panel-subtitle {
  margin: 0 0 0.35rem;
  font-size: 0.92rem;
  font-weight: 600;
}

.tvmse-imx-detail__panel-block + .tvmse-imx-detail__panel-block {
  margin-top: 0.85rem;
}

.tvmse-imx-detail__elevation {
  margin-top: 1rem;
}

.tvmse-imx-detail__elevation-title {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.tvmse-imx-detail__elevation-chart {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-s, 0.35rem);
  background: var(--base-2, #f7f6f4);
}

.tvmse-imx-detail__elevation-label {
  fill: var(--tvmse-imx-muted, rgba(0, 0, 0, 0.55));
  font-size: 11px;
}

.tvmse-imx-detail__lightbox-prev,
.tvmse-imx-detail__lightbox-next {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-top: -1.375rem;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: #111;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
  cursor: pointer;
}

.tvmse-imx-detail__lightbox-prev svg,
.tvmse-imx-detail__lightbox-next svg {
  display: block;
  width: 1.2rem;
  height: 1.2rem;
}

.tvmse-imx-detail__lightbox-prev {
  left: 0.75rem;
}

.tvmse-imx-detail__lightbox-next {
  right: 0.75rem;
}

.tvmse-imx-detail__title {
  margin: 0 0 0.35rem;
  font-size: clamp(1.75rem, 2.8vw, 2.35rem);
  line-height: 1.15;
}

.tvmse-imx-detail__meta {
  margin: 0;
  color: var(--tvmse-imx-muted, var(--contrast-2, rgba(0, 0, 0, 0.62)));
  font-size: 1.05rem;
}

.tvmse-imx-detail__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(16rem, 22rem);
  gap: 2rem 2.5rem;
  align-items: start;
}

@media (max-width: 52rem) {
  .tvmse-imx-detail__layout {
    grid-template-columns: 1fr;
  }
}

.tvmse-imx-detail__lead {
  margin: 0 0 1.25rem;
  font-size: 1.125rem;
  line-height: 1.55;
  color: var(--contrast, #2c0d1d);
}

.tvmse-imx-detail__content {
  margin: 0 0 1.75rem;
  line-height: 1.65;
  color: var(--contrast, #2c0d1d);
}

.tvmse-imx-detail__content p:first-child {
  margin-top: 0;
}

.tvmse-imx-detail__gallery-grid {
  display: grid;
  gap: 0.5rem;
  margin: 0 0 1.5rem;
  min-height: 16rem;
  border-radius: var(--tvmse-imx-card-radius, 0.75rem);
  overflow: hidden;
}

.tvmse-imx-detail__gallery-grid[data-count='2'] {
  grid-template-columns: 2fr 1fr;
}

.tvmse-imx-detail__gallery-grid[data-count='3'],
.tvmse-imx-detail__gallery-grid[data-count='4'],
.tvmse-imx-detail__gallery-grid[data-count='5'] {
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}

.tvmse-imx-detail__gallery-cell {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 7.5rem;
  padding: 0;
  border: none;
  background: var(--base-2, #f7f6f4);
  cursor: zoom-in;
  overflow: hidden;
}

.tvmse-imx-detail__gallery-cell--lead {
  grid-row: 1 / span 2;
  min-height: 16rem;
}

.tvmse-imx-detail__gallery-cell img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.tvmse-imx-detail__gallery-cell:hover img,
.tvmse-imx-detail__gallery-cell:focus-visible img {
  transform: scale(1.03);
}

.tvmse-imx-detail__gallery-cell-caption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 0.55rem 0.85rem;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 0.82rem;
  line-height: 1.45;
  text-align: left;
}

.tvmse-imx-detail__gallery-more {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
}

@media (max-width: 40rem) {
  .tvmse-imx-detail__gallery-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
    min-height: 0;
  }

  .tvmse-imx-detail__gallery-cell--lead {
    grid-column: 1 / -1;
    grid-row: auto;
    min-height: 12rem;
  }
}

.tvmse-imx-detail__lightbox {
  position: relative;
  max-width: min(96vw, 72rem);
  max-height: 92vh;
  padding: 0;
  border: none;
  border-radius: var(--tvmse-imx-card-radius, 0.75rem);
  background: #000;
  overflow: visible;
}

.tvmse-imx-detail__lightbox::backdrop {
  background: rgba(0, 0, 0, 0.72);
}

.tvmse-imx-detail__lightbox-figure {
  position: relative;
  display: inline-block;
  margin: 0;
  line-height: 0;
}

.tvmse-imx-detail__lightbox-image {
  display: block;
  max-width: 96vw;
  max-height: 92vh;
  width: auto;
  height: auto;
  margin: 0 auto;
}

.tvmse-imx-detail__lightbox-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: #111;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
  cursor: pointer;
}

.tvmse-imx-detail__lightbox-close svg {
  display: block;
  width: 1.15rem;
  height: 1.15rem;
}

.tvmse-imx-detail__lightbox-close:hover {
  background: #fff;
}

.tvmse-imx-detail__route-label {
  display: block;
  margin: 0 0 0.35rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.tvmse-imx-detail__route-from {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 0.65rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--contrast-3, rgba(0, 0, 0, 0.12));
  border-radius: var(--radius-s, 0.35rem);
  font: inherit;
}

.tvmse-imx-detail__route-submit {
  display: inline-block;
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: none;
  border-radius: var(--radius-s, 0.35rem);
  background: var(--tvmse-imx-accent, var(--accent, #005e90));
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.tvmse-imx-detail__route-submit:hover {
  filter: brightness(0.95);
}

.tvmse-imx-detail__section-title {
  margin: 0 0 0.75rem;
  font-size: 1.15rem;
}

.tvmse-imx-detail__map-section {
  margin-top: 0.5rem;
}

.tvmse-imx-detail__map {
  margin: 0;
}

.tvmse-imx-detail__aside {
  position: sticky;
  top: 5.5rem;
}

.tvmse-imx-detail__panel {
  margin: 0 0 1rem;
  padding: 1rem 1.1rem;
  background: var(--base-2, #f7f6f4);
  border: 1px solid var(--contrast-3, rgba(0, 0, 0, 0.12));
  border-radius: var(--tvmse-imx-card-radius, 0.75rem);
}

.tvmse-imx-detail__panel-title {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--contrast-2, rgba(0, 0, 0, 0.62));
}

.tvmse-imx-detail__panel-value {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.tvmse-imx-detail__address {
  margin: 0 0 0.75rem;
  font-style: normal;
  line-height: 1.5;
}

.tvmse-imx-detail__contact-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.tvmse-imx-detail__contact-list li + li {
  margin-top: 0.35rem;
}

.tvmse-imx-detail__contact-list a {
  color: var(--tvmse-imx-accent, var(--accent, #005e90));
  text-decoration: none;
  word-break: break-word;
}

.tvmse-imx-detail__contact-list a:hover {
  text-decoration: underline;
}

.tvmse-imx-detail__back {
  margin: 0 0 0.75rem;
  font-size: 0.9375rem;
}

.tvmse-imx-detail__back a {
  color: var(--tvmse-imx-accent, var(--accent, #005e90));
  text-decoration: none;
  font-weight: 600;
}

.tvmse-imx-detail--hub,
.tvmse-imx-detail--missing {
  padding: 1rem 1.25rem;
  border: 1px dashed rgba(0, 0, 0, 0.15);
  border-radius: var(--tvmse-imx-card-radius, 0.75rem);
  color: var(--tvmse-imx-muted, rgba(0, 0, 0, 0.62));
}

.tvmse-imx-detail__hub-note {
  margin: 0.5rem 0 0;
}

body.tvmse-imx-detail-active .entry-title,
body.tvmse-imx-detail-page .entry-title {
  display: none;
}

body.tvmse-imx-detail-active #primary,
body.tvmse-imx-detail-page #primary {
  padding-top: 0;
}

body.tvmse-imx-detail-page .site-main {
  padding-top: 1.5rem;
}

/* Event detail: series dates + venue map */
.tvmse-imx-event-dates {
  margin: 0 0 2rem;
  padding: 1.25rem 1.35rem;
  background: var(--base-2, #f7f6f4);
  border: 1px solid var(--contrast-3, rgba(0, 0, 0, 0.12));
  border-radius: var(--tvmse-imx-card-radius, 0.75rem);
}

.tvmse-imx-event-dates__header {
  margin-bottom: 1rem;
}

.tvmse-imx-event-dates__count,
.tvmse-imx-event-dates__month-count {
  font-weight: 500;
  color: var(--tvmse-imx-muted, var(--contrast-2, rgba(0, 0, 0, 0.62)));
}

.tvmse-imx-event-dates__range {
  margin: 0.35rem 0 0;
  font-size: 0.95rem;
  color: var(--tvmse-imx-muted, var(--contrast-2, rgba(0, 0, 0, 0.62)));
}

.tvmse-imx-event-dates__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.tvmse-imx-event-dates__row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.75rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--contrast-3, rgba(0, 0, 0, 0.08));
}

.tvmse-imx-event-dates__row:last-child {
  border-bottom: none;
}

.tvmse-imx-event-dates__when {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.65rem;
  min-width: 12rem;
}

.tvmse-imx-event-dates__weekday {
  flex: 0 0 2.25rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--tvmse-imx-accent, var(--accent, #005e90));
}

.tvmse-imx-event-dates__date {
  font-weight: 600;
}

.tvmse-imx-event-dates__time {
  color: var(--tvmse-imx-muted, var(--contrast-2, rgba(0, 0, 0, 0.62)));
  font-size: 0.95rem;
}

.tvmse-imx-event-dates__notes {
  font-size: 0.9rem;
  color: var(--tvmse-imx-muted, var(--contrast-2, rgba(0, 0, 0, 0.62)));
}

.tvmse-imx-event-dates__badge {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.tvmse-imx-event-dates__badge--soldout {
  background: rgba(180, 40, 40, 0.12);
  color: #8b1a1a;
}

.tvmse-imx-event-dates__badge--focus {
  background: rgba(0, 94, 144, 0.12);
  color: var(--tvmse-imx-accent, var(--accent, #005e90));
}

.tvmse-imx-hub {
  max-width: var(--width-l, 72rem);
  margin: 0 auto;
}

.tvmse-imx-hub__title {
  margin: 0 0 1.5rem;
  font-size: clamp(1.75rem, 2.8vw, 2.35rem);
}

body.tvmse-imx-hub-page .entry-title {
  display: none;
}

.tvmse-imx-tour-facts {
  margin: 0;
}

.tvmse-imx-tour-facts__row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--contrast-3, rgba(0, 0, 0, 0.08));
}

.tvmse-imx-tour-facts__row:last-child {
  border-bottom: none;
}

.tvmse-imx-tour-facts__row dt {
  margin: 0;
  color: var(--tvmse-imx-muted, var(--contrast-2, rgba(0, 0, 0, 0.62)));
  font-weight: 600;
}

.tvmse-imx-tour-facts__row dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
}

.tvmse-imx-detail__panel-value--rich p:first-child {
  margin-top: 0;
}

.tvmse-imx-detail__panel-value--rich p:last-child {
  margin-bottom: 0;
}

.tvmse-imx-map-pin-wrap {
  background: transparent !important;
  border: none !important;
}

.tvmse-imx-map-pin-wrap svg {
  display: block;
}

.tvmse-imx-event-dates__month {
  margin: 0.35rem 0 0;
  border-top: 1px solid var(--contrast-3, rgba(0, 0, 0, 0.08));
}

.tvmse-imx-event-dates__month:first-of-type {
  border-top: none;
}

.tvmse-imx-event-dates__month-title {
  padding: 0.65rem 0;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.tvmse-imx-event-dates__month-title::-webkit-details-marker {
  display: none;
}

.tvmse-imx-event-dates__month-title::before {
  content: "▸ ";
  display: inline-block;
  width: 1rem;
  color: var(--tvmse-imx-accent, var(--accent, #005e90));
}

.tvmse-imx-event-dates__month[open] > .tvmse-imx-event-dates__month-title::before {
  content: "▾ ";
}

.tvmse-imx-event-dates__more {
  margin-top: 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--contrast-3, rgba(0, 0, 0, 0.15));
}

.tvmse-imx-event-dates__more > summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--tvmse-imx-accent, var(--accent, #005e90));
  list-style: none;
}

.tvmse-imx-event-dates__more > summary::-webkit-details-marker {
  display: none;
}

.tvmse-imx-detail__venue-section {
  margin: 0 0 1.5rem;
}

.tvmse-imx-detail__venue-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 1.25rem;
  align-items: start;
}

@media (max-width: 40rem) {
  .tvmse-imx-detail__venue-layout {
    grid-template-columns: 1fr;
  }
}

.tvmse-imx-detail__venue-map .tvmse-imx-map {
  border-radius: var(--tvmse-imx-card-radius, 0.75rem);
  overflow: hidden;
}

.tvmse-imx-detail__venue-name {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.tvmse-imx-detail__venue-address .tvmse-imx-detail__address {
  margin-bottom: 0;
}

.tvmse-imx-detail--event .tvmse-imx-detail__panel--next-date .tvmse-imx-detail__panel-value {
  line-height: 1.45;
}
