/* =====================================================================
   FARIAS TRUCO — Black Luxury Gaming
   Base, tokens, componentes, home e lobby.  (mesa: table.css)
   ===================================================================== */

@font-face {
  font-family: "Cinzel";
  src: url("../fonts/cinzel-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 400 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Cinzel";
  src: url("../fonts/cinzel-latin-ext-wght-normal.woff2") format("woff2-variations");
  font-weight: 400 900; font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 200 800; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-latin-ext-wght-normal.woff2") format("woff2-variations");
  font-weight: 200 800; font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* paleta */
  --onyx: #000000;
  --jet: #070708;
  --graphite: #18181b;
  --graphite-2: #222226;
  --smoke: #2e2e33;
  --ash: #8d8b86;
  --mist: #c9c6bf;
  --white: #ffffff;
  --ivory: #f7f2e6;
  --gold: #c9a45c;
  --gold-hi: #f3dca0;
  --gold-lo: #7a5a22;
  --platinum: #c3c8d0;
  --crimson: #a8132b;
  --ok: #6fcf97;
  --bad: #e5675c;

  --foil: linear-gradient(135deg, #7a5a22 0%, #c9a45c 22%, #f3dca0 45%, #c9a45c 62%, #8e6a2c 82%, #e8cc8a 100%);
  --foil-soft: linear-gradient(135deg, rgba(243,220,160,.20), rgba(201,164,92,.06) 55%, rgba(243,220,160,.14));
  --hairline: rgba(201,164,92,.28);
  --hairline-2: rgba(255,255,255,.07);

  --f-display: "Cinzel", "Trajan Pro", Georgia, serif;
  --f-ui: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --r-s: 10px;
  --r-m: 16px;
  --r-l: 26px;
  --shadow-deep: 0 24px 60px -18px rgba(0,0,0,.9), 0 2px 0 rgba(255,255,255,.03) inset;
  --ease: cubic-bezier(.2,.8,.2,1);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; height: 100%; }
body {
  margin: 0; min-height: 100%;
  background: var(--onyx);
  color: var(--ivory);
  font-family: var(--f-ui);
  font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}
body::before { /* luz ambiente: um único foco de cima */
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(120% 70% at 50% -12%, rgba(243,220,160,.10), transparent 58%),
    radial-gradient(90% 60% at 50% 120%, rgba(201,164,92,.05), transparent 60%);
}
#app { position: relative; z-index: 1; min-height: 100dvh; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--gold-hi); }
img, svg { display: block; }
:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- type */
.display { font-family: var(--f-display); font-weight: 700; letter-spacing: .06em; line-height: 1.05; }
.foil-text {
  background: var(--foil); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.muted { color: var(--ash); }
.small { font-size: .86rem; }
h1, h2, h3 { margin: 0; font-weight: 700; }
h2 { font-size: 1.15rem; letter-spacing: .01em; }

/* ---------------------------------------------------------------- buttons */
.btn {
  --h: 52px;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: var(--h); padding: 0 1.4em; border-radius: 999px;
  border: 1px solid var(--hairline); background: var(--graphite-2); color: var(--ivory);
  font-weight: 700; font-size: 1rem; letter-spacing: .01em; text-decoration: none;
  transition: transform .15s var(--ease), background .2s, border-color .2s, box-shadow .2s;
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.btn:hover { border-color: rgba(243,220,160,.5); background: var(--smoke); }
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn-gold {
  background: var(--foil); color: #1b1203; border: 0;
  box-shadow: 0 10px 30px -10px rgba(201,164,92,.65), inset 0 1px 0 rgba(255,255,255,.55), inset 0 -2px 0 rgba(0,0,0,.18);
  text-shadow: 0 1px 0 rgba(255,255,255,.35);
}
.btn-gold:hover { background: var(--foil); filter: brightness(1.06); }
.btn-ghost { background: transparent; }
.btn-danger { color: #ffb4aa; border-color: rgba(229,103,92,.35); }
.btn-block { width: 100%; }
.btn-sm { --h: 40px; padding: 0 1em; font-size: .9rem; }
.btn-xs { --h: 32px; padding: 0 .8em; font-size: .8rem; }
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--hairline-2); background: rgba(255,255,255,.03); color: var(--mist);
  transition: background .2s, color .2s, border-color .2s;
}
.icon-btn:hover { color: var(--gold-hi); border-color: var(--hairline); }
.icon-btn svg { width: 20px; height: 20px; }
.badge-dot { position: absolute; top: 6px; right: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--gold-hi); box-shadow: 0 0 0 2px var(--onyx); }

/* ---------------------------------------------------------------- forms */
.field { display: grid; gap: 6px; }
.field > span { font-size: .85rem; color: var(--mist); }
.input {
  width: 100%; min-height: 50px; padding: 0 16px; border-radius: 14px;
  border: 1px solid var(--hairline-2); background: rgba(255,255,255,.035); color: var(--ivory);
  transition: border-color .2s, background .2s;
}
.input::placeholder { color: #6b6964; }
.input:focus { outline: none; border-color: var(--gold); background: rgba(255,255,255,.06); }
.code-input { font-family: var(--f-display); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: 1.1rem; }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid var(--hairline-2); }
.seg button { min-height: 42px; border: 0; border-radius: 10px; background: transparent; color: var(--mist); font-weight: 600; font-size: .92rem; }
.seg button[aria-pressed="true"] { background: var(--graphite-2); color: var(--gold-hi); box-shadow: inset 0 0 0 1px var(--hairline); }
.seg button[disabled] { opacity: .5; cursor: default; }

.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 4px 0; }
.switch input { appearance: none; width: 46px; height: 28px; border-radius: 99px; background: var(--smoke); position: relative; flex: none; transition: background .2s; cursor: pointer; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--mist); transition: transform .2s var(--ease), background .2s; }
.switch input:checked { background: var(--gold-lo); }
.switch input:checked::after { transform: translateX(18px); background: var(--gold-hi); }
.switch input:disabled { opacity: .5; cursor: default; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px; }
select.input option { background: var(--graphite); }

