/* ═══ The musician's room — a standalone layer ═══════════════════
   Every main-view element in the artist room carries an ar-* class and is
   styled HERE and only here. Nothing in this view inherits from
   bandworld.css: the band room's rules cannot reach an ar-* element, so a
   change to either room can no longer quietly break the other.

   What still lives on the bw-* system, deliberately: the focus panels
   (career wall / record shelf / the bands), the return button and focus
   nav, and the scrim — the artist room shares that machinery with the band
   room by rendering under #band-world, and it is behaviour, not layout.

   Approved against the Serpent Above reference, verified by screenshot at
   2000x1010 and 1512x950 before every deploy. */

/* ── the four zones share one top edge ── */
.ar-wall, .ar-identity, .ar-shelfzone {
  position: absolute; z-index: 10; top: 92px;
}
.ar-wall, .ar-shelfzone { cursor: pointer; outline: 0; }
.ar-wall:focus-visible, .ar-shelfzone:focus-visible {
  outline: 1px solid #4a4f56; outline-offset: 6px;
}

/* the zone headings sit on one shared line: display face, the room red */
.ar-wall > header, .ar-shelfzone > header, .ar-name {
  display: flex; align-items: baseline; gap: 12px;
  min-height: 56px; margin: 0 0 20px;
  font: 400 30px/1 var(--display-font);
  color: var(--accent); letter-spacing: .02em;
}
/* the musician's name, and only the name: red blackletter is set in capitals
   everywhere on the site (see CLAUDE.md). The zone headings share the line
   above but are not names, so they keep their own case. */
.ar-name { text-transform: uppercase; }
.ar-wall > header b, .ar-shelfzone > header b { font: inherit; color: inherit; }
.ar-wall > header span, .ar-shelfzone > header span {
  color: #8b9099; font: 700 11px var(--nav-font); letter-spacing: .14em;
}

