/* Ситуации — показ, галерея, анимации */

.sit-page {
  max-width: 1080px;
}

.sit-mode-kicker {
  font-family: var(--font-display);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
}

.sit-input-form {
  text-align: left;
  max-width: 36rem;
  margin: 0 auto;
}

.sit-preview,
.sit-assigned {
  margin: 0.8rem auto 1rem;
  max-width: 18rem;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.sit-preview img,
.sit-assigned img {
  display: block;
  width: 100%;
  max-height: 16rem;
  object-fit: contain;
  background: #11080a;
}

.sit-assigned {
  padding: 0.6rem;
}

.sit-assigned p {
  margin: 0.45rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.sit-ai-screen {
  min-height: 52vh;
  display: grid;
  place-content: center;
  position: relative;
  overflow: hidden;
}

.sit-ai-orb {
  width: 9rem;
  height: 9rem;
  margin: 0 auto 1.4rem;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, rgba(242, 230, 216, 0.9), transparent 28%),
    radial-gradient(circle at 50% 50%, var(--blood-hot), var(--blood) 55%, #2a0a10);
  box-shadow:
    0 0 40px rgba(194, 49, 63, 0.55),
    0 0 90px rgba(212, 175, 98, 0.18);
  animation: sitOrb 2.4s ease-in-out infinite;
}

@keyframes sitOrb {
  0%, 100% { transform: scale(1) rotate(0deg); filter: saturate(1); }
  50% { transform: scale(1.08) rotate(8deg); filter: saturate(1.35); }
}

.sit-reveal-screen,
.sit-gallery-screen {
  text-align: center;
}

.sit-stage {
  position: relative;
  min-height: 58vh;
  margin: 1rem auto 0;
  padding: 1.5rem 1rem 1.4rem;
  border: 1px solid var(--line);
  background:
    radial-gradient(900px 420px at 50% 120%, rgba(143, 29, 42, 0.28), transparent 60%),
    rgba(0, 0, 0, 0.35);
  overflow: hidden;
  isolation: isolate;
}

.sit-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(212, 175, 98, 0.08), transparent 30%);
  animation: sitWipe 0.7s ease both;
}

@keyframes sitWipe {
  from { clip-path: inset(0 0 100% 0); opacity: 0.4; }
  to { clip-path: inset(0 0 0 0); opacity: 1; }
}

.sit-nick {
  font-family: var(--font-display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.8rem;
  font-size: 0.95rem;
}

.sit-nick-sub {
  margin: 0.7rem 0 0;
  color: var(--muted);
  letter-spacing: 0.06em;
}

.sit-caption {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4.5vw, 2.6rem);
  line-height: 1.25;
  margin: 0 auto 1.2rem;
  max-width: 18ch;
  text-shadow: 0 0 28px rgba(143, 29, 42, 0.45);
}

.sit-type {
  animation: sitType 0.7s steps(18, end) both;
}

@keyframes sitType {
  from { clip-path: inset(0 100% 0 0); opacity: 0.2; }
  to { clip-path: inset(0 0 0 0); opacity: 1; }
}

.sit-drop {
  animation: sitDrop 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes sitDrop {
  from { transform: translateY(-70px); opacity: 0; filter: blur(8px); }
  to { transform: none; opacity: 1; filter: none; }
}

.sit-art {
  display: block;
  margin: 0 auto;
  max-width: min(420px, 86vw);
  max-height: 46vh;
  object-fit: contain;
  border: 1px solid var(--line);
  background: #0c0607;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.sit-slam {
  animation: sitSlam 0.62s cubic-bezier(0.15, 1.4, 0.3, 1) both;
}

@keyframes sitSlam {
  0% { transform: translateY(-120%) rotate(-8deg) scale(1.15); opacity: 0; }
  70% { transform: translateY(8px) rotate(1.5deg) scale(1.02); opacity: 1; }
  100% { transform: none; }
}

.sit-flash {
  animation: sitFlash 0.45s ease both;
}

@keyframes sitFlash {
  0% { box-shadow: 0 0 0 0 rgba(212, 175, 98, 0); }
  35% { box-shadow: 0 0 0 8px rgba(212, 175, 98, 0.35), 0 0 40px rgba(194, 49, 63, 0.55); }
  100% { box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45); }
}

.sit-action {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
  min-height: 46vh;
}

.sit-action-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  align-items: center;
  flex: 1;
}

@media (max-width: 760px) {
  .sit-action,
  .sit-action-row {
    min-height: 0;
  }
  .sit-action-row {
    grid-template-columns: 1fr;
  }
}

.sit-cast {
  display: grid;
  justify-items: center;
  gap: 0.55rem;
}

.sit-cast .sit-art {
  max-width: min(280px, 80vw);
  max-height: 36vh;
}

.sit-nameplate {
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  font-size: 1.05rem;
  color: var(--text);
}

