/* Dedicated first-step presentation for “Кто я?”. Existing setup and game screens keep shared styles. */
body.whoami-page .whoami-welcome.stage-card--active {
  position: relative;
  display: block;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(24px, 3vw, 34px);
  overflow: hidden;
  border: 1px solid rgba(139, 121, 255, .2);
  border-radius: 30px;
  background:
    radial-gradient(circle at 12% 8%, rgba(105, 215, 255, .12), transparent 34%),
    radial-gradient(circle at 92% 88%, rgba(143, 92, 255, .16), transparent 34%),
    linear-gradient(145deg, rgba(13, 18, 36, .99), rgba(10, 13, 25, .99) 55%, rgba(24, 14, 42, .98));
  box-shadow: 0 28px 90px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .04);
  isolation: isolate;
}

body.whoami-page .whoami-welcome::before,
body.whoami-page .whoami-welcome::after {
  content: '';
  position: absolute;
  z-index: -1;
  border-radius: 999px;
  pointer-events: none;
}

body.whoami-page .whoami-welcome::before {
  width: 360px;
  height: 360px;
  top: -265px;
  left: 23%;
  border: 1px solid rgba(104, 205, 255, .16);
  box-shadow: 0 0 90px rgba(73, 171, 255, .08);
}

body.whoami-page .whoami-welcome::after {
  width: 430px;
  height: 190px;
  right: -230px;
  bottom: -98px;
  border: 1px solid rgba(151, 109, 255, .2);
  transform: rotate(-14deg);
}

.whoami-welcome__exit {
  position: absolute;
  z-index: 10;
  top: 18px;
  right: 18px;
  display: inline-flex;
  min-width: 68px;
  min-height: 31px;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border: 1px solid rgba(207, 203, 255, .16);
  border-radius: 11px;
  background: rgba(39, 39, 67, .66);
  color: rgba(243, 242, 255, .8);
  font-size: .68rem;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  backdrop-filter: blur(12px);
  transition: border-color .16s ease, background .16s ease, color .16s ease;
}

.whoami-welcome__exit:hover,
.whoami-welcome__exit:focus-visible {
  border-color: rgba(144, 174, 255, .5);
  background: rgba(52, 51, 88, .9);
  color: #fff;
}

.whoami-welcome__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(390px, .95fr);
  gap: 18px;
  align-items: stretch;
}

.whoami-welcome__hero,
.whoami-welcome__controls {
  position: relative;
  min-width: 0;
  min-height: 486px;
  border: 1px solid rgba(204, 207, 255, .12);
  border-radius: 26px;
}

.whoami-welcome__hero {
  display: grid;
  grid-template-rows: auto minmax(145px, 1fr) auto;
  gap: 18px;
  padding: 30px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 60%, rgba(126, 101, 255, .14), transparent 31%),
    radial-gradient(circle at 13% 14%, rgba(92, 207, 255, .08), transparent 30%),
    linear-gradient(155deg, rgba(18, 30, 54, .8), rgba(16, 18, 35, .9));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03);
}

.whoami-welcome__hero::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, #74dfff, #9880ff 58%, transparent 94%);
  box-shadow: 0 0 30px rgba(113, 190, 255, .35);
}

.whoami-welcome__copy {
  position: relative;
  z-index: 2;
  display: grid;
  align-content: start;
  gap: 9px;
  padding-right: 58px;
}

.whoami-welcome__copy .hero-panel__eyebrow {
  margin: 0;
  color: #8ee6ff;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .19em;
  line-height: 1.25;
  text-transform: uppercase;
}

.whoami-welcome__copy h1 {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 3px 9px;
  margin: 0;
  color: #fbfbff;
  font-size: clamp(2.55rem, 4.1vw, 3.75rem);
  font-weight: 900;
  letter-spacing: -.06em;
  line-height: .98;
}

.whoami-welcome__copy h1 span {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 3px 8px;
  border: 1px solid rgba(124, 218, 255, .34);
  border-radius: 999px;
  background: rgba(76, 191, 255, .08);
  color: #8ddfff;
  font-size: .22em;
  font-weight: 900;
  letter-spacing: .1em;
  line-height: 1;
  text-transform: uppercase;
}

.whoami-welcome__copy > p:not(.hero-panel__eyebrow) {
  max-width: 44ch;
  margin: 0;
  color: rgba(218, 221, 239, .72);
  font-size: .9rem;
  font-weight: 500;
  line-height: 1.55;
}

.whoami-welcome__visual {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 94px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  min-height: 172px;
}

.whoami-welcome__halo {
  position: absolute;
  z-index: 0;
  top: 50%;
  left: 50%;
  width: 180px;
  height: 180px;
  border: 1px solid rgba(119, 197, 255, .12);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(133, 105, 255, .12), transparent 66%);
  box-shadow: inset 0 0 0 30px rgba(117, 142, 255, .018), 0 0 55px rgba(108, 94, 255, .12);
  transform: translate(-50%, -50%);
}

