html.i18n-pending body { opacity:0; }
html.i18n-ready body { opacity:1; transition:opacity 180ms ease-out; }

/* Language is an account preference, not a floating navigation action. */
.profile-panel[data-profile-panel="overview"] {
  grid-template-rows:minmax(220px,.7fr) minmax(290px,1fr) auto;
}

.profile-language-jump {
  position:absolute;
  z-index:4;
  right:0;
  bottom:clamp(19px,3vh,35px);
  width:208px;
  min-height:59px;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto 17px;
  grid-template-rows:12px 24px;
  align-items:center;
  gap:3px 9px;
  padding:8px 3px 9px 0;
  border:0;
  border-bottom:1px solid rgba(246,243,237,.23);
  color:rgba(246,243,237,.79);
  background:transparent;
  box-shadow:none;
  cursor:pointer;
  text-align:left;
  -webkit-tap-highlight-color:transparent;
  transition:color 200ms ease,border-color 200ms ease,text-shadow 200ms ease;
}
.profile-language-jump:hover {
  color:#fff;
  border-bottom-color:rgba(166,156,255,.75);
  text-shadow:0 0 13px rgba(166,156,255,.22);
}
.profile-language-jump:focus-visible { outline:2px solid #a69cff; outline-offset:5px; }
.profile-language-jump span {
  grid-column:1/-1;
  color:rgba(246,243,237,.52);
  font:650 8px/1 var(--mono);
  letter-spacing:.14em;
  transition:color 200ms ease;
}
.profile-language-jump strong {
  grid-column:1;
  grid-row:2;
  font-family:"Manrope",sans-serif;
  font-size:13px;
  font-weight:500;
  line-height:1.2;
  letter-spacing:-.015em;
  white-space:nowrap;
}
.profile-language-jump b {
  grid-column:2;
  grid-row:2;
  color:#bdb4ff;
  font:600 9px/1 var(--mono);
  letter-spacing:.08em;
}
.profile-language-jump svg {
  grid-column:3;
  grid-row:2;
  width:16px;
  height:16px;
  fill:none;
  stroke:#bdb4ff;
  stroke-width:1.5;
  stroke-linecap:round;
  stroke-linejoin:round;
  transition:stroke 200ms ease;
}
.profile-language-jump:hover span { color:rgba(246,243,237,.7); }
.profile-language-jump:hover svg { stroke:#fff; }

@media (min-width:761px) {
  .profile-page-title .profile-page-copy { padding-right:222px; }
}

.profile-main,
.profile-language-settings { overflow-anchor:none; }
.profile-main.is-language-switching { scroll-behavior:auto!important; }

.profile-language-settings {
  --language-accent:#d9ff57;
  position:relative;
  min-height:176px;
  display:grid;
  grid-template-columns:92px minmax(230px,1fr) minmax(340px,.95fr);
  align-items:center;
  gap:clamp(22px,3vw,42px);
  padding:28px clamp(24px,3.5vw,42px);
  overflow:hidden;
  border:1px solid rgba(255,255,255,.12);
  background:
    radial-gradient(circle at 8% 20%,color-mix(in srgb,var(--language-accent) 10%,transparent),transparent 28%),
    linear-gradient(110deg,rgba(255,255,255,.035),transparent 36%),
    #111218;
  color:#efebe4;
  isolation:isolate;
  transition:border-color 280ms ease,background 380ms ease;
}

.profile-language-settings[data-language="ru"] { --language-accent:#a69cff; }
.profile-language-settings::before {
  position:absolute;
  inset:0 0 auto;
  height:2px;
  background:linear-gradient(90deg,var(--language-accent),transparent 46%);
  content:"";
  transform-origin:left;
  transition:background 380ms ease;
}
.profile-language-settings::after {
  position:absolute;
  z-index:-1;
  right:-72px;
  bottom:-118px;
  width:250px;
  aspect-ratio:1;
  border:1px solid color-mix(in srgb,var(--language-accent) 17%,transparent);
  border-radius:50%;
  box-shadow:0 0 0 38px color-mix(in srgb,var(--language-accent) 2.6%,transparent),0 0 0 76px color-mix(in srgb,var(--language-accent) 1.4%,transparent);
  content:"";
  pointer-events:none;
}

.profile-language-symbol {
  position:relative;
  width:82px;
  aspect-ratio:1;
  display:grid;
  place-items:center;
  border:1px solid rgba(255,255,255,.13);
  border-radius:23px;
  background:#090a0f;
  box-shadow:inset 0 1px rgba(255,255,255,.045),0 18px 34px rgba(0,0,0,.2);
}
.profile-language-symbol svg {
  width:42px;
  height:42px;
  overflow:visible;
  fill:none;
  stroke:#efebe4;
  stroke-width:1.45;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.profile-language-symbol g {
  transform-box:fill-box;
  transform-origin:center;
  transition:transform 520ms cubic-bezier(.16,1,.3,1),stroke 320ms ease;
}
.profile-language-symbol-target { stroke:var(--language-accent); }
.profile-language-symbol i {
  position:absolute;
  right:10px;
  bottom:10px;
  width:7px;
  height:7px;
  border-radius:50%;
  background:var(--language-accent);
  box-shadow:0 0 14px color-mix(in srgb,var(--language-accent) 72%,transparent);
  transition:translate 520ms cubic-bezier(.16,1,.3,1),background 320ms ease;
}
.profile-language-settings:hover .profile-language-symbol-source { transform:translate(-2px,-2px) rotate(-3deg); }
.profile-language-settings:hover .profile-language-symbol-target { transform:translate(2px,2px) rotate(3deg); }
.profile-language-settings:hover .profile-language-symbol i { translate:-53px -53px; }

.profile-language-copy { min-width:0; }
.profile-language-copy>span {
  display:block;
  margin-bottom:13px;
  color:var(--language-accent);
  font:700 7px/1 var(--mono);
  letter-spacing:.18em;
  text-transform:uppercase;
}
.profile-language-copy h3 {
  margin:0;
  color:#efebe4;
  font-size:clamp(26px,2.8vw,42px);
  font-weight:560;
  line-height:.95;
  letter-spacing:-.052em;
}
.profile-language-copy p {
  max-width:420px;
  margin:15px 0 0;
  color:#888992;
  font-size:10px;
  line-height:1.55;
}

.profile-language-control { min-width:0; }
.profile-language-options {
  position:relative;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:0;
  padding:4px;
  border:1px solid rgba(255,255,255,.14);
  border-radius:18px;
  background:#090a0f;
  box-shadow:inset 0 1px rgba(255,255,255,.03);
}
.profile-language-options::before {
  position:absolute;
  z-index:0;
  inset:4px auto 4px 4px;
  width:calc(50% - 4px);
  border-radius:14px;
  background:var(--language-accent);
  box-shadow:0 10px 28px color-mix(in srgb,var(--language-accent) 16%,transparent);
  content:"";
  transition:transform 480ms cubic-bezier(.16,1,.3,1),background 320ms ease,box-shadow 320ms ease;
}
.profile-language-settings[data-language="ru"] .profile-language-options::before { transform:translateX(100%); }
.profile-language-options button {
  position:relative;
  z-index:1;
  min-width:0;
  min-height:64px;
  display:grid;
  grid-template-columns:auto minmax(0,1fr) 19px;
  align-items:center;
  gap:10px;
  padding:0 15px;
  border:0;
  border-radius:14px;
  color:#8b8c94;
  background:transparent;
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
  transition:color 260ms ease,transform 180ms ease;
}
.profile-language-options button:hover { color:#efebe4; }
.profile-language-options button:active { transform:scale(.975); }
.profile-language-options button:focus-visible { outline:2px solid #efebe4; outline-offset:2px; }
.profile-language-options button.is-active { color:#0b0c10; }
.profile-language-options small {
  font:750 8px/1 var(--mono);
  letter-spacing:.12em;
  opacity:.72;
}
.profile-language-options strong {
  overflow:hidden;
  font-size:13px;
  font-weight:680;
  text-align:left;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.profile-language-options button>i {
  width:19px;
  height:19px;
  display:grid;
  place-items:center;
  border:1px solid currentColor;
  border-radius:50%;
  opacity:.24;
  transform:scale(.72);
  transition:opacity 260ms ease,transform 420ms cubic-bezier(.16,1,.3,1);
}
.profile-language-options button>i svg { width:12px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.profile-language-options button.is-active>i { opacity:1; transform:scale(1); }
.profile-language-current {
  margin:10px 4px 0;
  color:#666770;
  font:680 7px/1.25 var(--mono);
  letter-spacing:.09em;
  text-align:right;
  text-transform:uppercase;
}

.profile-language-settings.is-switching .profile-language-symbol-source { animation:languageSourceShift 580ms cubic-bezier(.16,1,.3,1); }
.profile-language-settings.is-switching .profile-language-symbol-target { animation:languageTargetShift 580ms cubic-bezier(.16,1,.3,1); }
.profile-language-settings.is-switching::before { animation:languageLine 580ms cubic-bezier(.16,1,.3,1); }
@keyframes languageSourceShift { 45%{transform:translate(5px,-4px) rotate(7deg)} }
@keyframes languageTargetShift { 45%{transform:translate(-5px,4px) rotate(-7deg)} }
@keyframes languageLine { 50%{transform:scaleX(.34)} }
.profile-language-settings.is-revealed { animation:languageReveal 900ms cubic-bezier(.16,1,.3,1); }
@keyframes languageReveal {
  0%,100% { border-color:rgba(255,255,255,.12); }
  38% { border-color:color-mix(in srgb,var(--language-accent) 66%,transparent); box-shadow:0 0 0 4px color-mix(in srgb,var(--language-accent) 8%,transparent),0 28px 70px rgba(0,0,0,.28); }
}

@media (max-width:1060px) {
  .profile-language-settings { grid-template-columns:72px minmax(190px,.82fr) minmax(300px,1fr); gap:22px; padding-inline:26px; }
  .profile-language-symbol { width:68px; border-radius:20px; }
  .profile-language-symbol svg { width:35px; height:35px; }
  .profile-language-options button { padding-inline:12px; }
}

@media (max-width:760px) {
  .profile-page-title { padding-bottom:104px!important; }
  .profile-language-jump {
    right:0;
    bottom:14px;
    left:auto;
    width:192px;
    min-height:60px;
  }
  .profile-language-settings {
    min-height:0;
    grid-template-columns:64px minmax(0,1fr);
    gap:20px 16px;
    margin-top:22px;
    padding:22px 18px 20px;
    border-radius:0;
  }
  .profile-language-symbol { width:60px; border-radius:18px; }
  .profile-language-symbol svg { width:31px; height:31px; }
  .profile-language-symbol i { right:8px; bottom:8px; width:6px; height:6px; }
  .profile-language-settings:hover .profile-language-symbol i { translate:0; }
  .profile-language-copy>span { margin-bottom:10px; }
  .profile-language-copy h3 { font-size:clamp(27px,8.5vw,38px); }
  .profile-language-copy p { margin-top:11px; font-size:9px; }
  .profile-language-control { grid-column:1/-1; }
  .profile-language-options button { min-height:62px; gap:8px; padding-inline:12px; }
  .profile-language-options strong { font-size:12px; }
  .profile-language-current { margin-top:9px; text-align:left; }
}

@media (max-width:370px) {
  .profile-language-settings { grid-template-columns:52px minmax(0,1fr); padding-inline:14px; }
  .profile-language-symbol { width:50px; border-radius:15px; }
  .profile-language-symbol svg { width:27px; height:27px; }
  .profile-language-options button { grid-template-columns:auto 1fr; min-height:60px; padding-inline:10px; }
  .profile-language-options button>i { display:none; }
}

@media (prefers-reduced-motion:reduce) {
  html.i18n-ready body,
  .profile-language-settings *,
  .profile-language-settings::before,
  .profile-language-jump,
  .profile-language-jump svg { animation:none!important; transition:none!important; }
}
