/* Jamming.Live public Artist profile (and the authorized Preview of it).
   Everything here is scoped under .ap (or the .ap-viewer dialog), so it cannot reach the Venue page, the Manage Artist
   screens or any other page that shares jl-artist.css. Builds on the jl-auth.css tokens and jl-artist.css chips/videos. */

.ap { --ap-gutter: clamp(16px, 4vw, 56px); --ap-max: 1240px; min-width: 0; }
html:has(.ap) { scroll-padding-top: 72px; }
@media (prefers-reduced-motion: no-preference) { html:has(.ap) { scroll-behavior: smooth; } }

/* ---------- Hero: complete cover, identity and actions ---------- */
.ap-hero { max-width: var(--ap-max); margin: 0 auto; padding: clamp(18px, 3vw, 32px) var(--ap-gutter) clamp(20px, 3vw, 32px); display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 24px clamp(24px, 3.5vw, 48px); align-items: start; }
.ap-hero-nocover { grid-template-columns: minmax(0, 760px); }

/* The cover is shown whole: never cropped, never stretched, never larger than its stored pixels. A portrait, panoramic
   or small image sits centred in the dark frame. */
.ap-cover-frame { position: relative; aspect-ratio: 16 / 9; background: #0a0a0d; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.ap-cover { position: absolute; inset: 0; margin: auto; display: block; width: auto; height: auto; max-width: min(100%, var(--cw, 100%)); max-height: 100%; object-fit: contain; }

.ap-id { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
.ap-id h1 { margin: 0 0 8px; font-size: clamp(2rem, 4.2vw, 3.1rem); line-height: 1.08; letter-spacing: 0.005em; overflow-wrap: anywhere; }
.ap-id h1.ap-long-name { font-size: clamp(1.55rem, 2.6vw, 2.2rem); line-height: 1.15; }
.ap-kind { margin: 0 0 12px; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-soft); overflow-wrap: anywhere; }
.ap-rating { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 14px; margin: 0 0 8px; }
.ap-rating .rt-aggregate { margin: 0; }
.ap-rating .rt-control { margin: 0; }
.ap-rating .rt-signin { font-size: 0.92rem; }
.ap-loc { display: flex; align-items: center; gap: 8px; margin: 4px 0 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); color: var(--ink-soft); }
.ap-loc .ap-pin { flex: none; color: var(--accent-ink); }
.ap-actions { display: grid; gap: 10px; margin: 0 0 14px; }
.ap-book { width: 100%; min-height: 50px; background: linear-gradient(180deg, var(--accent-bright), var(--accent)); color: #fff; border-color: var(--accent); }
.ap-book:hover { filter: brightness(1.1); color: #fff; }

/* The shared Favorite heart, laid out as a full-width outlined action. The control, its script and its labels are unchanged. */
.ap-actions .fan-favorite { display: block; margin: 0; }
.ap-actions .fan-heart { width: 100%; min-height: 50px; gap: 10px; padding: 0 16px; border-radius: 8px; border: 1px solid #8a8a96; background: transparent; color: var(--ink); font: inherit; font-weight: 700; }
.ap-actions .fan-heart:hover { border-color: #fff; background: rgba(255, 255, 255, 0.06); color: #fff; }
.ap-actions .fan-heart > span { color: #e85d68; font-size: 1.4rem; line-height: 1; }
.ap-actions .fan-heart::after { content: "Favorite"; }
.ap-actions .fan-heart[aria-label^="Remove"]::after { content: "Favorited"; }

.ap-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 0; }

/* ---------- Section navigation ---------- */
.ap-nav { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(5, 5, 7, 0.97); }
.ap-nav ul { list-style: none; max-width: var(--ap-max); margin: 0 auto; padding: 0 var(--ap-gutter); display: flex; flex-wrap: wrap; justify-content: center; gap: 0 clamp(2px, 1.5vw, 18px); }
.ap-nav a { display: inline-flex; align-items: center; min-height: 48px; padding: 0 14px; color: var(--ink-soft); text-decoration: none; border-bottom: 3px solid transparent; font-weight: 600; }
.ap-nav a:hover { color: #fff; }
.ap-nav a[aria-current="true"] { color: #fff; border-bottom-color: var(--accent-bright); }
@media (min-width: 700px) and (min-height: 560px) { .ap-nav { position: sticky; top: 0; z-index: 20; } }

/* ---------- Body sections ---------- */
.ap-body { max-width: var(--ap-max); margin: 0 auto; padding: 0 var(--ap-gutter) clamp(36px, 6vw, 72px); }
.ap-section { padding: clamp(28px, 4vw, 44px) 0 4px; scroll-margin-top: 72px; }
.ap-section + .ap-section { border-top: 1px solid var(--line); margin-top: clamp(20px, 3vw, 32px); }
.ap-section > h2, .ap-about-text > h2 { margin: 0 0 18px; font-size: clamp(1.5rem, 2.6vw, 1.9rem); line-height: 1.15; overflow-wrap: anywhere; }

/* About + Artist Details */
.ap-about { display: grid; grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr); gap: 24px clamp(28px, 4vw, 56px); align-items: start; }
.ap-about-single { grid-template-columns: minmax(0, 820px); }
.ap-about .bio { font-size: 1.05rem; line-height: 1.7; max-width: 70ch; }
.ap-details { padding: 4px 0 4px clamp(20px, 3vw, 40px); border-left: 1px solid var(--line); }
.ap-details h3 { margin: 0 0 14px; font-size: 1.15rem; }
.ap-details dl { margin: 0; display: grid; gap: 10px; }
.ap-details dl > div { display: grid; grid-template-columns: minmax(84px, 108px) minmax(0, 1fr); gap: 10px; }
.ap-details dt { font-weight: 700; color: var(--ink); }
.ap-details dd { margin: 0; color: var(--ink-soft); overflow-wrap: anywhere; }

/* Upcoming Shows: compact rows */
.ap-shows { list-style: none; margin: 0; padding: 0; }
.ap-show { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding: 14px 0; border-top: 1px solid var(--line); }
.ap-show:first-child { border-top: 0; padding-top: 4px; }
.ap-date { flex: none; width: 56px; padding: 6px 0; display: grid; justify-items: center; line-height: 1.1; border: 1px solid #3a3a45; border-radius: 8px; background: var(--panel-2); }
.ap-date-month { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); }
.ap-date-day { font-size: 1.45rem; font-weight: 800; }
.ap-show-main { flex: 3 1 220px; display: grid; gap: 2px; }
.ap-show .evt-name { font-weight: 800; font-size: 1.05rem; color: var(--ink); overflow-wrap: anywhere; min-width: 0; }
.ap-show .evt-private { font-weight: 700; }
.ap-show .evt-date { min-width: 0; font-weight: 400; color: var(--ink-soft); font-size: 0.95rem; }
.ap-show-place { flex: 2 1 180px; display: grid; gap: 2px; margin: 0; color: var(--ink-soft); font-size: 0.95rem; overflow-wrap: anywhere; }
.ap-show-place span:first-child { color: var(--ink); }
.ap-show-link { flex: none; min-height: 44px; padding: 8px 20px; }
.ap-more { margin-top: 6px; }
.ap-more > summary { cursor: pointer; display: inline-block; padding: 12px 0; color: var(--accent-ink); font-weight: 700; }
.ap-more > summary:hover { color: #fff; }

/* Videos: one wide player, or a grid of players. The player itself (.yt) is the shared, deliberate-play embed. */
.ap-videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 20px; }
.ap-videos-one { grid-template-columns: minmax(0, 960px); }
.ap-video { min-width: 0; }

/* Photos: a strip of four thumbnails at a time (the script adds the arrows, pages through the rest and then marks the strip .ap-strip-ready, which is the only thing that makes it a single row; without the script
   every thumbnail is simply listed). Every thumbnail shows its whole photo: each tile's width follows its own aspect ratio (--r). */
.ap-strip { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.ap-photos { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.ap-photos li { flex: 0 1 calc(var(--r, 1.3333) * 220px); }
.ap-photos li[hidden] { display: none; }
.ap-strip-ready .ap-photos { flex-wrap: nowrap; }
.ap-photos a { position: relative; display: block; aspect-ratio: var(--r, 1.3333); overflow: hidden; border: 1px solid #3c464b; border-radius: 8px; background: #0a0a0d; }
.ap-photos img { display: block; width: 100%; height: 100%; object-fit: contain; }
.ap-photos a::after { content: ""; position: absolute; right: 8px; bottom: 8px; width: 30px; height: 30px; border-radius: 50%; background: rgba(0, 0, 0, 0.62) center / 16px 16px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7'/%3E%3C/svg%3E"); }
.ap-photos a:hover { border-color: #fff; }
@media (prefers-reduced-motion: no-preference) { .ap-photos img { transition: transform 0.2s; } .ap-photos a:hover img { transform: scale(1.03); } }
.ap-strip-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.ap-strip-nav { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; padding: 0 0 4px; border: 1px solid #8a8a96; border-radius: 50%; background: rgba(0, 0, 0, 0.6); color: #fff; font: inherit; font-size: 2.2rem; line-height: 1; cursor: pointer; }
.ap-strip-nav:hover { background: #fff; color: #000; border-color: #fff; }
.ap-strip-status { grid-column: 1 / -1; margin: 0; text-align: center; color: var(--ink-soft); font-size: 0.9rem; }
@media (max-width: 859px) {
  /* Four at a time as a 2 x 2 grid; the arrows float over the middle of the grid's left and right edges. */
  .ap-strip-ready .ap-photos { flex-wrap: wrap; justify-content: stretch; }
  .ap-photos li { flex: 0 0 calc(50% - 5px); }
  .ap-photos a { aspect-ratio: 4 / 3; }
  .ap-photos img { object-fit: contain; background: #0a0a0d; }
  /* The arrows sit under the grid, either side of the position text, so they never cover a photo. */
  .ap-strip-row { grid-template-areas: "list list list" "prev status next"; }
  .ap-strip-row .ap-photos { grid-area: list; }
  .ap-strip-prev { grid-area: prev; }
  .ap-strip-next { grid-area: next; }
  .ap-strip-status { grid-area: status; }
  .ap-strip-nav { width: 44px; height: 44px; }
}

/* Members */
.ap-members { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); gap: 16px; }
.ap-member { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; background: #0b1013; overflow: hidden; }
.ap-member-photo { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: #0a0a0d; }
.ap-member-none { background: radial-gradient(circle at 40% 30%, #d34b52, #2d1115 42%, #11191d 70%); }
.ap-member-text { display: grid; gap: 2px; padding: 10px 12px 12px; }
.ap-member-text b { overflow-wrap: anywhere; }
.ap-member-text span { color: var(--ink-soft); font-size: 0.92rem; overflow-wrap: anywhere; }

/* Song List and Performance Details: native disclosures */
.ap-more-info { max-width: 760px; margin-top: clamp(24px, 4vw, 40px); border-bottom: 1px solid var(--line); }
.ap-disclosure { border-top: 1px solid var(--line); }
.ap-disclosure > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 8px 4px; cursor: pointer; list-style: none; font-size: 1.15rem; font-weight: 700; }
.ap-disclosure > summary::-webkit-details-marker { display: none; }
.ap-disclosure > summary::after { content: ""; flex: none; width: 10px; height: 10px; margin: 0 6px 4px 12px; border: solid var(--ink-soft); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.ap-disclosure[open] > summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.ap-disclosure > summary > span:first-child { flex: 1; }
.ap-count { margin-left: -4px; padding: 2px 10px; border-radius: 999px; background: #171f24; border: 1px solid #39434a; font-size: 0.8rem; font-weight: 600; color: var(--ink-soft); }
.ap-songs, .ap-equipment { padding: 4px 4px 18px; margin: 0; }
.ap-songs { columns: 2 280px; }
.ap-equipment { margin-top: 0; }

/* ---------- Photo viewer (the one dialog for the grid) ---------- */
.ap-viewer { padding: 0; border: 1px solid #3c464b; border-radius: 12px; background: #000; color: #fff; width: min(96vw, 1280px); max-width: none; height: min(92dvh, 900px); max-height: none; overflow: hidden; }
.ap-viewer::backdrop { background: rgba(0, 0, 0, 0.88); }
.ap-viewer-frame { position: relative; width: 100%; height: 100%; }
.ap-viewer-stage { position: absolute; inset: 0 0 48px 0; display: flex; align-items: center; justify-content: center; touch-action: pan-y; }
.ap-viewer-image { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.ap-viewer-stage.is-loading .ap-viewer-image { opacity: 0.35; }
.ap-viewer-stage.is-loading::after { content: "Loading\2026"; position: absolute; color: var(--ink-soft); }
.ap-viewer-stage.is-failed .ap-viewer-image { display: none; }
.ap-viewer-error { margin: 0; padding: 20px; max-width: 32ch; text-align: center; color: var(--ink); line-height: 1.5; }
.ap-viewer-error[hidden] { display: none; }
.ap-viewer-count { position: absolute; left: 0; right: 0; bottom: 0; height: 48px; margin: 0; display: flex; align-items: center; justify-content: center; font-weight: 600; letter-spacing: 0.04em; }
.ap-viewer-close, .ap-viewer-nav { position: absolute; z-index: 2; display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; padding: 0; border: 1px solid rgba(255, 255, 255, 0.5); border-radius: 50%; background: rgba(0, 0, 0, 0.6); color: #fff; font: inherit; line-height: 1; cursor: pointer; }
.ap-viewer-close { top: 10px; right: 10px; font-size: 1.9rem; }
.ap-viewer-nav { top: calc(50% - 24px); font-size: 2.2rem; padding-bottom: 4px; }
.ap-viewer-prev { left: 10px; }
.ap-viewer-next { right: 10px; }
.ap-viewer-close:hover, .ap-viewer-nav:hover { background: #fff; color: #000; }
.ap-viewer-single .ap-viewer-nav { display: none; }
html.ap-viewer-open { overflow: hidden; }
@media (max-width: 600px) {
  .ap-viewer { width: 100vw; height: 100dvh; max-height: 100dvh; border: 0; border-radius: 0; }
  .ap-viewer-close, .ap-viewer-nav { width: 44px; height: 44px; }
  .ap-viewer-nav { top: calc(50% - 22px); }
}

/* ---------- Narrow screens: cover above identity ---------- */
@media (max-width: 859px) {
  .ap-hero { grid-template-columns: minmax(0, 1fr); }
  .ap-about { grid-template-columns: minmax(0, 1fr); }
  .ap-details { padding: 18px 0 0; border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .ap-members { grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 12px; }
  .ap-cover-frame { aspect-ratio: 4 / 3; }
  .ap-nav ul { justify-content: flex-start; }
  .ap-nav a { padding: 0 8px; font-size: 0.94rem; }
  .ap-show-link { flex: 1 1 100%; }
  .ap-details dl > div { grid-template-columns: minmax(0, 1fr); gap: 0; }
}
