/* ---------- Gig page (#event/<id>) ---------- */
.evp-root { padding: 0 0 calc(32px + env(safe-area-inset-bottom, 0px)); }
.evp { display: flex; flex-direction: column; }

/* Phones: the picture is the top of the page — no bar, Back floats over it (same rules as the profile hero: .screen.has-hero) */
@media (max-width: 1023px) {
  .screen--event .evp__media { margin: 0; border-radius: 0; aspect-ratio: 4 / 3; max-height: 64vh; }
  .screen--event .evp__media.is-poster { aspect-ratio: 4 / 5; }
  .screen--event .evp__day { left: 16px; top: auto; bottom: 14px; }
  .screen--event .evp__main { padding-top: 18px; }
}
/* picture: poster (4:5) when there is one, otherwise a wide cover */
.evp__media { position: relative; margin: 12px 16px 0; border-radius: 18px; overflow: hidden; background: var(--color-field); aspect-ratio: 16 / 10; max-height: 62vh; }
.evp__media.is-poster { aspect-ratio: 4 / 5; }
.evp__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.evp__ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--color-ink-muted); }
.evp__ph svg { width: 40px; height: 40px; }
.evp__day { position: absolute; left: 12px; top: 12px; min-width: 48px; padding: 6px 6px 5px; border-radius: 12px; background: var(--color-surface); color: var(--color-ink); text-align: center; line-height: 1; box-shadow: 0 2px 10px rgba(0, 0, 0, .22); }
.evp__day b { display: block; font-size: 22px; font-weight: 800; }
.evp__day small { display: block; margin-top: 3px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--color-accent-text, var(--color-accent)); }
.evp.is-cancelled .evp__media img, .evp.is-past .evp__media img { filter: grayscale(.85); opacity: .75; }

.evp__main { display: flex; flex-direction: column; gap: 14px; min-width: 0; padding: 18px 16px 0; }
.evp__when { margin: 0; font-size: 14px; color: var(--color-ink-muted); text-transform: capitalize; }
.evp__when b { color: var(--color-ink); font-weight: 700; }
.evp__title { margin: -6px 0 0; font-size: 28px; line-height: 1.12; font-weight: 800; letter-spacing: -.01em; text-wrap: balance; }
.evp__where { display: flex; align-items: center; gap: 6px; margin: -4px 0 0; font-size: 15px; color: var(--color-ink); }
.evp__where svg { flex: none; width: 17px; height: 17px; color: var(--color-ink-muted); }
.evp__where a { color: inherit; font-weight: 600; text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .evp__where a:hover { text-decoration: underline; } }

