/* mmolfg: a janela de grupo do jogo, com acabamento moderno.
   Cena: jogadores a noite, no celular vindo de uma DM do Discord ou no PC ao
   lado do jogo. Escuro por padrao; o claro segue o sistema.
   Cores de funcao como no jogo; dourado so para acao, seu lugar e mudancas. */

@font-face { font-family: 'Chakra Petch'; font-weight: 600; font-display: swap; src: url('/static/fonts/chakra-petch-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Chakra Petch'; font-weight: 700; font-display: swap; src: url('/static/fonts/chakra-petch-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 400; font-display: swap; src: url('/static/fonts/barlow-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 500; font-display: swap; src: url('/static/fonts/barlow-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 600; font-display: swap; src: url('/static/fonts/barlow-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-weight: 500; font-display: swap; src: url('/static/fonts/jetbrains-mono-latin-500-normal.woff2') format('woff2'); }

:root {
  color-scheme: dark;
  --bg: #0e1016;
  --surface: #161922;
  --surface-2: #1d212c;
  --surface-3: #262b38;
  --line: rgb(255 255 255 / 0.07);
  --line-strong: rgb(255 255 255 / 0.13);
  --text: #e7e9f0;
  --text-2: #a1a9b9;
  --text-3: #6f7789;
  --gold: #e8b94a;
  --gold-ink: #1b1505;
  --gold-text: #f0c869;
  --gold-wash: rgb(232 185 74 / 0.1);
  --gold-wash-strong: rgb(232 185 74 / 0.2);
  --ok: #4fd18b;
  --danger: #f27474;
  --role-tank: #6a96f2;
  --role-healer: #4fd18b;
  --role-support: #ad91f7;
  --role-dps: #f27474;
  --role-any: #8c95a8;
  --cp: #5fd4e2;
  --shadow: 0 1px 0 rgb(255 255 255 / 0.04) inset, 0 14px 32px -18px rgb(0 0 0 / 0.8), 0 3px 8px -4px rgb(0 0 0 / 0.45);
  --shadow-pop: 0 18px 40px -14px rgb(0 0 0 / 0.75), 0 4px 12px -4px rgb(0 0 0 / 0.5);
  --scrim: rgb(6 8 12 / 0.62);

  --font-display: 'Chakra Petch', 'Segoe UI', sans-serif;
  --font-body: 'Barlow', system-ui, sans-serif;
  --font-data: 'JetBrains Mono', ui-monospace, monospace;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;
  --r-sm: 8px;
  --r: 10px;
  --r-lg: 16px;
  --gutter: 16px;
  --tabbar: 64px;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #f2f3f7;
    --surface: #ffffff;
    --surface-2: #f5f6f9;
    --surface-3: #e9ecf2;
    --line: rgb(16 22 35 / 0.08);
    --line-strong: rgb(16 22 35 / 0.15);
    --text: #121620;
    --text-2: #525a6b;
    --text-3: #8a91a0;
    --gold: #f0bf45;
    --gold-ink: #1b1505;
    --gold-text: #8a6100;
    --gold-wash: rgb(240 191 69 / 0.16);
    --gold-wash-strong: rgb(240 191 69 / 0.32);
    --ok: #178a52;
    --danger: #c63d3d;
    --role-tank: #3a6ad6;
    --role-healer: #1b9a5c;
    --role-support: #7a58d8;
    --role-dps: #d24848;
    --role-any: #6d7587;
    --cp: #0a7a87;
    --shadow: 0 14px 30px -20px rgb(20 26 40 / 0.35), 0 2px 6px -3px rgb(20 26 40 / 0.14);
    --shadow-pop: 0 18px 40px -16px rgb(20 26 40 / 0.4), 0 4px 12px -6px rgb(20 26 40 / 0.2);
    --scrim: rgb(20 26 40 / 0.42);
  }
}

/* ------------------------------------------------------------ base */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.5 var(--font-body);
  font-variant-numeric: tabular-nums;
  caret-color: var(--gold);
  scrollbar-color: var(--surface-3) transparent;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--gold); color: var(--gold-ink); }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--gold); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
img { display: block; }
h1, h2, h3, p, ol, ul, dl, dd, fieldset { margin: 0; }
ol, ul { padding: 0; list-style: none; }
fieldset { border: 0; padding: 0; min-width: 0; }
button, input, select { font: inherit; color: inherit; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.muted { color: var(--text-2); }
.small { font-size: 14px; }
.fine { font-size: 13px; color: var(--text-2); display: flex; gap: var(--s2); align-items: center; }
.num { font-family: var(--font-data); font-size: 13px; font-weight: 500; color: var(--text-2); }
.warn { color: var(--text); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 10; background: var(--gold); color: var(--gold-ink); padding: var(--s2) var(--s3); border-radius: var(--r-sm); }
.skip:focus { left: 8px; }

.display, .h1, .h2, .quest__title, .party__head h2, .brand__word {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.display { font-size: clamp(40px, 8vw, 76px); line-height: 1; text-wrap: balance; }
.h1 { font-size: clamp(28px, 5vw, 38px); line-height: 1.1; }
.h2 { font-weight: 600; font-size: 19px; line-height: 1.2; margin: var(--s6) 0 var(--s3); }
.lead { font-size: 18px; color: var(--text-2); max-width: 60ch; margin-top: var(--s3); }
.label { font-size: 12.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); }

/* Cores de funcao, usadas por pontos, selos e textos. */
.role-tank { --role: var(--role-tank); }
.role-healer { --role: var(--role-healer); }
.role-support { --role: var(--role-support); }
.role-dps { --role: var(--role-dps); }
.role-any { --role: var(--role-any); }

/* ------------------------------------------------------------ moldura */

.masthead {
  display: flex; align-items: center; gap: var(--s5);
  padding: 0 var(--gutter); height: 60px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.brand { flex: none; display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand__mark { width: 26px; height: 26px; color: var(--gold); }
.brand__word { font-size: 22px; letter-spacing: 0; }
.topnav { flex: none; display: none; gap: var(--s1); padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; }
.topnav a { font-weight: 500; font-size: 15px; white-space: nowrap; text-decoration: none; color: var(--text-2); padding: 6px 14px; border-radius: 999px; transition: background-color 160ms var(--ease), color 160ms var(--ease); }
.topnav a:hover { color: var(--text); }
.topnav a[aria-current="page"] { color: var(--text); background: var(--surface-3); }
/* So o nome do personagem encolhe (com reticencias) quando falta espaco; o resto fica inteiro. */
.masthead__end { margin-left: auto; display: flex; align-items: center; gap: var(--s2); min-width: 0; }
.masthead__end > :not(.me) { flex: none; }
.langs { display: flex; padding: 3px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; }
.langs button {
  background: none; border: 0; cursor: pointer; padding: 4px 9px; border-radius: 999px;
  font-weight: 600; font-size: 12.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-2);
}
.langs button[aria-pressed="true"] { color: var(--gold-ink); background: var(--gold); }
.who { display: inline-flex; align-items: center; gap: var(--s2); text-decoration: none; padding: 4px; border-radius: 999px; }
.who:hover { background: var(--surface); }
.who img, .who__blank { width: 30px; height: 30px; border-radius: 50%; }
.who__blank { display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); }
.who__name { display: none; font-weight: 500; padding-right: 6px; }
.iconbtn { display: grid; place-items: center; width: 40px; height: 40px; background: none; border: 0; border-radius: 999px; color: var(--text-2); cursor: pointer; }
.iconbtn:hover { color: var(--text); background: var(--surface); }

/*
 * Seu personagem no cabecalho: um frame da janela de grupo em miniatura, com
 * dois toques. O personagem (o emblema com o nivel, o nome, o servidor e a
 * linha de GS e CP) leva ao Perfil; as setas ao lado, sempre a vista (o toque
 * nao tem hover), trocam de personagem e ficam douradas ao apontar.
 */
.me { display: inline-flex; align-items: center; gap: 2px; min-width: 0; }
.me__who {
  display: inline-flex; align-items: center; gap: 10px; min-width: 0;
  padding: 4px 10px 4px 4px; border-radius: 12px;
  text-decoration: none;
  transition: background-color 160ms var(--ease);
}
.me__who:hover { background: var(--surface); }
.me__swap {
  flex: none; display: grid; place-items: center; width: 36px; height: 36px;
  border-radius: 10px; color: var(--text-2);
  transition: color 160ms var(--ease), background-color 160ms var(--ease);
}
.me__swap .icon { width: 18px; height: 18px; }
.me__swap:hover, .me__swap[aria-current="page"] { color: var(--gold-text); background: var(--gold-wash); }
.me__text { display: grid; gap: 1px; min-width: 0; }
.me__id { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.me__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 15px/1.25 var(--font-display); }
.me__server { flex: none; font-size: 12.5px; color: var(--text-2); }
.me .power { flex-wrap: nowrap; gap: 0 10px; font-size: 12.5px; line-height: 1.3; }
.me .power__stat .icon { width: 13px; height: 13px; }

/* O emblema com o nivel numa plaquinha embaixo, recortada na cor do fundo (--lv-ring). */
.lvbadge { flex: none; position: relative; margin-bottom: 4px; }
.lvbadge__level {
  position: absolute; left: 50%; bottom: -7px; transform: translateX(-50%);
  min-width: 22px; padding: 0 4px; border-radius: 5px;
  background: var(--surface-3); box-shadow: 0 0 0 2px var(--lv-ring, var(--bg));
  font: 600 10.5px/15px var(--font-body); color: var(--text); text-align: center;
}
.me__who:hover .lvbadge { --lv-ring: var(--surface); }

/* Celulares estreitos (360 px e menos): o cabecalho cabe sem comer a margem nem rolar para o lado. */
@media (max-width: 400px) {
  .masthead { gap: var(--s2); }
  .masthead__end { gap: var(--s1); }
  .me__who { gap: 8px; padding-right: 6px; }
  .me__swap { width: 32px; height: 32px; }
  .me .power { gap: 0 8px; font-size: 12px; }
  .me .power__stat .icon { width: 12px; height: 12px; }
}
@media (max-width: 359px) { .brand__word { display: none; } }
/*
 * No celular, com o seu personagem no cabecalho, a marca fica so com o simbolo:
 * o nome, o GS e o CP e as setas de trocar precisam da largura (o "mmolfg" deixava
 * so 91 px para a linha de GS e CP, que pede uns 115).
 */
@media (max-width: 479px) { .masthead--me .brand__word { display: none; } }

.runhead {
  display: flex; align-items: center; gap: var(--s2);
  padding: 8px var(--gutter);
  font-size: 13px; color: var(--text-2);
  white-space: nowrap;
}
.runhead__clock { flex: none; margin-left: auto; display: inline-flex; align-items: center; gap: 6px; }
.runhead__clock .icon { width: 15px; height: 15px; }
.runhead__clock time { font-family: var(--font-data); font-weight: 500; color: var(--text); }

/*
 * Com o personagem no cabecalho, o celular nao tem lugar para o idioma ali:
 * ele desce para a linha do relogio, menor. Do tablet para cima fica no cabecalho.
 */
.langs--narrow { flex: none; padding: 2px; }
.langs--narrow button { padding: 2px 7px; font-size: 11.5px; }
@media (max-width: 767px) { .langs--wide { display: none; } }
@media (max-width: 400px) { .runhead__brt { display: none; } }

.main {
  flex: 1;
  width: 100%; max-width: 1180px; margin: 0 auto;
  padding: var(--s4) var(--gutter) calc(var(--tabbar) + var(--s7));
}
.foot {
  display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); justify-content: center;
  padding: var(--s5) var(--gutter) calc(var(--tabbar) + var(--s5));
  font-size: 13px; color: var(--text-2);
  border-top: 1px solid var(--line);
}

.tabbar {
  position: fixed; inset: auto 0 0; z-index: 5;
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
  height: calc(var(--tabbar) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 3px;
  text-decoration: none; color: var(--text-2); font-size: 12.5px; font-weight: 500;
  min-width: 0; padding: 8px 2px 0;
}
/* O rotulo que nao cabe na aba (cinco abas, para quem modera, ou 320 px) quebra em
   duas linhas, sem invadir a vizinha; os icones ficam todos na mesma altura. */
.tabbar a span { text-align: center; line-height: 1.05; text-wrap: balance; }
.tabbar .icon { width: 23px; height: 23px; }
.tabbar a[aria-current="page"] { color: var(--text); }
.tabbar a[aria-current="page"] .icon { color: var(--gold); }

@media (min-width: 768px) {
  :root { --gutter: 32px; }
  .who__name { display: inline; }
  .langs--narrow { display: none; }
  .main { padding-top: var(--s5); }
}
/*
 * As abas sobem para o cabecalho so no desktop: com a marca, as abas, o idioma
 * e o seu personagem, o cabecalho precisa de ~970 px. No tablet ficam embaixo,
 * como no celular.
 */
@media (min-width: 1024px) {
  :root { --tabbar: 0px; }
  .topnav { display: flex; }
  .tabbar { display: none; }
}

/* ------------------------------------------------------------ controles */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 44px; padding: 0 18px;
  border: 1px solid var(--line-strong); border-radius: var(--r);
  background: var(--surface-2); color: var(--text);
  font-weight: 600; font-size: 15.5px; text-decoration: none;
  cursor: pointer; white-space: nowrap;
  transition: background-color 160ms var(--ease), border-color 160ms var(--ease), transform 160ms var(--ease);
}
.btn:hover { background: var(--surface-3); }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--gold); border-color: transparent; color: var(--gold-ink); }
.btn--primary:hover { background: var(--gold-text); }
.btn--ghost { background: transparent; border-color: transparent; color: var(--text-2); padding: 0 var(--s3); }
.btn--ghost:hover { background: var(--surface-2); color: var(--text); }
.btn--danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn--danger:hover { background: var(--danger); color: var(--bg); }
.btn--big { min-height: 54px; padding: 0 var(--s5); font-size: 17px; border-radius: 12px; }
.btn.is-on { background: var(--gold-wash-strong); border-color: var(--gold); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.linkbtn {
  display: inline-flex; align-items: center; gap: 6px; padding: var(--s2) 0;
  background: none; border: 0; color: var(--text-2); cursor: pointer; font-size: 14px;
}
.linkbtn:hover { color: var(--text); }

.field { display: grid; gap: 6px; }
.field__label { font-weight: 500; font-size: 14px; color: var(--text-2); }
input:not([type="checkbox"]):not([type="radio"]), select, textarea {
  width: 100%; min-height: 44px; padding: 0 var(--s3);
  background: var(--bg); color: var(--text);
  border: 1px solid var(--line-strong); border-radius: var(--r);
  transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease);
}
/* A caixa cresce com o texto (onde o navegador sabe), ate um limite; dai em diante rola. */
textarea { display: block; padding: 10px var(--s3); font: inherit; line-height: 1.45; resize: vertical; min-height: 92px; field-sizing: content; max-height: 280px; }
input::placeholder, textarea::placeholder { color: var(--text-3); }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px var(--gold-wash-strong); }
legend { font-size: 12.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); margin-bottom: var(--s2); padding: 0; }
.check { display: flex; gap: var(--s2); align-items: flex-start; font-size: 15px; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--gold); }

.pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 9px; border-radius: 999px;
  font-weight: 600; font-size: 12px; letter-spacing: 0.03em; line-height: 1.5; white-space: nowrap;
  background: var(--surface-3); color: var(--text-2);
}
.pill .icon { width: 13px; height: 13px; }
.pill--open { background: var(--surface-3); color: var(--text); }
.pill--in, .pill--now { background: var(--gold); color: var(--gold-ink); }
.pill--you { background: var(--gold-wash-strong); color: var(--gold-text); }
.pill--full { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.pill--closed { background: transparent; border: 1px solid var(--line-strong); color: var(--text-2); }
.tag { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 6px; background: var(--surface-3); color: var(--text-2); font: 600 0.4em/1.6 var(--font-body); letter-spacing: 0.04em; vertical-align: middle; }

/* Erro da ultima acao: fica no topo da pagina, porque pede para ler e agir. O sucesso e o toast. */
.flash {
  display: flex; align-items: flex-start; gap: var(--s2);
  margin-bottom: var(--s5); padding: var(--s3) var(--s4);
  border-radius: 12px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.flash .icon { margin-top: 2px; }
.flash--error { background: var(--gold-wash-strong); border-color: var(--gold); }
.flash--error .icon { color: var(--gold-text); }

/*
 * Sucesso da ultima acao: no canto de baixo, a direita (no celular, acima das
 * abas e da barra de salvar do Procurar grupo). Sobe ao entrar, o check se
 * desenha, a linha de baixo esvazia em 5 s como a duracao de um buff, e ele
 * desce sumindo. Mouse em cima pausa; um clique fecha (site.js). Sem
 * JavaScript, entra e some do mesmo jeito.
 */
.toast {
  --toast-hold: 5s;
  position: fixed; z-index: 20;
  right: max(var(--gutter), env(safe-area-inset-right));
  bottom: calc(var(--tabbar) + env(safe-area-inset-bottom) + var(--dock, 0px) + var(--s3));
  display: flex; align-items: center; gap: var(--s3);
  width: max-content; max-width: min(400px, calc(100vw - 2 * var(--gutter)));
  padding: 10px var(--s4) 10px 10px;
  overflow: hidden;
  background: var(--surface-3); color: var(--text);
  border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: var(--shadow-pop);
  font-size: 15px; font-weight: 600; line-height: 1.35;
  cursor: pointer; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent;
  transform-origin: 100% 100%;
  animation: toast-in 380ms var(--ease) both, toast-out 220ms cubic-bezier(.5, 0, .75, 0) var(--toast-hold) forwards;
}
/* O Procurar grupo tem a barra de salvar presa embaixo: o toast fica acima dela (site.js mede a altura certa). */
body:has(.lfgform__bar) .toast { --dock: calc(62px + var(--s2)); }
.toast__mark {
  display: grid; place-items: center; flex: none;
  width: 28px; height: 28px; border-radius: var(--r-sm);
  background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok);
}
.toast__mark .icon {
  width: 18px; height: 18px; stroke-width: 2.25;
  stroke-dasharray: 21; animation: toast-check 360ms var(--ease) 180ms both;
}
.toast__text { min-width: 0; overflow-wrap: break-word; }
.toast::after {
  content: ''; position: absolute; inset: auto 0 0; height: 2px;
  background: var(--ok); opacity: 0.7;
  transform-origin: 0 50%;
  animation: toast-drain var(--toast-hold) linear both;
}
@media (min-width: 1024px) {
  .toast { bottom: calc(env(safe-area-inset-bottom) + var(--dock, 0px) + var(--s5)); }
}
@media (hover: hover) {
  .toast:hover { animation-play-state: running, paused; }
  .toast:hover::after { animation-play-state: paused; }
}
.toast.is-closing { animation: toast-out 180ms cubic-bezier(.5, 0, .75, 0) forwards; }
.toast.is-closing::after { animation-play-state: paused; }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px) scale(.96); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(10px); visibility: hidden; } }
@keyframes toast-drain { to { transform: scaleX(0); } }
@keyframes toast-check { from { stroke-dashoffset: 21; } to { stroke-dashoffset: 0; } }
/* Menos movimento (no Windows, "Efeitos de animacao" desligado): so nao desliza; o fade, o check e a linha ficam. */
@keyframes toast-in-still { from { opacity: 0; } }
@keyframes toast-out-still { to { opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) {
  .toast { animation-name: toast-in-still, toast-out-still; }
  .toast.is-closing { animation-name: toast-out-still; }
}

.empty { display: flex; align-items: center; gap: var(--s3); padding: var(--s5); border: 1px dashed var(--line-strong); border-radius: var(--r-lg); color: var(--text-2); }
.back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: var(--s4); font-weight: 500; font-size: 14px; color: var(--text-2); text-decoration: none; }
.back::before { content: '←'; }
.back:hover { color: var(--text); }

.stack { display: grid; gap: var(--s4); align-content: start; }
.row { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }
.pagehead { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; justify-content: space-between; }
.sheet { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s5); box-shadow: var(--shadow); }
.sheet--narrow { max-width: 560px; margin: 0 auto; }
@media (max-width: 480px) { .sheet { padding: var(--s4); } }
.sheet .h2:first-child { margin-top: 0; }
.sheet > .lead { margin-bottom: var(--s5); font-size: 16px; }
.hint { margin-bottom: var(--s4); }
.columns { display: grid; gap: var(--s5); margin-top: var(--s5); }
@media (min-width: 960px) {
  .columns { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: start; }
}

.segmented { display: inline-flex; padding: 3px; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; }
.segmented button { padding: 6px 14px; background: none; border: 0; border-radius: 999px; cursor: pointer; color: var(--text-2); font-weight: 500; }
.segmented button[aria-pressed="true"] { background: var(--gold); color: var(--gold-ink); }

.danger-zone > summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; }
.danger-zone > summary::-webkit-details-marker { display: none; }
.danger-zone > summary::after { content: '+'; color: var(--text-2); font: 500 20px/1 var(--font-body); }
.danger-zone[open] > summary::after { content: '−'; }
.danger-zone[open] > summary { margin-bottom: var(--s3); }
.danger-zone > p { margin-bottom: var(--s3); }

/* ------------------------------------------------------------ selos e pontos de funcao */

.badge {
  display: inline-grid; place-items: center; flex: none;
  width: 36px; height: 36px; border-radius: 10px;
  background: color-mix(in srgb, var(--role) 16%, transparent);
  color: var(--role);
}
.badge .icon { width: 20px; height: 20px; }
/* Emblema da classe (prateado, do jogo): fundo escuro tingido da funcao, para ler bem nos dois temas. */
/* O emblema ja vem na cor da classe: fundo escuro neutro, e o aro na cor da funcao da vaga. */
.badge:has(.emblem) { background: #151821; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--role) 45%, transparent); }
.badge .emblem { width: 78%; height: 78%; object-fit: contain; filter: drop-shadow(0 1px 1px rgb(0 0 0 / 0.5)); }

/* Os 4 grupos de um conteudo de FORCE (20 vagas) ficam sempre 2 em cima e 2 embaixo: numa linha so nao cabem no celular nem no cartao estreito da sala. */
.pips { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 10px; vertical-align: middle; }
.pips:has(> :nth-child(4)) { display: inline-grid; grid-template-columns: repeat(2, auto); }
.pips__group { display: inline-flex; gap: 4px; }
.pips i { display: block; width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid color-mix(in srgb, var(--role) 60%, transparent); }
.pips i.is-on { background: var(--role); border-color: var(--role); }

/* ------------------------------------------------------------ personagem */

.sheet { container-type: inline-size; }
.field__hint { font-size: 13.5px; color: var(--text-2); }
.charform fieldset { display: grid; gap: var(--s2); }
.charform .btn--primary { justify-self: start; }
.charform .fine { margin: 0; }

/* Regiao: chips de radio, quebrando linha como os filtros. */
.regions__chips { display: flex; flex-wrap: wrap; gap: var(--s2); }
.rchip { position: relative; display: inline-flex; }
.rchip input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.rchip span {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px;
  border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface-2);
  color: var(--text-2); font-size: 14.5px; font-weight: 500; white-space: nowrap;
  transition: border-color 160ms var(--ease), background-color 160ms var(--ease), color 160ms var(--ease);
}
.rchip:hover span { color: var(--text); border-color: var(--text-3); }
.rchip input:checked + span { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); font-weight: 600; }
.rchip input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }

/* Raca: dois cartoes com a arte de abertura de cada lado, como na criacao de personagem do jogo. */
.races { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.races legend { grid-column: 1 / -1; }
.race {
  position: relative; display: grid; aspect-ratio: 16 / 10; overflow: hidden; cursor: pointer;
  border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line);
  isolation: isolate;
  transition: transform 200ms var(--ease), box-shadow 200ms var(--ease), border-color 200ms var(--ease);
}
.race input { position: absolute; inset: 0; opacity: 0; margin: 0; z-index: 3; cursor: pointer; }
.race img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 400ms var(--ease), filter 200ms var(--ease); }
.race--elyos img { object-position: 50% 30%; }
.race--asmodian img { object-position: 50% 30%; }
.race::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgb(8 10 15 / 0.9) 0%, rgb(8 10 15 / 0.45) 45%, rgb(8 10 15 / 0.1) 75%); }
.race__name { align-self: end; padding: var(--s3); color: #fff; font: 700 18px/1.1 var(--font-display); text-shadow: 0 1px 2px rgb(0 0 0 / 0.6); }
.race__check {
  position: absolute; top: 10px; right: 10px; display: grid; place-items: center; width: 26px; height: 26px;
  border-radius: 50%; border: 1.5px solid rgb(255 255 255 / 0.55); background: rgb(8 10 15 / 0.45); color: transparent;
  transition: background-color 160ms var(--ease), border-color 160ms var(--ease), color 160ms var(--ease);
}
.race__check .icon { width: 16px; height: 16px; stroke-width: 2.4; }
.race:hover { border-color: var(--line-strong); transform: translateY(-2px); box-shadow: var(--shadow-pop); }
.race:hover img { transform: scale(1.04); }
.races:has(input:checked) .race:not(:has(input:checked)) img { filter: grayscale(0.7) brightness(0.7); }
.race:has(input:checked) { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold), var(--shadow-pop); }
.race:has(input:checked) .race__check { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.race:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .race, .race img { transition: none; } .race:hover, .race:hover img { transform: none; } }

/* O personagem no perfil: um frame da janela de grupo, maior. */
.charcard {
  display: grid; grid-template-columns: 48px minmax(0, 1fr); grid-template-areas: 'badge id' 'power power';
  gap: var(--s3); align-items: center;
  padding: var(--s3); border-radius: 12px; background: var(--surface-2);
}
.charcard .badge { grid-area: badge; width: 48px; height: 48px; border-radius: 12px; }
.charcard__id { grid-area: id; display: grid; gap: 2px; min-width: 0; }
.charcard__name { font: 700 20px/1.15 var(--font-display); overflow-wrap: anywhere; }
.charcard__meta { font-size: 14px; color: var(--text-2); }
.charcard .power { grid-area: power; }
@container (min-width: 560px) {
  .charcard { grid-template-columns: 48px minmax(0, 1fr) auto; grid-template-areas: 'badge id power'; }
}
.charsetup__delete { max-width: 560px; margin: var(--s5) auto 0; }
.charsetup__top { max-width: 560px; margin: 0 auto; }
/*
 * Seus outros personagens, na troca: cada um e um frame da janela de grupo, e o
 * frame inteiro e o botao de usar (como as vagas abertas: dourado ao apontar).
 * O x ao lado esquece o personagem.
 */
.alts__list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.alt { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s1); align-items: center; }
.alt__btn {
  --lv-ring: var(--surface-2);
  width: 100%; display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 0 var(--s3); align-items: center;
  padding: 8px 8px 8px 10px; min-height: 66px; text-align: left; cursor: pointer;
  background: var(--surface-2); border: 1px solid transparent; border-radius: 12px; color: var(--text);
  transition: border-color 160ms var(--ease), background-color 160ms var(--ease);
}
.alt__text { display: grid; gap: 1px; min-width: 0; }
.alt__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 15px/1.25 var(--font-display); }
.alt__meta { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--text-2); }
.alt .power { flex-wrap: wrap; gap: 0 10px; font-size: 12.5px; line-height: 1.3; }
.alt .power__stat .icon { width: 13px; height: 13px; }
.alt__go {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px 0 9px; border-radius: 8px;
  border: 1px solid var(--line-strong); background: var(--surface-2);
  font: 600 13.5px/1 var(--font-body); white-space: nowrap;
  transition: background-color 160ms var(--ease), border-color 160ms var(--ease), color 160ms var(--ease);
}
.alt__go .icon { width: 16px; height: 16px; color: var(--text-2); }
.alt__btn:is(:hover, :focus-visible) { border-color: color-mix(in srgb, var(--gold) 70%, transparent); background: var(--gold-wash); --lv-ring: var(--surface-2); }
.alt__btn:is(:hover, :focus-visible) .alt__go { background: var(--gold); border-color: transparent; color: var(--gold-ink); }
.alt__btn:is(:hover, :focus-visible) .alt__go .icon { color: var(--gold-ink); }
.alt__btn:active .alt__go { background: color-mix(in srgb, var(--gold) 82%, var(--gold-ink)); }
.alt__btn[aria-busy="true"] { cursor: progress; }
.alt__btn[aria-busy="true"] .alt__go { background: var(--gold); border-color: transparent; color: var(--gold-ink); }
.alt__forget:hover { color: var(--danger); }
.alts + .h2 { margin-top: var(--s6); }
/*
 * Celular: o nome e os numeros precisam da largura. O botao fica so com as
 * setas (o nome dele, "Usar Kau, Encantador em Zikel", continua para o leitor
 * de tela) e o x estreita.
 */
@media (max-width: 400px) {
  .alt__btn { gap: 0 10px; padding: 8px 6px 8px 8px; }
  .alt__go { width: 32px; padding: 0; justify-content: center; }
  .alt__go [data-busy-label] { display: none; }
  .alt__forget { width: 32px; }
  .alt .power { gap: 0 8px; font-size: 12px; }
  .alt .power__stat .icon { width: 12px; height: 12px; }
}
.charsheet .charcard { margin-bottom: var(--s3); }
.charsheet > p { margin: 0 0 var(--s4); }
.charsheet .row { gap: var(--s2); }
.charsheet .row form { display: contents; }

