/* ============================================================
   SkinSignal / css / prestige-hall.css
   The Prestige page's Hall (js/prestige.js hallMarkup) and the reader's
   blade (bladeMarkup), for both views:
     the hall     five wings of plinths (the dashboard's hero plinth,
                  assets/hall), each emblem standing on its plinth, the
                  plinth's LED groove in its tier's blade finish (--ba to
                  --bb), and Immortal under the dome at the end
     states       public: every tier lit. Signed in: climbed lit, the
                  reader's own spot-lit and marked, the climb ahead dark
     the blade    raw steel under the finish, the finish shown to the
                  fill point (--fx), a seam in the finish's glow
   Only transform and opacity move (a hover lift); nothing loops. The
   pillars and the floor are the hall's own pictures, faint, behind.
   ============================================================ */

/* The page holds its height until the first render, so the footer is
   never pushed down under a reader (the signed out CLS). */
#prestigeRoot:empty { min-height: 100vh; }
/* ONE WIDTH FOR THE WRAP. It used to widen (1180 to 1440) the moment a
   visitor turned out to be signed out, moving the whole page (CLS 0.084).
   Now the wrap is the wide measure from the start and only a drawn signed
   in page narrows, inside it, as it appears. Same widths as before. */
.pl-wrap { max-width: 1440px; }
.pl-wrap:not(.pl-wrap--public) > #prestigeRoot:not(:empty) { max-width: calc(1180px - 2 * clamp(16px, 3vw, 32px)); margin-inline: auto; }