.sit-slide-left { animation: sitInLeft 0.7s cubic-bezier(0.16, 1, 0.3, 1) both; }
.sit-slide-right { animation: sitInRight 0.7s cubic-bezier(0.16, 1, 0.3, 1) both; }

@keyframes sitInLeft {
  from { transform: translateX(-40%) rotate(-6deg); opacity: 0; }
  to { transform: none; opacity: 1; }
}
@keyframes sitInRight {
  from { transform: translateX(40%) rotate(6deg); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.sit-collide .sit-cast:first-child { animation: sitBumpL 0.45s ease both; }
.sit-collide .sit-cast:last-child { animation: sitBumpR 0.45s ease both; }

@keyframes sitBumpL {
  0% { transform: translateX(0); }
  40% { transform: translateX(12px) scale(1.04); }
  100% { transform: none; }
}
@keyframes sitBumpR {
  0% { transform: translateX(0); }
  40% { transform: translateX(-12px) scale(1.04); }
  100% { transform: none; }
}

.sit-stamp {
  font-family: var(--font-display);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  color: var(--blood-hot);
  border: 3px solid var(--blood-hot);
  padding: 0.55rem 0.9rem;
  transform: rotate(-8deg);
  text-shadow: 0 0 18px rgba(194, 49, 63, 0.45);
  animation: sitStamp 0.5s cubic-bezier(0.2, 1.6, 0.3, 1) both;
}

.sit-stamp.is-set {
  animation: none;
  transform: rotate(-8deg);
  filter: none;
  opacity: 1;
}

@keyframes sitStamp {
  0% { transform: scale(2.4) rotate(-18deg); opacity: 0; filter: blur(6px); }
  70% { transform: scale(0.92) rotate(-6deg); opacity: 1; filter: none; }
  100% { transform: rotate(-8deg); }
}

.sit-title-card {
  position: relative;
  left: auto;
  right: auto;
  bottom: auto;
  margin: 0.15rem 5% 0.35rem;
  padding: 1.1rem 1.3rem;
  background: linear-gradient(180deg, rgba(26, 16, 18, 0.2), rgba(10, 6, 7, 0.92));
  border: 1px solid var(--gold);
  box-shadow: 0 0 40px rgba(143, 29, 42, 0.35);
  animation: sitTitle 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
  z-index: 3;
}

.sit-title-card p {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 3.4vw, 1.9rem);
  margin: 0;
  line-height: 1.3;
}

@keyframes sitTitle {
  from { transform: translateY(40px) scale(0.92); opacity: 0; letter-spacing: 0.4em; }
  to { transform: none; opacity: 1; }
}

.sit-ghost {
  opacity: 0.18;
  filter: grayscale(0.4);
  transform: scale(0.96);
}

.sit-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1.4rem 0 2rem;
  text-align: left;
}

.sit-tile {
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
  padding: 0.7rem;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease;
  animation: riseIn 0.55s ease both;
}

.sit-tile:hover {
  transform: translateY(-4px) rotate(-0.6deg);
  border-color: var(--gold);
}

.sit-tile img {
  width: 100%;
  height: 8.5rem;
  object-fit: cover;
  background: #11080a;
  display: block;
}

.sit-tile h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  margin: 0.55rem 0 0.25rem;
}

.sit-tile p {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.sit-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
}

.sit-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(5, 3, 4, 0.82);
  display: grid;
  place-items: center;
  padding: 1.2rem;
  animation: sitWipe 0.35s ease both;
}

.sit-modal .sit-stage {
  width: min(920px, 100%);
  max-height: 88vh;
  overflow: auto;
}

.sit-modal-close {
  margin-top: 0.8rem;
}

.sit-bank-list {
  display: grid;
  gap: 0.55rem;
  margin-top: 1rem;
}

.sit-bank-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem;
  align-items: center;
  border: 1px solid var(--line);
  padding: 0.55rem 0.7rem;
  background: rgba(0, 0, 0, 0.22);
}

.sit-bank-item img {
  width: 3.4rem;
  height: 3.4rem;
  object-fit: cover;
  background: #11080a;
}

.sit-in { animation: riseIn 0.5s ease both; }

.sit-page:not([data-admin]) .sit-host { display: none !important; }

.sit-host {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  margin: 1.15rem auto 0;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  background: rgba(8, 4, 5, 0.72);
  max-width: 36rem;
}

.sit-host-step {
  margin: 0;
  font-family: var(--font-display);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  font-size: 0.82rem;
  min-width: 9rem;
}

.sit-host-next {
  min-width: 10.5rem;
  font-size: 1.15rem;
  padding: 0.85rem 1.4rem;
  box-shadow: 0 0 24px rgba(194, 49, 63, 0.35);
  animation: sitHostPulse 2.2s ease-in-out infinite;
}

@keyframes sitHostPulse {
  0%, 100% { box-shadow: 0 0 16px rgba(194, 49, 63, 0.25); }
  50% { box-shadow: 0 0 32px rgba(212, 175, 98, 0.45); }
}

.sit-fx {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 8;
}