/* GS e CP: o elmo e as espadas da janela de grupo do jogo, com o numero. */
.power { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-variant-numeric: tabular-nums; }
.power__stat { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; color: var(--text); font-weight: 500; }
.power__stat .icon { width: 15px; height: 15px; color: var(--text-2); }
/* O CP em ciano, como na janela de grupo do jogo; o GS fica no branco do texto. */
.power__stat--cp .icon, .power__stat--cp .power__value { color: var(--cp); }
.power__short { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; color: var(--text-2); }
.power__value { font-variant-numeric: tabular-nums; }
.power--labeled { gap: var(--s2); }
.power--labeled .power__stat { gap: 6px; padding: 6px 12px 6px 10px; border-radius: 10px; background: var(--surface-3); font-size: 16px; font-weight: 600; }
.power--labeled .power__stat .icon { width: 17px; height: 17px; }

/* ------------------------------------------------------------ conteudos (LFG) */

.tickets { display: flex; flex-wrap: wrap; gap: var(--s2); }
.tickets legend { width: 100%; }
.ticket { position: relative; display: inline-flex; }
.ticket input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.ticket span {
  display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; font-size: 15px; white-space: nowrap;
  transition: background-color 160ms var(--ease), border-color 160ms var(--ease);
}
.ticket:hover span { border-color: var(--line-strong); }
.ticket input:checked + span { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); font-weight: 600; }
.ticket input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }

/* Tags da sala no formulario: tickets com o icone, na altura de toque, e a dica embaixo. */
.roomtagpick .ticket span { min-height: 44px; gap: var(--s2); padding: 0 16px 0 14px; }
.roomtagpick .ticket .icon { width: 18px; height: 18px; color: var(--text-2); }
.roomtagpick .ticket input:checked + span .icon { color: var(--gold-ink); }
.roomtagpick__hint { width: 100%; margin-top: 2px; }

/* Tags da sala no cartao e na lista: etiquetas neutras com o icone (cor so descreve funcao, ouro so acao). */
.roomtags { display: flex; flex-wrap: wrap; gap: 6px; }
.roomtag {
  display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 10px 0 8px;
  background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 8px;
  font-weight: 600; font-size: 13.5px; line-height: 1; color: var(--text); white-space: nowrap;
}
.roomtag .icon { width: 16px; height: 16px; color: var(--text-2); }
.roomtags--row { margin-top: 4px; gap: 4px; }
.roomtags--row .roomtag { min-height: 24px; padding: 0 8px 0 6px; font-size: 12.5px; gap: 5px; }
.roomtags--row .roomtag .icon { width: 14px; height: 14px; }


/* ------------------------------------------------------------ cartao do evento */

/* align-content: start: lado a lado, o cartao mais baixo estica sem espalhar o conteudo, e os selos ficam na mesma linha. */
.quest {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s3); align-content: start;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: var(--s5); box-shadow: var(--shadow);
}
.quest.is-mine { border-color: color-mix(in srgb, var(--gold) 45%, transparent); }
/* Num celular de 320 px os pontos das vagas descem para baixo do status em vez de passar da borda. */
.quest__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2) var(--s3); }
.quest__count { display: inline-flex; align-items: center; gap: var(--s2); min-width: 0; }
.quest__title { font-size: clamp(30px, 6vw, 42px); line-height: 1.05; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); overflow-wrap: anywhere; }
.quest__title a { text-decoration: none; }
.quest__title a:hover { color: var(--gold-text); }
/* O nome que quem criou deu a sala ("PT dos F2P"): em destaque, logo abaixo do conteudo. */
.quest__extra { margin-top: calc(-1 * var(--s1)); font: 600 clamp(19px, 3.2vw, 22px)/1.25 var(--font-display); color: var(--text); overflow-wrap: anywhere; text-wrap: balance; }
/* A descricao de quem organiza: texto corrido, com as quebras de linha que a pessoa escreveu. */
.quest__desc {
  padding: var(--s3) var(--s4); border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line);
  color: var(--text); font-size: 15.5px; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; max-width: 70ch;
}
.meta { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); color: var(--text-2); font-size: 15px; }
.meta li { display: inline-flex; align-items: center; gap: 6px; }
.meta li:first-child { color: var(--text); font-weight: 500; }
.meta .icon { width: 17px; height: 17px; }
.yourplace {
  display: flex; align-items: center; gap: var(--s3);
  padding: var(--s3); border-radius: 12px;
  background: var(--gold-wash); border: 1px solid color-mix(in srgb, var(--gold) 35%, transparent);
  font-size: 15px;
}
.yourplace .icon { width: 15px; height: 15px; vertical-align: -2px; }
.yourplace .badge .icon { width: 20px; height: 20px; }
.yourplace__label { display: block; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-text); }
.yourplace strong { font: 700 18px/1.2 var(--font-display); }
.quest__actions { display: grid; gap: var(--s3); padding-top: var(--s3); border-top: 1px solid var(--line); }
.joinform { display: grid; }
/* Abaixo do CP minimo: o aviso e "Pedir para entrar"; depois de pedir, o aviso e o cancelar. */
.applyform { display: grid; gap: var(--s3); }
.applied { display: grid; gap: 2px; }
.applied form { justify-self: start; }
.applied .linkbtn { min-height: 44px; padding: 0; text-decoration: underline; text-underline-offset: 3px; }
.viewnote--entry .icon[aria-hidden] { color: var(--cp); }
.viewnote--sent .icon[aria-hidden] { color: var(--gold-text); }

/* CP minimo: as espadas, o numero em milhares e o K, como o jogo escreve. */
.cpmin__box { position: relative; display: flex; align-items: center; max-width: 240px; }
.cpmin__box > .icon { position: absolute; left: var(--s3); width: 18px; height: 18px; color: var(--cp); pointer-events: none; }
.cpmin .cpmin__box input { padding-left: 40px; padding-right: 36px; font-family: var(--font-data); -moz-appearance: textfield; appearance: textfield; }
.cpmin__box input::-webkit-inner-spin-button, .cpmin__box input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.cpmin__unit { position: absolute; right: var(--s3); font: 500 15px/1 var(--font-data); color: var(--text-2); pointer-events: none; }
.cpmin__box:has(input:disabled) { opacity: 0.5; }
.cpmin__rec { color: var(--text-2); }

/* Pedidos para entrar: um frame por pessoa, com Recusar e Aceitar. */
.requests { display: grid; gap: var(--s3); }
.requests > .h2 { margin: 0; display: flex; align-items: baseline; gap: var(--s2); }
.requests > p { margin: 0; }
.requests__list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.requests__item {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3);
  padding: var(--s2) var(--s3); border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line);
}
.requests__item .badge { flex: none; }
.requests__who { flex: 1 1 140px; min-width: 0; display: grid; }
.requests__name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.requests__meta { font-size: 13.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.requests__cp { display: inline-flex; align-items: center; gap: 4px; color: var(--cp); font-family: var(--font-data); }
.requests__cp .icon { width: 13px; height: 13px; }
.requests__actions { display: flex; gap: var(--s2); margin-left: auto; }
.requests__actions .btn { min-height: 40px; padding: 0 var(--s3); font-size: 14.5px; }
.quest__actions > .muted { display: flex; gap: var(--s2); align-items: center; }
/* Convidar: a acao positiva do cartao para quem ja esta na sala. Contorno e
   tinta dourados (ouro = agir), mais quieto que o Entrar solido; ao copiar,
   fica verde com o check por 2 segundos. */
.invite { display: grid; gap: 6px; }
.btn--invite { width: 100%; background: var(--gold-wash); border-color: color-mix(in srgb, var(--gold) 55%, transparent); color: var(--gold-text); }
.btn--invite:hover { background: var(--gold-wash-strong); border-color: var(--gold); }
.btn--invite.is-copied { background: color-mix(in srgb, var(--ok) 14%, transparent); border-color: var(--ok); color: var(--ok); }
/* Sair da sala: a acao negativa, no fim do cartao e separada por uma linha,
   em vermelho quieto que so enche ao passar o mouse. */
.leave { display: grid; padding-top: var(--s3); border-top: 1px solid var(--line); }
.btn--leave { justify-self: start; background: transparent; border-color: color-mix(in srgb, var(--danger) 45%, transparent); color: var(--danger); }
.btn--leave:hover { background: color-mix(in srgb, var(--danger) 14%, transparent); border-color: var(--danger); }
/* Confirmar presenca no cartao: o pedido de quem organiza em dourado (ouro = agir),
   com o botao na largura toda; depois de confirmar, so uma linha verde. */
.presence {
  display: grid; gap: var(--s3); padding: var(--s3); border-radius: 12px;
  background: var(--gold-wash); border: 1px solid color-mix(in srgb, var(--gold) 35%, transparent);
}
.presence__ask { display: flex; gap: var(--s2); align-items: flex-start; font-size: 15px; font-weight: 600; line-height: 1.4; }
.presence__ask .icon { width: 20px; height: 20px; flex: none; color: var(--gold-text); }
.presence .btn { width: 100%; }
.presence.is-done { display: flex; gap: var(--s2); align-items: center; padding: 0; background: none; border: 0; color: var(--ok); font-size: 15px; font-weight: 600; }
.presence.is-done .icon { width: 20px; height: 20px; flex: none; }

.quest--compact { padding: var(--s4); gap: 10px; }
.quest--compact .quest__title { font-size: 24px; }
.quest--compact .quest__extra { font-size: 18px; }
.quest--compact .yourplace { padding: 10px var(--s3); }
/* Em Suas salas o cartao inteiro abre a sala: o link do nome se estende sobre o cartao. */
.quest--compact .quest__title a::after { content: ''; position: absolute; inset: 0; z-index: 1; border-radius: var(--r-lg); }
.quest--compact .quest__title a:focus-visible { outline: none; }
.quest--compact .quest__title a:focus-visible::after { outline: 2px solid var(--gold); outline-offset: 2px; }
.quest--compact:has(.quest__title a:hover) { border-color: var(--line-strong); }
.quest--compact.is-mine:has(.quest__title a:hover) { border-color: color-mix(in srgb, var(--gold) 75%, transparent); }

.cards { display: grid; gap: var(--s3); }
@media (min-width: 720px) { .cards { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); } }

/* ------------------------------------------------------------ lista de eventos */

.events { display: grid; gap: var(--s2); }
.events__link {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s2) var(--s4); align-items: center;
  padding: var(--s3) var(--s4); text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  transition: background-color 160ms var(--ease), border-color 160ms var(--ease);
}
.events__link:hover { background: var(--surface-2); border-color: var(--line-strong); }
.events__row.is-mine .events__link { border-color: color-mix(in srgb, var(--gold) 45%, transparent); }
.events__main { display: grid; gap: 2px; min-width: 0; }
.events__title { font: 600 18px/1.25 var(--font-display); display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }
.events__title .tag { font-size: 12px; }
.events__extra { font: 600 15.5px/1.3 var(--font-display); color: var(--text); overflow-wrap: anywhere; }
.events__meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 14px; color: var(--text-2); }
.events__meta .icon { width: 15px; height: 15px; }
.events__slots { display: inline-flex; gap: var(--s2); align-items: center; grid-column: 1; }
.events__status { grid-column: 2; grid-row: 1; justify-self: end; align-self: start; }
.events__go { display: none; color: var(--text-3); }
@media (min-width: 760px) {
  .events__link { grid-template-columns: minmax(0, 1fr) auto auto 20px; }
  .events__slots { grid-column: 2; grid-row: 1; }
  .events__status { grid-column: 3; align-self: center; }
  .events__go { display: block; }
}

/* ------------------------------------------------------------ pagina do evento */

/* O cartao, os grupos, Organizar (so para quem organiza) e Horarios do grupo.
   Celular: um embaixo do outro. Desktop (1080 px+): o cartao a esquerda, fixo ao
   rolar, e o resto embaixo dos grupos. Tela larga (1600 px+): cartao, grupos e
   Organizar lado a lado, e Horarios do grupo logo embaixo dos grupos, com as duas
   grades de 15 minutos lado a lado. */
.main--wide { max-width: 2560px; }
.eventgrid { display: grid; gap: var(--s5); }
.eventgrid__side { display: grid; gap: var(--s4); align-content: start; }
.eventgrid__parties, .eventtools { display: grid; gap: var(--s4); align-content: start; min-width: 0; }
/* 1080 px: o cartao com 340 px (o "Entrar" cabe ao lado da classe) e dois grupos de 300 px lado a lado. */
@media (min-width: 1080px) {
  /* A ultima linha leva a sobra quando o cartao e mais alto, e o resto fica colado nos grupos. */
  .eventgrid { grid-template-columns: minmax(340px, 2fr) minmax(0, 5fr); grid-template-rows: auto auto 1fr; align-items: start; }
  .eventgrid__side { grid-column: 1; grid-row: 1 / span 3; position: sticky; top: var(--s5); }
  .eventgrid__parties, .eventtools, .eventgrid > .times { grid-column: 2; }
}
@media (min-width: 1600px) {
  .eventgrid { grid-template-columns: minmax(340px, 1fr) minmax(0, 3fr) minmax(340px, 1fr); grid-template-rows: auto 1fr; }
  .eventgrid__side { grid-row: 1 / span 2; }
  /* Organizar desce pela coluna da direita, e os horarios ficam logo embaixo dos grupos. */
  .eventtools { grid-column: 3; grid-row: 1 / span 2; }
  .eventgrid > .times { grid-column: 2; grid-row: 2; }
  /* Sem Organizar, grupos e horarios ficam com a terceira coluna. */
  .eventgrid:not(:has(> .eventtools)) > :is(.eventgrid__parties, .times) { grid-column: 2 / -1; }
}
/* As janelas dos grupos lado a lado quando cabem, e a reserva como mais uma janela
   na mesma fileira; quando ela nao cabe, desce e ocupa a largura toda. */
.parties { display: flex; flex-wrap: wrap; gap: var(--s4); }
.parties > .party { flex: 1 1 300px; min-width: 0; }
.parties > .party--reserve { align-self: flex-start; }