.evp__banner { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; margin: 0; padding: 12px 14px; border-radius: 14px; background: var(--color-field); font-size: 14px; line-height: 19px; }
.evp__banner > svg { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--color-ink-muted); }
.evp__banner > span { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.evp__banner small { color: var(--color-ink-muted); font-size: 13px; }
.evp__banner.is-bad > svg, .evp__banner.is-bad b { color: var(--color-danger); }
.evp__banner .ob-btn { flex: none; }

.evp__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.evp__go { flex: 1 1 140px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 18px; border-radius: 12px;
  background: var(--color-ink); color: var(--color-surface); font-size: 15px; font-weight: 700; transition: transform .1s ease, background-color .15s ease; }
.evp__go svg { width: 18px; height: 18px; }
.evp__go.is-on { background: var(--color-positive); color: var(--color-on-positive); }
.evp__go:active { transform: scale(.98); }
.evp__int, .evp__tix { height: 48px; padding: 0 16px; border-radius: 12px; font-size: 15px; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.evp__tix svg, .evp__int svg { width: 18px; height: 18px; }
.evp__note { display: flex; gap: 8px; align-items: center; margin: -4px 0 0; font-size: 13px; color: var(--color-ink-muted); }
.evp__note svg { flex: none; width: 15px; height: 15px; }

.evp__social { display: flex; align-items: center; gap: 10px; margin: 0; padding: 12px 0; border-top: 1px solid var(--color-line); border-bottom: 1px solid var(--color-line); font-size: 14px; }
.evp__social > svg { width: 20px; height: 20px; color: var(--color-ink-muted); }
.evp__social small { color: var(--color-ink-muted); font-size: 13px; }
.evp__faces { display: flex; flex: none; }
.evp__face { width: 28px; height: 28px; font-size: 11px; box-shadow: 0 0 0 2px var(--color-bg); }
.evp__face + .evp__face { margin-left: -8px; }

.evp__tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 8px; }
.evp__tool { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-width: 0; height: 68px; padding: 0 8px; border: 1px solid var(--color-line); border-radius: 14px; background: none;
  color: var(--color-ink); font-size: 13px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.evp__tool span { max-width: 100%; }
.evp__tool span { overflow: hidden; text-overflow: ellipsis; }
.evp__tool svg { flex: none; width: 20px; height: 20px; color: var(--color-ink); }
@media (hover: hover) and (pointer: fine) { .evp__tool:hover { background: var(--color-field); } }

.evp__sec { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.evp__h { margin: 0 0 2px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--color-ink-muted); }
.evp-card { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--color-line); border-radius: 14px; }
.evp-card__main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.evp-card__av { flex: none; width: 48px; height: 48px; font-size: 16px; }
.evp-card__av--sq { border-radius: 12px; }
.evp-card__txt { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.evp-card__txt b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.evp-card__txt small { font-size: 13px; color: var(--color-ink-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.evp-card__follow { flex: none; height: 36px; padding: 0 14px; font-size: 14px; }
.evp-card__follow svg { width: 16px; height: 16px; }

.evp__join { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; margin-top: 8px; padding: 18px; border-radius: 16px; background: var(--color-field); }
.evp__join p { margin: 0; font-size: 15px; line-height: 21px; max-width: 46ch; }
.evp__join .ob-btn { text-decoration: none; }

/* entry points elsewhere */
.ob-event__open { display: inline-flex; align-items: center; gap: 4px; margin-top: 10px; padding: 0; background: none; color: var(--color-accent-text, var(--color-accent)); font-size: 14px; font-weight: 600; }
.ob-event__open svg { width: 16px; height: 16px; }
.pf-ev__title { display: block; padding: 0; background: none; color: inherit; font: inherit; font-weight: 700; text-align: left; }
.pf-ev__date { cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .pf-ev__title:hover, .gig__title button:hover { text-decoration: underline; } }

/* desktop: picture left (stays in view), everything else right */
@media (min-width: 900px) {
  .evp { display: grid; grid-template-columns: minmax(280px, 400px) minmax(0, 1fr); gap: 32px; align-items: start; max-width: 1040px; margin: 0 auto; padding: 24px 32px 0; }
  .evp__media { position: sticky; top: 24px; margin: 0; max-height: none; }
  .evp__main { padding: 4px 0 0; }
  .evp__title { font-size: 36px; }
  .evp__go { flex: 0 1 200px; }
}
/* the picture follows the poster's own shape (media.js posterImg); a gig without one shows its typographic poster */
.evp__media.is-type .ev-poster__day b { font-size: clamp(56px, 9vw, 84px); }
.evp__media .ev-poster__body { max-width: 100%; }
@media (max-width: 1023px) { .screen--event .evp__media.is-type, .screen--event .evp__media.is-fit { max-height: 72vh; } }

/* 24 Oct: phones — the picture runs edge to edge from the very top (Back floats over it), and a poster's date
   starts below Back instead of under it */
@media (max-width: 1023px) {
  .screen--event.has-hero .screen-inner { padding-top: 0; padding-left: 0; padding-right: 0; }
  .screen--event .evp__media .ev-poster { padding-top: calc(env(safe-area-inset-top, 0px) + 68px); }
}
