.footer {
  background: var(--footer-background, #0e0e10);
  color: var(--paper);
  line-height: 1.55;
}
.footer nav a:is(:hover, :focus-visible) { color: var(--paper); }
.footer :is(a, button, summary):focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.footer-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--paper);
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.2;
}
.footer-brand-link img { flex: none; }
.footer-inner {
  container: footer / inline-size;
  width: min(calc(100% - 2 * var(--gutter)), var(--wrap));
  margin-inline: auto;
  padding-block: clamp(32px, 4.6vw, 64px) 26px;
}
.footer-directory {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 25px clamp(16px, 3.4vw, 44px);
}
.footer-brand, .footer-games { grid-column: 1 / -1; min-width: 0; }
.footer-brand p { margin-top: 9px; color: var(--muted); font-size: .9375rem; }
.footer-group h2 { margin-bottom: 8px; font-size: .9375rem; font-weight: 800; line-height: 1.2; }
.footer-group ul { display: grid; gap: 4px 12px; margin: 0; padding: 0; list-style: none; }
.footer-games ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.footer-group a {
  display: flex;
  align-items: center;
  gap: .5rem;
  width: fit-content;
  max-width: 100%;
  min-height: 30px;
  padding-block: 4px;
  color: var(--muted);
  font-size: .9375rem;
}
.footer-link-label { white-space: nowrap; }
.footer-link-icon {
  inline-size: .9375rem;
  block-size: .9375rem;
  flex: none;
  opacity: .74;
}
.footer-link-icon svg { display: block; width: 100%; height: 100%; }
.footer-product-icon {
  background: currentColor;
  mask-position: center;
  mask-size: contain;
  mask-repeat: no-repeat;
}
.footer-group a:is(:hover, :focus-visible) .footer-link-icon { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .footer-link-icon { transition: opacity .2s var(--ease); }
}
@container footer (width >= 45rem) {
  .footer-directory { grid-template-columns: minmax(0, 1.15fr) minmax(max-content, .85fr) minmax(max-content, .95fr) minmax(max-content, 2fr); }
  .footer-brand, .footer-games { grid-column: auto; }
}
@media (min-width: 720px) {
  .footer-newsletter { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
}
@container footer (width < 19rem) {
  .footer-link-icon { display: none; }
  .footer-link-label { white-space: normal; overflow-wrap: anywhere; }
}
@container footer (width < 14.5rem) {
  .footer-directory, .footer-games ul { grid-template-columns: minmax(0, 1fr); }
}
@container footer (width < 21rem) {
  :lang(ru) .footer-directory { grid-template-columns: minmax(0, 1fr); }
}
@container footer (width < 17rem) {
  .newsletter-row { grid-template-columns: minmax(0, 1fr); }
}
.footer-newsletter {
  display: grid;
  gap: 18px clamp(36px, 7vw, 100px);
  margin-top: clamp(29px, 4.1vw, 54px);
  padding-block: clamp(24px, 3.4vw, 40px) 12px;
  border-block: 1px solid var(--footer-divider, rgb(255 255 255 / .12));
}
.footer-newsletter h2 { font-size: clamp(22px, 2.4vw, 30px); font-weight: 800; line-height: 1.15; letter-spacing: -.02em; }
.footer-newsletter h2 + p { margin-top: 9px; color: var(--muted); font-size: .9375rem; }
.newsletter-form { display: grid; align-content: start; gap: 8px; min-width: 0; }
.newsletter-label { font-size: .875rem; font-weight: 700; }
.newsletter-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.newsletter-row input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid #3d3d43;
  border-radius: 9px;
  color: var(--paper);
  background: #18181b;
  font: inherit;
  font-size: 1rem;
}
.newsletter-row input::placeholder { color: var(--muted); }
.newsletter-form input:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.newsletter-submit {
  min-height: 44px;
  padding-inline: clamp(12px, 1.7vw, 20px);
  border: 1px solid #4a4a51;
  border-radius: 9px;
  color: var(--paper);
  background: #242428;
  font-size: .875rem;
  font-weight: 800;
  cursor: pointer;
}
.newsletter-submit:not(:disabled):hover { background: #2e2e34; }
.newsletter-submit:disabled { opacity: .64; cursor: default; }
.newsletter-consent { display: flex; align-items: start; gap: 9px; color: var(--muted); font-size: .8125rem; }
.newsletter-consent input { margin: 3px 0 0; accent-color: var(--blue); inline-size: 16px; block-size: 16px; flex: none; }
.newsletter-consent a { color: var(--paper); text-decoration: underline; text-underline-offset: 2px; }
.newsletter-status { min-height: 1.4em; font-size: .8125rem; color: var(--muted); }
.newsletter-status[data-state="error"] { color: #ffb9b5; }
.footer-copyright { padding-top: 19px; color: var(--muted); font-size: .8125rem; text-align: center; }
.footer-home-link:is(:hover, :focus-visible) { text-decoration: underline; text-underline-offset: .2em; }
.footer-language { width: fit-content; max-width: 100%; margin: 9px auto 0; color: var(--muted); font-size: .8125rem; }
.footer-language summary {
  display: flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  margin-inline: auto;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  list-style: none;
}
.footer-language summary::-webkit-details-marker { display: none; }
.footer-language summary svg { width: 15px; height: 15px; }
.footer-language summary svg:last-child { rotate: 180deg; }
.footer-language[open] summary svg:last-child { rotate: 0deg; }
.footer-language ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(108px, 100%), 1fr));
  gap: 4px;
  width: min(420px, calc(100vw - 2 * var(--gutter)));
  max-height: 50svh;
  overflow: auto;
  margin-top: 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.footer-language a { display: block; padding: 6px 8px; border-radius: 6px; }
.footer-language a:is(:hover, :focus-visible, [aria-current]) { background: #202734; color: var(--paper); }

.footer-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content minmax(0, 1fr);
  align-items: center;
  column-gap: 12px;
  min-height: 36px;
  margin-top: 17px;
}
.footer-bottom .footer-copyright { grid-column: 2; padding: 0; }
.footer-bottom .footer-language {
  position: relative;
  grid-column: 3;
  justify-self: end;
  margin: 0;
}
.footer-bottom .footer-language ul {
  position: absolute;
  z-index: 2;
  inset-inline-end: 0;
  inset-block-end: calc(100% + 8px);
  margin: 0;
  background: #19191c;
  box-shadow: 0 8px 28px #0009;
}
@container footer (width < 36rem) {
  .footer-bottom { grid-template-columns: minmax(0, 1fr) auto; }
  .footer-bottom .footer-copyright { grid-column: 1; text-align: start; }
  .footer-bottom .footer-language { grid-column: 2; }
  .footer-bottom > .footer-copyright:only-child { grid-column: 1 / -1; text-align: center; }
}