.summary { display: flex; gap: var(--s2); align-items: flex-start; padding: var(--s3) var(--s4); border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.summary .icon { margin-top: 2px; color: var(--gold-text); }
.summary.is-complete { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.summary.is-complete .icon { color: var(--ok); }
/* Fechada faltando gente: o grupo segue com quem esta e completa no jogo. */
.summary.is-short .icon { color: var(--gold-text); }
/* Faltando gente, quem organiza pode fechar ali mesmo com quem ja esta. */
.summary__body { display: grid; gap: var(--s2); min-width: 0; flex: 1 1 auto; }
.summary__body > p { margin: 0; }
.summary__close { display: grid; justify-items: start; gap: var(--s2); padding-top: var(--s2); border-top: 1px solid var(--line); }
.summary__close .small { margin: 0; color: var(--text-2); }
.summary__close .btn { max-width: 100%; white-space: normal; text-align: left; }
.summary__close .btn .icon { color: inherit; margin-top: 0; }

/* A janela de grupo. */
.party { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s3); box-shadow: var(--shadow); }
.party.is-full { border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.party__head { display: flex; align-items: center; gap: var(--s2); padding: 2px var(--s1) var(--s3); }
.party__head h2 { font-size: 18px; margin-right: auto; }
.party__foot { display: grid; gap: 6px; padding: var(--s3) var(--s1) 2px; font-size: 14px; color: var(--text-2); }
.party__foot p { display: flex; gap: var(--s2); align-items: flex-start; }
.party__foot .icon { width: 16px; height: 16px; margin-top: 2px; }
.party__foot b { color: var(--text); font-weight: 600; }

.units { display: grid; gap: 6px; container-type: inline-size; }
/* Na reserva larga (embaixo dos grupos) os frames se dividem em colunas, em vez de um frame da largura toda. */
.party--reserve .units { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
/* Frame estreito (celular): o nome, o CP e o "Agora" precisam do espaco, senao o frame
   cresce e as linhas dos grupos desalinham. O seu frame ja e dourado; o "Voce" continua
   para leitor de tela. */
@container (max-width: 340px) {
  .unit .pill--you { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
.unit {
  position: relative;
  display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; grid-template-areas: 'badge name move' 'badge class move';
  gap: 0 var(--s3); align-items: center;
  /* 62 px e a altura de um frame com nome e classe: a vaga aberta fica igual, e as linhas dos grupos lado a lado se alinham. */
  padding: 8px 6px 8px 8px; min-height: 62px;
  background: var(--surface-2); border: 1px solid transparent; border-radius: 12px;
  animation: slot-in 420ms var(--ease) both;
}
.unit:nth-child(2) { animation-delay: 40ms; }
.unit:nth-child(3) { animation-delay: 80ms; }
.unit:nth-child(4) { animation-delay: 120ms; }
.unit:nth-child(5) { animation-delay: 160ms; }
.unit:nth-child(n + 6) { animation-delay: 200ms; }
@keyframes slot-in { from { opacity: 0.3; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .unit { animation: none; } }
.unit .badge { grid-area: badge; }
/* O nome e o CP na mesma linha de base; sem espaco, o CP desce para baixo do nome (nunca corta o nome). */
.unit__name { grid-area: name; font-weight: 600; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; min-width: 0; }
.unit__nick { overflow-wrap: anywhere; }
/* O nick e um botao sem moldura que copia o nick com o servidor, como o jogo escreve para
   adicionar ("Lalatina[ZIK]"). O icone de copiar fica sempre a mostra (no toque nao ha hover),
   1 px abaixo do centro da linha para ficar no centro das letras, e vira o check verde por 2 s
   depois de copiar. O servidor fica escondido: aparece logo depois do icone ao passar o mouse,
   no foco do teclado e depois de copiar (com o check a mostra), numa etiqueta flutuante por cima
   do que vem depois, para o CP e as marcas nao andarem. O leitor de tela le "Lalatina [ZIK]". */
.unit__id {
  display: inline-flex; align-items: baseline; min-width: 0; max-width: 100%;
  padding: 0; border: 0; border-radius: 4px; background: none;
  font: inherit; color: inherit; text-align: left; cursor: pointer;
  position: relative;
}
.unit__server {
  position: absolute; left: 100%; top: 50%; z-index: 2; margin-left: 6px; padding: 1px 6px;
  background: var(--surface-3); border: 1px solid var(--line-strong); border-radius: 6px;
  box-shadow: 0 4px 12px rgb(0 0 0 / 0.28);
  font-weight: 600; font-size: 13px; line-height: 18px; color: var(--text); letter-spacing: 0.02em; white-space: nowrap;
  opacity: 0; translate: -4px -50%; pointer-events: none;
  transition: opacity 140ms var(--ease), translate 180ms var(--ease);
}
.unit__id:is(:hover, :focus-visible, .is-copied) .unit__server { opacity: 1; translate: 0 -50%; }
@media (prefers-reduced-motion: reduce) { .unit__server { transition: none; } }
.unit__id .icon { flex: none; align-self: center; width: 13px; height: 13px; margin-left: 4px; translate: 0 1px; color: var(--text-3); transition: color 160ms var(--ease); }
.unit__id:hover .unit__nick, .unit__id:focus-visible .unit__nick { color: var(--gold-text); }
.unit__id:hover .icon, .unit__id:focus-visible .icon { color: var(--gold-text); }
.unit__id:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.unit__id.is-copied .icon { color: var(--ok); }
/* Presenca confirmada: o selo verde colado ao nome; o title diz o que e ao passar o mouse. */
.unit__ok { display: inline-flex; align-self: center; margin-left: -4px; color: var(--ok); }
.unit__ok .icon { width: 16px; height: 16px; }
.unit__class { grid-area: class; display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 13.5px; line-height: 20px; color: var(--text-2); }
/* A marca de instrutor, ao lado da classe e na cor do texto: fica legivel mesmo sobre o fundo Premium. */
.unit__mark { display: inline-flex; flex: none; color: var(--text); }
.unit__mark .icon { width: 16px; height: 16px; }
/* O CP ao lado do nome, em ciano como no jogo, um pouco menor que o nome. O frame traz o CP
   nos dois lugares: ao lado do nome e ao lado da classe, que so aparece no frame estreito
   (ver "Frame estreito", depois do arrastar). O escondido sai tambem do leitor de tela. */
.unit .power { display: block; font-size: 13px; white-space: nowrap; }
.unit .power__stat { display: inline; }
.unit .power__value { font-weight: 600; letter-spacing: 0.01em; }
.unit .power .icon { width: 13px; height: 13px; margin-right: 4px; vertical-align: -2px; }
.unit__class .power { display: none; flex: none; }
.unit__classname { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Celular de 320 px, quem organiza: espacos um pouco menores para um nick de 8 a 9 letras caber com o CP. */
@container (max-width: 280px) {
  .units .unit.is-draggable { column-gap: 6px; }
  .units .unit__name { column-gap: 6px; }
}
.unit.is-open { background: transparent; border: 1px dashed var(--line-strong); }
.unit.is-open .badge { background: transparent; border: 1.5px dashed color-mix(in srgb, var(--role) 55%, transparent); color: color-mix(in srgb, var(--role) 70%, var(--text-3)); }
.unit.is-open .unit__name { font-weight: 500; color: var(--text-2); }
.unit.is-you { border-color: color-mix(in srgb, var(--gold) 55%, transparent); background: var(--gold-wash); }
/* Presenca confirmada: o frame inteiro em verde, para o quadro mostrar de longe quem ja
   confirmou. No seu proprio frame a borda continua dourada (voce) e o fundo fica verde. */
.unit.is-confirmed { background: color-mix(in srgb, var(--ok) 12%, var(--surface-2)); border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.unit.is-you.is-confirmed { border-color: color-mix(in srgb, var(--gold) 55%, transparent); }
/* Vaga aberta que se escolhe: o frame inteiro e o botao (o ::after do "Entrar" cobre o
   frame), com o "Entrar" a direita sempre a vista, porque no toque nao ha hover. */
.unit.is-pick { transition: border-color 160ms var(--ease), background-color 160ms var(--ease); }
.unit__pick {
  grid-area: move; display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px 0 9px; border-radius: 8px;
  border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--text);
  font: 600 13.5px/1 var(--font-body); white-space: nowrap; cursor: pointer;
  transition: background-color 160ms var(--ease), border-color 160ms var(--ease), color 160ms var(--ease);
}
.unit__pick .icon { width: 16px; height: 16px; color: var(--text-2); transition: color 160ms var(--ease); }
.unit__pick::after { content: ''; position: absolute; inset: -1px; border-radius: 12px; }
.unit__pick:focus-visible { outline: none; }
.unit.is-pick:has(.unit__pick:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }
.unit.is-pick:is(:hover, :has(.unit__pick:focus-visible)) { border-color: color-mix(in srgb, var(--gold) 70%, transparent); background: var(--gold-wash); }
.unit.is-pick:is(:hover, :has(.unit__pick:focus-visible)) .unit__pick { background: var(--gold); border-color: transparent; color: var(--gold-ink); }
.unit.is-pick:is(:hover, :has(.unit__pick:focus-visible)) .unit__pick .icon { color: var(--gold-ink); }
/* Apertar so escurece: um transform no botao faria dele o bloco do ::after, que deixaria de
   cobrir o frame no meio do clique (o clique cairia fora do botao). */
.unit.is-pick:active .unit__pick { background: color-mix(in srgb, var(--gold) 82%, var(--gold-ink)); }
body.is-arranging .unit.is-pick:hover:not(.is-drop) { border-color: var(--line-strong); background: transparent; }
/* Quem organiza: o Convidar ao lado do Entrar/Mudar, por cima do ::after dele (que
   cobre o frame). Passar o mouse no Convidar nao acende a vaga como se fosse entrar. */
.unit__acts { grid-area: move; display: flex; align-items: center; gap: 6px; }
.unit__invite {
  position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px 0 9px; border-radius: 8px;
  border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--text);
  font: 600 13.5px/1 var(--font-body); white-space: nowrap; text-decoration: none;
  transition: background-color 160ms var(--ease), border-color 160ms var(--ease), color 160ms var(--ease);
}
.unit__invite .icon { width: 16px; height: 16px; color: var(--gold-text); }
.unit__invite:is(:hover, :focus-visible) { background: var(--gold-wash); border-color: color-mix(in srgb, var(--gold) 70%, transparent); color: var(--gold-text); }
.unit__invite:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.unit.is-pick:has(.unit__invite:is(:hover, :focus-visible)) { border-color: var(--line-strong); background: transparent; }
.unit.is-pick:has(.unit__invite:is(:hover, :focus-visible)) .unit__pick { background: var(--surface-2); border-color: var(--line-strong); color: var(--text); }
.unit.is-pick:has(.unit__invite:is(:hover, :focus-visible)) .unit__pick .icon { color: var(--text-2); }
/* Frame estreito com os dois botoes: o Convidar fica so com o icone (o nome vai no aria-label). */
@container (max-width: 380px) {
  .unit__acts:has(.unit__pick) .unit__invite { width: 32px; padding: 0; justify-content: center; }
  .unit__acts:has(.unit__pick) .unit__invite span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
/* Convidado que ainda nao confirmou: o frame tracejado, como a vaga que ele guarda,
   e o "Convidado" com o relogio (so o relogio no frame estreito). */
.unit.is-invited { background: color-mix(in srgb, var(--surface-2) 45%, transparent); border: 1px dashed var(--line-strong); }
.unit.is-invited .badge { opacity: 0.8; }
.pill--invited { background: transparent; border: 1px solid var(--line-strong); color: var(--text-2); padding: 1px 8px; }
@container (max-width: 340px) {
  .pill--invited { padding: 2px 4px; }
  .pill--invited .pill__text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
.unit.is-changed { background: var(--gold-wash-strong); border-color: var(--gold); }
/* Pagina ao vivo (site.js): as vagas nao sobem de novo a cada mudanca, e quem
   acabou de mudar acende como o is-changed e apaga sozinho. So cor, sem movimento. */
main.is-live .unit { animation: none; }
main.is-live .unit.is-fresh { animation: unit-fresh 2400ms ease-out; }
@keyframes unit-fresh { from, 40% { background: var(--gold-wash-strong); border-color: var(--gold); } }

.move { grid-area: move; position: relative; }
.move > summary {
  display: grid; place-items: center; width: 36px; height: 36px; list-style: none; cursor: pointer;
  border-radius: 9px; color: var(--text-2);
}
.move > summary::-webkit-details-marker { display: none; }
.move > summary:hover, .move[open] > summary { background: var(--surface-3); color: var(--text); }
.move__menu {
  position: absolute; right: 0; top: calc(100% + 4px); z-index: 4; min-width: 210px;
  display: grid; gap: 2px; padding: 6px;
  background: var(--surface-3); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: var(--shadow-pop);
}
.move__menu button {
  display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 10px;
  background: none; border: 0; border-radius: 8px; cursor: pointer; text-align: left; font-size: 15px;
}
.move__menu button .icon { width: 17px; height: 17px; color: var(--text-2); }
.move__menu button:hover:not(:disabled) { background: var(--surface-2); }
.move__menu button:disabled { color: var(--text-3); cursor: default; }
.move__menu .danger { color: var(--danger); margin-top: 2px; border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; }
.move__menu .danger .icon { color: var(--danger); }

.organizer { display: grid; gap: var(--s4); }
/* Na coluna larga dos grupos: editar a esquerda; fechar, quem edita e cancelar a direita. */
.organizer > .h2 { margin-bottom: 0; }
/* minmax(0, 1fr): a coluna implicita (auto) crescia ate o item mais largo e passava da borda a 320 px. */
.organizer__body, .organizer__side { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s4); align-content: start; }
/* Fechar e Concluir, os dois passos de quem organiza, um embaixo do outro. */
.organizer__steps { display: grid; gap: var(--s3); justify-items: start; }
.organizer__steps .stack, .organizer__side > form.stack { justify-items: start; gap: var(--s2); }
@container (min-width: 620px) {
  .organizer__body { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--s5); align-items: start; }
}
.organizer .danger-zone > summary { font-weight: 600; color: var(--danger); }

/* ------------------------------------------------------------ moderacao */

.moderation__lead { font-size: 16px; margin: var(--s2) 0 var(--s5); max-width: 68ch; }
/* Na sala, para quem modera: depois do Organizar, o excluir com motivo (a janela e .confirm). */
.moderation { display: grid; gap: var(--s4); }
.moderation > .h2 { margin: 0; display: flex; align-items: center; gap: var(--s2); }
.moderation > .h2 .icon { width: 20px; height: 20px; }
.moderation > p { margin: 0; }
.moderation > .btn { justify-self: start; }

/* ------------------------------------------------------------ entrada */

.landing { display: grid; gap: var(--s7); padding: var(--s5) 0 var(--s7); }
.landing__pitch { display: grid; gap: var(--s4); align-content: center; justify-items: start; }
.landing__pitch .lead { margin-top: 0; }
.landing__demo { display: grid; gap: var(--s3); max-width: 440px; width: 100%; justify-self: center; }
.landing__demo > .tag { justify-self: start; font-size: 12px; }
@media (min-width: 900px) {
  .landing { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: center; padding-top: var(--s7); }
}
/* Secoes da entrada, depois da arte: o que da para fazer, como funciona, os jogos e o convite final. */
.showcase, .how, .games, .closer { padding-block: var(--s7); }
.showcase .lead, .games .lead { margin-top: var(--s2); }
.showcase .h1, .how .h1, .games .h1, .closer .h1 { margin: 0; text-wrap: balance; }

/* Vitrine: a arte de entrada de cada conteudo, como no seletor do jogo, com a secao e o nome. */
.showcase__head { margin-bottom: var(--s5); }
.showcase__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
@media (min-width: 600px) { .showcase__list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) { .showcase__list { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.showcase__item {
  position: relative; isolation: isolate; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--line); display: flex; align-items: flex-end;
  container-type: inline-size;
}
.showcase__item img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 600ms cubic-bezier(0.16, 1, 0.3, 1); }
.showcase__item::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgb(10 12 18 / 0.94) 8%, rgb(10 12 18 / 0.55) 45%, rgb(10 12 18 / 0) 75%); }
.showcase__item:hover img { transform: scale(1.04); }
.showcase__text { display: grid; gap: 2px; padding: var(--s3); }
.showcase__cat { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: rgb(242 243 247 / 0.72); }
/* Tamanho pela largura do cartao, para "Decontamination" caber inteiro na linha. */
.showcase__name { font: 700 clamp(13px, 9.6cqi, 19px)/1.15 var(--font-display); color: #f2f3f7; overflow-wrap: break-word; }
@media (prefers-reduced-motion: reduce) { .showcase__item img { transition: none; } }

/* Como funciona: tres passos em sequencia; o numero diz a ordem, a linha liga um ao outro. */
.how__list { display: grid; gap: var(--s5); margin-top: var(--s5); }
.how__step { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: var(--s4); align-items: start; }
.how__n {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
  background: var(--gold-wash); border: 1px solid color-mix(in oklab, var(--gold) 45%, transparent);
  color: var(--gold-text); font: 500 18px/1 var(--font-data);
}
.how__title { font: 700 19px/1.25 var(--font-display); margin: 9px 0 var(--s2); }
.how__step p { color: var(--text-2); max-width: 46ch; }
@media (min-width: 900px) {
  .how__list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s6); position: relative; }
  .how__step { grid-template-columns: 1fr; gap: var(--s3); }
  .how__title { margin-top: 0; }
  /* A linha que liga os numeros, por tras deles. */
  .how__list::before { content: ''; position: absolute; top: 22px; left: 44px; right: 0; height: 1px; background: linear-gradient(to right, var(--line-strong), transparent); z-index: -1; }
}

/* Jogos: a janela de grupo dos jogos, com o Aion 2 no primeiro frame e as vagas abertas para os proximos. */
.games { display: grid; gap: var(--s5); align-items: center; }
@media (min-width: 900px) { .games { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--s7); } }
.games__slots { display: grid; gap: var(--s2); padding: var(--s3); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.games__slot { display: flex; align-items: center; gap: var(--s3); min-height: 62px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text-2); }
.games__slot.is-live { border: 1px solid color-mix(in oklab, var(--gold) 45%, transparent); background: var(--gold-wash); color: var(--text); }
.games__slot img, .games__blank { flex: none; width: 44px; height: 44px; border-radius: 10px; object-fit: cover; }
.games__slot img { object-position: 70% 30%; }
.games__blank { border: 1px dashed var(--line-strong); }
.games__slot > span:last-child { display: grid; gap: 2px; }
.games__slot strong { font: 700 17px/1.2 var(--font-display); }
.games__state { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.games__slot.is-live .games__state { color: var(--ok); font-weight: 600; }
.games__state .icon { width: 16px; height: 16px; }

/* Convite final: o mesmo botao do topo, para quem leu ate aqui. */
.closer { display: grid; justify-items: center; gap: var(--s5); text-align: center; border-top: 1px solid var(--line); }

/* ------------------------------------------------------------ imagens do jogo */

/* Faixa com a imagem do conteudo no topo do cartao do evento. */
.quest.has-art { padding-top: 0; overflow: hidden; }
.quest__art {
  position: relative; margin: 0 calc(-1 * var(--s5)); aspect-ratio: 16 / 7; overflow: hidden;
  background: var(--surface-2);
}
.quest--compact .quest__art { margin: 0 calc(-1 * var(--s4)); aspect-ratio: 16 / 6; }
.quest__art img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Degrade para a imagem terminar na superficie do cartao, sem linha dura. */
.quest__art::after { content: ''; position: absolute; inset: 40% 0 0; background: linear-gradient(to bottom, transparent, var(--surface)); }

.events__link { grid-template-columns: 56px minmax(0, 1fr) auto; }
.events__thumb { grid-row: 1 / span 2; width: 56px; height: 56px; border-radius: 10px; overflow: hidden; background: var(--surface-3); align-self: start; }
.events__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* No celular as vagas ocupam a linha de baixo inteira (embaixo do status tambem), para o "1/10" caber ao lado. */
.events__slots { grid-column: 2 / -1; }
.events__status { grid-column: 3; }
@media (min-width: 760px) {
  .events__link { grid-template-columns: 56px minmax(0, 1fr) auto auto 20px; }
  .events__thumb { grid-row: 1; }
  .events__slots { grid-column: 3; }
  .events__status { grid-column: 4; }
}

/* ------------------------------------------------------------ criar evento */

.create { display: grid; gap: var(--s5); margin-top: var(--s4); }
.create__pick .h2 { margin-top: 0; }
.create__details { align-self: start; }
@media (min-width: 1040px) {
  .create { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
  .create__details { position: sticky; top: var(--s5); }
}
.picks { margin-bottom: var(--s5); }
.picks__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
@media (min-width: 640px) { .picks__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pick {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr); aspect-ratio: 4 / 3; overflow: hidden; cursor: pointer;
  border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line);
  isolation: isolate; container-type: inline-size;
  transition: transform 200ms var(--ease), box-shadow 200ms var(--ease), border-color 200ms var(--ease);
}
.pick input { position: absolute; opacity: 0; inset: 0; z-index: 3; cursor: pointer; margin: 0; }
.pick img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 400ms var(--ease); }
/* Degrade por baixo do nome: e o que deixa o nome legivel em qualquer imagem. */
.pick::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgb(8 10 15 / 0.92) 0%, rgb(8 10 15 / 0.55) 38%, transparent 70%); }
.pick__text { align-self: end; display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; padding: var(--s3); color: #fff; }
/*
 * O nome encolhe so em cartao estreito, na medida para a palavra mais longa
 * (Decontamination, ~8.3 vezes o corpo) caber inteira desde celulares de 320 px;
 * o hifen e a quebra ficam de reserva.
 */
.pick__text strong {
  font: 700 clamp(13px, calc((100cqi - 24px) / 8.3), 17px)/1.15 var(--font-display); text-shadow: 0 1px 2px rgb(0 0 0 / 0.6);
  -webkit-hyphens: auto; hyphens: auto; overflow-wrap: break-word;
}
.pick__variant { justify-self: start; padding: 1px 8px; border-radius: 6px; background: rgb(255 255 255 / 0.16); font-size: 12px; font-weight: 600; letter-spacing: 0.03em; }
.pick:hover { border-color: var(--line-strong); transform: translateY(-2px); box-shadow: var(--shadow-pop); }
.pick:hover img { transform: scale(1.04); }
.pick:has(input:checked) { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold), var(--shadow-pop); }
.pick:has(input:checked) .pick__variant { background: var(--gold); color: var(--gold-ink); }
.pick:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 3px; }
/* GS minimo e CP recomendado, no canto de cima (sem passar do circulo de marcar):
   o elmo e "2.100+", as espadas e "180K", legiveis em qualquer arte. */
