.characters-page {
  --han-accent: #d8b86b;
  --sten-accent: #9472ef;
  --soren-accent: #5d94d9;
  background: #040509;
}

.characters-page .site-header--solid { background: rgba(5, 6, 10, 0.82); }

.pack-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(3.5rem, 6vw, 6rem) 0 2rem;
  border-bottom: 1px solid var(--line-soft);
  background:
    radial-gradient(ellipse at 50% 12%, rgba(102, 73, 157, 0.14), transparent 34rem),
    linear-gradient(180deg, #080911, #040509 48%, #030407);
  isolation: isolate;
}

.pack-hero::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    repeating-linear-gradient(90deg, transparent 0 11.9%, rgba(255, 255, 255, 0.012) 12%, transparent 12.1%),
    linear-gradient(180deg, transparent 64%, rgba(3, 4, 7, 0.94));
  content: "";
  pointer-events: none;
}

.pack-hero__aura {
  position: absolute;
  z-index: -1;
  top: 4rem;
  left: 50%;
  width: min(80vw, 76rem);
  aspect-ratio: 1;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(100, 71, 154, 0.09), transparent 64%);
  filter: blur(2.5rem);
  pointer-events: none;
}

.pack-hero__intro {
  position: relative;
  z-index: 20;
  width: var(--content);
  margin-inline: auto;
}

.pack-hero__intro h1 {
  max-width: 760px;
  margin-bottom: 1rem;
  font-size: clamp(2.65rem, 5.3vw, 5.7rem);
  line-height: 0.96;
  letter-spacing: -0.045em;
}

.pack-hero__summary {
  max-width: 52ch;
  margin-bottom: 0;
  color: #b9b5c0;
  font-size: 1rem;
  line-height: 1.7;
}

.pack-audio-controls {
  position: absolute;
  right: 0;
  bottom: 0;
  max-width: 16rem;
}

.pack-audio-controls[hidden] { display: none; }

.pack-audio-toggle {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 0.7rem;
  padding: 0.65rem 0.95rem;
  border: 1px solid rgba(205, 168, 87, 0.35);
  border-radius: 2px;
  background: rgba(9, 10, 16, 0.78);
  color: var(--paper);
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
  touch-action: manipulation;
  transition: border-color 180ms ease, background 180ms ease;
}

.pack-audio-toggle:hover,
.pack-audio-toggle[aria-pressed="true"] {
  border-color: var(--gold);
  background: rgba(205, 168, 87, 0.10);
}

.pack-audio-toggle:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 4px;
}

.pack-audio-toggle:disabled { cursor: default; opacity: 0.7; }
.pack-audio-toggle svg { fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.pack-audio-waves { display: none; }
.pack-audio-toggle[aria-pressed="true"] .pack-audio-waves { display: block; }
.pack-audio-toggle[aria-pressed="true"] .pack-audio-muted { display: none; }
.pack-audio-status { display: block; margin-top: 0.5rem; color: var(--muted); font-size: 0.875rem; line-height: 1.45; }
.pack-audio-status:empty { display: none; }

@media (max-width: 1050px) {
  .pack-audio-controls { position: static; max-width: none; margin-top: 1.25rem; }
}

.pack-stage {
  position: relative;
  width: min(1350px, calc(100% - 2rem));
  margin: clamp(2.2rem, 4vw, 4rem) auto 0;
  isolation: isolate;
}

.pack-visual {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  border: 1px solid rgba(205, 168, 87, 0.16);
  background: #05060a;
  box-shadow: 0 2.5rem 7rem rgba(0, 0, 0, 0.58);
  isolation: isolate;
}

.pack-visual::before,
.pack-visual::after {
  position: absolute;
  z-index: 9;
  content: "";
  pointer-events: none;
}

.pack-visual::before {
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.03);
  box-shadow: 0 0 7rem rgba(0, 0, 0, 0.74) inset;
}

.pack-visual::after {
  right: 0;
  bottom: 0;
  left: 0;
  height: 19%;
  background: linear-gradient(180deg, transparent, rgba(3, 4, 8, 0.42));
}

