/*
 * Vários idiomas.
 * Fontes: a Lilita One local só tem o latim básico; o que faltar (turco, polonês, russo...) vem da Nunito do próprio
 * projeto ("Nunito Street" = Nunito 800 declarada como peso 400, para não misturar letra fina no meio da palavra);
 * japonês, coreano e chinês usam as fontes do sistema, na mesma ordem dos outros jogos da casa.
 */
@font-face {
  font-family: 'Nunito Street';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('./nunito-800-IXmKHQJ0.woff2') format('woff2');
}
html:root {
  --font-cjk: 'Hiragino Sans', 'Noto Sans CJK JP', 'Malgun Gothic', 'Microsoft YaHei';
  --font-street: 'Lilita One', 'Nunito Street', var(--font-cjk), system-ui, sans-serif;
  --font-ui: 'Nunito', 'Segoe UI', var(--font-cjk), system-ui, -apple-system, sans-serif;
  --font-display: 'Nunito', 'Segoe UI', var(--font-cjk), system-ui, sans-serif;
}

/* Seletor de idioma: <select> nativo (acessível e com a lista de idiomas do sistema), vestido como etiqueta de rua. */
.lang-select {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0;
}
.lang-select .lang-ico {
  position: absolute;
  left: 12px;
  width: 20px;
  height: 20px;
  color: #fff;
  pointer-events: none;
  z-index: 1;
}
.lang-select .lang-ico svg {
  width: 100%;
  height: 100%;
  display: block;
}
.lang-select select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  min-height: 42px;
  padding: 6px 38px 9px 40px;
  border: 0;
  border-radius: 0;
  font: 400 17px/1 var(--font-street);
  text-transform: uppercase;
  color: #fff;
  -webkit-text-stroke: 0.16em #05070f;
  paint-order: stroke fill;
  background:
    linear-gradient(45deg, transparent 46%, #fff 47% 60%, transparent 61%) right 18px center/9px 9px
      no-repeat,
    linear-gradient(-45deg, transparent 46%, #fff 47% 60%, transparent 61%) right 12px center/9px
      9px no-repeat,
    var(--art-street-menu-tag-dark) center/100% 100% no-repeat;
  filter: drop-shadow(0 3px 0 #07142c73);
}
.lang-select select:hover {
  filter: brightness(1.12) drop-shadow(0 3px 0 #07142c73);
}
.lang-select select:focus-visible {
  outline: 3px solid #ffd83a;
  outline-offset: 3px;
}
/* A lista aberta é do sistema: texto escuro normal. */
.lang-select select option {
  color: #0b1a3a;
  -webkit-text-stroke: 0;
  text-transform: none;
  font: 600 15px var(--font-ui);
  background: #fff;
}
.splash-languages.lang-select {
  padding: 0;
  background: none;
  border-radius: 0;
}
.settings .lang-select select {
  min-height: 40px;
  font-size: 16px;
}

/* Rótulos que encolhem para caber (src/ui/fit-label.ts): o texto encolhe por igual, a placa fica do mesmo tamanho. */
/* zoom (não scale): encolhe também o espaço ocupado, então a centralização da placa continua valendo. */
.fit-in {
  display: inline-block;
  white-space: inherit;
  zoom: var(--fit, 1);
}
.s3-name,
.cs-name {
  max-width: 94%;
}
.s3-tag {
  max-width: 110%;
}
/* Botões da partida: mesma largura (como no mockup) e o texto encolhe dentro de cada um (src/ui/fit-label.ts).
   A largura não depende do texto (base 0), então o ajuste não anda em círculo; e a fileira nunca passa da tela,
   em nenhum idioma (antes crescia com o texto e, em italiano e russo, passava da tela no celular). */
html.painted .passthrough .hud-bottom .btn {
  flex: 1 1 0;
  min-width: 0;
}
html.painted .passthrough .hud-bottom .btn > span {
  flex: 0 1 auto;
  min-width: 0;
}
/* Japonês, chinês e coreano quebram a linha em qualquer letra ("キャンペー/ン"): ali a palavra fica inteira e o rótulo
   encolhe para caber (src/ui/fit-label.ts). */
html:lang(ja) body,
html:lang(zh-CN) body,
html:lang(ko) body {
  word-break: keep-all;
  line-break: strict;
}
@media (orientation: landscape) and (min-width: 761px) {
  /* Título de personagens termina antes das etiquetas de etapa (em russo e alemão a etiqueta é mais larga). */
  .af-s3 .s3-crew .af-title.has-art {
    --w: 38;
  }
}
/* Título do encontro pode ocupar duas linhas: em japonês, chinês e coreano quebra em qualquer letra, como antes. */
html:lang(ja) :is(.s3-camp .cs-title, .cs-description, .bubble, p),
html:lang(zh-CN) :is(.s3-camp .cs-title, .cs-description, .bubble, p),
html:lang(ko) :is(.s3-camp .cs-title, .cs-description, .bubble, p) {
  word-break: normal;
  line-break: auto;
}
/* Balão de fala: letras CJK são mais largas que o latim, a margem lateral menor deixa o texto dentro do balão. */
html:lang(ja) .s3-camp .cs-description,
html:lang(zh-CN) .s3-camp .cs-description,
html:lang(ko) .s3-camp .cs-description {
  padding-left: 2.2em;
  padding-right: 2em;
  font-size: calc(0.9 * var(--s));
}

/* ---------- Tela de resultado: todo texto numa placa, nada quebrado ou saindo (derrota, desistência, empate) ---------- */
/* Botões: texto em uma linha só; se não couber, encolhe dentro do botão (fit-label.ts). */
html.painted .result-stage > .actions > .btn {
  white-space: nowrap;
}
html.painted .result-stage > .actions > .btn > span {
  flex: 0 1 auto;
  min-width: 0;
  white-space: nowrap;
}
/* Motivo ("Você desistiu da partida.") numa placa escura de pincel, não solto no céu. */
.result-stage .result-reason {
  display: block;
  justify-self: center;
  width: fit-content;
  max-width: min(92vw, 560px);
  padding: 0.8em 1.8em 1.1em;
  text-align: center;
  line-height: 1.2;
  color: #fff;
  font-weight: 900;
  text-shadow: 0 1px 0 var(--street-ink);
  background: var(--art-street-menu-tag-dark) center/100% 100% no-repeat;
}
/* Balão de fala: texto sempre dentro, quebrando em linhas normais (a letra diminui se precisar). */
.result-stage .quote {
  overflow: hidden;
  white-space: normal;
}
.result-stage .quote .q-in {
  display: block;
  width: 100%;
  min-width: 0;
  white-space: normal;
  overflow-wrap: break-word;
  hyphens: auto;
  text-wrap: balance;
  text-align: center;
}
/* Celular: balão com altura para duas ou três linhas (antes era uma faixa fina e o texto saía pelos lados). */
@media not all and (orientation: landscape) and (min-width: 761px) and (min-height: 441px) {
  /* A arte do balão tem margem transparente dos lados: o texto fica entre 24% e 78% da largura. */
  .result-stage .quote {
    --qw: min(86vw, 360px);
    min-width: 0;
    width: var(--qw);
    min-height: 96px;
    padding: 22px calc(var(--qw) * 0.22) 30px calc(var(--qw) * 0.25);
    display: grid;
    place-items: center;
    background-size: 100% 100% !important;
  }
}
/* Dica da derrota numa placa e "Tutorial" em pílula de arte. */
.result-stage .loss-help {
  padding: 0.6em 1em 0.8em;
  line-height: 1.25;
  text-align: center;
  overflow: hidden;
  background: var(--art-street-menu-tag-dark) center/100% 100% no-repeat;
}
html.painted .result-stage .result-extras .btn.small {
  min-height: 0;
  height: 2.4em;
  padding: 0 1.1em 0.1em;
  border: 0 !important;
  box-shadow: none !important;
  color: #fff !important;
  background: var(--art-street-menu-pill-blue) center/100% 100% no-repeat !important;
  font-family: var(--font-street);
  text-transform: uppercase;
  -webkit-text-stroke: 0.16em var(--street-ink);
  paint-order: stroke fill;
}
@media (orientation: landscape) and (min-width: 761px) and (min-height: 441px) {
  /* Margem direita maior: o texto do balão encostava na borda desenhada. */
  .result-stage > .quote {
    padding-right: calc(8.4 * var(--ux));
  }
  .result-stage > .result-reason {
    width: fit-content;
    max-width: calc(44 * var(--ux));
    left: calc(50% + 0 * var(--ux));
    font-size: calc(1.45 * var(--ux));
  }
  .result-stage > .result-extras {
    max-height: calc(24 * var(--uy));
  }
  .result-stage .loss-help {
    max-height: calc(14 * var(--uy));
  }
}
/* Motivo e dica: placa escura arredondada com borda branca de adesivo, que cresce com o texto
   (a pincelada fina só cabia uma linha; com duas, o texto saía da placa). */
.result-stage .result-reason,
.result-stage .loss-help {
  background: #0b1a3aeb !important;
  border: 2px solid #fff;
  border-radius: 14px 18px 12px 20px / 16px 12px 18px 14px;
  box-shadow: 0 4px 0 #07142c80;
  padding: 0.45em 0.95em 0.5em;
  rotate: -1.5deg;
}
/* Celular deitado: não sobra altura para a dica da derrota sem cobrir os botões; ela fica nos outros formatos. */
@media (max-height: 440px) and (orientation: landscape) {
  .result-stage .result-extras:has(.loss-help) {
    display: none;
  }
}
/* Celular deitado: título do resultado menor e abaixo do topo (girado e alongado, passava da tela). */
@media (max-height: 440px) and (orientation: landscape) {
  .result-stage > .big.has-art {
    padding-top: 10px;
  }
  .result-stage > .big.has-art .street-title {
    --st-max: 11vh;
  }
}
/* Conteúdo mais alto que a tela (alemão e polonês no celular deitado): centraliza sem cortar o topo. */
@media (max-height: 440px) and (orientation: landscape) {
  html.painted .modal-card.result.result-stage {
    align-content: safe center;
    overflow-y: auto;
  }
}

/* End of src/lang.css */

/* End of assets/lang-C_nnqdee.css */