.whoami-welcome__halo::before,
.whoami-welcome__halo::after {
  content: '';
  position: absolute;
  border: 1px solid rgba(133, 172, 255, .1);
  border-radius: 50%;
}

.whoami-welcome__halo::before {
  inset: 25px;
}

.whoami-welcome__halo::after {
  inset: 52px;
}

.whoami-welcome__logo {
  position: relative;
  z-index: 3;
  display: grid;
  width: 94px;
  height: 94px;
  place-items: center;
  justify-self: center;
  border: 1px solid rgba(152, 139, 255, .32);
  border-radius: 25px;
  background: linear-gradient(145deg, rgba(36, 42, 69, .94), rgba(15, 18, 33, .98));
  box-shadow: 0 18px 44px rgba(42, 27, 104, .4), 0 0 32px rgba(117, 102, 255, .14), inset 0 1px 0 rgba(255, 255, 255, .08);
}

.whoami-welcome__logo img {
  width: 82px;
  height: 82px;
  border-radius: 21px;
  object-fit: cover;
}

.whoami-welcome__preview {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 5px;
  min-height: 70px;
  align-content: center;
  padding: 12px;
  border: 1px solid rgba(203, 207, 255, .13);
  border-radius: 17px;
  background: rgba(8, 12, 23, .72);
  box-shadow: 0 16px 34px rgba(0, 0, 0, .18);
}

.whoami-welcome__preview--answer {
  transform: rotate(-2.5deg);
}

.whoami-welcome__preview--secret {
  transform: rotate(2.5deg);
}

.whoami-welcome__preview span {
  color: rgba(195, 201, 226, .58);
  font-size: .59rem;
  font-weight: 900;
  letter-spacing: .12em;
  line-height: 1.15;
  text-transform: uppercase;
}

.whoami-welcome__preview strong {
  color: #f8f8ff;
  font-size: .83rem;
  font-weight: 900;
  line-height: 1.15;
}

.whoami-welcome__preview--answer strong {
  color: #96e7ff;
}

.whoami-welcome__preview--secret strong {
  color: #c2adff;
}