/* ── the wall: every documented night, flyers first ── */
.ar-wall {
  left: 1.1%; bottom: 88px;
  width: clamp(330px, 23%, 520px);
  perspective: 900px;
}
.ar-paperwall {
  position: absolute; top: 76px; bottom: 0; left: 0; right: 3px;
  columns: 3 auto; column-gap: 5px;
  overflow: hidden;
}
.ar-paperwall.density-high { columns: 5 auto; column-gap: 4px; }
.ar-paperwall.density-extreme { columns: 8 auto; column-gap: 2px; }
.ar-paper {
  position: relative; min-width: 0; overflow: hidden;
  break-inside: avoid; margin: 0 0 5px;
  color: #15120f; background: #a99e8b;
  border: 1px solid #4a4f56;
  box-shadow: 0 5px 14px rgb(0 0 0 / .6);
  transform: rotate(calc((var(--paper-index) % 7 - 3) * .45deg));
  transform-origin: 50% 3%;
  cursor: pointer;
}
.ar-paper:nth-child(3n) { transform: translate(2px, -2px) rotate(-2deg); }
.ar-paper:nth-child(5n) { transform: translate(-2px, 2px) rotate(2.5deg); z-index: 2; }
.ar-paper:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.ar-paper > div {
  aspect-ratio: 3 / 4; padding: 4px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  background:
    radial-gradient(circle at 50% 35%, transparent, rgb(0 0 0 / .25)),
    repeating-linear-gradient(12deg, #b0a591 0 2px, #9c9280 3px 4px);
}
.ar-paper small { font-size: 9px; letter-spacing: .12em; }
.ar-paper b { margin: auto 0; font: 400 13px/.78 var(--display-font); }
.ar-paper span { font-size: 9px; font-weight: 800; }
.ar-paper.has-scan img { display: block; width: 100%; height: auto; }

/* ── the identity: name over everything, a centred ladder of facts.
   The zone owns the whole centre column down to the timeline and centres
   its content vertically — on a tall monitor the air splits evenly instead
   of pooling into a hole between the badges and the rail. ── */
.ar-identity {
  left: calc(1.1% + clamp(330px, 23%, 520px) + 26px);
  right: calc(1.1% + clamp(400px, 24%, 500px) + 26px);
  bottom: 302px;
  display: flex; flex-direction: column; justify-content: center;
}
.ar-name, .ar-figure, .ar-honors { flex: none; }
.ar-identity::before, .ar-identity::after {
  content: ''; position: absolute; top: -10px; bottom: 0;
  width: 1px; background: #1e2126;
}
.ar-identity::before { left: -27px; }
.ar-identity::after { right: -27px; }
.ar-name { justify-content: center; text-align: center; font-size: clamp(30px, 2.4vw, 44px); }

.ar-figure {
  display: grid; grid-template-columns: minmax(280px, 1fr) minmax(300px, 1fr);
  gap: clamp(24px, 3vw, 54px); align-items: center;
  max-height: min(34vh, 330px);
}
.ar-copy {
  display: grid; gap: 11px; justify-items: center; align-content: center;
  text-align: center; min-width: 0;
}
.ar-born { display: flex; align-items: baseline; gap: 9px; }
.ar-born span {
  color: #8b9099; font: 700 10px var(--nav-font);
  letter-spacing: .18em; text-transform: uppercase;
}
.ar-born b { color: #eef1f5; font: 400 34px/1 var(--display-font); }
.ar-fact { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.ar-fact span { color: #8b9099; font: 600 11px var(--nav-font); letter-spacing: .06em; }
.ar-fact b { color: #e4e8ed; font: 600 14px/1.35 var(--nav-font); }
.ar-known { margin-top: 7px; }
.ar-known > span {
  display: block; margin-bottom: 5px;
  color: #8b9099; font: 700 10px var(--nav-font);
  letter-spacing: .18em; text-transform: uppercase;
}
.ar-known div { color: #dfe4ea; font: 400 17px/1.45 var(--display-font); }
.ar-counts {
  margin-top: 10px; color: #6e757e;
  font: 700 10px var(--nav-font); letter-spacing: .16em;
}
.ar-photo {
  position: relative; overflow: hidden;
  aspect-ratio: 4 / 5; max-height: min(32vh, 310px);
  border: 1px solid #41464d; background: #101010;
  box-shadow: 0 26px 50px rgb(0 0 0 / .66);
  display: grid; place-items: center;
}
.ar-photo img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.6) contrast(1.05); }
.ar-photo > span { font: 400 76px var(--display-font); color: #3f444a; }

/* ── the honors: one even row — title over the metal, tally under it.
   Fixed internal rows, so every badge shares the same three baselines. ── */
.ar-honors { margin-top: 20px; padding-top: 16px; border-top: 1px solid #23262b; }
.ar-honors .honors {
  display: flex; flex-direction: row; flex-wrap: wrap;
  justify-content: center; align-items: flex-start;
  width: 100%; gap: 18px 32px; margin: 0;
}
.ar-honors .honor {
  display: grid; grid-template-columns: none; grid-template-rows: 17px 52px 12px;
  justify-items: center; align-items: center; gap: 5px 0; min-width: 0;
}
.ar-honors .honor > * { grid-column: 1; }
.ar-honors .honor img {
  grid-row: 2; width: 48px; height: 48px; object-fit: contain;
}
.ar-honors .honor .hl {
  grid-row: 1; align-self: end;
  font: 400 15px/1 var(--display-font); color: #dfe4ea;
  letter-spacing: 0; white-space: nowrap;
}
.ar-honors .honor .n {
  grid-row: 3; align-self: start; white-space: nowrap;
  font: 700 10px var(--nav-font); color: #8b9099;
  letter-spacing: .12em; text-transform: uppercase;
}

/* ── the shelf: sleeves in a grid, captions in the open, never clipped ──
   The zone is a flex column — header, two rows of sleeves, the credits
   strip — and the SLEEVES take whatever height is left, not the other way
   round. A short window gets smaller covers; nothing is ever cut. */
.ar-shelfzone {
  right: 1.1%; bottom: 292px;
  width: clamp(400px, 24%, 500px);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.ar-shelfzone > header { flex: none; justify-content: flex-end; }
.ar-shelf {
  flex: 1 1 auto; min-height: 0;
  /* the natural height of two full rows — the shelf shrinks on a short
     window but never stretches past it, so a tall monitor doesn't pull the
     rows apart or strand the credits strip in mid-air */
  max-height: calc((clamp(400px, 24vw, 500px) - 28px) * 2 / 3 + 94px);
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 18px 14px;
}
.ar-record { position: relative; min-width: 0; cursor: pointer; transition: transform .18s, filter .18s; }
.ar-record:hover, .ar-record:focus-visible { transform: translateY(-4px); filter: brightness(1.08); }
.ar-record:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.ar-shelf .ar-record {
  display: grid; grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 0; align-content: end;
}
.ar-record > img, .ar-record .ar-nocover {
  display: block; width: 100%; aspect-ratio: 1; height: auto; object-fit: cover;
  border: 1px solid #2f343b;
  box-shadow: 0 12px 24px rgb(0 0 0 / .55);
}
.ar-shelf .ar-record > img, .ar-shelf .ar-record .ar-nocover {
  grid-row: 1; align-self: end; justify-self: start;
  height: 100%; width: auto; max-width: 100%; max-height: 100%;
}
.ar-record .ar-nocover {
  display: grid; place-items: center;
  color: #4c525a; background: #0c0e11; font-size: 15px;
}
.ar-shelf .ar-record .ar-nocover { width: 100%; height: auto; max-height: 100%; }
.ar-record-copy { grid-row: 2; padding: 6px 8px 0 1px; }
.ar-record-copy small { color: #8b939d; font-size: 10px; letter-spacing: .08em; }
.ar-record-copy h3 {
  margin: 2px 0 0; min-height: 0;
  font: 400 15px/1.05 var(--display-font); color: #dfe4ea;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ar-record-copy b, .ar-record-copy span { display: none; }

.ar-credhead {
  flex: none;
  display: flex; align-items: baseline; justify-content: flex-end; gap: 10px;
  margin: 14px 0 8px;
  font: 400 20px/1 var(--display-font); color: var(--accent); letter-spacing: .02em;
}
.ar-credhead b { font: inherit; color: inherit; }
.ar-credhead span { color: #8b9099; font: 700 11px var(--nav-font); letter-spacing: .14em; }
.ar-credstrip {
  flex: none;
  display: grid; grid-template-columns: repeat(auto-fill, 44px);
  justify-content: start; gap: 6px;
}
.ar-credstrip .ar-record-copy { display: none; }

/* ── the timeline: one line on the floor. Ticks are nights (blue home,
   red abroad), logos are joins, sleeves hang under their year. ── */
.ar-timeline {
  position: absolute; z-index: 11; bottom: 20px; height: 262px;
  left: calc(1.1% + clamp(330px, 23%, 520px) + 26px);
  right: calc(1.1% + clamp(400px, 24%, 500px) + 26px);
  padding: 12px 0;
}
.ar-timeline > header b { color: #8b9099; font-size: 10.5px; letter-spacing: .18em; }
.ar-rail {
  position: relative; margin: 96px 52px 0;
  border-top: 2px solid #454a51;
}
.ar-railyear {
  position: absolute; top: 0; transform: translateY(-50%); z-index: 5;
  color: #8b9099; font: 700 11px var(--nav-font); letter-spacing: .16em;
}
.ar-railyear.is-start { left: -52px; }
.ar-railyear.is-end { right: -52px; }

/* a year is a target: dot on the line, label on hover */
.ar-rail > div {
  position: absolute; top: -14px; transform: translateX(-50%);
  text-align: center; cursor: default;
  transition: transform .18s, filter .18s;
}
.ar-rail > div::before {
  content: ''; display: block; width: 10px; height: 10px; margin: 5px auto;
  border: 2px solid #585e66; border-radius: 50%; background: #0b0c0c;
  transition: border-color .18s, background .18s;
}
.ar-rail > div.has-release::before { width: 17px; height: 17px; border-color: #aeb6c0; background: #2b3038; }
.ar-rail > div.has-join::before { border-color: #c9d0d9; background: #2a2113; }
.ar-rail > div:hover { z-index: 12; transform: translateX(-50%) translateY(-7px); filter: brightness(1.18); }
.ar-rail > div:hover::before { border-color: #c9d0d9; background: #242830; }
.ar-rail b { font-size: 11.5px; color: #8b9099; opacity: 0; transition: opacity .18s; }
.ar-rail > div.has-release b { font-size: 15px; color: #c9d0d9; }
.ar-rail > div:hover b { opacity: 1; }
.ar-rail.is-dense > div:not(.has-release) b { display: none; }
.ar-rail > div span {
  display: block; max-width: 112px; opacity: 0; overflow: hidden;
  color: #8d867d; font-size: 9.5px; white-space: nowrap; text-overflow: ellipsis;
  transition: opacity .18s, max-width .18s;
}
.ar-rail > div:hover span {
  position: relative; z-index: 13; opacity: 1;
  max-width: 200px; white-space: normal; color: #dde1e7;
  margin-top: 3px; padding: 4px 6px;
  background: rgb(8 9 8 / .95); border: 1px solid #3d4249;
}

/* one tick, one night — a soft edge light, never a glowing wall */
.ar-night {
  position: absolute; bottom: 2px; z-index: 3;
  width: var(--night-w, 5px); max-width: 9px; height: 34px;
  transform: translateX(-50%); border-radius: 1px;
  transition: height .16s, filter .16s;
}
.ar-night.is-local  { background: #8fd0ee; box-shadow: 0 0 3px rgb(126 198 230 / .5); }
.ar-night.is-abroad { background: var(--accent); box-shadow: 0 0 3px rgb(224 69 62 / .5); }
.ar-night.is-one { cursor: pointer; }
.ar-night.is-one:hover, .ar-night.is-one:focus-visible {
  height: 46px; filter: brightness(1.45); z-index: 6; outline: none;
}
.ar-night.is-one:focus-visible { box-shadow: 0 0 0 2px var(--accent); }

/* a join is a white mark standing clear of the line */
.ar-join {
  position: absolute; left: 50%; bottom: calc(52px + var(--join-lift, 0px)); z-index: 4;
  display: block; width: max-content;
  transform: translateX(-50%);
  transition: transform .18s, filter .18s;
}
.ar-rail > div.has-join.has-release .ar-join { bottom: calc(100px + var(--join-lift, 0px)); }
.ar-join img {
  display: block; height: 44px; width: auto; max-width: 150px;
  object-fit: contain; mix-blend-mode: screen; filter: var(--logo-filter);
}
.ar-join.is-crowded img { height: 32px; max-width: 120px; }
.ar-join:hover, .ar-join:focus-visible {
  transform: translateX(-50%) translateY(-5px) scale(1.08); filter: brightness(1.35);
}
.ar-join:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.ar-join .ar-join-name { display: none; }
.ar-join.is-packed img { display: none; }
.ar-join.is-packed .ar-join-name {
  display: block; white-space: nowrap;
  font: 700 10px/1.2 var(--nav-font); color: #d8dde3;
  letter-spacing: .1em; text-transform: uppercase;
}
.ar-join.is-text b { font: 400 12px/1.05 var(--display-font); color: #d8dde3; }

/* releases hang under the line, one size — hierarchy is position, not scale */
.ar-relrow { position: relative; height: 74px; margin-top: 4px; }
.ar-relmark {
  position: absolute; top: 0; transform: translateX(-50%);
  width: 46px; height: 46px; padding: 0;
  border: 1px solid #2b2f35; background: #0c0e11;
  cursor: pointer; overflow: hidden;
  transition: transform .16s, border-color .16s, filter .16s;
}
.ar-relmark img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ar-relmark span { color: #4c525a; font-size: 13px; }
.ar-relmark:hover, .ar-relmark:focus-visible {
  z-index: 6; transform: translateX(-50%) translateY(-5px) scale(1.12);
  border-color: var(--accent); filter: brightness(1.12); outline: none;
}
.ar-relmark:focus-visible { box-shadow: 0 0 0 2px var(--accent); }

/* hover a night, see the night */
.ar-peek {
  position: absolute; z-index: 30;
  transform: translateX(-50%);
  width: max-content; max-width: 240px;
  padding: 7px 9px 8px;
  background: rgb(10 12 14 / .97);
  border: 1px solid #3a4048;
  box-shadow: 0 18px 40px rgb(0 0 0 / .8);
  pointer-events: none; text-align: center;
}
.ar-peek img {
  display: block; max-width: 200px; max-height: 200px;
  margin: 0 auto 6px; border: 1px solid #2a2e34;
}
.ar-peek small {
  display: block; color: #aab2bc;
  font: 600 10px/1.4 var(--nav-font); letter-spacing: .06em;
}

/* ── a focus panel opening darkens the whole main view ── */
#band-world:not([data-focus='none']) .ar-wall,
#band-world:not([data-focus='none']) .ar-identity,
#band-world:not([data-focus='none']) .ar-shelfzone,
#band-world:not([data-focus='none']) .ar-timeline {
  opacity: 0; pointer-events: none;
}
.ar-wall, .ar-identity, .ar-shelfzone, .ar-timeline { transition: opacity .45s; }

/* ── a narrower room compacts before it collides ── */
@media (max-width: 1700px) {
  .ar-figure { max-height: min(28vh, 270px); }
  .ar-photo { max-height: min(26vh, 250px); }
  .ar-honors .honors { gap: 14px 22px; }
  .ar-honors .honor { grid-template-rows: 15px 40px 11px; }
  .ar-honors .honor img { width: 36px; height: 36px; }
  .ar-honors .honor .hl { font-size: 13px; }
  .ar-join { bottom: calc(42px + var(--join-lift, 0px)); }
  .ar-rail > div.has-join.has-release .ar-join { bottom: calc(66px + var(--join-lift, 0px)); }
  .ar-join img { height: 32px; max-width: 120px; }
  .ar-join.is-crowded img { height: 24px; max-width: 92px; }
  .ar-relmark { width: 38px; height: 38px; }
}

/* a tall monitor gets a larger portrait, not a hole */
@media (min-height: 1150px) {
  .ar-figure { max-height: min(44vh, 470px); }
  .ar-photo { max-height: min(42vh, 450px); }
}

/* below the room's working width the archive column page takes over —
   the JS gate (ROOM_MQ) and this rule must agree on 1440 */
@media (max-width: 1439px) {
  .artist-page #band-world { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  .ar-paper, .ar-record, .ar-join, .ar-relmark, .ar-rail > div {
    transition-duration: .01ms !important;
  }
}