.ph {
  position: relative;
  margin-top: clamp(22px, 3vw, 36px);
  padding: clamp(22px, 3vw, 40px) clamp(16px, 3vw, 44px) clamp(26px, 3vw, 44px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  overflow: hidden;
  background:
    radial-gradient(90% 40% at 50% 0%, rgba(228, 174, 57, 0.07), rgba(228, 174, 57, 0) 70%),
    linear-gradient(180deg, #0a0e15, #05080d);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 24px 60px -30px rgba(0, 0, 0, 0.95);
}
/* The pillars down both walls, faint. */
.ph::before,
.ph::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: clamp(40px, 5vw, 72px);
  background: url('/assets/hall/hall-pillar-dark.webp') center top / 100% auto repeat-y;
  opacity: 0.28;
  pointer-events: none;
}
.ph::before { left: 0; }
.ph::after { right: 0; transform: scaleX(-1); }

/* ---------- The head ---------- */
.ph__head {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px 28px;
  margin-bottom: clamp(18px, 2.4vw, 30px);
}
.ph__k {
  margin: 0 0 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #e4ae39;
}
.ph__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(26px, 3.2vw, 42px);
  line-height: 1.04;
  letter-spacing: -0.01em;
  color: var(--text, #f2efe8);
}
.ph__gold { color: #e4ae39; }
.ph__line { max-width: 440px; margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--muted, #9aa2b1); }
.ph__climb { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.ph__count { margin: 0; font-size: 13px; color: var(--muted, #9aa2b1); }
.ph__count b { font-size: 22px; font-weight: 500; color: var(--text, #f2efe8); }
.ph__pips { display: grid; grid-template-columns: repeat(30, 6px); gap: 3px; }
.ph__pips i { display: block; width: 6px; height: 6px; border-radius: 1px; background: rgba(255, 255, 255, 0.08); }
.ph__pips i.is-lit { background: rgb(var(--ba)); box-shadow: 0 0 6px rgba(var(--ba), 0.8); }
.ph__climb .ph__line { font-size: 12px; }

/* ---------- The wings ---------- */
.ph__wings { position: relative; z-index: 1; display: grid; gap: clamp(14px, 2vw, 22px); }
.ph-wing {
  position: relative;
  padding: 12px clamp(8px, 2vw, 34px) 10px;
}
/* The floor under the wing: the hall's own floor, faint. */
.ph-wing::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 55%;
  background: url('/assets/hall/hall-floor-wide.webp') center bottom / 100% 100% no-repeat;
  opacity: 0.35;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  pointer-events: none;
}
.ph-wing__head { position: relative; display: flex; align-items: baseline; gap: 12px; margin-bottom: 4px; }
.ph-wing__k { font-size: 10.5px; letter-spacing: 0.22em; text-transform: uppercase; color: #8d97a8; }
.ph-wing__label { font-family: var(--font-display); font-weight: 600; font-size: 14px; letter-spacing: 0.04em; color: #c9d0dc; }
.ph-wing__row,
.ph-summit {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 4px clamp(6px, 1.4vw, 18px);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ---------- A plinth ---------- */
.ph-p { min-width: 0; }
.ph-p__in {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 2px 8px;
  border-radius: 10px;
  text-align: center;
}
.ph-p__in[data-tier] { cursor: pointer; }
.ph-p__in[data-tier]:focus-visible { outline: 2px solid rgba(118, 166, 255, 0.85); outline-offset: 2px; }
.ph-p__in.is-open { background: rgba(255, 255, 255, 0.04); }
.ph-p__stage { position: relative; display: flex; flex-direction: column; align-items: center; width: 100%; transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1); }
.ph-p__in[data-tier]:hover .ph-p__stage { transform: translateY(-3px); }
/* The emblem, whole, standing on the plinth's top. */
.ph .ph-p__emblem {
  position: relative;
  z-index: 2;
  display: block;
  width: 66%;
  height: auto;
  aspect-ratio: 1;
  margin: 0 0 -13%;
  background: none;
  border: 0;
  box-shadow: none;
}
.ph .ph-p__emblem picture { position: absolute; inset: 0; display: block; }
.ph .ph-p__emblem img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; }
/* No gloss square over an emblem that stands free. */
.ph .ph-p__emblem::after { content: none; }
.ph-p__base { position: relative; z-index: 1; display: block; width: 100%; aspect-ratio: 520 / 202; }
.ph-p__plinth { display: block; width: 100%; height: auto; }
/* The LED groove on the plinth's front rail, in its tier's finish. */
.ph-p__led {
  position: absolute;
  left: 14.66%;
  width: 70.68%;
  top: 33.8%;
  height: 2px;
  border-radius: 1px;
  background: linear-gradient(90deg, rgb(var(--ba)), rgb(var(--bb)));
  box-shadow: 0 0 6px rgba(var(--ba), 0.9), 0 0 14px rgba(var(--ba), 0.45);
}
/* The light from above: the reader's own plinth only. */
.ph-p__light {
  position: absolute;
  left: 50%;
  top: -18%;
  width: 130%;
  height: 120%;
  transform: translateX(-50%);
  background: radial-gradient(42% 56% at 50% 46%, rgba(var(--ba), 0.42), rgba(var(--ba), 0) 72%);
  opacity: 0;
  pointer-events: none;
}
.ph-p__plate { display: flex; flex-direction: column; align-items: center; gap: 1px; margin-top: 4px; min-width: 0; max-width: 100%; }
.ph-p__no { font-size: 10px; letter-spacing: 0.14em; color: rgb(var(--ba)); }
.ph-p__name {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--text, #f2efe8);
}
.ph-p__th { font-size: 10.5px; color: #7d8696; }
.ph-p__here {
  margin-top: 4px;
  padding: 3px 8px;
  border: 1px solid rgba(228, 174, 57, 0.6);
  border-radius: 999px;
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #e4ae39;
  background: rgba(228, 174, 57, 0.08);
}

/* The states. */
.ph-p.is-current .ph-p__light { opacity: 1; }
.ph-p.is-current .ph-p__stage { transform: translateY(-4px); }
.ph-p.is-current .ph-p__emblem { filter: drop-shadow(0 0 16px rgba(var(--ba), 0.55)); }
.ph-p.is-ahead .ph-p__emblem img { filter: grayscale(0.85) brightness(0.38); }
.ph-p.is-ahead .ph-p__plinth { filter: brightness(0.6); }
.ph-p.is-ahead .ph-p__led { opacity: 0.14; box-shadow: none; }
.ph-p.is-ahead .ph-p__name { color: #7d8696; }
.ph-p.is-ahead .ph-p__no { color: #5d6573; }

/* ---------- The summit: Immortal under the dome ---------- */
.ph-summit { grid-template-columns: minmax(0, 1fr); justify-items: center; margin-top: clamp(10px, 2vw, 22px); }
.ph-p--summit { width: clamp(150px, 17vw, 210px); }
.ph-summit__stage { aspect-ratio: 220 / 322; }
.ph-summit__dome { position: absolute; inset: 0; z-index: 2; display: block; width: 100%; height: 100%; }
.ph-summit__emblem { position: absolute; left: 50%; bottom: 38.4%; z-index: 1; display: block; width: 60%; transform: translateX(-50%); }
.ph-summit__emblem img { display: block; width: 100%; height: auto; }
.ph-p--summit .ph-p__light { top: -6%; height: 90%; }
.ph-p--summit.is-public .ph-p__light { opacity: 0.6; }
.ph-p--summit.is-ahead .ph-summit__emblem img { filter: grayscale(0.85) brightness(0.38); }
.ph-p--summit .ph-p__name { font-family: var(--font-display); font-size: 17px; font-weight: 700; color: #e4ae39; }
.ph-p--summit.is-ahead .ph-p__name { color: #8a7a52; }

.ph .pl-tierdetail { position: relative; z-index: 1; margin-top: 18px; }

/* ---------- The blade ---------- */
.ph-blade { position: relative; width: 100%; max-width: 440px; aspect-ratio: var(--ar, 1000 / 192); margin: 8px 0 2px; }
.ph-blade picture,
.ph-blade img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; }
.ph-blade__steel.is-raw img { filter: grayscale(1) brightness(0.35) contrast(1.15); }
.ph-blade__finish { clip-path: inset(0 calc(100% - var(--fx) * 100%) 0 0); }
.ph-blade__seam {
  position: absolute;
  top: 26%;
  bottom: 26%;
  left: calc(var(--fx) * 100%);
  width: 2px;
  margin-left: -1px;
  background: rgb(var(--glow));
  box-shadow: 0 0 8px rgba(var(--glow), 0.95), 0 0 18px rgba(var(--glow), 0.5);
}
.ph-blade__cap { margin: 0 0 6px; font-size: 10.5px; letter-spacing: 0.06em; color: #8d97a8; }
.ph-blade__cap b { font-weight: 500; color: rgb(var(--glow, 228, 174, 57)); }

/* ---------- Narrow ---------- */
@media (max-width: 900px) {
  .ph-wing__row { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 10px; }
  .ph__climb { align-items: flex-start; }
}
@media (max-width: 520px) {
  .ph::before, .ph::after { display: none; }
  .ph__pips { grid-template-columns: repeat(15, 6px); }
  .ph-p__name { font-size: 12px; }
  .ph-p__here { font-size: 8px; letter-spacing: 0.1em; padding: 2px 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .ph-p__stage { transition: none; }
  .ph-p__in[data-tier]:hover .ph-p__stage { transform: none; }
}