.sit-shock {
  position: absolute;
  left: 50%;
  top: 52%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border: 3px solid rgba(212, 175, 98, 0.85);
  border-radius: 50%;
  pointer-events: none;
  z-index: 7;
  animation: sitShock 0.55s cubic-bezier(0.12, 0.8, 0.2, 1) both;
}

@keyframes sitShock {
  from { transform: scale(0.2); opacity: 0.95; }
  to { transform: scale(18); opacity: 0; }
}

.sit-blood-wipe {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 7;
  background: linear-gradient(180deg, rgba(143, 29, 42, 0.7), rgba(194, 49, 63, 0.12) 55%, transparent 78%);
  animation: sitBlood 0.62s ease both;
}

@keyframes sitBlood {
  from { transform: translateY(-100%); opacity: 0.9; }
  to { transform: translateY(0); opacity: 0; }
}

.sit-stage.sit-shake {
  animation: sitShake 0.45s ease-out;
}

@keyframes sitShake {
  0%, 100% { transform: translate(0, 0) rotate(0); }
  18% { transform: translate(-11px, 7px) rotate(-0.8deg); }
  36% { transform: translate(9px, -5px) rotate(0.6deg); }
  54% { transform: translate(-7px, 3px) rotate(-0.4deg); }
  72% { transform: translate(4px, -2px) rotate(0.2deg); }
}

.sit-stage.sit-letterbox::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 6;
  box-shadow: inset 0 48px 0 #050304, inset 0 -10px 0 #050304;
  animation: sitBars 0.55s ease both;
}

@keyframes sitBars {
  from { box-shadow: inset 0 0 0 #050304, inset 0 0 0 #050304; }
  to { box-shadow: inset 0 48px 0 #050304, inset 0 -10px 0 #050304; }
}

.sit-typing::after {
  content: "▍";
  color: var(--gold);
  animation: sitCaret 0.7s step-end infinite;
}

@keyframes sitCaret {
  0%, 45% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.sit-caption {
  background: linear-gradient(90deg, transparent, rgba(212, 175, 98, 0.35), transparent);
  background-size: 0 2px;
  background-repeat: no-repeat;
  background-position: left 100%;
}

.sit-caption.sit-lined {
  background-size: 100% 2px;
  transition: background-size 0.45s ease;
}

.sit-ink {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--blood-hot), transparent 70%);
  pointer-events: none;
  z-index: 5;
  animation: sitInk 0.55s ease both;
}

@keyframes sitInk {
  from { transform: scale(0.2); opacity: 0.9; }
  to { transform: scale(3.4); opacity: 0; }
}

.sit-cast.sit-slide-left .sit-art,
.sit-cast.sit-slide-right .sit-art {
  filter: none;
}

@keyframes sitInLeft {
  from { transform: translateX(-55%) rotate(-8deg); opacity: 0; filter: blur(12px); }
  to { transform: none; opacity: 1; filter: none; }
}
@keyframes sitInRight {
  from { transform: translateX(55%) rotate(8deg); opacity: 0; filter: blur(12px); }
  to { transform: none; opacity: 1; filter: none; }
}

.sit-collide .sit-cast:first-child { animation: sitBumpL 0.5s cubic-bezier(0.15, 1.4, 0.2, 1) both; }
.sit-collide .sit-cast:last-child { animation: sitBumpR 0.5s cubic-bezier(0.15, 1.4, 0.2, 1) both; }

@keyframes sitBumpL {
  0% { transform: translateX(-18%); }
  45% { transform: translateX(18px) scale(1.08) rotate(-2deg); }
  100% { transform: none; }
}
@keyframes sitBumpR {
  0% { transform: translateX(18%); }
  45% { transform: translateX(-18px) scale(1.08) rotate(2deg); }
  100% { transform: none; }
}

@keyframes sitSlam {
  0% { transform: translateY(-130%) rotate(-10deg) scale(1.2); opacity: 0; }
  68% { transform: translateY(14px) rotate(2deg) scale(1.04); opacity: 1; }
  82% { transform: translateY(-6px) rotate(-1deg); }
  100% { transform: none; }
}

@keyframes sitStamp {
  0% { transform: scale(3.2) rotate(-22deg); opacity: 0; filter: blur(8px); }
  62% { transform: scale(0.86) rotate(-5deg); opacity: 1; filter: none; }
  78% { transform: scale(1.08) rotate(-10deg); }
  100% { transform: rotate(-8deg); }
}

@keyframes sitTitle {
  from { transform: translateY(50px) scale(0.86); opacity: 0; letter-spacing: 0.55em; filter: blur(8px); }
  to { transform: none; opacity: 1; filter: none; }
}

.sit-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 6;
  box-shadow: inset 0 0 140px 40px rgba(5, 2, 3, 0.78);
  animation: sitVig 1.35s ease-in-out infinite alternate;
}

@keyframes sitVig {
  from { opacity: 0.28; }
  to { opacity: 0.88; }
}