/* ---------------------------------------------------------------- panels */
.panel {
  position: relative; border-radius: var(--r-l); padding: 22px;
  background: linear-gradient(180deg, rgba(34,34,38,.82), rgba(16,16,18,.92));
  border: 1px solid var(--hairline-2);
  box-shadow: var(--shadow-deep);
}
.panel-gilt { border: 1px solid var(--hairline); }
.panel-gilt::before { /* filete dourado interno */
  content: ""; position: absolute; inset: 6px; border-radius: calc(var(--r-l) - 6px);
  border: 1px solid rgba(201,164,92,.12); pointer-events: none;
}
.stack { display: grid; gap: 14px; }
.stack > p, .stack > h2, .panel > h2 { margin: 0; }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }

/* ---------------------------------------------------------------- avatar */
.avatar {
  --s: 44px; position: relative; width: var(--s); height: var(--s); border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #34343a, #121214 70%);
  box-shadow: inset 0 0 0 1.5px rgba(201,164,92,.55), 0 6px 16px -6px rgba(0,0,0,.9);
  color: var(--gold-hi);
}
.avatar svg { width: 54%; height: 54%; }
.avatar.is-bot { color: var(--platinum); box-shadow: inset 0 0 0 1.5px rgba(195,200,208,.5), 0 6px 16px -6px rgba(0,0,0,.9); }
.avatar.lg { --s: 64px; }
.avatar.xl { --s: 88px; }

/* ---------------------------------------------------------------- toasts & modal */
.toasts { position: fixed; left: 50%; top: calc(14px + var(--safe-t)); transform: translateX(-50%); z-index: 200; display: grid; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
.toast {
  pointer-events: auto; padding: 12px 16px; border-radius: 14px; font-size: .92rem;
  background: rgba(24,24,27,.96); border: 1px solid var(--hairline); color: var(--ivory);
  box-shadow: 0 16px 40px -12px rgba(0,0,0,.9);
  animation: toastIn .35s var(--ease);
}
.toast.err { border-color: rgba(229,103,92,.5); }
.toast.out { animation: toastOut .3s var(--ease) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-10px); } }

