/* ============================================================
   Line Aura — X1 DE LINHA (js/x1.js)
   Tudo na lousa do Line (tokens --cp-* do historia.css), com o rosa
   da casa só no que é a próxima ação (riscar a partir de você,
   Começar, Revanche).
   ============================================================ */

.x1[hidden], .x1-entrada[hidden], .x1-sala[hidden], .x1-hud[hidden], .x1-faixa[hidden], .x1-quadro__pop[hidden], .x1-toast[hidden], .x1-podio[hidden] { display: none !important; }

/* ── o cartão na home ── */
.lh-home__grid .lh-livres__lista .lh-modo--x1 { grid-column: 1 / -1; }
.lh-modo--x1[hidden] { display: none !important; }
.lh-modo--x1 { position: relative; background: linear-gradient(180deg, #1B806E 0, var(--cp-slab) 100%); }
.lh-modo--x1 .lh-modo__ic { color: #fff; background: var(--cp-pink-3); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .18), 0 0 0 2.5px var(--cp-edge); }
.lh-modo__novo { display: inline-block; vertical-align: 3px; margin-left: 6px; padding: 3px 7px 4px; border-radius: 7px; font: 800 10.5px/1 'Poppins', sans-serif; letter-spacing: .06em; text-transform: uppercase; color: var(--cp-edge); background: var(--cp-gold-2); text-shadow: none; }
.lh-modo__on { display: inline-flex; align-items: center; gap: 6px; font: 700 12px/1.2 'Poppins', sans-serif; color: #8EF0B4; }
.lh-modo__on::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #3BD679; box-shadow: 0 0 0 3px rgba(59, 214, 121, .22); }
.lh-modo__on:empty { display: none; }
/* a etiqueta do X1 com quantos estão online (04/11): escura, bolinha verde, no lugar do "novo" */
.lh-modo__novo--online { display: inline-flex; align-items: center; gap: 6px; vertical-align: 2px; color: #CFF7DC; background: rgba(0, 0, 0, .38); box-shadow: inset 0 0 0 1.5px rgba(142, 240, 180, .35); }
.lh-modo__novo--online::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #3BD679; flex: 0 0 auto; }
/* o chip "N online" sai da barra de cima (o X1 mostra quem tá online) */
.la-topleft > .apr-wrap { display: none !important; }

/* ── a tela do X1 ── */
/* (.cp p / .cp h3 zero the margins in the mold, so the ones here go through .cp) */
.x1 { position: fixed; inset: 0; z-index: 25; overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch; color: var(--cp-text); }
.x1-in { width: min(620px, 100%); margin: 0 auto; padding: 72px 16px 48px; }
.x1-topo { display: flex; align-items: center; margin-bottom: 14px; }
.x1-topo .cp-btn { min-height: 42px; padding: 0 16px 0 10px; font-size: 16px; }
.x1-hero { text-align: center; margin-bottom: 18px; }
.x1-titulo { font: 400 clamp(40px, 10vw, 60px)/.95 'Lilita One', 'Poppins', sans-serif; color: var(--cp-text); text-shadow: var(--cp-tx-l); }
.cp .x1-regra { max-width: 470px; margin: 10px auto 0; font-size: 14px; line-height: 1.5; font-weight: 600; color: var(--cp-text-dim); }
.cp .x1-sub { margin: 32px 0 10px; font: 400 18px/1 'Lilita One', 'Poppins', sans-serif; color: var(--cp-text-dim); text-shadow: var(--cp-tx-s); padding-left: 4px; }

/* a lousa de desafio: shared/desafio-lousa.js (as cores da lousa verde são o padrão dela) */
#x1-quadro-sala { margin-top: 18px; }
/* "Chamar a galera no Discord" (shared/chamar-galera.js) na lousa verde */
.x1-chamada { margin: -4px 0 18px; }
.x1-chamada .cg { --cg-fundo: #0E5047; --cg-texto: #F6F2E9; --cg-texto2: #A6D5C9; --cg-borda: #04211D; --cg-ok: #7EE0B5; }
.x1-chamada:empty { display: none; }

/* criar / entrar com código / salas abertas */
.x1-acoes { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 18px; }
.x1-acoes .cp-btn { min-height: 48px; font-size: 17px; }
.x1-codigo { display: flex; gap: 8px; }
.x1-codigo input {
  width: 150px; min-height: 48px; padding: 0 14px; border: 0; border-radius: 12px; text-transform: uppercase; letter-spacing: .12em;
  font: 800 16px/1 'Poppins', sans-serif; color: var(--cp-text); background: var(--cp-night); box-shadow: var(--cp-well-shadow);
}
.x1-codigo input::placeholder { letter-spacing: 0; text-transform: none; font-weight: 600; color: var(--cp-text-dim); }
.x1-codigo input:focus { outline: 3px solid rgba(255, 255, 255, .6); outline-offset: 2px; }
.x1-salas { display: grid; gap: 10px; }
.x1-salinha {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; padding: 10px 14px; border: 0; border-radius: 16px; cursor: pointer;
  color: var(--cp-text); font: inherit; text-align: left; background: linear-gradient(180deg, var(--cp-slab-hi) 0, var(--cp-slab) 100%);
  box-shadow: inset 0 1.5px 0 var(--cp-bevel-hi), 0 0 0 2.5px var(--cp-edge), 0 4px 0 2.5px var(--cp-edge);
}
.x1-salinha:active { transform: translateY(3px); box-shadow: inset 0 1.5px 0 var(--cp-bevel-hi), 0 0 0 2.5px var(--cp-edge), 0 1px 0 2.5px var(--cp-edge); }
.x1-salinha__av { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 24px; background: var(--cp-night); box-shadow: var(--cp-well-shadow); }
.x1-salinha__t { display: grid; gap: 2px; min-width: 0; }
.x1-salinha__t b { font: 400 17px/1.1 'Lilita One', 'Poppins', sans-serif; text-shadow: var(--cp-tx-s); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.x1-salinha__t small { font-size: 12px; font-weight: 600; color: var(--cp-text-dim); }
.x1-salinha__n { font: 400 17px/1 'Lilita One', 'Poppins', sans-serif; color: var(--cp-text-dim); }
.x1-vazio { padding: 14px; border-radius: 14px; text-align: center; font-size: 13.5px; font-weight: 600; color: var(--cp-text-dim); background: var(--cp-night); box-shadow: var(--cp-well-shadow); }

/* ── a sala ── */
.x1-cod {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 12px; padding: 16px; border-radius: 22px;
  background: var(--cp-slab-bg); box-shadow: var(--cp-slab-shadow);
}
.x1-cod__l { font: 400 18px/1 'Lilita One', 'Poppins', sans-serif; color: var(--cp-text-dim); text-shadow: var(--cp-tx-s); }
.x1-cod b { font: 400 40px/1 'Lilita One', 'Poppins', sans-serif; letter-spacing: .12em; color: #fff; text-shadow: var(--cp-tx-m); margin-right: 6px; }
.x1-cod .cp-btn { min-height: 42px; font-size: 15px; padding: 0 14px; }
.x1-jogadores { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 12px; margin: 18px 0; }
.x1-jog {
  position: relative; display: grid; justify-items: center; gap: 5px; padding: 14px 8px 12px; border-radius: 18px;
  background: linear-gradient(180deg, var(--cp-slab-hi) 0, var(--cp-slab) 100%); box-shadow: inset 0 1.5px 0 var(--cp-bevel-hi), 0 0 0 2.5px var(--cp-edge), 0 5px 0 2.5px var(--cp-edge);
}
.x1-jog__av { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-size: 28px; background: var(--cp-night); box-shadow: 0 0 0 3px var(--cor, var(--cp-edge)); }
.x1-jog__nm { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 400 16px/1.1 'Lilita One', 'Poppins', sans-serif; text-shadow: var(--cp-tx-s); }
.x1-jog__cor { font-size: 13px; letter-spacing: 1px; color: #FF6F9A; text-shadow: 0 1px 0 var(--cp-edge); }
.x1-jog__st { font: 700 12px/1 'Poppins', sans-serif; color: var(--cp-text-dim); }
.x1-jog.is-pronto { box-shadow: inset 0 1.5px 0 var(--cp-bevel-hi), 0 0 0 2.5px var(--cp-edge), 0 0 0 5px #6BE08A, 0 5px 0 5px var(--cp-edge); }
.x1-jog.is-pronto .x1-jog__st { color: #8EF0B4; }
.x1-jog__av { position: relative; }
.x1-jog__ok { position: absolute; right: -4px; bottom: -4px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font: 900 13px/1 Poppins, sans-serif; font-style: normal; color: var(--cp-edge); background: #6BE08A; box-shadow: 0 0 0 2.5px var(--cp-edge); }
.x1-jog__tag { padding: 3px 7px; border-radius: 6px; font: 800 10px/1.1 'Poppins', sans-serif; color: var(--cp-edge); background: var(--cp-gold-2); }
.x1-jog__x { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border: 0; border-radius: 8px; cursor: pointer; color: var(--cp-text-dim); background: var(--cp-night); font-size: 12px; }
.x1-jog__x:hover { color: #fff; }
.x1-jog.is-off { opacity: .55; }
.x1-jog.is-espera .x1-jog__cor { color: var(--cp-gold-2); letter-spacing: 0; font-weight: 700; }
.x1-jog.is-espera .x1-jog__av { animation: x1Pulsa 1.1s ease-in-out infinite; }
.x1-jog.is-vazio { background: none; box-shadow: inset 0 0 0 2px rgba(166, 213, 201, .25); }
.x1-jog.is-vazio .x1-jog__av { background: none; box-shadow: inset 0 0 0 2px rgba(166, 213, 201, .3); color: var(--cp-text-dim); font: 400 26px/1 'Lilita One', sans-serif; }
.x1-jog.is-vazio .x1-jog__nm { color: var(--cp-text-dim); }
.cp .x1-config__l { margin: 0 0 8px; font: 400 16px/1 'Lilita One', 'Poppins', sans-serif; color: var(--cp-gold-2); text-shadow: var(--cp-tx-s); }
.x1-config { display: grid; grid-template-columns: 1fr 1.5fr; gap: 12px; }
.x1-config .lh-opt { margin: 0; }
.x1-config .la-time:disabled { cursor: default; }
.x1-config.is-leitura .la-time:not(.sel) { opacity: .45; }
.x1-comecar { display: flex; flex-direction: column; justify-content: center; width: 100%; margin-top: 18px; }
.x1-comecar small, .x1-pronto small { display: block; font: 700 12px/1.2 'Poppins', sans-serif; opacity: .85; }
.x1-comecar[hidden] { display: none; }
.cp .x1-dica { margin: 20px 0 0; text-align: center; font-size: 14px; font-weight: 700; color: var(--cp-text-dim); }
.x1-sala > .la-link { display: block; margin: 22px auto 0; color: var(--cp-text-dim); }

/* ── a partida: o placar, a barra de tempo e a faixa ── */
body.x1mode #la-back, body.x1mode #la-timer, body.x1mode #la-streak, body.x1mode #la-meta { display: none !important; }
.x1-hud { position: fixed; inset: 0; z-index: 31; pointer-events: none; }
.x1-hud > *, .x1-hud__topo > * { pointer-events: auto; }
.x1-hud__topo { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px 0; pointer-events: none; }
.x1-hud__topo .la-iconbtn { flex: 0 0 auto; }
.x1-placar { flex: 1; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; min-width: 0; pointer-events: none !important; }
.x1-pl {
  display: flex; align-items: center; gap: 7px; padding: 5px 11px 5px 5px; border-radius: 999px;
  background: rgba(4, 33, 29, .9); box-shadow: 0 0 0 2px var(--cor);   /* no backdrop blur: with 6 chips over the moving board it cost frames */
}
.x1-pl__av { position: relative; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 18px; background: var(--cp-night); }
.x1-pl__ok { position: absolute; right: -5px; bottom: -4px; width: 17px; height: 17px; border-radius: 50%; display: grid; place-items: center; font: 900 11px/1 Poppins, sans-serif; font-style: normal; color: var(--cp-edge); background: #6BE08A; box-shadow: 0 0 0 2px var(--cp-edge); }
.x1-pl__tx { display: grid; gap: 1px; min-width: 0; }
.x1-pl__tx b { max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 800 12px/1.1 'Poppins', sans-serif; color: #fff; }
.x1-pl__cor { font-size: 12px; line-height: 1; letter-spacing: .5px; color: rgba(246, 242, 233, .3); }
.x1-pl__cor i { font-style: normal; }
.x1-pl__cor i.on { color: #FF4F84; }
.x1-pl.is-eu { box-shadow: 0 0 0 2px var(--cor), 0 0 0 4px var(--cp-edge); }
.x1-pl.is-fora { opacity: .45; }
.x1-pl.is-fora .x1-pl__cor { color: var(--cp-text-dim); font: 700 11px/1 'Poppins', sans-serif; }
.x1-pl.is-off .x1-pl__av { filter: grayscale(1); }
.x1-pl.is-perdeu { animation: x1Treme .5s; }
.x1-pl.is-perdeu .x1-pl__cor { animation: x1Pisca .9s; }
.x1-pl.is-ganhou { animation: x1Pula .6s; }
@keyframes x1Treme { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
@keyframes x1Pisca { 0%, 50% { filter: brightness(2.2); } }
@keyframes x1Pula { 40% { transform: translateY(-6px) scale(1.06); } }
.x1-barra { position: absolute; left: 50%; top: calc(var(--x1-topo, 64px)); transform: translateX(-50%); width: min(420px, calc(100% - 32px)); height: 7px; border-radius: 99px; background: rgba(246, 242, 233, .14); overflow: hidden; pointer-events: none !important; }
.x1-barra i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, #6BE08A, #FFD23F); }
.x1-barra i.is-pouco { background: #FF4F84; }
@media (max-width: 600px) { .x1-hud { --x1-topo: 104px; } }
.x1-faixa {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(.9); opacity: 0;
  display: grid; gap: 6px; justify-items: center; width: max-content; max-width: calc(100% - 32px); padding: 14px 22px 16px; border-radius: 20px;
  text-align: center; pointer-events: none !important; background: rgba(4, 33, 29, .86); box-shadow: 0 0 0 3px var(--cp-edge), 0 14px 30px rgba(0, 0, 0, .35);
  transition: opacity .18s ease-out, transform .18s ease-out;
}
.x1-faixa.is-in { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.x1-faixa b { font: 400 clamp(24px, 6vw, 40px)/1.05 'Lilita One', 'Poppins', sans-serif; color: #fff; text-shadow: var(--cp-tx-m); }
.x1-faixa span { font-size: 14px; font-weight: 700; color: var(--cp-text-dim); }
.x1-faixa.is-conta b { font-size: clamp(64px, 16vw, 110px); }
.x1-faixa.is-conta { background: none; box-shadow: none; }
.x1-faixa.is-final { box-shadow: 0 0 0 3px var(--cp-edge), 0 0 0 7px var(--cp-gold-2), 0 0 0 9.5px var(--cp-edge); }
/* o veredito fica embaixo, pra não tampar os traços */
.x1-faixa.is-levou, .x1-faixa.is-perdeu, .x1-faixa.is-veredito { top: auto; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 10px); }
.x1-faixa.is-levou.is-in, .x1-faixa.is-perdeu.is-in, .x1-faixa.is-veredito.is-in { transform: translate(-50%, 0); }
.x1-faixa.is-levou b { color: #6BE08A; }
.x1-faixa.is-perdeu b { color: #FF6F9A; }

/* ── o pódio ── */
.x1-podio { z-index: 62; }
.x1-podio__box { text-align: center; padding-top: 22px; }
.x1-podio__coroa { font-size: 44px; line-height: 1; margin-bottom: 4px; animation: x1Pula 1s ease-in-out 2; }
.x1-podio__t { font: 400 clamp(32px, 8vw, 44px)/1 'Lilita One', 'Poppins', sans-serif; color: var(--cp-text); text-shadow: var(--cp-tx-l); }
.cp .x1-podio__sub { margin: 6px 0 16px; font-size: 13px; font-weight: 700; color: var(--cp-text-dim); }
.cp .x1-podio__lista { list-style: none; display: grid; gap: 8px; margin: 0 0 18px; padding: 0; text-align: left; }
.x1-podio__lista li {
  display: grid; grid-template-columns: 34px 40px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 14px;
  background: var(--cp-night); box-shadow: var(--cp-well-shadow), inset 4px 0 0 var(--cor);
}
.x1-podio__lista li.is-1 { background: linear-gradient(90deg, rgba(255, 200, 61, .22), transparent 70%), var(--cp-night); }
.x1-podio__pos { font: 400 20px/1 'Lilita One', 'Poppins', sans-serif; color: var(--cp-gold-2); text-shadow: var(--cp-tx-s); }
.x1-podio__av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; background: var(--cp-slab); }
.x1-podio__lista b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 400 17px/1.1 'Lilita One', 'Poppins', sans-serif; text-shadow: var(--cp-tx-s); }
.x1-podio__lista small { font-size: 12px; font-weight: 700; color: var(--cp-text-dim); white-space: nowrap; }
.x1-podio__acoes { display: grid; gap: 12px; justify-items: center; }
.x1-podio__acoes .cp-btn { width: 100%; }
.x1-podio__espera { font-size: 14px; font-weight: 700; color: var(--cp-text-dim); }
.x1-podio__acoes .x1-pronto { flex-direction: column; }
.cp .x1-podio__conta { margin: 0; font-size: 13.5px; font-weight: 700; color: var(--cp-text-dim); text-align: center; }
.x1-podio__prontos { display: flex; flex-wrap: wrap; gap: 6px 10px; justify-content: center; font-size: 13px; color: var(--cp-text-dim); }
.x1-podio__prontos:empty { display: none; }
.x1-podio__prontos b { color: #8EF0B4; font-weight: 800; }
/* watching (you, or how many) */
.x1-olhos { position: absolute; left: 50%; top: calc(var(--x1-topo, 64px) + 16px); transform: translateX(-50%); padding: 6px 12px; border-radius: 999px; font: 800 12.5px/1 'Poppins', sans-serif; color: var(--cp-text); background: rgba(4, 33, 29, .9); box-shadow: 0 0 0 2px rgba(166, 213, 201, .35); pointer-events: none !important; white-space: nowrap; }
.x1-podio .la-link { color: var(--cp-text-dim); }

.x1-toast {
  position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 99;
  max-width: calc(100% - 32px); padding: 11px 16px; border-radius: 12px; font: 700 14px/1.35 Poppins, sans-serif; text-align: center;
  color: var(--cp-edge); background: var(--cp-text); box-shadow: 0 0 0 2.5px var(--cp-edge), 0 6px 0 2.5px var(--cp-edge);
}

@media (max-width: 600px) {
  .x1-quadro { height: 330px; }
  .x1-bolha { width: 86px; }
  .x1-av { width: 46px; height: 46px; font-size: 24px; }
  .x1-bolha--eu .x1-av { width: 56px; height: 56px; font-size: 30px; }
  .x1-config { grid-template-columns: 1fr; }
  .x1-cod b { font-size: 34px; }
  .x1-hud__topo { flex-direction: column; align-items: stretch; }
  .x1-hud__topo .la-iconbtn { align-self: flex-start; position: absolute; }
  .x1-placar { padding-left: 0; margin-top: 50px; gap: 6px; }
  .x1-pl { padding-right: 9px; }
  .x1-pl__tx b { max-width: 64px; }
}
@media (prefers-reduced-motion: reduce) {
  .x1-quadro__guia, .x1-bolha.is-chamado .x1-av, .x1-jog.is-espera .x1-jog__av, .x1-pl, .x1-podio__coroa { animation: none !important; }
  .x1-faixa { transition: none; }
}
