/* Public portal finish. Loaded after the base theme and localisation styles. */
:root {
  --subtle: #a2abb3;
  --polish-edge: rgba(226, 189, 121, .38);
  --polish-focus: #f2cf91;
}

::selection { background: #d1a85f; color: #100d09; }
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--polish-focus);
  outline-offset: 4px;
}
:where(h1, h2, h3) { text-wrap: balance; overflow-wrap: break-word; }
h1 { line-height: 1.08; }
h2 { line-height: 1.16; }
p { text-wrap: pretty; }
:where(.metric strong, .stat-line strong, .ranking-kills, .shop-card__price, time) {
  font-variant-numeric: tabular-nums;
}

/* Shared responsive header: compact by default; JS enables the full row only
   after measuring its actual translated controls. Never shrink hit areas under text. */
.topPanel {
  border-bottom-color: var(--polish-edge);
  box-shadow: 0 1px 0 rgba(255, 227, 180, .04), 0 10px 28px rgba(0, 0, 0, .22);
}
.topPanel .topPanel-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(1480px, calc(100% - 32px));
  max-width: calc(100% - 32px);
  min-height: 72px;
}
.topPanel .brand { flex: 0 1 auto; max-width: calc(100% - 60px); }
.topPanel .menuButton { display: block; flex: 0 0 44px; }
.topPanel .site-nav {
  position: absolute;
  inset: calc(100% + 8px) 0 auto;
  display: none;
  width: auto;
  max-width: 100%;
  max-height: calc(100dvh - 96px);
  margin: 0;
  padding: 12px;
  border: 1px solid var(--polish-edge);
  border-radius: 8px;
  background: linear-gradient(145deg, #14151a, #08090d);
  box-shadow: 0 20px 44px rgba(0, 0, 0, .6);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.topPanel.is-open .site-nav { display: block; }
.topPanel .site-nav::before { display: none; }
.topPanel .site-nav .menu,
.topPanel .site-nav .account-nav {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  width: 100%;
  align-items: stretch;
}
.topPanel .site-nav .account-nav { margin-top: 10px; }
.topPanel .menu > li > :is(a, button),
.topPanel .account-nav > :is(a, button),
.topPanel .dropDown-menu a {
  width: 100%;
  max-width: 100%;
  min-height: 44px;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: left;
  line-height: 1.4;
}
.topPanel .nav-icon { flex-shrink: 0; width: 30px; height: 30px; background-size: contain; }
.topPanel .menu > .is-active > :is(a, button) { box-shadow: inset 0 -2px 0 var(--gold); }
.topPanel .site-nav .dropDown-menu {
  position: static;
  inset: auto;
  display: none;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin: 6px 0 10px;
  border-color: var(--polish-edge);
  background: linear-gradient(145deg, #191a20, #0c0e13);
  visibility: hidden;
  opacity: 0;
  transform: none;
  pointer-events: none;
}
.topPanel .menu > li.is-open > .dropDown-menu,
.topPanel .account-nav.is-open > .dropDown-menu {
  display: block;
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}
.topPanel .language-toggle { justify-content: space-between; min-height: 44px; transition: background .18s ease, border-color .18s ease; }
.topPanel .language-toggle__icon { flex: 0 0 18px; }
.topPanel .language-toggle__name { display: inline; }
.topPanel .language-option { min-height: 44px; }
.topPanel .language-option[aria-current="true"] { box-shadow: inset 2px 0 0 var(--gold); }

/* Wide layout is intrinsic-sized: no flex shrinking or hidden overflow. */
.topPanel.is-wide .brand { flex: 0 0 auto; max-width: none; }
.topPanel.is-wide .menuButton { display: none; }
.topPanel.is-wide .site-nav {
  position: static;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 12px;
  width: max-content;
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  overflow: visible;
  animation: none;
}
.topPanel.is-wide .site-nav .menu,
.topPanel.is-wide .site-nav .account-nav {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  width: auto;
  margin: 0;
  gap: 4px;
}
.topPanel.is-wide .site-nav .account-nav { gap: 8px; }
.topPanel.is-wide .menu > li { flex: 0 0 auto; }
.topPanel.is-wide .menu > li > :is(a, button),
.topPanel.is-wide .account-nav > :is(a, button) {
  flex: 0 0 auto;
  width: auto;
  max-width: none;
  padding: 9px 10px;
  white-space: nowrap;
  overflow-wrap: normal;
}
.topPanel.is-wide .language-toggle { justify-content: center; }
.topPanel.is-wide .language-toggle__name { display: none; }
.topPanel.is-wide .site-nav .dropDown-menu {
  position: absolute;
  inset: calc(100% + 8px) auto auto 0;
  display: block;
  width: max-content;
  min-width: 220px;
  max-width: min(320px, calc(100vw - 32px));
  margin: 0;
}
.topPanel.is-wide .account-nav .dropDown-menu { left: auto; right: 0; }
.topPanel.is-wide .menu > li:is(:hover, :focus-within, .is-open) > .dropDown-menu,
.topPanel.is-wide .account-nav:not(.language-nav):is(:hover, :focus-within, .is-open) > .dropDown-menu,
.topPanel.is-wide .language-nav.is-open > .dropDown-menu {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}
@media (max-width: 700px) {
  .topPanel:not(.is-wide) .site-nav :is(.menu-link, a) { line-height: 1.4 !important; }
}

/* Preserve the artwork; add depth through restrained light and framing. */
.site-hero { border-bottom: 1px solid rgba(209, 168, 95, .13); }
.page-hero {
  border: 1px solid rgba(209, 168, 95, .27);
  box-shadow: inset 0 1px 0 rgba(255, 224, 169, .1), 0 22px 65px rgba(0, 0, 0, .4);
}
.page-hero__copy { max-width: 100%; }
.page-hero__copy h1 { text-shadow: 0 3px 24px rgba(0, 0, 0, .8); }
.page-hero__copy > p:last-child { margin-bottom: 0; }
.hero-tagline { line-height: 1.65; }
.war-room {
  border-color: rgba(209, 168, 95, .3);
  box-shadow: inset 0 1px 0 rgba(255, 224, 169, .12), 0 20px 60px rgba(0, 0, 0, .48);
}
.war-room .status-pill { max-width: 100%; line-height: 1.45; }

.panel, .feature-card, .shop-card, .realm-card {
  border-top-color: var(--polish-edge);
  box-shadow: inset 0 1px 0 rgba(255, 226, 175, .045), 0 18px 48px rgba(0, 0, 0, .3);
}
.panel-title { flex-wrap: wrap; align-items: start; row-gap: 8px; }
.panel-title h2 { margin-bottom: 14px; }
.eyebrow { line-height: 1.55; }
.news-row h3 { line-height: 1.35; margin-top: 8px; margin-bottom: 9px; }
.news-row p:last-child { margin-bottom: 0; }
.news-row--featured { border-top-color: rgba(209, 168, 95, .32); }
.feature-card li + li { margin-top: .3em; }
.tos-section { scroll-margin-top: 100px; }
.tos-section li { line-height: 1.75; }
.tos-section li + li { margin-top: .65em; }
.ranking-hero #ranking-title { margin-bottom: 12px; font-size: clamp(25px, 3vw, 42px); }
.ranking-row--top-1 { background: linear-gradient(90deg, rgba(209, 168, 95, .12), transparent 78%); }
.ranking-table th { letter-spacing: .035em; }
.ranking-kills { white-space: nowrap; }

/* The highlight only moves on deliberate interaction, never behind the copy. */
a.button.primary, button.button.primary, .button-sign {
  background-image: linear-gradient(115deg, #ecc888, #c09652 55%, #d9af69);
  border-color: #e4bd78;
  color: #181109;
  box-shadow: inset 0 1px 0 rgba(255, 246, 218, .4), 0 6px 22px rgba(151, 99, 35, .19);
}
.button, .button-sign, .realm-card, .feature-strip__items a {
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}
@media (hover: hover) and (pointer: fine) {
  a.button.primary:hover, button.button.primary:hover, .button-sign:hover {
    box-shadow: inset 0 1px 0 rgba(255, 246, 218, .6), 0 8px 26px rgba(209, 168, 95, .3);
    transform: translateY(-2px);
  }
  .realm-card:hover, .feature-strip__items a:hover {
    border-color: rgba(226, 189, 121, .62);
    box-shadow: inset 0 1px 0 rgba(255, 226, 175, .16), 0 16px 36px rgba(0, 0, 0, .35);
  }
  .site-footer__nav a { transition: color .18s ease, transform .18s ease; }
  .site-footer__nav a:hover { color: var(--polish-focus); transform: translateX(3px); }
}
.button:disabled, .button-sign:disabled { transform: none; box-shadow: none; }
.modalBlock { border-top-color: var(--polish-edge); }
.modalBlock h2 { line-height: 1.2; }
.modal-help { line-height: 1.6; }
.form-message { overflow-wrap: anywhere; }

/* Cyrillic navigation stays readable without squeezing longer translations. */
html:is([lang="ru"], [lang="uk"]) .page-hero h1 {
  font-size: clamp(30px, 4.8vw, 64px);
  line-height: 1.13;
}
html:is([lang="ru"], [lang="uk"]) .hero-logo__word {
  font-family: "Hollow Display", "Segoe UI", Arial, sans-serif !important;
}
@media (max-width: 600px) {
  .panel { padding: 20px 17px; }
  .panel-title { display: block; }
  .panel-title .eyebrow { margin-bottom: 7px; }
  .page-hero__copy h1 { font-size: clamp(30px, 8.4vw, 46px); }
  .page-hero__copy p:not(.eyebrow) { font-size: 15px; line-height: 1.65; }
  .hero-actions > a { white-space: normal; text-align: center; line-height: 1.4; }
  .stat-line { flex-wrap: wrap; gap: 5px 12px; }
  .site-footer { row-gap: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
}