.pack-scene,
.pack-scene img,
.pack-scene__veil {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.pack-scene img {
  max-width: none;
  object-fit: cover;
  object-position: center;
}

.pack-scene__base {
  z-index: 1;
  filter: grayscale(0.82) saturate(0.32) brightness(0.48) contrast(1.08);
  transition: filter 520ms ease;
}

.pack-scene__reveal {
  z-index: 2;
  filter: saturate(0.92) brightness(0.98) contrast(1.02);
  opacity: 0;
  transition: opacity 520ms cubic-bezier(0.2, 0.72, 0.2, 1);
  will-change: opacity;
}

.pack-scene__reveal--han {
  -webkit-mask-image: radial-gradient(ellipse 20% 55% at 31.5% 50%, #000 0 54%, rgba(0, 0, 0, 0.72) 72%, transparent 100%);
  mask-image: radial-gradient(ellipse 20% 55% at 31.5% 50%, #000 0 54%, rgba(0, 0, 0, 0.72) 72%, transparent 100%);
}

.pack-scene__reveal--sten {
  -webkit-mask-image: radial-gradient(ellipse 20% 57% at 50% 50%, #000 0 54%, rgba(0, 0, 0, 0.72) 72%, transparent 100%);
  mask-image: radial-gradient(ellipse 20% 57% at 50% 50%, #000 0 54%, rgba(0, 0, 0, 0.72) 72%, transparent 100%);
}

.pack-scene__reveal--soren {
  -webkit-mask-image: radial-gradient(ellipse 21% 56% at 69.5% 50%, #000 0 54%, rgba(0, 0, 0, 0.72) 72%, transparent 100%);
  mask-image: radial-gradient(ellipse 21% 56% at 69.5% 50%, #000 0 54%, rgba(0, 0, 0, 0.72) 72%, transparent 100%);
}

.pack-stage[data-active="han"] .pack-scene__reveal--han,
.pack-stage[data-active="sten"] .pack-scene__reveal--sten,
.pack-stage[data-active="soren"] .pack-scene__reveal--soren { opacity: 1; }

.pack-stage[data-engaged="true"] .pack-scene__base {
  filter: grayscale(0.94) saturate(0.14) brightness(0.36) contrast(1.1);
}

.pack-scene__veil {
  z-index: 4;
  background:
    linear-gradient(90deg, rgba(3, 4, 8, 0.32), transparent 16%, transparent 84%, rgba(3, 4, 8, 0.34)),
    linear-gradient(180deg, rgba(3, 4, 8, 0.17), transparent 19%, transparent 78%, rgba(3, 4, 8, 0.36));
  pointer-events: none;
}

.pack-figures {
  position: absolute;
  z-index: 10;
  inset: 0;
}

.pack-member {
  --member-accent: var(--gold);
  position: absolute;
  top: 4%;
  bottom: 6%;
  width: 19%;
}

.pack-member--han { --member-accent: var(--han-accent); left: 22%; }
.pack-member--sten { --member-accent: var(--sten-accent); left: 40.5%; }
.pack-member--soren { --member-accent: var(--soren-accent); left: 59%; }

.pack-member__trigger {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--paper);
  cursor: pointer;
  outline: none;
}

.pack-member__trigger::before {
  position: absolute;
  inset: 5% 8% 10%;
  border: 1px solid transparent;
  border-radius: 48%;
  content: "";
  transition: border-color 220ms ease, box-shadow 320ms ease;
}

.pack-member__trigger:focus-visible::before {
  border-color: color-mix(in srgb, var(--member-accent), transparent 48%);
  box-shadow: 0 0 2rem color-mix(in srgb, var(--member-accent), transparent 82%);
}

.pack-member__label {
  position: absolute;
  right: -8%;
  bottom: 0;
  left: -8%;
  transform: translateY(0.3rem);
  text-align: center;
  text-shadow: 0 2px 1rem #000;
  opacity: 0.62;
  transition: opacity 300ms ease, transform 420ms ease;
}

.pack-member__label::before {
  display: block;
  width: 42%;
  height: 1px;
  margin: 0 auto 0.58rem;
  transform: scaleX(0.56);
  background: var(--member-accent);
  content: "";
  opacity: 0.42;
  transition: opacity 300ms ease, transform 420ms ease;
}

.pack-member__label small,
.pack-member__label strong { display: block; }

.pack-member__label small {
  margin-bottom: 0.24rem;
  color: var(--member-accent);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.pack-member__label strong {
  font-family: var(--serif);
  font-size: clamp(1.05rem, 1.65vw, 1.55rem);
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.pack-stage[data-engaged="true"] .pack-member:not(.is-active) .pack-member__label { opacity: 0.24; }
.pack-member.is-active .pack-member__label { transform: translateY(0); opacity: 1; }
.pack-member.is-active .pack-member__label::before { transform: scaleX(1); opacity: 0.88; }

.pack-profiles {
  position: absolute;
  z-index: 20;
  inset: 0;
  pointer-events: none;
}

.pack-profile {
  --profile-accent: var(--gold);
  position: absolute;
  top: 30%;
  width: min(25rem, 30vw);
  padding: 1.35rem 1.4rem 1.45rem;
  transform: translateY(1rem);
  border: 1px solid color-mix(in srgb, var(--profile-accent), transparent 68%);
  border-left: 2px solid var(--profile-accent);
  background: linear-gradient(135deg, rgba(9, 10, 16, 0.94), rgba(5, 6, 10, 0.8));
  box-shadow: 0 1.8rem 4rem rgba(0, 0, 0, 0.48);
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms ease, transform 420ms ease;
  backdrop-filter: blur(16px);
}

.pack-profile.is-visible { transform: translateY(0); opacity: 1; pointer-events: auto; }

.pack-profile--neutral {
  top: auto;
  bottom: 2.2rem;
  left: 50%;
  width: min(35rem, 52vw);
  transform: translate(-50%, 1rem);
  border-left-width: 1px;
  text-align: center;
}

.pack-profile--neutral.is-visible { transform: translate(-50%, 0); }
.pack-profile--neutral > p:last-child { margin-bottom: 0; color: var(--muted); font-size: 0.88rem; }
.pack-profile--han { --profile-accent: var(--han-accent); right: 2.5%; }
.pack-profile--sten { --profile-accent: var(--sten-accent); left: 2.5%; }
.pack-profile--soren { --profile-accent: var(--soren-accent); left: 2.5%; }

.pack-profile__index {
  margin-bottom: 0.65rem;
  color: var(--profile-accent);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.pack-profile__prompt {
  margin-bottom: 0.45rem;
  color: var(--paper);
  font-family: var(--serif);
  font-size: 1.12rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pack-profile h2 {
  margin-bottom: 0.22rem;
  font-size: clamp(2rem, 3.7vw, 3.5rem);
  line-height: 1;
  letter-spacing: -0.035em;
}

.pack-profile__role {
  margin-bottom: 1rem;
  color: var(--profile-accent);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.pack-profile blockquote {
  margin-bottom: 1.1rem;
  color: #d7d3db;
  font-size: clamp(0.9rem, 1.25vw, 1.08rem);
  line-height: 1.55;
}

.pack-profile dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin: 0 0 1.25rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.pack-profile dt {
  margin-bottom: 0.2rem;
  color: var(--muted-2);
  font-size: 0.7rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.pack-profile dd { margin: 0; color: #d7d3da; font-size: 0.86rem; }

.pack-profile__link {
  display: flex;
  min-height: 2.9rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.74rem 0.92rem;
  border: 1px solid color-mix(in srgb, var(--profile-accent), transparent 50%);
  background: color-mix(in srgb, var(--profile-accent), transparent 91%);
  color: var(--paper);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-decoration: none;
  text-transform: uppercase;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.pack-profile__link:hover,
.pack-profile__link:focus-visible {
  transform: translateY(-1px);
  border-color: var(--profile-accent);
  background: color-mix(in srgb, var(--profile-accent), transparent 82%);
}

.pack-instruction {
  width: var(--content);
  margin: 1.3rem auto 0;
  color: var(--muted-2);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-align: center;
  text-transform: uppercase;
}

.pack-instruction span { margin-right: 0.5rem; color: var(--gold); }

.pack-oath {
  position: relative;
  display: grid;
  min-height: 560px;
  place-items: center;
  align-content: center;
  overflow: hidden;
  padding: 6rem max(1.5rem, calc((100vw - 1280px) / 2));
  border-bottom: 1px solid var(--line-soft);
  background:
    radial-gradient(circle at 50% 100%, rgba(81, 58, 127, 0.18), transparent 34rem),
    linear-gradient(180deg, #040509, #090a10);
  text-align: center;
}

.pack-oath::before {
  position: absolute;
  width: min(72vw, 58rem);
  aspect-ratio: 1;
  border: 1px solid rgba(205, 168, 87, 0.09);
  border-radius: 50%;
  box-shadow: 0 0 0 5rem rgba(205, 168, 87, 0.018);
  content: "";
}

.pack-oath .eyebrow { position: relative; justify-content: center; }

.pack-oath blockquote {
  position: relative;
  max-width: 22ch;
  margin-bottom: 3.5rem;
  color: var(--paper);
  font-size: clamp(2rem, 4.7vw, 4.8rem);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.pack-oath__centers {
  position: relative;
  display: grid;
  width: min(58rem, 100%);
  grid-template-columns: repeat(3, 1fr);
  border-block: 1px solid var(--line);
}

.pack-oath__centers span {
  padding: 1.1rem;
  color: #c2bec7;
  font-family: var(--serif);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pack-oath__centers span + span { border-left: 1px solid var(--line); }
.pack-oath__centers small { margin-right: 0.55rem; color: var(--gold); }

@media (max-width: 900px) {
  .pack-stage { width: min(100% - 1rem, 1350px); }
  .pack-profile { top: 20%; width: min(22rem, 35vw); }
  .pack-member__label small { font-size: 0.65rem; }
}

@media (max-width: 720px) {
  .pack-hero { padding-top: 3.2rem; }
  .pack-hero__intro h1 { font-size: clamp(2.7rem, 13vw, 4.2rem); }
  .pack-hero__summary { max-width: 39ch; }
  .pack-stage { width: 100%; margin-top: 2.3rem; }
  .pack-visual { aspect-ratio: 4 / 3; border-inline: 0; }
  .pack-scene__reveal--han {
    -webkit-mask-image: radial-gradient(ellipse 24% 55% at 29.5% 50%, #000 0 54%, rgba(0, 0, 0, 0.72) 72%, transparent 100%);
    mask-image: radial-gradient(ellipse 24% 55% at 29.5% 50%, #000 0 54%, rgba(0, 0, 0, 0.72) 72%, transparent 100%);
  }
  .pack-scene__reveal--soren {
    -webkit-mask-image: radial-gradient(ellipse 24% 56% at 71.5% 50%, #000 0 54%, rgba(0, 0, 0, 0.72) 72%, transparent 100%);
    mask-image: radial-gradient(ellipse 24% 56% at 71.5% 50%, #000 0 54%, rgba(0, 0, 0, 0.72) 72%, transparent 100%);
  }
  .pack-member { top: 1%; bottom: 2%; width: 23%; }
  .pack-member--han { left: 18%; }
  .pack-member--sten { left: 38.5%; }
  .pack-member--soren { left: 60%; }
  .pack-member__label { right: -20%; bottom: -0.2rem; left: -20%; }
  .pack-member__label::before { margin-bottom: 0.35rem; }
  .pack-member__label small { font-size: 0.58rem; letter-spacing: 0.12em; }
  .pack-member__label strong { font-size: clamp(0.78rem, 3.7vw, 1.05rem); }

  .pack-profiles {
    position: relative;
    min-height: 315px;
    margin: 0 1rem;
  }

  .pack-profile,
  .pack-profile--neutral,
  .pack-profile--han,
  .pack-profile--sten,
  .pack-profile--soren {
    inset: 1rem 0 auto;
    width: 100%;
    min-height: 285px;
    transform: translateY(0.8rem);
  }

  .pack-profile.is-visible,
  .pack-profile--neutral.is-visible { transform: translateY(0); }
  .pack-profile--neutral { display: grid; align-content: center; }
  .pack-profile h2 { font-size: clamp(2.4rem, 11vw, 3.3rem); }
  .pack-instruction { margin-top: 0.5rem; padding-inline: 1rem; line-height: 1.6; }
  .pack-oath { min-height: 500px; padding-block: 5rem; }
  .pack-oath blockquote { margin-bottom: 2.8rem; }
}

@media (max-width: 520px) {
  .pack-profile { padding: 1.2rem; }
  .pack-profile dl { gap: 0.3rem; }
  .pack-oath__centers { grid-template-columns: 1fr; }
  .pack-oath__centers span + span { border-top: 1px solid var(--line); border-left: 0; }
}

@supports not (color: color-mix(in srgb, white, black)) {
  .pack-member__trigger:focus-visible::before { border-color: var(--member-accent); }
  .pack-profile { border-color: rgba(205, 168, 87, 0.3); }
  .pack-profile__link { border-color: rgba(205, 168, 87, 0.48); background: rgba(205, 168, 87, 0.09); }
}

@media (prefers-reduced-motion: reduce) {
  .pack-scene__base,
  .pack-scene__reveal,
  .pack-member__label,
  .pack-profile { transition: none; }
}

/* Characters v5: a click keeps its selection; touch uses the approved continuous scene. */
.pack-canvas { position:absolute; inset:0; }
.pack-mobile-dock { display:none; }
.pack-instruction [data-pack-instruction] { margin:0; color:inherit; }
.pack-profile__link:focus-visible { outline:2px solid var(--profile-accent); outline-offset:4px; }
.pack-stage[data-locked="true"] .pack-member.is-active .pack-member__label::before { height:2px; }

.pack-stage[data-layout="pan"] { --pack-pan-height:clamp(300px,60svh,580px); width:min(100%,1100px); }
.pack-stage[data-layout="pan"] .pack-visual {
  height:var(--pack-pan-height); aspect-ratio:auto; overflow-x:auto; overflow-y:hidden;
  scroll-snap-type:x mandatory; scrollbar-width:none; overscroll-behavior-x:contain;
  touch-action:pan-x pan-y pinch-zoom; border-inline:0;
}
.pack-stage[data-layout="pan"] .pack-visual::-webkit-scrollbar { display:none; }
.pack-stage[data-layout="pan"] .pack-visual:focus-visible { outline:2px solid var(--gold); outline-offset:3px; }
.pack-stage[data-layout="pan"] .pack-canvas {
  position:relative; inset:auto; width:max(180%,calc(var(--pack-pan-height) * 1.5)); height:auto; aspect-ratio:3 / 2;
}
.pack-stage[data-layout="pan"] .pack-visual::before,
.pack-stage[data-layout="pan"] .pack-visual::after { display:none; }
.pack-stage[data-layout="pan"] .pack-member { top:4%; bottom:6%; width:19%; scroll-snap-align:center; }
.pack-stage[data-layout="pan"] .pack-member--han { left:22%; }
.pack-stage[data-layout="pan"] .pack-member--sten { left:40.5%; }
.pack-stage[data-layout="pan"] .pack-member--soren { left:60%; }
.pack-stage[data-layout="pan"] .pack-member__label { display:none; }
.pack-stage[data-layout="pan"] .pack-scene__reveal--han {
  -webkit-mask-image:radial-gradient(ellipse 20% 55% at 31.5% 50%,#000 0 54%,rgba(0,0,0,.72) 72%,transparent 100%);
  mask-image:radial-gradient(ellipse 20% 55% at 31.5% 50%,#000 0 54%,rgba(0,0,0,.72) 72%,transparent 100%);
}
.pack-stage[data-layout="pan"] .pack-scene__reveal--soren {
  -webkit-mask-image:radial-gradient(ellipse 21% 56% at 69.5% 50%,#000 0 54%,rgba(0,0,0,.72) 72%,transparent 100%);
  mask-image:radial-gradient(ellipse 21% 56% at 69.5% 50%,#000 0 54%,rgba(0,0,0,.72) 72%,transparent 100%);
}
.pack-stage[data-layout="pan"] .pack-mobile-dock {
  position:relative; z-index:25; display:grid; gap:8px; padding:10px 16px 14px;
  background:linear-gradient(180deg,#0d0e17,#080910); border-block:1px solid #d8b86b30;
}
.pack-pan-help { margin:0; color:#aaa5b4; font-size:11px; text-align:center; letter-spacing:.08em; }
.pack-mobile-choices { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:5px; }
.pack-mobile-choices button {
  display:flex; align-items:center; justify-content:center; gap:7px; min-height:44px; padding:7px 4px;
  color:#aaa5b4; background:transparent; border:1px solid transparent; border-bottom:1px solid #ffffff20;
  font:500 13px/1.4 Inter,system-ui,sans-serif; cursor:pointer; touch-action:manipulation;
}
.pack-mobile-choices button .rv-sigil { width:20px; height:20px; color:var(--rv-character); }
.pack-mobile-choices button[aria-pressed="true"] { color:#f4eee3; border-bottom-color:var(--rv-character); background:#ffffff08; }
.pack-mobile-choices button:focus-visible,.pack-mobile-dossier:focus-visible { outline:2px solid var(--gold); outline-offset:3px; }
.pack-mobile-dossier {
  display:flex; align-items:center; gap:10px; min-height:48px; padding:12px 15px;
  border:1px solid var(--rv-character,#d8b86b); background:#ffffff07; color:#f4eee3;
  font:600 13px/1.4 Inter,system-ui,sans-serif; text-decoration:none; touch-action:manipulation;
}
.pack-mobile-dossier .rv-sigil { color:var(--rv-character); }
.pack-mobile-dossier > span:last-child { margin-left:auto; }
.pack-stage[data-layout="pan"] .pack-profiles { position:relative; min-height:0; margin:16px; }
.pack-stage[data-layout="pan"] .pack-profile {
  display:none; position:relative; inset:auto; width:100%; min-height:0; transform:none; padding:20px; margin:0;
}
.pack-stage[data-layout="pan"] .pack-profile.is-visible { display:block; }
.pack-stage[data-layout="pan"] .pack-profile h2 { font-size:clamp(2rem,8vw,3rem); }
.pack-stage[data-layout="pan"] .pack-profile__link { display:none; }
.pack-stage[data-layout="pan"] .pack-profile dl { margin-bottom:0; }
@media(prefers-reduced-motion:reduce) { .pack-stage[data-layout="pan"] .pack-visual { scroll-behavior:auto; } }