.pick__reqs {
  position: absolute; top: 10px; left: 10px; right: 46px; z-index: 1;
  display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px;
}
.pick__gs {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 6px;
  background: rgb(8 10 15 / 0.76); border: 1px solid rgb(255 255 255 / 0.16); color: #f2f3f7;
  font: 600 12px/1.4 var(--font-data); letter-spacing: 0.02em;
}
/* Seu GS ainda nao chega ao minimo: o alerta no lugar do elmo e a cor de perigo. */
.pick__gs.is-below { border-color: rgb(242 116 116 / 0.7); color: #ffb3b3; }
.pick__gs .icon { width: 13px; height: 13px; }
/* As espadas do CP em ciano, como no jogo (a arte e sempre escura atras). */
.pick__gs.is-cp:not(.is-below) .icon { color: #5fd4e2; }
/* Hard: etiqueta vermelha e borda avermelhada, sempre, mesmo selecionado. */
.pick.is-hard { border-color: rgb(229 72 77 / 0.6); }
.pick__variant.is-hard,
.pick:has(input:checked) .pick__variant.is-hard { background: #e5484d; color: #fff; }
@media (prefers-reduced-motion: reduce) { .pick, .pick img { transition: none; } .pick:hover { transform: none; } .pick:hover img { transform: none; } }

/* Dia da semana como chips, hora como campo de hora. */
/* "Decidir com o grupo" na linha de cima, da largura toda (o nome nao cabe num
   chip de dia), e os sete dias numa linha so, nas mesmas bordas dos campos. */
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; min-inline-size: 0; }
/* Fieldset nao encolhe abaixo do conteudo por padrao: a 320 px os sete dias passavam da borda do Organizar. */
@media (max-width: 359px) { .days { gap: 4px; } .daychip span { font-size: 13px; padding: 0; } }
.days legend, .daychip:first-of-type { grid-column: 1 / -1; }
.daychip { position: relative; display: grid; }
.daychip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.daychip span {
  display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 2px;
  border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font-weight: 600; font-size: 14px; text-transform: capitalize;
}
.daychip:first-of-type span { text-transform: none; font-weight: 500; color: var(--text-2); }
.daychip input:checked + span { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.daychip input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.field--time input { font-family: var(--font-data); }
.create__server { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 14px; }
.create__server .icon { width: 18px; height: 18px; flex: none; }

/* ------------------------------------------------------------ entrada com a arte do jogo */

.landing { position: relative; isolation: isolate; border-radius: 24px; overflow: hidden; padding: var(--s6) var(--s5); margin-bottom: var(--s5); }
.landing__art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 30% 20%; z-index: -2; }
/* Veu escuro para o texto ler bem sobre a arte, mais forte do lado do texto. */
.landing::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to bottom, rgb(14 16 22 / 0.55), rgb(14 16 22 / 0.92) 55%, var(--bg)); }
.landing .display, .landing .lead, .landing .fine { color: #f2f3f7; }
.landing .lead { color: rgb(242 243 247 / 0.82); }
@media (min-width: 900px) {
  .landing { padding: var(--s7); }
  /* Logo do jogo, na direita da arte, fica escondido atras do exemplo. */
  .landing__art { object-position: 100% 25%; }
  .landing::after { background: linear-gradient(to right, rgb(14 16 22 / 0.96) 0%, rgb(14 16 22 / 0.8) 40%, rgb(14 16 22 / 0.35) 58%, rgb(14 16 22 / 0.82) 100%); }
}

/* ------------------------------------------------------------ teste das DMs no perfil */

/* Mesmo respiro dos outros cartoes: titulo a 12px do conteudo. */
.dmsheet { gap: var(--s3); }
.dmsheet > .h2 { margin-bottom: 0; }
.dmcheck { display: grid; gap: var(--s3); margin-top: var(--s2); padding-top: var(--s4); border-top: 1px solid var(--line); }
.dmcheck__actions { display: flex; flex-wrap: wrap; gap: var(--s2); }
.dmcheck__actions .icon { width: 18px; height: 18px; }
.dmcheck__blocked { display: flex; gap: var(--s2); align-items: flex-start; font-size: 14px; line-height: 1.45; }
.dmcheck__blocked .icon { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--gold-text); }

/* ------------------------------------------------------------ eventos privados e horarios do grupo */

.h3 { font-weight: 600; font-size: 16px; line-height: 1.25; margin: 0 0 var(--s2); }

/* Aberto ou privado, ao criar: duas opcoes grandes, com o que cada uma faz. */
.visibility { display: grid; gap: var(--s2); }
.visopt { position: relative; display: grid; gap: 2px; padding: var(--s3); border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); cursor: pointer; }
.visopt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.visopt__title { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.visopt__title .icon { width: 18px; height: 18px; color: var(--text-2); }
.visopt__hint { font-size: 13.5px; color: var(--text-2); }
.visopt:has(input:checked) { border-color: var(--gold); background: var(--gold-wash); box-shadow: inset 0 0 0 1px var(--gold); }
.visopt:has(input:checked) .visopt__title .icon { color: var(--gold); }
.visopt:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }

.meta__private { color: var(--text); font-weight: 600; }
.privnote { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: var(--text-2); }
.privnote .icon { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--gold); }

/* Horarios do grupo: o resumo com a sugestao, a grade do grupo e a sua grade,
   lado a lado quando cabem. */
.times__layout { display: grid; gap: var(--s5); align-items: start; }
.times__summary, .times__group, .times__mine { display: grid; gap: var(--s3); align-content: start; min-width: 0; }
.times__summary > .h2 { margin-bottom: 0; }
.times__group > .h3, .times__mine > .h3 { margin: 0; }
.times__layout > * + * { padding-top: var(--s5); border-top: 1px solid var(--line); }
@container (min-width: 700px) {
  /* Lado a lado, as duas grades comecam e terminam na mesma altura: titulo,
     explicacao, grade e botoes ficam em linhas comuns (subgrid). */
  .times__layout.has-group { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto repeat(4, auto); row-gap: 0; }
  .times__layout.has-group > .times__summary { grid-column: 1 / -1; margin-bottom: var(--s5); }
  .times__layout.has-group > .times__group, .times__layout.has-group > .times__mine { grid-row: 2 / span 4; grid-template-rows: subgrid; }
  .times__layout.has-group > * > .heat, .times__layout.has-group > * > .weekform { grid-row: 2 / span 3; grid-template-rows: subgrid; }
  .times__layout:not(.has-group) { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .times__layout:not(.has-group) > .times__mine { padding-top: 0; border-top: 0; }
}
@container (min-width: 1040px) {
  .times__layout.has-group { grid-template-columns: minmax(0, 5fr) repeat(2, minmax(0, 6fr)); grid-template-rows: repeat(4, auto); }
  .times__layout.has-group > .times__summary { grid-column: 1; grid-row: 1 / span 4; margin-bottom: 0; }
  .times__layout.has-group > .times__group, .times__layout.has-group > .times__mine { grid-row: 1 / span 4; padding-top: 0; border-top: 0; }
}

/* Sugestao: verde quando todos conseguem, neutra quando e o melhor possivel. */
.suggest { border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); overflow: hidden; }
.suggest.is-everyone { border-color: color-mix(in srgb, var(--ok) 55%, transparent); }
.suggest__head { display: flex; align-items: center; gap: 8px; padding: var(--s2) var(--s3); font-weight: 600; font-size: 14px; border-bottom: 1px solid var(--line); }
.suggest__head .icon { width: 18px; height: 18px; color: var(--text-2); }
.suggest.is-everyone .suggest__head { color: var(--ok); }
.suggest.is-everyone .suggest__head .icon { color: var(--ok); }
.suggest__list { list-style: none; margin: 0; padding: 0; }
.suggest__item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2) var(--s3); padding: var(--s3); }
.suggest__item + .suggest__item { border-top: 1px solid var(--line); }
.suggest__item > div { display: grid; gap: 2px; min-width: 0; }
.suggest__item strong { font: 700 17px/1.2 var(--font-display); }
.suggest__item .btn .icon { width: 18px; height: 18px; }