.modal-back {
  position: fixed; inset: 0; z-index: 150; display: grid; place-items: end center;
  background: rgba(0,0,0,.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  animation: fadeIn .25s ease;
}
.modal {
  width: min(100%, 520px); max-height: 92dvh; overflow: auto;
  border-radius: 26px 26px 0 0; padding: 26px 22px calc(22px + var(--safe-b));
  background: linear-gradient(180deg, #1d1d21, #0c0c0d);
  border: 1px solid var(--hairline); border-bottom: 0;
  animation: sheetUp .38s var(--ease);
}
.modal h2 { font-family: var(--f-display); font-size: 1.35rem; letter-spacing: .05em; margin-bottom: 4px; }
.modal .close { position: absolute; }
@media (min-width: 640px) {
  .modal-back { place-items: center; }
  .modal { border-radius: 26px; border-bottom: 1px solid var(--hairline); padding-bottom: 26px; }
}
@keyframes fadeIn { from { opacity: 0; } }
@keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } }

.avatar-pick { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.avatar-pick button { border: 0; background: none; padding: 0; border-radius: 50%; display: grid; place-items: center; }
.avatar-pick button .avatar { --s: 48px; transition: transform .15s; }
.avatar-pick button[aria-pressed="true"] .avatar { box-shadow: inset 0 0 0 2px var(--gold-hi), 0 0 0 3px rgba(243,220,160,.25); transform: scale(1.06); }

/* ---------------------------------------------------------------- logo */
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.logo-mark { width: 44px; height: 44px; flex: none; }
.logo-word { font-family: var(--f-display); font-weight: 800; font-size: 1.18rem; letter-spacing: .16em; line-height: 1; }
.logo-word small { display: block; white-space: nowrap; font-family: var(--f-ui); font-weight: 600; font-size: .62rem; letter-spacing: .34em; color: var(--ash); margin-top: 5px; }

/* ===================================================================== HOME */
.home { min-height: 100dvh; display: grid; grid-template-rows: auto 1fr; overflow-x: clip; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: calc(14px + var(--safe-t)) 18px 10px; max-width: 1180px; width: 100%; margin: 0 auto; }
.me-chip { display: flex; align-items: center; gap: 10px; padding: 4px 4px 4px 14px; border-radius: 999px; border: 1px solid var(--hairline-2); background: rgba(255,255,255,.03); color: var(--ivory); }
.me-chip .avatar { --s: 36px; }
.me-chip strong { font-size: .92rem; max-width: 9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.home-main { width: 100%; max-width: 1180px; margin: 0 auto; padding: 6px 18px calc(40px + var(--safe-b)); display: grid; gap: 22px; align-content: start; }

/* palco do herói: a mesa preta com as três manilhas */
.hero { position: relative; display: grid; justify-items: center; text-align: center; padding: 10px 0 0; }
.hero-title { font-size: clamp(2.5rem, 11vw, 5.2rem); font-weight: 800; letter-spacing: .1em; margin: 4px 0 0; }
.hero-title span { display: block; }
.hero-title .t2 { font-size: .52em; letter-spacing: .62em; margin-top: .25em; padding-left: .62em; }
.hero-sub { color: var(--mist); max-width: 30ch; margin: 14px auto 0; font-size: 1rem; }
.hero-stage { position: relative; width: min(100%, 460px); height: clamp(170px, 46vw, 230px); margin-top: 8px; }
.hero-stage .rail {
  position: absolute; left: -10%; right: -10%; bottom: -60%; height: 120%; border-radius: 50%;
  background: radial-gradient(60% 55% at 50% 40%, #1b1b1e 0%, #0b0b0c 62%, #000 100%);
  box-shadow: 0 -1px 0 rgba(243,220,160,.55), 0 -12px 40px -16px rgba(243,220,160,.35), inset 0 2px 0 #000, inset 0 10px 30px rgba(0,0,0,.8);
}
.hero-stage .rail::before { content: ""; position: absolute; inset: 10px; border-radius: 50%; border-top: 1px solid rgba(201,164,92,.35); }
.hero-fan { position: absolute; left: 50%; bottom: 18%; width: 0; height: 0; }
.hero-fan .card { position: absolute; left: 0; bottom: 0; --cw: clamp(78px, 22vw, 104px); transform-origin: 50% 120%; opacity: 0; animation: fanIn .9s var(--ease) forwards; }
.hero-fan .card:nth-child(1) { --r: -16deg; --x: -88%; animation-delay: .15s; }
.hero-fan .card:nth-child(2) { --r: 0deg; --x: -50%; --y: -10px; animation-delay: .3s; }
.hero-fan .card:nth-child(3) { --r: 16deg; --x: -12%; animation-delay: .45s; }
@keyframes fanIn {
  from { opacity: 0; transform: translateX(-50%) translateY(30px) rotate(0deg); }
  to { opacity: 1; transform: translateX(var(--x)) translateY(var(--y, 0)) rotate(var(--r)); }
}

.home-grid { display: grid; gap: 18px; }
.play-panel { display: grid; gap: 12px; }
.play-panel .btn-gold { --h: 60px; font-size: 1.08rem; }
.join-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.join-row .btn { --h: 50px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--ash); font-size: .82rem; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--hairline-2); }

.profile-card { display: grid; gap: 16px; }
.profile-head { display: flex; align-items: center; gap: 14px; }
.profile-head h2 { font-size: 1.2rem; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stat { padding: 12px 8px; border-radius: 14px; background: rgba(255,255,255,.03); border: 1px solid var(--hairline-2); text-align: center; }
.stat b { display: block; font-family: var(--f-display); font-size: 1.45rem; font-weight: 700; color: var(--gold-hi); line-height: 1.1; }
.stat span { font-size: .74rem; color: var(--ash); }

.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid var(--hairline-2); overflow-x: auto; }
.tabs button { flex: 1; min-height: 42px; padding: 0 14px; border: 0; border-radius: 10px; background: transparent; color: var(--mist); font-weight: 600; white-space: nowrap; }
.tabs button[aria-selected="true"] { background: var(--graphite-2); color: var(--gold-hi); box-shadow: inset 0 0 0 1px var(--hairline); }

.list { display: grid; gap: 8px; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.025); border: 1px solid var(--hairline-2); }
.list-item .grow small { display: block; color: var(--ash); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-pill { font-size: .78rem; font-weight: 700; padding: 4px 10px; border-radius: 99px; background: rgba(111,207,151,.12); color: var(--ok); }
.result-pill.loss { background: rgba(229,103,92,.12); color: #f0a198; }
.score-mini { font-family: var(--f-display); font-weight: 700; font-size: 1.05rem; color: var(--ivory); }
.rank-pos { width: 30px; text-align: center; font-family: var(--f-display); font-weight: 700; color: var(--ash); }
.rank-pos.top { color: var(--gold-hi); }
.empty { padding: 26px 10px; text-align: center; color: var(--ash); font-size: .92rem; }

.welcome { display: grid; gap: 14px; }

@media (min-width: 900px) {
  .home-main { grid-template-columns: 1.1fr .9fr; align-items: start; column-gap: 40px; padding-top: 24px; }
  .hero { grid-row: span 2; position: sticky; top: 30px; }
  .hero-stage { height: 280px; width: 520px; margin-top: 30px; }
  .hero-fan .card { --cw: 120px; }
}

/* ===================================================================== LOBBY */
.lobby { max-width: 1180px; margin: 0 auto; padding: calc(12px + var(--safe-t)) 16px calc(28px + var(--safe-b)); display: grid; gap: 16px; }
.lobby-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.code-plate { text-align: center; padding: 22px 16px 18px; }
.code-plate .code { font-family: var(--f-display); font-weight: 800; font-size: clamp(2rem, 10vw, 3.2rem); letter-spacing: .12em; line-height: 1; margin: 6px 0 4px; }
.code-plate p { margin: 0; color: var(--mist); font-size: .92rem; }
.share-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.share-row .btn { --h: 46px; padding: 0 .6em; font-size: .88rem; }
.share-row svg { width: 18px; height: 18px; }

.seatmap {
  position: relative; aspect-ratio: 1 / 1.05; width: 100%; max-width: 520px; margin: 0 auto 10px;
}
@media (min-width: 600px) { .seatmap { aspect-ratio: 1.3; } }
.seatmap .mini-table {
  position: absolute; inset: 25% 24%; border-radius: 50%;
  background: radial-gradient(60% 60% at 50% 42%, #1c1c20, #070708 75%);
  box-shadow: 0 0 0 2px #0a0a0a, 0 0 0 3px rgba(201,164,92,.55), 0 0 0 10px #121214, 0 0 0 11px rgba(201,164,92,.18), 0 30px 60px -20px #000;
  display: grid; place-items: center; text-align: center;
}
.mini-table .mt-mode { font-family: var(--f-display); font-weight: 700; letter-spacing: .08em; font-size: clamp(.9rem, 3.6vw, 1.2rem); }
.mini-table .mt-sub { color: var(--ash); font-size: .8rem; }
.lseat { position: absolute; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 4px; width: 100px; text-align: center; }
.lseat .avatar { --s: 48px; }
.lseat .nm { font-size: .8rem; font-weight: 700; max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lseat .tag { font-size: .68rem; color: var(--ash); }
.lseat.team-1 .avatar { box-shadow: inset 0 0 0 1.5px rgba(195,200,208,.6), 0 6px 16px -6px #000; }
.lseat .empty-seat { width: 48px; height: 48px; padding: 0; border-radius: 50%; border: 1.5px dashed rgba(201,164,92,.45); background: rgba(255,255,255,.02); display: grid; place-items: center; color: var(--gold); font-size: 1.4rem; }
button.empty-seat:hover { background: rgba(201,164,92,.1); border-style: solid; }
.lseat .bot-add { --h: 34px; white-space: nowrap; font-size: .74rem; padding: 0 .7em; }
.lseat { width: 92px; }
.lseat .seat-actions { display: flex; gap: 4px; }
.lseat .kick { position: absolute; top: -6px; right: 18px; width: 24px; height: 24px; border-radius: 50%; border: 1px solid rgba(229,103,92,.5); background: #1a0f0f; color: #ffb4aa; font-size: .8rem; display: grid; place-items: center; }
.lseat.me .nm { color: var(--gold-hi); }
.conn-off .avatar { opacity: .45; }

.team-legend { display: flex; justify-content: center; gap: 18px; font-size: .82rem; color: var(--mist); margin: 6px 0 10px; }
.team-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }

.lobby-grid { display: grid; gap: 16px; }
.settings-grid { display: grid; gap: 14px; }
.rules-list { margin: 0; padding-left: 1.1em; color: var(--mist); font-size: .9rem; display: grid; gap: 4px; }
.lobby-cta { position: sticky; bottom: 0; padding: 12px 0 calc(8px + var(--safe-b)); background: linear-gradient(180deg, transparent, var(--onyx) 35%); display: grid; gap: 8px; z-index: 5; }
.lobby-cta .btn-gold { --h: 58px; }
.last-result { text-align: center; padding: 14px; border-radius: 16px; background: var(--foil-soft); border: 1px solid var(--hairline); }
.last-result b { font-family: var(--f-display); font-size: 1.3rem; }

@media (min-width: 900px) {
  .lobby-grid { grid-template-columns: 1.15fr .85fr; align-items: start; }
}

/* ---------------------------------------------------------------- chat (compartilhado) */
.chat { display: grid; grid-template-rows: 1fr auto auto; gap: 10px; min-height: 0; }
.chat-log { overflow-y: auto; display: grid; align-content: start; gap: 6px; min-height: 120px; max-height: 42dvh; padding-right: 4px; overscroll-behavior: contain; }
.msg { font-size: .9rem; line-height: 1.35; padding: 7px 11px; border-radius: 12px; background: rgba(255,255,255,.04); max-width: 92%; justify-self: start; overflow-wrap: anywhere; }
.msg b { color: var(--gold-hi); font-weight: 700; margin-right: 6px; }
.msg.mine { justify-self: end; background: rgba(201,164,92,.12); }
.msg.sys { justify-self: center; background: none; color: var(--ash); font-size: .8rem; text-align: center; }
.msg.team { box-shadow: inset 0 0 0 1px rgba(201,164,92,.35); }
.msg.team::before { content: "só a equipe"; display: block; font-size: .66rem; color: var(--gold); }
.msg.spec b { color: var(--platinum); }
.msg time { margin-left: 6px; color: #6d6b66; font-size: .7rem; }
.chat-quick { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chat-quick::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 36px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--hairline-2); background: rgba(255,255,255,.04); font-size: .85rem; font-weight: 600; color: var(--ivory); }
.chip:hover { border-color: var(--hairline); }
.chip.emoji { font-size: 1.1rem; padding: 0 9px; }
.chat-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.chat-form .input { min-height: 46px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media (max-width: 420px) {
  .logo-word { font-size: 1rem; letter-spacing: .12em; }
  .logo-word small { letter-spacing: .24em; font-size: .56rem; }
  .logo-mark { width: 38px; height: 38px; }
  .topbar .btn-sm { --h: 38px; padding: 0 .9em; }
}