.whoami-welcome__facts {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.whoami-welcome__facts > span {
  display: grid;
  min-height: 58px;
  place-content: center;
  gap: 3px;
  padding: 8px;
  border: 1px solid rgba(201, 206, 255, .11);
  border-radius: 15px;
  background: rgba(255, 255, 255, .025);
  text-align: center;
}

.whoami-welcome__facts strong {
  color: #f9f9ff;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
}

.whoami-welcome__facts small {
  color: rgba(200, 205, 226, .6);
  font-size: .63rem;
  font-weight: 700;
  line-height: 1.15;
}

.whoami-welcome__controls {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 24px;
  background:
    radial-gradient(circle at 100% 0%, rgba(121, 101, 255, .12), transparent 36%),
    linear-gradient(160deg, rgba(27, 28, 48, .88), rgba(11, 15, 27, .96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03);
}

.whoami-welcome__controls-head {
  display: grid;
  gap: 4px;
}

.whoami-welcome__controls-head strong {
  color: #fafaff;
  font-size: 1.23rem;
  font-weight: 900;
  line-height: 1.12;
}

.whoami-welcome__controls-head span {
  color: rgba(203, 206, 226, .62);
  font-size: .76rem;
  font-weight: 500;
  line-height: 1.35;
}

.whoami-welcome__steps {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}

.whoami-welcome__steps li {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 82px;
  padding: 12px 14px;
  border: 1px solid rgba(205, 209, 255, .12);
  border-radius: 18px;
  background: rgba(255, 255, 255, .025);
}

.whoami-welcome__steps li:nth-child(2) {
  background: linear-gradient(100deg, rgba(49, 42, 88, .22), rgba(255, 255, 255, .018));
}

.whoami-welcome__steps b {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(132, 200, 255, .24);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(71, 135, 211, .13), rgba(117, 89, 217, .12));
  color: #a6e6ff;
  font-size: 1.05rem;
  font-weight: 900;
}

.whoami-welcome__steps li > span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.whoami-welcome__steps strong {
  color: #fafaff;
  font-size: .93rem;
  font-weight: 900;
  line-height: 1.15;
}

.whoami-welcome__steps small {
  color: rgba(201, 205, 224, .63);
  font-size: .69rem;
  font-weight: 600;
  line-height: 1.35;
}

.whoami-welcome__start {
  width: 100%;
  min-height: 56px;
  margin-top: auto;
  padding: 12px 20px;
  border: 1px solid rgba(255, 226, 115, .64);
  border-radius: 17px;
  background: linear-gradient(180deg, #ffd65c, #e6aa22);
  box-shadow: 0 15px 34px rgba(223, 161, 27, .2), inset 0 1px 0 rgba(255, 255, 255, .52);
  color: #30200a;
  font: inherit;
  font-size: .94rem;
  font-weight: 900;
  cursor: pointer;
  transition: transform .16s ease, filter .16s ease, box-shadow .16s ease;
}

.whoami-welcome__start:hover,
.whoami-welcome__start:focus-visible {
  filter: brightness(1.04);
  transform: translateY(-1px);
  box-shadow: 0 18px 38px rgba(223, 161, 27, .26), inset 0 1px 0 rgba(255, 255, 255, .58);
}

.whoami-welcome__note {
  margin: -6px 0 0;
  color: rgba(193, 198, 219, .5);
  font-size: .63rem;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
}

@media (max-width: 980px) {
  .whoami-welcome__layout {
    grid-template-columns: 1fr;
  }

  .whoami-welcome__hero,
  .whoami-welcome__controls {
    min-height: 0;
  }
}

@media (max-width: 720px) {
  body.whoami-page:not(.whoami-game-active) .app-shell > .whoami-welcome.stage-card--active {
    display: block;
  }

  body.whoami-page .whoami-welcome.stage-card--active {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 16px;
    border-radius: 23px;
  }

  .whoami-welcome__exit {
    top: 12px;
    right: 12px;
    min-width: 62px;
    min-height: 29px;
    padding: 5px 8px;
    border-radius: 10px;
    font-size: .64rem;
  }

  .whoami-welcome__layout {
    gap: 11px;
  }

  .whoami-welcome__hero {
    grid-template-rows: auto 102px auto;
    gap: 10px;
    padding: 3px 0 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .whoami-welcome__hero::before {
    display: none;
  }

  .whoami-welcome__copy {
    gap: 6px;
    padding-right: 56px;
  }

  .whoami-welcome__copy .hero-panel__eyebrow {
    font-size: .59rem;
    letter-spacing: .16em;
  }

  .whoami-welcome__copy h1 {
    gap: 2px 7px;
    font-size: 2.12rem;
  }

  .whoami-welcome__copy h1 span {
    min-height: 19px;
    padding: 2px 6px;
    font-size: .24em;
  }

  .whoami-welcome__copy > p:not(.hero-panel__eyebrow) {
    font-size: .7rem;
    line-height: 1.42;
  }

  .whoami-welcome__visual {
    grid-template-columns: minmax(0, 1fr) 64px minmax(0, 1fr);
    gap: 7px;
    min-height: 102px;
  }

  .whoami-welcome__halo {
    width: 116px;
    height: 116px;
  }

  .whoami-welcome__halo::before {
    inset: 19px;
  }

  .whoami-welcome__halo::after {
    inset: 39px;
  }

  .whoami-welcome__logo {
    width: 64px;
    height: 64px;
    border-radius: 18px;
  }

  .whoami-welcome__logo img {
    width: 56px;
    height: 56px;
    border-radius: 15px;
  }

  .whoami-welcome__preview {
    min-height: 54px;
    gap: 3px;
    padding: 8px;
    border-radius: 13px;
  }

  .whoami-welcome__preview span {
    font-size: .43rem;
    letter-spacing: .08em;
  }

  .whoami-welcome__preview strong {
    font-size: .62rem;
  }

  .whoami-welcome__facts {
    gap: 6px;
  }

  .whoami-welcome__facts > span {
    min-height: 45px;
    gap: 2px;
    padding: 6px;
    border-radius: 12px;
  }

  .whoami-welcome__facts strong {
    font-size: .8rem;
  }

  .whoami-welcome__facts small {
    font-size: .5rem;
  }

  .whoami-welcome__controls {
    gap: 9px;
    padding: 13px;
    border-radius: 20px;
  }

  .whoami-welcome__controls-head {
    gap: 2px;
  }

  .whoami-welcome__controls-head strong {
    font-size: 1rem;
  }

  .whoami-welcome__controls-head span {
    font-size: .64rem;
  }

  .whoami-welcome__steps {
    gap: 7px;
  }

  .whoami-welcome__steps li {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 9px;
    min-height: 58px;
    padding: 8px 10px;
    border-radius: 15px;
  }

  .whoami-welcome__steps b {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    font-size: .88rem;
  }

  .whoami-welcome__steps strong {
    font-size: .78rem;
  }

  .whoami-welcome__steps small {
    font-size: .57rem;
    line-height: 1.28;
  }

  .whoami-welcome__start {
    min-height: 52px;
    padding: 10px 16px;
    border-radius: 15px;
    font-size: .86rem;
  }

  .whoami-welcome__note {
    margin-top: -4px;
    font-size: .53rem;
  }
}

@media (max-width: 360px) {
  body.whoami-page .whoami-welcome.stage-card--active {
    padding: 13px;
  }

  .whoami-welcome__copy {
    padding-right: 52px;
  }

  .whoami-welcome__copy h1 {
    font-size: 1.93rem;
  }

  .whoami-welcome__copy > p:not(.hero-panel__eyebrow) {
    font-size: .66rem;
  }

  .whoami-welcome__preview {
    padding: 7px;
  }

  .whoami-welcome__preview strong {
    font-size: .56rem;
  }

  .whoami-welcome__controls {
    padding: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .whoami-welcome__exit,
  .whoami-welcome__start {
    transition: none;
  }
}