.durationform { display: flex; align-items: flex-end; gap: var(--s2); max-width: 420px; }
.durationform .field { flex: 1; }

/* ------------------------------------------------------------ grades da semana */

/* Como no when2meet: uma coluna por dia (segunda primeiro), de 00h a 24h, uma
   linha por bloco de 15 minutos, linha cheia a cada hora e fraca na meia hora.
   A de marcar e feita de caixas de marcar (douradas quando marcadas); a do
   grupo, de blocos com o calor de quantos podem. */
.wgrid {
  --row: 8px;
  --hours: 36px;
  position: relative; padding-bottom: var(--s2);
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
.wgrid__head, .wgrid__body { display: grid; grid-template-columns: var(--hours) repeat(7, minmax(0, 1fr)); column-gap: 3px; }
/* Os dias ficam no alto da tela enquanto se pinta a parte de baixo da grade. */
.wgrid__head {
  position: sticky; top: 0; z-index: 3; padding: var(--s2) 0 6px; margin-bottom: 7px;
  background: var(--surface); box-shadow: 0 1px 0 var(--line);
  font-size: 13px; font-weight: 600; color: var(--text-2); text-align: center; text-transform: capitalize;
}
.wgrid__body { position: relative; }
.wgrid__hours { display: grid; grid-template-rows: repeat(24, calc(4 * var(--row))); grid-auto-rows: 0; padding-right: 6px; }
.wgrid__hours span { align-self: start; transform: translateY(-50%); font-size: 11.5px; line-height: 1; color: var(--text-2); text-align: right; font-variant-numeric: tabular-nums; }
.wgrid__col { display: grid; grid-template-rows: repeat(96, var(--row)); border-radius: 6px; overflow: hidden; background: var(--surface-2); }
.wgrid__col > * { display: block; margin: 0; min-width: 0; }
/* Linha da hora (a cada 4 blocos) e da meia hora. */
.wgrid__col > :nth-child(4n+1):not(:first-child) { box-shadow: inset 0 1px 0 var(--line-strong); }
.wgrid__col > :nth-child(4n+3) { box-shadow: inset 0 1px 0 var(--line); }

/* Marcar: cada bloco e uma caixa de marcar sem a aparencia do navegador. */
.wgrid__col > input {
  -webkit-appearance: none; appearance: none; width: 100%; height: 100%;
  border: 0; border-radius: 0; background: transparent; cursor: pointer;
}
.wgrid__col > input:checked { background: var(--gold); }
/* No dourado, so a linha da hora, fraca: o trecho marcado le como uma barra. */
.wgrid__col > input:checked:nth-child(4n+1):not(:first-child) { box-shadow: inset 0 1px 0 rgb(27 21 5 / 0.16); }
.wgrid__col > input:checked:nth-child(4n+3) { box-shadow: none; }
@media (hover: hover) {
  .wgrid__col > input:hover { background: var(--gold-wash-strong); }
  .wgrid__col > input:checked:hover { background: color-mix(in srgb, var(--gold) 78%, var(--text)); }
  /* Pintando, o bloco sob o mouse mostra o que vai ficar. */
  .wgrid.is-painting .wgrid__col > input:hover { background: transparent; }
  .wgrid.is-painting .wgrid__col > input:checked:hover { background: var(--gold); }
}
.wgrid__col > input:focus-visible { position: relative; z-index: 1; outline: 2px solid var(--text); outline-offset: 0; }

/* Calor do grupo: verde de "todos conseguem", do fraco ao cheio; "todos" e o verde cheio. */
.wgrid--heat .wgrid__col > i.q1, .heat i.q1 { background: color-mix(in oklab, var(--ok) 20%, var(--surface-2)); }
.wgrid--heat .wgrid__col > i.q2, .heat i.q2 { background: color-mix(in oklab, var(--ok) 36%, var(--surface-2)); }
.wgrid--heat .wgrid__col > i.q3, .heat i.q3 { background: color-mix(in oklab, var(--ok) 52%, var(--surface-2)); }
.wgrid--heat .wgrid__col > i.q4, .heat i.q4 { background: color-mix(in oklab, var(--ok) 66%, var(--surface-2)); }
.wgrid--heat .wgrid__col > i.qa, .heat i.qa { background: var(--ok); }
.wgrid--heat .wgrid__col > i.qa:nth-child(4n+1):not(:first-child) { box-shadow: inset 0 1px 0 rgb(0 0 0 / 0.16); }
.wgrid--heat .wgrid__col > i.qa:nth-child(4n+3) { box-shadow: none; }
.wgrid--heat:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: 8px; }
/* O bloco apontado (mouse, toque ou setas). */
.wgrid--heat .wgrid__col > i.is-at { position: relative; z-index: 1; outline: 2px solid var(--text); }

/* O que esta sendo pintado, ou quem pode naquele horario, perto do dedo ou do mouse. */
.wgrid__tip {
  position: absolute; z-index: 4; top: 0; left: 0; width: max-content; max-width: min(260px, 100%);
  padding: 6px 10px; border-radius: 8px; transform: translate(-50%, calc(-100% - 6px));
  background: var(--surface-3); color: var(--text); border: 1px solid var(--line-strong); box-shadow: var(--shadow-pop);
  font-size: 13px; line-height: 1.35; font-variant-numeric: tabular-nums; pointer-events: none;
}
.wgrid__tip[hidden] { display: none; }
.wgrid__tip.is-below { transform: translate(-50%, 6px); }
.wgrid__tip.is-mark { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.wgrid__tip b { font-weight: 600; }
.wgrid__tip span { display: block; color: var(--text-2); }

/* Grade vazia: o "como pintar" no meio dela, por cima, com a grade um pouco apagada atras.
   Some quando o mouse ou o foco chegam (e enquanto se pinta) e volta se a grade ficar vazia.
   O aviso acompanha a tela entre o alto (abaixo dos dias) e o pe (acima da barra de abas). */
.wgrid__ph {
  position: absolute; inset: 0 0 0 calc(var(--hours) + 3px); z-index: 2;
  display: flex; align-items: center; justify-content: center; padding: var(--s3);
  border-radius: 6px; background: color-mix(in srgb, var(--surface) 45%, transparent);
  pointer-events: none; opacity: 0; transition: opacity 180ms var(--ease);
}
.wgrid.is-empty:not(:hover, :focus-within, .is-painting) .wgrid__ph { opacity: 1; transition-duration: 320ms; }
.wgrid__phin {
  position: sticky; top: 52px; bottom: calc(var(--tabbar) + env(safe-area-inset-bottom) + var(--s4));
  display: flex; align-items: center; gap: var(--s3); max-width: 290px; margin: 0;
  padding: var(--s3) var(--s4) var(--s3) var(--s3); border-radius: 12px;
  background: var(--surface-3); border: 1px solid var(--line-strong); box-shadow: var(--shadow-pop);
  font-size: 15px; font-weight: 600; line-height: 1.35; color: var(--text); text-wrap: pretty;
}
.wgrid__phin .icon { width: 28px; height: 28px; flex: none; color: var(--gold); }
@media (prefers-reduced-motion: reduce) { .wgrid__ph { transition: none; } }

.weekform { display: grid; gap: var(--s3); }
.weekform__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); }
.weekform__dirty { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 500; color: var(--gold-text); }
.weekform__dirty .icon { width: 16px; height: 16px; }
.weekform__dirty[hidden] { display: none; }
/* Como marcar: o texto do mouse ou o do toque. */
.for-touch { display: none; }
@media (pointer: coarse) { .for-touch { display: inline; } .for-mouse { display: none; } }

.heat, .heat__intro { display: grid; gap: var(--s3); }
.heat__legend { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s4); font-size: 13px; color: var(--text-2); }
.heat__scale, .heat__key { display: inline-flex; align-items: center; gap: var(--s2); }
.heat__ramp { display: inline-flex; gap: 2px; }
.heat__legend i { display: block; width: 18px; height: 12px; border-radius: 3px; }
.heat__key { color: var(--text); font-weight: 600; }

/* Quem pode editar: uma chave por pessoa. */
.managers { padding-top: var(--s4); border-top: 1px solid var(--line); }
.managers__list { list-style: none; margin: var(--s3) 0 0; padding: 0; display: grid; gap: var(--s2); }
.managers__item { display: flex; align-items: center; gap: var(--s3); }
.managers__name { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.managers__item .badge { width: 32px; height: 32px; border-radius: 9px; }
/* Organizar: pedir confirmacao de presenca, com quantos ja confirmaram. */
.presence-ask { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: start; gap: var(--s2); padding-top: var(--s4); border-top: 1px solid var(--line); }
/* A 320 px "Pedir confirmação de presença" nao cabe numa linha: o botao quebra em vez de passar da borda. */
.presence-ask .btn { max-width: 100%; white-space: normal; text-align: left; padding-block: 10px; }
.switch { position: relative; width: 46px; height: 28px; flex: none; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface-2); cursor: pointer; padding: 0; transition: background-color 160ms var(--ease), border-color 160ms var(--ease); }
.switch span { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--text-2); transition: transform 160ms var(--ease), background-color 160ms var(--ease); }
.switch.is-on { background: var(--gold); border-color: var(--gold); }
.switch.is-on span { transform: translateX(18px); background: var(--gold-ink); }
.switch:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .switch, .switch span { transition: none; } }

/* ------------------------------------------------------------ Sem avisos no Discord */

/* A Kautricia nao consegue mandar DM para a pessoa. Lembrete no tom do resumo do
   que falta na sala: superficie, alerta dourado, o atalho para autorizar e o
   teste de DM, ao lado do texto quando cabem (Salas) e embaixo dele quando nao
   (o celular e o cartao da sala). */
.reach {
  container-type: inline-size;
  margin: var(--s4) 0 var(--s5); padding: var(--s3) var(--s4);
  border-radius: 12px; background: var(--surface); border: 1px solid var(--line);
}
.quest .reach { margin: 0; background: var(--surface-2); }
.reach__in { display: grid; grid-template-columns: 20px minmax(0, 1fr); align-items: center; column-gap: var(--s3); row-gap: 2px; }
.reach__in > .icon { grid-row: 1; width: 20px; height: 20px; color: var(--gold-text); }
.reach__title { grid-column: 2; font-weight: 600; font-size: 15px; line-height: 1.4; }
.reach__text { grid-column: 2; font-size: 14.5px; line-height: 1.45; color: var(--text-2); max-width: 70ch; }
.reach__actions { grid-column: 2; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin-top: var(--s3); }
.reach__actions .btn .icon { width: 18px; height: 18px; }
@container (min-width: 780px) {
  .reach__in { grid-template-columns: 20px minmax(0, 1fr) auto; }
  .reach__actions { grid-column: 3; grid-row: 1 / span 2; flex-wrap: nowrap; margin: 0 0 0 var(--s4); }
}


/* Miniatura da arte do conteudo. */
.thumb { display: block; flex: none; width: 52px; height: 52px; border-radius: 10px; overflow: hidden; background: var(--surface-3); }
.thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.lfgpick .tag { font-size: 11.5px; }
.tag.is-hard { background: #e5484d; color: #fff; }
/* GS minimo nos cartoes do Procurar grupo: a mesma etiqueta mono do cartao de criar evento, em versao clara. */
.gsreq {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 0 6px; border-radius: 6px; border: 1px solid var(--line-strong);
  font: 500 11.5px/1.6 var(--font-data); color: var(--text-2); white-space: nowrap;
}
.gsreq .icon { width: 12px; height: 12px; }
.gsreq.is-below { border-color: color-mix(in srgb, var(--danger) 55%, transparent); color: var(--danger); }
.gsreq.is-cp:not(.is-below) .icon { color: var(--cp); }

/* Escolher o que quer jogar: cartoes pequenos com a arte, marcados em dourado. */
.lfgpicker { display: grid; gap: var(--s3); align-content: start; margin-top: var(--s4); }
.lfgpicker > .h2 { margin-bottom: 0; }
.lfgform { display: grid; gap: var(--s4); }
.lfgpicks { display: grid; gap: var(--s2); }
.lfgpicks__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: var(--s2); }
/*
 * Alinhado pelo topo: quando as etiquetas quebram linha num cartao, os nomes e
 * os marcadores da mesma fileira continuam na mesma altura. O texto desce 5px
 * para ficar centrado na miniatura quando tem duas linhas, e o marcador fica no
 * meio da miniatura.
 */
.lfgpick {
  position: relative; display: grid; grid-template-columns: 52px minmax(0, 1fr) 22px; gap: var(--s3); align-items: start;
  padding: 8px 12px 8px 8px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); cursor: pointer;
  transition: border-color 160ms var(--ease), background-color 160ms var(--ease);
}
.lfgpick input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.lfgpick.is-hard { border-color: rgb(229 72 77 / 0.45); }
.lfgpick:hover { border-color: var(--line-strong); }
.lfgpick__text { display: grid; gap: 3px; min-width: 0; padding-top: 5px; }
.lfgpick__text strong { font-weight: 600; font-size: 14.5px; line-height: 1.25; }
.lfgpick__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.lfgpick__check { display: grid; place-items: center; width: 22px; height: 22px; margin-top: 15px; border-radius: 50%; border: 1.5px solid var(--line-strong); color: transparent; }
.lfgpick__check .icon { width: 14px; height: 14px; }
.lfgpick:has(input:checked) { border-color: var(--gold); background: var(--gold-wash); box-shadow: inset 0 0 0 1px var(--gold); }
.lfgpick:has(input:checked) .lfgpick__check { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.lfgpick:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }
/* Salvar fica sempre a mao, acima da barra de abas do celular. */
.lfgform__bar {
  position: sticky; bottom: calc(var(--tabbar) + env(safe-area-inset-bottom) + var(--s2)); z-index: 2;
  display: flex; flex-wrap: wrap; gap: var(--s2);
  padding: var(--s2); margin: 0 calc(-1 * var(--s2)); border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.28);
}
.lfgform__bar .btn--primary { flex: 1 1 200px; }
@media (prefers-reduced-motion: reduce) { .lfgpick { transition: none; } }

/* ------------------------------------------------------------ eventos abertos: filtros e quem ja esta */

