.casting {
  isolation: isolate;
  position: relative;
  overflow: hidden;
  background: #29162d;
  margin: 0 clamp(8px, 1.1vw, 24px);
  border-radius: 20px;
}
.casting-sky, .casting-shadow { position: absolute; inset: 0; pointer-events: none; }
.casting-sky {
  z-index: -4;
  background: linear-gradient(0deg, #0e081187, #27152f0a 60%, #28143145), url('../assets/boulevard.webp') center 58% / cover;
}
.casting-masthead {
  position: absolute;
  z-index: -3;
  inset: 4% 0 auto;
  text-align: center;
  color: #f8e9ff;
}
.casting h1 {
  margin: .01em auto 0;
  font: 900 min(21.7vw, 48vh, 440px)/.9 var(--font-heading);
  letter-spacing: -.022em;
  padding-right: .07em;
  color: #f1d8fd;
  background: linear-gradient(180deg, #fffaff 3%, #f0dafb 45%, #c880f0 93%);
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.casting-model {
  position: absolute;
  z-index: -2;
  top: 15%;
  left: 52%;
  transform: translateX(-50%) rotate(-3deg);
  height: 130%;
  width: auto;
  max-width: none;
  filter: drop-shadow(12px 18px 26px #0c071f80);
}
/* Blender-рендеры: целая фигура, одинаковый масштаб для всех ролей */
.casting-model[data-role] { top: 7%; height: 96%; left: 55%; transform: translateX(-50%); filter: drop-shadow(0 24px 40px #0c071fa0); }
.casting-shadow {
  z-index: -1;
  background: linear-gradient(0deg, #0c0811f7, #0f091620 25%, transparent 67%), linear-gradient(90deg, #130b20af, transparent 36%, transparent 69%, #110c1894);
}
.casting-stage {
  min-height: clamp(570px, 44vw, 780px);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding-block: 245px clamp(26px, 3.2vw, 65px);
}
.casting-caption h2 { font: 900 clamp(2.6rem, 4.2vw, 5rem)/.93 var(--font-heading); letter-spacing: -.018em; margin: 0; }
.role-description { max-width: 34ch; margin: 16px 0 22px; color: #e6e0e8; font-size: clamp(.98rem, 1.08vw, 1.22rem); line-height: 1.5; }
.enter-game { display: inline-flex; align-items: center; justify-content: center; gap: 13px; background: var(--purple); color: #1c0e25; font-weight: 800; padding: 15px 25px; border-radius: 12px; box-shadow: 0 8px 32px #a54bce33; }
.enter-game img { width: 20px; height: 20px; filter: brightness(0); }

.casting { touch-action: pan-y pinch-zoom; }
.casting-sky { transition: filter .6s ease; }
.casting[data-scene="officer"] .casting-sky { filter: hue-rotate(-18deg); }
.casting[data-scene="medic"] .casting-sky { filter: hue-rotate(14deg); }
.casting[data-scene="soldier"] .casting-sky { filter: saturate(.55); }
.casting[data-scene="business"] .casting-sky { filter: hue-rotate(8deg) saturate(.8); }
.casting[data-scene="worker"] .casting-sky { filter: hue-rotate(24deg) saturate(.85); }
.casting-model { pointer-events: none; }
.casting-caption { max-width: min(40%, 480px); }
.casting-stage { min-height: clamp(490px, 38vw, 710px); }
.role-paging { text-align: right; }
.wheel-hint { margin: 0 0 9px; font-size: .85rem; color: #e2d7e6; }
.page-controls { display: flex; gap: 8px; align-items: center; justify-content: flex-end; }
.role-count { font-size: .88rem; font-weight: 600; line-height: 1; color: #d1bbd8; margin-right: 6px; }
.role-count b { color: white; }
.page-controls button { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: #100d14b8; border: 1px solid #ffffff6b; }

.page-controls img { width: 18px; filter: brightness(0) invert(1); }
.casting-selector { background: #100d14e8; border-top: 1px solid #ffffff24; display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); }
.casting-selector button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(6px, .8vw, 16px);
  padding: 14px 4px;
  min-width: 0;
  border: none;
  border-top: 2px solid transparent;
  background: transparent;
  color: #ccc4d1;
  font-weight: 800;
  font-size: clamp(.8rem,1.05vw,1.13rem);

}
.casting-selector button + button { border-left: 1px solid #ffffff14; }
.casting-selector button[aria-pressed="true"] { background-color: #271b2e; border-top-color: var(--purple); color: white; }

.casting-selector button:focus-visible { outline-offset: -4px; }
.casting-selector img { width: clamp(32px,3.15vw,56px); height: clamp(32px,3.15vw,56px); object-fit: contain; }
@media (max-width: 950px) {
  .casting-stage { min-height: 550px; padding-top: 200px; }
  .casting-caption { max-width: 48%; }
  .casting-model[data-role] { top: 10%; height: 82%; left: 62%; }
}
@media (max-width: 700px) {
  .casting { border-radius: 15px; }
  .casting-stage { min-height: 600px; display: grid; grid-template-columns: 1fr; align-content: end; align-items: start; padding-block: 210px 17px; gap: 18px; }
  .casting-masthead { top: 21px; }
  .casting h1 { font-size: 22vw; }
  .casting-model[data-role] { height: 58%; top: 9%; left: 66%; }
  .casting-shadow { background: linear-gradient(0deg, #0c0811 1%,#0c0811ef 20%,#0d091498 39%, transparent 70%),linear-gradient(90deg,#170d1c80,transparent 45%); }
  .casting-caption { max-width: 100%; }
  .casting-caption h2 { font-size: clamp(2.55rem,7.6vw,3.4rem); }
  .role-description { font-size: .96rem; max-width: 34ch; margin: 10px 0 15px; }
  .enter-game { padding: 12px 20px; border-radius: 9px; }
  .casting-selector { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .casting-selector button { font-size: .79rem; gap: 4px; padding: 6px 2px; flex-direction: column; }
  .casting-selector button:nth-child(n+4) { box-shadow: inset 0 1px #ffffff19; }
  .casting-selector img { width: 31px; height: 31px; }
  .casting-caption { max-width: 100%; }
  .casting-stage { min-height: 490px; padding-top: 218px; }
  .casting-model[data-role] { height: 55%; }
  .role-paging { position: absolute; top: 14px; right: 15px; }
  .role-count { margin: 0; font-size: .72rem; }
  .role-paging button, .wheel-hint { display: none; }
}

@media (min-width:701px) and (max-width:1000px) {
  .casting-selector button { flex-direction: column; gap: 3px; padding: 8px 2px; }
}
@media (max-height:650px) and (min-width:701px) {
  .casting-stage { min-height: 400px; padding-top: 130px; padding-bottom: 20px; }
  .casting h1 { font-size: min(20vw,40vh); }
}

/* Онлайн и IP под кнопкой «Начать играть» */
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.hero-online, .hero-ip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; background: #100d14b8; border: 1px solid #ffffff2e; font-size: .86rem; color: #e6e0e8; }
.hero-online i { width: 8px; height: 8px; border-radius: 50%; background: #5ee08a; box-shadow: 0 0 0 3px #5ee08a33; }
.hero-online b, .hero-ip b { color: #fff; font-variant-numeric: tabular-nums; }
.hero-ip span { color: #b6b0bd; font-weight: 700; font-size: .76rem; }
.hero-ip em { font-style: normal; color: var(--purple); font-weight: 700; }
.hero-ip:hover { border-color: var(--purple); }
