/* Comunidade: primeiro o encontro, depois as escolhas da partida. */
.community-page { width: 100%; max-width: 1040px; min-width: 0; margin-inline: auto; }
.community-page > *, .community-page #community-content > * { min-width: 0; }
.community-page h1, .community-page h2, .community-page h3 { color: var(--text); }
.community-page p { max-width: 64ch; }
.community-page svg { width: 20px; height: 20px; flex: 0 0 20px; }
.community-page button { box-shadow: none; }
.community-page button:focus-visible, .community-page a:focus-visible {
  outline: 2px solid var(--good); outline-offset: 4px;
}
.community-page .community-status { margin: .6rem 0; color: var(--muted); font-size: .88rem; }
.community-page .community-status:empty { display: none; }
.community-page .community-status[data-error="true"] { color: var(--error); }
.community-header { display: flex; flex-wrap: wrap; align-items: center; gap: 1.2rem; margin-bottom: 2rem; }
.community-header h1 { margin: 0 0 .6rem; }
.community-header p { margin: 0; color: var(--muted); }
.community-personal-button { display: inline-flex; align-items: center; gap: .7rem; padding: .5rem .8rem .5rem .55rem; background: transparent; white-space: nowrap; }
.community-personal-button img { display: block; width: 36px; height: 36px; border-radius: 8px; }
.community-personal-button span { font-size: .86rem; }
.community-tabs, .community-detail-tabs { display: flex; gap: 1.4rem; border-bottom: 1px solid var(--line); margin-bottom: 1.7rem; }
.community-tabs button, .community-detail-tabs button { position: relative; display: inline-flex; align-items: center; gap: .55rem; padding: .7rem .15rem 1rem; border: 0; border-radius: 0; background: transparent; color: var(--muted); }
.community-tabs button:hover:not(:disabled), .community-detail-tabs button:hover:not(:disabled) { color: var(--text); background: transparent; }
.community-tabs button[aria-selected="true"], .community-detail-tabs button[aria-selected="true"] { color: var(--text); font-weight: 650; }
.community-tabs button[aria-selected="true"]::after, .community-detail-tabs button[aria-selected="true"]::after { content: ""; position: absolute; inset: auto 0 -1px; height: 3px; background: var(--good); border-radius: 2px 2px 0 0; }
.community-tabs button[aria-selected="true"] svg, .community-detail-tabs button[aria-selected="true"] svg { color: var(--good); }
.community-workspace { min-width: 0; }
.community-join { display: flex; flex-direction: column; align-items: flex-start; gap: .85rem; padding: 1.15rem 1.3rem; margin: 0 0 2rem; border-radius: 9px; background: var(--panel); border: 1px solid var(--line); }
.community-join h2 { margin: 0 0 .2rem; font-size: 1.02rem; }
.community-join p { margin: 0; color: var(--muted); font-size: .86rem; }
.community-join form { display: flex; align-items: end; gap: .55rem; width: min(100%, 380px); min-width: 0; }
.community-join form label { display: grid; gap: .35rem; min-width: 0; flex: 1; font-size: .8rem; }
.community-join input { width: 100%; min-width: 0; padding: .65rem .8rem; font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.community-join form button { display: inline-flex; align-items: center; gap: .45rem; flex: none; padding-inline: .9rem; }
.community-section-head { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; margin: 0 0 1.1rem; }
.community-section-head h2 { margin: 0; font-size: 1.2rem; }
.community-section-head p { margin: .25rem 0 0; color: var(--muted); font-size: .88rem; }
.community-section-head > button { display: inline-flex; align-items: center; gap: .5rem; flex: none; }
.community-entries { display: grid; border-top: 1px solid var(--line); }
.community-entry { display: flex; align-items: center; width: 100%; gap: 1rem; padding: 1.15rem .6rem; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; text-align: left; }
.community-entry:hover:not(:disabled) { background: var(--panel); }
.community-entry > span:not(.community-entry-icon):not(.community-room-state):not(.community-entry-arrow) { display: grid; gap: .3rem; min-width: 0; flex: 0 1 auto; }
.community-entry strong { font-size: 1rem; font-weight: 600; overflow-wrap: anywhere; }
.community-entry small { color: var(--muted); font-size: .82rem; }
.community-entry-icon { display: grid; place-items: center; flex: 0 0 42px; width: 42px; height: 42px; color: var(--muted); background: var(--panel2); border-radius: 9px; }
.community-room-state { flex: none; display: inline-flex; align-items: center; gap: .4rem; font-size: .77rem; color: var(--muted); white-space: nowrap; }
.community-room-state::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.community-room-state[data-state="active"] { color: var(--good); }
.community-room-state[data-state="active"]::before { background: var(--good); }
.community-entry-arrow { display: flex; flex: none; margin-left: auto; color: var(--muted); }
.community-entry:hover .community-entry-arrow { color: var(--good); }
.community-empty { display: grid; justify-items: center; padding: 2.8rem 1rem 3rem; text-align: center; border: 1px solid var(--line); border-radius: 10px; }
.community-empty h3 { margin: 1.15rem 0 .45rem; font-size: 1.14rem; }
.community-empty p { max-width: 38ch; margin: 0 0 1.2rem; color: var(--muted); font-size: .92rem; }
.community-empty-art { display: flex; align-items: center; padding-right: 6px; }
.community-empty-art img { display: block; width: 56px; height: 56px; border: 3px solid var(--bg); border-radius: 13px; }
.community-empty-art img + img { margin-left: -7px; transform: rotate(5deg); }
.community-solo { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; }
.community-solo p { margin: 0; }
.community-solo button { display: inline-flex; align-items: center; gap: .45rem; background: transparent; border: 0; color: var(--good); padding: .4rem .15rem; font-size: .88rem; white-space: nowrap; }
.community-solo button:hover:not(:disabled) { background: transparent; color: var(--text); }
.community-flow { max-width: 820px; margin-inline: auto; }
.community-flow-head { margin: 0 0 1.8rem; }
.community-flow-head h1, .community-flow-head h2 { font-size: clamp(1.5rem, 2.3vw, 1.9rem); margin: 1.2rem 0 .5rem; }
.community-flow-head p { color: var(--muted); margin: 0; }
.community-back { display: inline-flex; align-items: center; gap: .45rem; border: 0; padding: .35rem .1rem; background: transparent; color: var(--muted); font-size: .86rem; }
.community-back:hover:not(:disabled) { color: var(--text); background: transparent; }
.community-step-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem; margin: 0 0 2rem; }
.community-step-tabs button { position: relative; display: flex; align-items: center; gap: .55rem; min-width: 0; padding: .75rem .1rem; border: 0; border-bottom: 2px solid var(--line); border-radius: 0; color: var(--muted); background: transparent; text-align: left; font-size: .88rem; }
.community-step-tabs button[aria-current="step"] { color: var(--text); border-bottom-color: var(--good); font-weight: 650; }
.community-step-tabs button[aria-current="step"] span:first-child { color: var(--good); }
.community-step-tabs button:hover:not(:disabled) { background: transparent; color: var(--text); }
.community-editor { padding: 1.8rem; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.community-editor form { display: grid; gap: 1.6rem; }
.community-editor fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.community-editor legend { margin-bottom: .85rem; font-size: 1.02rem; font-weight: 600; }
.community-editor fieldset > p { color: var(--muted); font-size: .87rem; margin: -.3rem 0 .85rem; }
.community-editor form > label, .community-editor fieldset > label:not(.community-choice) { display: grid; gap: .5rem; font-size: .9rem; }
.community-editor input:not([type="radio"]):not([type="checkbox"]), .community-editor textarea { width: 100%; min-width: 0; padding: .7rem .85rem; background: var(--bg); }
.community-editor input[type="text"] { max-width: 100%; }
.community-editor textarea { resize: vertical; min-height: 100px; }
.community-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
.community-choice { position: relative; display: flex; align-items: start; min-width: 0; gap: .65rem; padding: 1rem; margin: 0; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--text); cursor: pointer; font-size: .9rem; }
.community-choice:hover { border-color: var(--muted); }
.community-choice input[type="radio"] { position: absolute; width: 1px; height: 1px; min-height: 0; opacity: 0; margin: 0; pointer-events: none; }
.community-choice > span { display: grid; min-width: 0; gap: .3rem; }
.community-choice strong { font-size: .93rem; font-weight: 550; line-height: 1.4; }
.community-choice small { font-size: .8rem; line-height: 1.45; color: var(--muted); }
.community-choice:has(input:checked) { border-color: var(--good); background: var(--panel2); }
.community-choice:has(input:checked) strong { color: var(--good); }
.community-choice:has(input:focus-visible) { outline: 2px solid var(--good); outline-offset: 3px; }
.community-choice:has(input:disabled) { opacity: .5; cursor: not-allowed; }
.community-topics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.community-counts { display: flex; flex-wrap: wrap; gap: .6rem; }
.community-counts .community-choice { justify-content: center; min-width: 68px; padding: .7rem 1.1rem; text-align: center; }
.community-counts .community-choice strong { font-size: 1.1rem; }
.community-times { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.community-times .community-choice { padding: .85rem; }
.community-times .community-choice > span { width: 100%; }
.community-setup-footer { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem .8rem; padding-top: 1.3rem; margin-top: .3rem; border-top: 1px solid var(--line); }
.community-setup-footer > span:empty { display: none; }
.community-setup-footer button { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; }
#group-suggest .community-setup-footer { flex-direction: column; align-items: flex-start; gap: .55rem; }
.community-mini-summary { margin-top: 1.4rem; padding-top: 1.15rem; border-top: 1px solid var(--line); }
.community-mini-summary h2, .community-mini-summary h3 { margin: 0 0 .7rem; font-size: 1rem; }
.community-mini-summary dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 0; }
.community-mini-summary dl > div { min-width: 0; }
.community-mini-summary dt { color: var(--muted); font-size: .78rem; }
.community-mini-summary dd { margin: .2rem 0 0; font-size: .9rem; overflow-wrap: anywhere; }
.community-avatar-options { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .65rem; }
.community-avatar-options .community-choice { display: grid; justify-items: center; align-content: start; padding: .8rem .35rem; text-align: center; }
.community-avatar-options .community-choice > span { justify-items: center; gap: .55rem; }
.community-avatar-options img { display: block; width: 50px; height: 50px; border-radius: 10px; }
.community-avatar-options strong { font-size: .8rem; }
.community-color-options { display: flex; flex-wrap: wrap; gap: .6rem; }
.community-color-options .community-choice { display: flex; align-items: center; padding: .7rem .85rem; }
.community-color-options .community-choice > span { display: flex; align-items: center; gap: .5rem; }
.community-swatch { display: inline-block; width: 16px; height: 16px; flex: 0 0 16px; border-radius: 50%; background: var(--swatch, var(--good)); }
.community-swatch[data-color="lime"], .community-swatch-lime { background: #baf06d; }
.community-swatch[data-color="blue"], .community-swatch-blue { background: #67b7ff; }
.community-swatch[data-color="amber"], .community-swatch-amber { background: #ffcd70; }
.community-swatch[data-color="violet"], .community-swatch-violet { background: #ba9eff; }
.community-swatch[data-color="coral"], .community-swatch-coral { background: #ff9885; }
.community-personal-preview { display: flex; align-items: center; gap: 1rem; margin: 0 0 1.8rem; padding-bottom: 1.3rem; border-bottom: 1px solid var(--line); }
.community-personal-preview img { display: block; width: 72px; height: 72px; flex: 0 0 72px; border-radius: 14px; }
.community-personal-preview h2, .community-personal-preview h3 { margin: 0 0 .3rem; font-size: 1.15rem; }
.community-personal-preview p { color: var(--muted); font-size: .87rem; margin: 0; }
.community-code { display: inline-flex; align-items: center; gap: .6rem; max-width: 100%; }
.community-code > span { color: var(--muted); font-size: .78rem; }
.community-code code { padding: .55rem .75rem; border: 1px solid var(--line); background: var(--bg); border-radius: 6px; font-size: .85rem; letter-spacing: .045em; white-space: nowrap; }
.community-code button { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem .7rem; font-size: .8rem; }
.community-page .community-top { flex-wrap: wrap; justify-content: flex-start; margin-bottom: 1.3rem; }
.community-page .panel { margin-bottom: 1rem; }
.community-page .community-loading { min-height: 13rem; border: 1px solid var(--line); border-radius: 10px; background: transparent; }
.community-page .community-loading-orbit img { animation: none; }
.community-page .community-loading-line { display: none; }
.community-page .community-loading strong { color: var(--muted); font-size: .95rem; font-weight: 500; }
.community-page .arena-header { gap: 1.5rem; background: var(--panel); padding: 1.4rem; margin-bottom: 1.3rem; border: 1px solid var(--line); border-radius: 10px; }
.community-page .arena-header h1, .community-page .arena-header h2 { margin: 0 0 .5rem; font-size: clamp(1.45rem, 2.5vw, 1.9rem); overflow-wrap: anywhere; }
.community-page .arena-header-copy > p { margin: .6rem 0 0; font-size: .9rem; }
.community-page .arena-header .community-code { margin-top: .8rem; }
.community-page .arena-host { gap: .65rem; }
.community-page .arena-host strong { font-size: .92rem; }
.community-page .arena-host small { font-size: .78rem; }
.community-page .arena-live { padding: .3rem .6rem; font-size: .78rem; }
.community-page .arena-live.is-live::before { animation: none; box-shadow: none; }
.community-page .arena-layout { gap: 1.3rem; }
.community-page .arena-question { padding: 1.6rem; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.community-page .arena-question h2 { max-width: 35ch; margin: 1rem 0 1.5rem; font-size: clamp(1.3rem, 2.2vw, 1.75rem); font-weight: 600; line-height: 1.35; }
.community-page .arena-question .community-options { grid-template-columns: minmax(0, 1fr); gap: .6rem; }
.community-page .arena-question .arena-option { display: grid; grid-template-columns: 1.8rem minmax(0, 1fr); gap: .8rem; min-height: 60px; padding: .8rem 1rem; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 7px; box-shadow: none; font-size: .95rem; line-height: 1.45; }
.community-page .arena-question .arena-option:hover:not(:disabled) { background: var(--panel2); border-color: var(--muted); box-shadow: none; filter: none; transform: none; }
.community-page .arena-question .arena-option[aria-pressed="true"] { border-color: var(--good); background: var(--panel2); box-shadow: inset 3px 0 var(--good); }
.community-page .arena-symbol { display: none; }
.community-page .arena-letter { display: grid; place-items: center; width: 1.8rem; height: 1.8rem; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); font-size: .82rem; font-weight: 550; }
.community-page .arena-option[aria-pressed="true"] .arena-letter { color: var(--good); border-color: var(--good); }
.community-page .arena-code { color: var(--text); background: var(--bg); padding: 1rem; border: 1px solid var(--line); border-radius: 7px; font-size: .87rem; }
.community-page .arena-waiting { min-height: 16rem; background: var(--panel); }
.community-page .arena-waiting h2 { margin-top: 0; }
.community-page .arena-waiting p { color: var(--muted); margin-bottom: 0; }
.community-page .arena-clock { width: min(100%, 9rem); font-size: .82rem; }
.community-page .arena-clock.is-urgent { color: var(--error); }
.community-page .arena-clock.is-urgent progress { accent-color: var(--error); }
.community-page .arena-score { padding: 1.25rem; border: 1px solid var(--line); border-radius: 10px; background: transparent; }
.community-page .arena-score-head h2 { margin: 0 0 1rem; font-size: 1.12rem; }
.community-page .arena-score .community-score { gap: 0; }
.community-page .arena-score .community-score li { grid-template-columns: 1.2rem 2rem minmax(0, 1fr) auto; gap: .6rem; padding: .9rem 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.community-page .arena-score .community-score li:last-child { border-bottom: 0; }
.community-page .arena-score .community-score li.is-leading { background: transparent; }
.community-page .arena-rank { color: var(--muted); font-size: .8rem; font-weight: 550; }
.community-page .arena-score .community-avatar { width: 30px; height: 30px; border-radius: 7px; outline-width: 1px; }
.community-page .arena-player strong { color: var(--text); font-size: .88rem; line-height: 1.35; }
.community-page .arena-player small { font-size: .74rem; }
.community-page .arena-points { font-size: 1.02rem; color: var(--good); white-space: nowrap; }
.community-page .arena-points small { font-size: .74rem; }
.community-page .arena-score-bar { background: var(--line); position: relative; overflow: hidden; height: 3px; margin-top: .2rem; }
.community-page .arena-score-bar::after { content: ""; display: block; width: var(--score, 0%); height: 100%; background: var(--good); }
.community-page .community-result { display: grid; gap: .35rem; padding: 1.1rem; border: 1px solid var(--good); border-radius: 8px; background: var(--panel2); color: var(--good); font-size: .96rem; }
.community-page .community-result small { font-weight: 400; font-size: .84rem; color: var(--muted); }
.community-page .community-result.is-review { border-color: var(--gold); background: var(--panel2); color: var(--text); }
.community-page .arena-events { border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 1.5rem 0 0; margin-top: 1rem; background: transparent; }
.community-page .arena-events h2 { margin-bottom: .4rem; font-size: 1rem; }
.community-room-controls { display: flex; padding-top: 1.1rem; margin-top: .6rem; border-top: 1px solid var(--line); }
.community-page .community-room-danger { color: var(--error); background: transparent; border-color: var(--line); }
.community-page .community-room-danger:hover:not(:disabled) { color: var(--error); background: var(--panel2); border-color: var(--error); }
.community-room-confirm { max-width: 600px; margin: 1rem 0 0; padding: 1.2rem 1.4rem; border: 1px solid var(--line); border-left: 3px solid var(--error); border-radius: 8px; background: var(--panel); }
.community-room-confirm h2 { margin: 0 0 .5rem; font-size: 1.15rem; }
.community-room-confirm p { color: var(--muted); font-size: .9rem; }
.community-room-confirm .actions { display: flex; flex-wrap: wrap; gap: .7rem; }
.community-page .arena-events .community-events { max-height: 14rem; padding-left: 1.2rem; color: var(--muted); font-size: .8rem; }
.community-page .community-report { gap: 0; }
.community-page .community-report article { padding: 1rem 0; font-size: .9rem; }
.community-page .community-report article strong { font-weight: 550; }
.community-page .community-report article span { color: var(--muted); }
.community-suggestions { display: grid; gap: 0; margin: 1.5rem 0 0; padding: 0; list-style: none; }
.community-suggestion-entry { padding: 1.1rem 0; border-top: 1px solid var(--line); }
.community-suggestion-entry strong { display: block; margin-bottom: .3rem; font-size: .86rem; font-weight: 550; }
.community-suggestion-entry p { margin: 0; font-size: .9rem; overflow-wrap: anywhere; }
.community-suggestion-entry small { color: var(--muted); }
@media (min-width: 1050px) {
  .community-page .arena-layout { grid-template-columns: minmax(0, 1.6fr) minmax(260px, .75fr); align-items: start; }
  .community-page .arena-header { grid-template-columns: minmax(0, 1.3fr) minmax(230px, .7fr); }
}
@media (max-width: 760px) {
  .community-header { align-items: start; gap: 1rem; }
  .community-personal-button { padding: .45rem; }
  .community-personal-button span { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .community-join { align-items: stretch; flex-direction: column; gap: .9rem; padding: 1.15rem; }
  .community-join form { flex-basis: auto; }
  .community-page .arena-header { grid-template-columns: 1fr; }
  .community-page .arena-layout { grid-template-columns: minmax(0, 1fr); }
  .community-entry { flex-wrap: wrap; gap: .6rem .8rem; }
  .community-entry .community-room-state { margin-left: 54px; order: 2; width: calc(100% - 54px); }
  .community-entry-arrow { margin-left: auto; }
}
@media (max-width: 520px) {
  .community-header { margin-bottom: 1.4rem; }
  .community-header h1 { font-size: 1.9rem; }
  .community-header p { font-size: .9rem; }
  .community-tabs, .community-detail-tabs { margin-bottom: 1.2rem; }
  .community-tabs button, .community-detail-tabs button { font-size: .9rem; padding-bottom: .8rem; }
  .community-section-head { align-items: start; gap: .7rem; }
  .community-section-head h2 { padding-top: .55rem; font-size: 1.08rem; }
  .community-section-head > button { padding-inline: .75rem; font-size: .85rem; }
  .community-section-head > button svg { display: none; }
  .community-empty { padding: 2.2rem 1rem; }
  .community-solo { align-items: start; flex-direction: column; gap: .3rem; }
  .community-flow-head h1, .community-flow-head h2 { margin-top: .9rem; }
  .community-step-tabs { gap: .55rem; margin-bottom: 1.25rem; }
  .community-step-tabs button { align-items: start; gap: .4rem; font-size: .78rem; padding-block: .6rem; }
  .community-editor { padding: 1.15rem; }
  .community-editor form { gap: 1.4rem; }
  .community-choices, .community-topics { grid-template-columns: minmax(0, 1fr); }
  .community-choice { padding: .85rem; }
  .community-times { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .community-avatar-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .community-avatar-options .community-choice { padding-block: .8rem; }
  .community-setup-footer { gap: .6rem; }
  .community-setup-footer button { padding-inline: .8rem; font-size: .86rem; }
  .community-mini-summary dl { gap: 1rem .7rem; }
  .community-page .arena-question { padding: 1.15rem; }
  .community-page .arena-question .arena-option { padding: .8rem; gap: .6rem; }
  .community-page .arena-header { padding: 1.15rem; }
  .community-code { gap: .4rem; flex-wrap: wrap; }
  .community-code > span { flex-basis: 100%; }
  .community-code code { font-size: .76rem; padding-inline: .5rem; }
  .community-code button { padding-inline: .55rem; }
  .community-code button svg { width: 16px; height: 16px; flex-basis: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .community-page *, .community-page *::before, .community-page *::after { animation: none !important; transition: none !important; }
}
@media (max-width: 360px) {
  .community-join form { display: grid; grid-template-columns: minmax(0, 1fr); }
  .community-join form button { width: 100%; justify-content: center; }
}