.filters { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2) var(--s3); margin-bottom: var(--s3); }
.filters__chips { display: flex; flex-wrap: wrap; gap: var(--s2); }
.fchip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  color: var(--text-2); font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap;
  transition: border-color 160ms var(--ease), background-color 160ms var(--ease), color 160ms var(--ease);
}
.fchip:hover { border-color: var(--line-strong); color: var(--text); }
.fchip.is-on { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); font-weight: 600; }
.fchip__n { font: 500 12px/1 var(--font-data); opacity: 0.75; }
.fchip--toggle .icon { width: 15px; height: 15px; display: none; }
.fchip--toggle.is-on .icon { display: block; }
.fchip:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* Quem ja esta: o emblema de cada um, na cor da funcao da vaga; vaga livre e um aro. */
.roster { display: inline-flex; flex-wrap: wrap; gap: 6px 10px; }
.roster__group { display: inline-flex; gap: 3px; }
.mini {
  display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px;
  background: #151821;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--role) 50%, transparent);
}
.mini .emblem { width: 80%; height: 80%; object-fit: contain; }
.mini--empty { background: transparent; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--role) 45%, transparent); }
.events__meta > span { display: inline-flex; align-items: center; gap: 5px; }
.events__meta { gap: 4px 12px; }
.events__leader { color: var(--text); font-weight: 500; }
.events__leader .icon { color: var(--gold); }

/* ------------------------------------------------------------ historico */

.history__lead { font-size: 16px; margin: var(--s2) 0 var(--s5); }
/* No lugar das vagas e do estado: onde a pessoa ficou. No celular, embaixo do titulo. */
.events--history .events__link { grid-template-columns: 56px minmax(0, 1fr); }
.events__place { grid-column: 2; display: flex; align-items: center; gap: var(--s2); min-width: 0; font-size: 14px; color: var(--text-2); }
.events__place > .mini { flex: none; }
.events__place strong { color: var(--text); font-weight: 600; }
.mini--organizer { --role: var(--text-3); }
.mini--organizer .icon { width: 14px; height: 14px; color: var(--gold); }
@media (min-width: 760px) {
  .events--history .events__link { grid-template-columns: 56px minmax(0, 1fr) auto 20px; }
  .events--history .events__thumb { grid-row: 1; }
  .events__place { grid-column: 3; grid-row: 1; }
}
/* Convite por personagem, para quem foi convidado: quem organiza guardou o lugar,
   falta a pessoa agir, entao em dourado como o pedido de presenca; o personagem
   convidado no selo da classe, e Recusar e Confirmar dividindo a largura. */
.invited {
  display: grid; gap: var(--s3); padding: var(--s3); border-radius: 12px;
  background: var(--gold-wash); border: 1px solid color-mix(in srgb, var(--gold) 35%, transparent);
}
.invited__head { display: flex; align-items: flex-start; gap: var(--s3); min-width: 0; }
.invited__head .badge { flex: none; }
.invited__who { display: grid; gap: 2px; min-width: 0; }
.invited__who p { margin: 0; }
.invited__title { font: 700 17px/1.25 var(--font-display); color: var(--gold-text); }
.invited__room { font: 600 16px/1.3 var(--font-display); color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.invited__room:hover { color: var(--gold-text); text-decoration: underline; text-underline-offset: 3px; }
.invited__when { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text-2); }
.invited__when .icon { width: 15px; height: 15px; flex: none; }
.invited__who .invited__text { margin-top: 4px; font-size: 15px; line-height: 1.45; color: var(--text); overflow-wrap: anywhere; }
.invited__actions { display: flex; flex-wrap: wrap; gap: var(--s2); }
.invited__actions .btn { flex: 1 1 120px; }
/* Em Salas: um cartao por convite, lado a lado quando cabem. */
.invites { display: grid; gap: var(--s3); grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); }
.invited--list { padding: var(--s4); }

/* Convidar um personagem: o selo da vaga, o titulo e onde, depois o servidor e o nick. */
.invitepage { display: grid; gap: var(--s4); margin-top: var(--s4); }
.invitepage__head { display: flex; align-items: center; gap: var(--s3); }
.invitepage__head > .badge { flex: none; width: 44px; height: 44px; border-radius: 12px; }
.invitepage__head > .badge .icon { width: 24px; height: 24px; }
.invitepage__title { margin: 0; font: 700 clamp(21px, 4vw, 24px)/1.2 var(--font-display); letter-spacing: -0.01em; text-wrap: balance; }
.invitepage__where { margin: 2px 0 0; color: var(--text-2); font-size: 14.5px; overflow-wrap: anywhere; }
.invitepage__lead { margin: 0; max-width: 60ch; color: var(--text-2); font-size: 15.5px; line-height: 1.5; }

/* So para leitores de tela. */
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (prefers-reduced-motion: reduce) { .fchip { transition: none; } }

/* ------------------------------------------------------------ vaga de outra classe: confirmar */

.confirm {
  width: min(420px, calc(100% - 2 * var(--gutter))); max-width: none; max-height: calc(100% - 2 * var(--gutter));
  margin: auto; padding: 0; overflow: auto;
  border: 1px solid var(--line-strong); border-radius: var(--r-lg);
  background: var(--surface); color: var(--text); box-shadow: var(--shadow-pop);
}
.confirm::backdrop { background: var(--scrim); }
.confirm[open] { animation: confirm-in 240ms var(--ease); }
@keyframes confirm-in { from { opacity: 0; transform: translateY(10px) scale(0.98); } }
@media (prefers-reduced-motion: reduce) { .confirm[open] { animation: none; } }
.confirm__in { display: grid; gap: var(--s3); justify-items: start; padding: var(--s5); }
.confirm__in > .badge { width: 44px; height: 44px; border-radius: 12px; }
.confirm__in > .badge .icon { width: 24px; height: 24px; }
.confirm__title { margin: var(--s1) 0 0; font: 700 21px/1.2 var(--font-display); letter-spacing: -0.01em; }
.confirm__text { margin: 0; max-width: 46ch; color: var(--text-2); font-size: 15.5px; line-height: 1.5; }
.confirm__actions { display: flex; flex-wrap: wrap; gap: var(--s2); justify-self: stretch; margin-top: var(--s2); }
.confirm__actions .btn { flex: 1 1 auto; }
.confirm--page { margin-top: var(--s4); }
.confirm__field { justify-self: stretch; }
.badge--danger { --role: var(--danger); }

/* ------------------------------------------------------------ arrastar pessoas entre as vagas */

.arrange { display: grid; gap: var(--s4); }
.arrange__hint { display: flex; align-items: center; gap: 6px; margin: 0; }
.arrange__hint .icon { width: 16px; height: 16px; flex: none; }
.unit.is-draggable { cursor: grab; touch-action: pan-y; }
/* Vaga vazia de quem organiza: mesma coluna da alca, para os selos ficarem alinhados. */
.unit.is-draggable, .unit.is-slot { grid-template-columns: 16px 36px minmax(0, 1fr) auto; grid-template-areas: 'grip badge name move' 'grip badge class move'; column-gap: 8px; }
/* Vaga vazia: uma linha so (a funcao), centrada no selo. */
.unit.is-open { grid-template-areas: 'badge name move'; }
.unit.is-open.is-slot { grid-template-areas: 'grip badge name move'; }
.unit.is-slot .unit__grip { cursor: default; }
.unit__grip { grid-area: grip; display: grid; place-items: center; align-self: stretch; color: var(--text-3); touch-action: none; cursor: grab; }
.unit__grip .icon { width: 16px; height: 16px; }
.unit.is-dragging { opacity: 0.35; }
.unit--ghost {
  position: fixed; top: 0; left: 0; z-index: 50; pointer-events: none; margin: 0; list-style: none;
  box-shadow: 0 18px 40px rgb(0 0 0 / 0.45); border-color: var(--gold); cursor: grabbing;
}
body.is-arranging, body.is-arranging * { cursor: grabbing !important; user-select: none; }
/* Onde vai cair: contorno dourado na vaga (ou na reserva). */
[data-spot].is-drop { outline: 2px dashed var(--gold); outline-offset: 2px; background: var(--gold-wash); }
.party__empty { margin: 0; padding: var(--s3); border: 1px dashed var(--line-strong); border-radius: 12px; color: var(--text-2); font-size: 14px; text-align: center; }
@media (hover: hover) { .unit__grip { opacity: 0.55; } .unit.is-draggable:hover .unit__grip { opacity: 1; } }
/* Frame estreito (celular, tres janelas lado a lado, quem organiza): o nome com o servidor
   ("Ventorosa[ZIK]") nao cabe com o CP na mesma linha. O CP desce para o lado da classe, e o
   frame continua com 62 px, como os das outras janelas. */
@container (max-width: 400px) {
  .units .unit__name .power { display: none; }
  /* Sem espaco para a classe inteira com o CP (Espiritualista no celular), ela termina em reticencias. */
  .units .unit__class .power { display: block; }
}

/* ------------------------------------------------------------ Procurar grupo em etapas */

/* As tres etapas: um numero em circulo ligado ao proximo por uma linha. A de agora em dourado, as feitas com o check verde. */
.lfgsteps { margin: var(--s4) 0 var(--s4); }
.lfgsteps ol { display: flex; gap: var(--s2); list-style: none; margin: 0; padding: 0; }
.lfgsteps li { flex: 1 1 0; min-width: 0; display: flex; align-items: center; gap: var(--s2); }
.lfgsteps li:not(:last-child)::after { content: ''; flex: 1 1 auto; min-width: 8px; height: 1px; background: var(--line-strong); }
.lfgsteps a, .lfgsteps li > span {
  display: inline-flex; align-items: center; gap: var(--s2); min-height: 44px; min-width: 0;
  color: var(--text-2); text-decoration: none; font-weight: 600; font-size: 15px;
}
.lfgsteps li > span[aria-disabled] { color: var(--text-3); }
.lfgsteps__n {
  display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%;
  border: 1.5px solid var(--line-strong); font: 600 14px/1 var(--font-data); color: var(--text-2);
}
.lfgsteps__n .icon { width: 15px; height: 15px; }
.lfgsteps__name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lfgsteps a:hover { color: var(--text); }
.lfgsteps a:hover .lfgsteps__n { border-color: var(--text-2); }
.lfgsteps a:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 8px; }
.lfgsteps li.is-here a { color: var(--text); }
.lfgsteps li.is-here .lfgsteps__n { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.lfgsteps li.is-done .lfgsteps__n { border-color: color-mix(in srgb, var(--ok) 55%, transparent); background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.lfgsteps li.is-done::after { background: color-mix(in srgb, var(--ok) 45%, transparent); }
/* No celular so a etapa de agora diz o nome; as outras ficam no circulo (o nome segue para o leitor de tela). */
@media (max-width: 560px) {
  .lfgsteps li:not(.is-here) { flex: 0 1 auto; }
  .lfgsteps li.is-here { flex: 1 1 auto; }
  .lfgsteps li:not(.is-here):not(:last-child) { flex: 1 1 auto; }
  .lfgsteps li:not(.is-here) .lfgsteps__name {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }
}
.lfgstep { margin-top: 0; }
.lfgstep > .h2 { margin-top: 0; }
.lfgstep.lfgpicker { margin-top: 0; }

/* Quantos estao buscando grupo: o icone verde e o numero (o texto inteiro fica no title e no leitor de tela). */
.looking { display: inline-flex; align-items: center; gap: 3px; font: 600 12.5px/1 var(--font-data); color: var(--ok); }
.looking .icon { width: 14px; height: 14px; }

/* Etapa 3: um conteudo por vez nos chips, o grupo que da para montar e as salas abertas dele. */
.lfgchips { margin-bottom: var(--s4); }
.lfgrooms { display: grid; gap: var(--s6); }
.lfgrooms .h2 { margin-top: 0; }
.match { display: grid; gap: var(--s4); }
.match__head { display: flex; align-items: center; gap: var(--s3); }
.match__title { display: grid; gap: 6px; min-width: 0; }
.match__title .h2 { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); font-size: 24px; overflow-wrap: anywhere; }
.match__title .tag { font-size: 12px; }
.match__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0; }
.match__lead { margin: 0; max-width: 70ch; color: var(--text-2); }
.parties--preview > .party { flex: 0 1 440px; box-shadow: none; }
/* Criar: a barra da acao, com o melhor horario do grupo ao lado do botao. */
.match__create {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--s2) var(--s4);
  padding: var(--s4); border-radius: var(--r-lg); background: var(--gold-wash);
  border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent);
}
.match__when { display: flex; align-items: flex-start; gap: var(--s2); margin: 0; }
.match__when .icon { flex: none; margin-top: 3px; width: 17px; height: 17px; color: var(--gold-text); }
.match__when strong { font: 600 17px/1.3 var(--font-display); }
.match__note { grid-column: 1 / -1; margin: 0; }
@media (max-width: 640px) {
  .match__create { grid-template-columns: minmax(0, 1fr); }
  .match__create .btn { width: 100%; }
}

/* Sala completa: o nome para criar a sala no jogo, com o botao de copiar. */
.gametitle { align-items: flex-start; }
.gametitle__body { display: grid; gap: 6px; min-width: 0; flex: 1 1 auto; }
.gametitle__head { margin: 0; font-weight: 600; }
.gametitle .small { margin: 0; color: var(--text-2); }
.gametitle__row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); }
.gametitle__name {
  display: inline-flex; align-items: center; min-height: 44px;
  font: 600 16px/1.3 var(--font-data); color: var(--text); padding: 6px 12px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--line-strong); overflow-wrap: anywhere; user-select: all;
}
.gametitle .btn .icon { color: inherit; margin-top: 0; }
/* Quem organiza avisa que criou a sala no jogo; depois, a linha de quantos foram avisados. */
.gametitle__room { display: grid; justify-items: start; gap: var(--s2); margin: var(--s2) 0 0; padding-top: var(--s3); border-top: 1px solid var(--line); }
.gametitle__room .btn { max-width: 100%; white-space: normal; text-align: left; }
.gametitle__room .small a { color: var(--gold-text); }
.gametitle__room.is-done { display: flex; align-items: flex-start; gap: var(--s2); font-size: 14px; color: var(--text-2); line-height: 1.45; }
.gametitle__room.is-done b { color: var(--ok); font-weight: 600; }
.gametitle__room.is-done .icon { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--ok); }

/* ------------------------------------------------------------ salas: abertas, fechadas e concluidas */

/* Cada parte da pagina Salas abre com o titulo, a contagem e uma linha do que ela e. */
.sechead { margin: var(--s6) 0 var(--s3); }
.sechead > .h2 { margin: 0; display: flex; align-items: baseline; gap: var(--s2); }
.sechead__n { font: 500 14px/1 var(--font-data); color: var(--text-2); }
.sechead__lead { margin-top: 4px; font-size: 14px; color: var(--text-2); max-width: 70ch; }
/* "Vagas para mim" vem primeiro, sozinho; os tipos ao lado (embaixo, no celular). */
.filters:has(> .fchip--toggle:first-child) { justify-content: flex-start; }
.filters--stack { flex-direction: column; align-items: flex-start; margin-top: var(--s4); }
.groups__lead { font-size: 16px; margin: var(--s2) 0 0; }
/* Desta semana ou Concluidos: um seletor so, para nao parecer mais um filtro de tipo. */
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.seg .fchip { border-color: transparent; background: transparent; min-height: 34px; }
.seg .fchip.is-on { background: var(--gold); border-color: var(--gold); }
/* A sala do que a pessoa procura: e o que a poe no topo. */
.events__match { color: var(--gold-text); font-weight: 500; }
/* "Ver os 12 grupos fechados": depois da lista, alinhado a ela. */
.more {
  display: inline-flex; align-items: center; gap: 4px; min-height: 44px; margin-top: var(--s1);
  font-weight: 600; font-size: 14px; color: var(--gold-text); text-decoration: none;
}
.more .icon { width: 16px; height: 16px; }
.more:hover { text-decoration: underline; text-underline-offset: 3px; }
.pill--done { background: transparent; border: 1px solid var(--line); color: var(--text-2); }
/* Grupos concluidos: recolhidos, o titulo e a seta abrem. */
.fold { margin-top: var(--s6); border-top: 1px solid var(--line); }
.fold__head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s3);
  min-height: 56px; padding-top: var(--s3); cursor: pointer; list-style: none; border-radius: 8px;
}
.fold__head::-webkit-details-marker { display: none; }
.fold__head > .h2 { margin: 0; display: flex; align-items: baseline; gap: var(--s2); }
.fold__chev { width: 20px; height: 20px; color: var(--text-2); transform: rotate(90deg); transition: transform 200ms var(--ease); }
.fold[open] .fold__chev { transform: rotate(-90deg); }
.fold__head:hover .fold__chev { color: var(--text); }
.fold__head:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.fold > .sechead__lead { margin: 0 0 var(--s3); }
/* Sala fechada para quem nao esta nela: so ver. */
.viewnote {
  display: flex; gap: var(--s2); align-items: flex-start; padding: var(--s3); border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--line); font-size: 14px; color: var(--text-2);
}
.viewnote .icon { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--text-2); }
.viewnote b { color: var(--text); font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .fold__chev { transition: none; } }

/* ------------------------------------------------------------ salas com varios conteudos */

/*
 * Criar sala: os conteudos sao caixas de marcar. O check no canto diz que da
 * para marcar mais de um; marcado um conteudo, os de outro tamanho de grupo
 * apagam (site.js). Com dois ou mais, o nome da sala e obrigatorio e aparece
 * quem pode entrar.
 */
.create__hint { margin-top: calc(-1 * var(--s2)); margin-bottom: var(--s3); max-width: 70ch; }
.pick__check {
  position: absolute; top: var(--s2); right: var(--s2); z-index: 2; display: grid; place-items: center;
  width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid rgb(255 255 255 / 0.55); background: rgb(8 10 15 / 0.45); color: transparent;
  transition: background-color 160ms var(--ease), border-color 160ms var(--ease);
}
.pick__check .icon { width: 15px; height: 15px; }
.pick:has(input:checked) .pick__check { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.pick:has(input:disabled) { cursor: not-allowed; opacity: 0.38; filter: grayscale(0.85); }
.pick:has(input:disabled):hover { transform: none; box-shadow: none; border-color: var(--line); }
.pick:has(input:disabled):hover img { transform: none; }
.pick input:disabled { cursor: not-allowed; }
.create:not(.is-bundle) .roomname__many, .create.is-bundle .roomname__one { display: none; }
.create__bundle[hidden] { display: none; }
/* Organizar: o conteudo de agora e o botao de troca-lo (abre os cartoes de Criar sala). */
.contentnow__row { display: flex; align-items: center; justify-content: space-between; gap: var(--s2) var(--s3); flex-wrap: wrap; }
.contentnow__name { min-width: 0; font-weight: 600; color: var(--text); overflow-wrap: anywhere; }

/*
 * O subtitulo de uma sala com varios conteudos: os dois primeiros e "+N" (no
 * celular os nomes vao ate duas linhas, cortam com reticencias e o +N fica). Com mouse,
 * passar por cima abre a dica com todos; no toque, a pagina da sala mostra a
 * lista inteira.
 */
.bundle { position: relative; display: block; min-width: 0; }
/* Os conteudos sao o subtitulo, mais quietos que o nome da sala acima deles. */
.quest__extra.bundle, .events__extra.bundle { font: 600 15px/1.35 var(--font-body); color: var(--text-2); text-wrap: initial; }
.quest--compact .quest__extra.bundle { font-size: 15px; }
.bundle__line { display: flex; align-items: center; gap: var(--s2); min-width: 0; }
.bundle__names { min-width: 0; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow-wrap: anywhere; }
.bundle__more {
  flex: none; padding: 0 7px; border-radius: 6px; background: var(--surface-3); border: 1px solid var(--line-strong);
  color: var(--text-2); font: 600 12.5px/20px var(--font-data); letter-spacing: 0;
}
.bundle__tip {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 30; display: grid; gap: var(--s2);
  width: max-content; max-width: min(340px, calc(100vw - 48px)); padding: var(--s3);
  background: var(--surface-3); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: var(--shadow-pop);
  font: 500 14.5px/1.3 var(--font-body); color: var(--text); white-space: normal;
  opacity: 0; transform: translateY(-4px); pointer-events: none;
  transition: opacity 140ms var(--ease), transform 140ms var(--ease);
}
.bundle__head, .bundlefull__head { font: 600 12px/1.3 var(--font-body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); }
.bundle__list { display: grid; gap: 6px; }
.bundle__item { display: flex; align-items: center; gap: var(--s2); min-height: 22px; }
.bundle__item .tag { font-size: 12px; flex: none; }
.bundle__match { display: inline-flex; margin-left: auto; padding-left: var(--s2); color: var(--gold-text); }
.bundle__match .icon { width: 15px; height: 15px; }
@media (hover: hover) {
  .bundle:hover .bundle__tip, .events__link:focus-visible .bundle__tip { opacity: 1; transform: none; }
  .bundle:hover .bundle__more { color: var(--text); border-color: var(--gold); }
}
@media (prefers-reduced-motion: reduce) { .bundle__tip { transition: none; transform: none; } }
/* A linha da lista nao corta a dica: ela passa por cima da linha de baixo. */
.events__row:has(.bundle:hover) { position: relative; z-index: 5; }

/* Na pagina da sala, todos os conteudos, sem dica: cada um num chip. */
.bundlefull { display: grid; gap: var(--s2); margin-top: calc(-1 * var(--s1)); }
.bundle__list--full { display: flex; flex-wrap: wrap; gap: var(--s2); }
.bundle__list--full .bundle__item {
  min-height: 32px; padding: 3px 10px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line-strong);
  font: 600 14.5px/1.25 var(--font-body);
}
.bundle__list--full .bundle__item.is-match { border-color: color-mix(in srgb, var(--gold) 55%, transparent); }
.bundle__list--full .bundle__match { margin-left: 0; padding-left: 0; }
.meta__entry { color: var(--text); font-weight: 600; }
/* CP na linha da sala: as espadas em ciano; o minimo exigido no texto forte, o recomendado com a palavra ao lado. */
.meta__cp .icon { color: var(--cp); }
.meta__cp.is-required { color: var(--text); font-weight: 600; }
.meta__note { color: var(--text-2); font-weight: 400; }

/* ------------------------------------------------------------ premium */

/* A cor do visual Premium (premium.js): sem dourado (voce, agir) e sem verde (presenca confirmada). */
.look--purple { --look: #b48cff; }
.look--pink { --look: #ff86cf; }
.look--blue { --look: #74a9ff; }
.look--orange { --look: #ff9d5c; }
.look--silver { --look: #c9d1e0; }
/* Cores feitas para uma pessoa (PERSONAL_LOOKS): musgo e blase sao apagadas, longe do verde de confirmado e do dourado. */
.look--moss { --look: #a7bb6e; }
.look--sky { --look: #8fd4f5; }
.look--blase { --look: #ded08f; }
/* Laranja volei: mais vivo e mais vermelho que o laranja de todos, para os dois nao parecerem a mesma cor. */
.look--volley { --look: #ff6a1a; }
/* Carmim puxa para o vinho, longe do vermelho de perigo (--danger). */
.look--crimson { --look: #e25d74; }
/* Bronze e apagado, longe do laranja e do dourado; indigo e um azul de noite, mais escuro que o roxo e o azul. */
.look--bronze { --look: #c99a6b; }
.look--indigo { --look: #6470e0; }
/* Azul-petroleo puxa para o verde-azulado escuro, longe do verde de confirmado e do azul celeste. */
.look--petrol { --look: #4fb7c7; }
/* Rosa neon e mais vivo que o rosa de todos; o vermelho ficha e escarlate, entre o carmim e o laranja, longe do dourado de voce. */
.look--neon { --look: #ff4fa3; }
.look--chipred { --look: #ff5847; }
/* Magenta: mais roxo e mais forte que o rosa de todos. */
.look--magenta { --look: #d65ee8; }
/* Melancia e o rosa-avermelhado da fruta, entre o rosa de todos e o vermelho de perigo; azul gelo e claro e ciano laser e vivo, para nao parecerem o azul de todos. */
.look--watermelon { --look: #ff6b8b; }
.look--ice { --look: #a6e8ff; }
.look--laser { --look: #1fd4ec; }
@media (prefers-color-scheme: light) {
  .look--purple { --look: #7a4fe0; }
  .look--pink { --look: #c43d8d; }
  .look--blue { --look: #2f66d0; }
  .look--orange { --look: #bf5a14; }
  .look--silver { --look: #67708a; }
  .look--moss { --look: #5b7a2a; }
  .look--sky { --look: #1f86b8; }
  .look--blase { --look: #8a7a22; }
  .look--volley { --look: #cc3f00; }
  .look--crimson { --look: #a62239; }
  .look--bronze { --look: #8b5a2b; }
  .look--indigo { --look: #343a9e; }
  .look--petrol { --look: #1d6f7c; }
  .look--neon { --look: #d81b60; }
  .look--chipred { --look: #c62a1a; }
  .look--magenta { --look: #9a2aaa; }
  .look--watermelon { --look: #c2264f; }
  .look--ice { --look: #3a7fc0; }
  .look--laser { --look: #0a7f91; }
}

/* O brilho que corre pela borda, da esquerda para a direita, e descansa antes de passar de novo. */
.shine {
  position: absolute; inset: -1px; border-radius: 12px; padding: 1.5px; pointer-events: none;
  background: linear-gradient(100deg, transparent 0 38%, color-mix(in srgb, var(--look) 35%, #fff) 50%, transparent 62% 100%) no-repeat;
  background-size: 300% 100%; background-position: 100% 0;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: shine 4.2s cubic-bezier(.45, 0, .25, 1) infinite;
}
@keyframes shine { 0% { background-position: 100% 0; } 55%, 100% { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { .shine { animation: none; background-position: 50% 0; opacity: 0.6; } }

/* Frame Premium: a cor no fundo e na borda, a arte a direita se esmaecendo para o nome
   continuar legivel, e o brilho. O conteudo fica por cima da camada do fundo. */
.unit.is-premium {
  background: linear-gradient(90deg, color-mix(in srgb, var(--look) 20%, var(--surface-2)), color-mix(in srgb, var(--look) 7%, var(--surface-2)) 70%);
  border-color: color-mix(in srgb, var(--look) 50%, transparent);
}
.unit.is-premium > * { position: relative; }
.unit.is-premium > .unit__look { position: absolute; inset: -1px; border-radius: 12px; overflow: hidden; pointer-events: none; }
.unit__art {
  position: absolute; right: 2px; top: 50%; height: 112%; width: auto; transform: translateY(-50%);
  opacity: 0.6; -webkit-mask-image: linear-gradient(90deg, transparent, #000 55%); mask-image: linear-gradient(90deg, transparent, #000 55%);
}
.unit.is-premium:not(.has-art) .unit__art { display: none; }
/* Voce (dourado) e presenca confirmada (verde) continuam dizendo isso pela borda. */
.unit.is-premium.is-confirmed { border-color: color-mix(in srgb, var(--ok) 55%, transparent); }
.unit.is-premium.is-you { border-color: color-mix(in srgb, var(--gold) 60%, transparent); }
@media (prefers-color-scheme: light) { .unit__art { opacity: 0.5; } }

/* Sala de quem e Premium: no topo da lista, na cor de quem criou, com o brilho na borda. */
.events__row.is-featured .events__link {
  position: relative;
  background: linear-gradient(90deg, color-mix(in srgb, var(--look) 12%, var(--surface)), var(--surface) 65%);
  border-color: color-mix(in srgb, var(--look) 50%, transparent);
}
.events__row.is-featured .events__link:hover { background: linear-gradient(90deg, color-mix(in srgb, var(--look) 16%, var(--surface-2)), var(--surface-2) 65%); }
.events__row.is-featured.is-mine .events__link { border-color: color-mix(in srgb, var(--gold) 45%, transparent); }
.pill--featured { background: color-mix(in srgb, var(--look) 18%, transparent); color: var(--look); }

/* Perfil: o visual do frame. */
.looks__head { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.looks__head .h2 { margin: 0; }
.looks__preview .unit { animation: none; }
.swatches, .artopts { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-wrap: wrap; gap: var(--s2); }
.swatches legend, .artopts legend { width: 100%; }
.swatch {
  position: relative; display: inline-flex; align-items: center; gap: var(--s2); min-height: 44px; padding: 0 14px 0 10px;
  border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line-strong); font-weight: 600; font-size: 14.5px; cursor: pointer;
}
.swatch input, .artopt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.swatch__dot { width: 18px; height: 18px; border-radius: 50%; background: var(--look); box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.2); }
.swatch:hover { border-color: color-mix(in srgb, var(--look) 60%, transparent); }
.swatch:has(input:checked) { border-color: var(--look); background: color-mix(in srgb, var(--look) 16%, var(--surface-2)); box-shadow: inset 0 0 0 1px var(--look); }
.swatch:has(input:focus-visible), .artopt:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }
.artopt { position: relative; display: grid; gap: 6px; width: 132px; font-size: 14px; font-weight: 600; cursor: pointer; }
.artopt__box {
  display: grid; place-items: center; aspect-ratio: 5 / 3; border-radius: 10px; overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--line-strong); color: var(--text-3);
}
.artopt__box img { width: 100%; height: 100%; object-fit: contain; }
.artopt:hover .artopt__box { border-color: var(--text-3); }
.artopt:has(input:checked) .artopt__box { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); background: var(--gold-wash); }
