:root {
  --bg: #313338;
  --bg-side: #2b2d31;
  --bg-dark: #1e1f22;
  --bg-hover: #3a3c41;
  --text: #dbdee1;
  --muted: #949ba4;
  --accent: #5865f2;
  --green: #23a559;
  --red: #da373c;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text);
  font: 15px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.hidden { display: none !important; }
.muted { color: var(--muted); }

/* login */
.login-wrap { min-height: 100%; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(ellipse at 50% 0%, #2b2d55 0%, var(--bg-dark) 60%); }
.login-cards { display: flex; flex-wrap: wrap; gap: 24px; justify-content: center; width: 100%; max-width: 860px; }
.login-card { width: 100%; max-width: 380px; background: var(--bg); padding: 28px; border-radius: 10px;
  display: flex; flex-direction: column; gap: 14px; box-shadow: 0 10px 34px rgba(0,0,0,.45);
  animation: modalIn .25s cubic-bezier(.2,.8,.3,1.05); }
.login-card h1 { margin: 0; background: linear-gradient(90deg, #8b96ff, #d0a2ff);
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.login-card h2 { margin: 0; }
.login-card label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
input { background: var(--bg-dark); border: 0; color: var(--text); padding: 10px 12px; border-radius: 6px; font: inherit; outline: none; }
input:focus { box-shadow: 0 0 0 2px var(--accent); }
button { background: var(--accent); color: #fff; border: 0; padding: 9px 14px; border-radius: 6px; font: inherit; cursor: pointer; }
button:hover { filter: brightness(1.1); }
button.danger { background: var(--red); }
button.link { background: none; color: var(--muted); padding: 2px 4px; font-size: 12px; }
button.link:hover { color: var(--text); }
.error { background: rgba(218,55,60,.2); color: #ffb3b5; padding: 8px 10px; border-radius: 6px; font-size: 13px; }
.notice { background: rgba(35,165,89,.15); color: #a3e6ba; padding: 8px 10px; border-radius: 6px; font-size: 13px; }
.inline-form { display: flex; flex-direction: column; gap: 8px; }

/* layout */
.app { display: flex; flex-direction: column; height: 100vh; }
.app-body { display: grid; grid-template-columns: 240px 1fr 200px; flex: 1; min-height: 0; }

/* server bar across the top */
#server-bar { display: flex; align-items: center; gap: 6px; padding: 8px 12px; background: var(--bg-dark);
  border-bottom: 1px solid #111214; overflow-x: auto; flex: none; }
#server-chips { display: flex; gap: 6px; }
.server-chip { background: var(--bg-hover); color: var(--muted); padding: 6px 14px; border-radius: 16px;
  font-size: 13px; white-space: nowrap; }
.server-chip:hover { color: var(--text); filter: brightness(1.15); }
.server-chip.active { background: var(--accent); color: #fff; }
#btn-new-server { width: 30px; height: 30px; padding: 0; border-radius: 50%; font-size: 16px;
  background: var(--bg-hover); color: var(--green); flex: none; }

.sidebar { background: var(--bg-side); display: flex; flex-direction: column; min-height: 0; }
.sidebar-scroll { flex: 1; min-height: 0; overflow-y: auto; padding-bottom: 8px; }

/* friends list + private messages */
.friend-add { display: flex; gap: 6px; padding: 2px 8px 8px; }
.friend-add input { flex: 1; min-width: 0; padding: 6px 8px; font-size: 13px; }
.friend-add button { padding: 6px 10px; }
.friend-list { list-style: none; margin: 0; padding: 0 8px; }
.friend-list li { display: flex; align-items: center; gap: 6px; padding: 4px 6px; border-radius: 4px;
  font-size: 13px; color: var(--muted); }
.friend-list li.friend { cursor: pointer; }
.friend-list li.friend:hover { background: var(--bg-hover); color: var(--text); }
.friend-list li.friend.active { background: var(--bg-hover); color: #fff; }
.friend-list .fname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.friend-list li.incoming { flex-wrap: wrap; }
.friend-list li.incoming button { padding: 3px 8px; font-size: 12px; }
.friend-list li.pending { font-size: 12px; }
.fdot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); opacity: .35; flex: none; }
.fdot.on { background: var(--green); opacity: 1; }
.unread { background: var(--red); color: #fff; border-radius: 10px; font-size: 11px; font-weight: 700;
  padding: 0 6px; flex: none; }
.friend-list .muted-icon { font-size: 11px; opacity: .7; flex: none; }

/* @mentions */
.mention { background: rgba(88,101,242,.35); color: #c9cdfb; border-radius: 3px; padding: 0 2px; font-weight: 600; }
.mention.me { background: rgba(241,196,15,.3); color: #f5d76e; }

/* animated rainbow name (shop item) */
.rainbow-name { background: linear-gradient(90deg, #ff3b3b, #ffb340, #f5e663, #4ddb6b, #4dc3ff, #b06bff, #ff3b3b);
  background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: rainbow-slide 4s linear infinite; }
@keyframes rainbow-slide { to { background-position: 300% 0; } }

/* title badges (GOAT, VIP, …) render as a small pill instead of a bare emoji */
.badge.title, .pf-badge.title { background: var(--accent); color: #fff; font-size: 10px; font-weight: 800;
  letter-spacing: .06em; border-radius: 8px; padding: 1px 6px; vertical-align: middle; }
.badge.bot-tag, .pf-badge.bot-tag { background: #5865f2; box-shadow: 0 0 6px rgba(88,101,242,.6); }
.pf-role { margin: 8px 16px 0; padding: 8px 10px; border-radius: 6px; font-size: 12px;
  background: rgba(88,101,242,.18); color: #c9cdfb; }
button.link.mini { font-size: 15px; padding: 0 4px; }
.me-points { font-size: 13px; font-weight: 700; color: #f5c518; white-space: nowrap; }

/* vote kick panel */
.vote-panel { position: fixed; right: 16px; bottom: 16px; z-index: 80; width: 270px; background: #111214;
  border-radius: 8px; padding: 14px; display: flex; flex-direction: column; gap: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.5); }
.vote-panel .vp-title { font-weight: 700; }
.vote-panel .vp-count { font-variant-numeric: tabular-nums; }
.vote-panel .vp-row { display: flex; gap: 8px; }
.vote-panel .vp-row button { flex: 1; }
.vote-panel .muted { font-size: 12px; }
.server-name { padding: 14px 16px; font-weight: 700; border-bottom: 1px solid var(--bg-dark);
  display: flex; align-items: center; gap: 6px; }
.server-name span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.server-name #btn-invite { font-size: 12px; white-space: nowrap; }
.section-label { display: flex; align-items: center; justify-content: space-between; }
.invite-row { display: flex; align-items: center; gap: 8px; }
.invite-row .fname { flex: 1; text-align: left; }
.section-label { text-transform: uppercase; font-size: 11px; font-weight: 700; color: var(--muted); padding: 14px 16px 4px; letter-spacing: .04em; }
.channel-list, .member-list { list-style: none; margin: 0; padding: 0 8px; }
.channel-list > li { margin: 1px 0; }
.channel { display: block; padding: 6px 10px; border-radius: 4px; color: var(--muted); cursor: pointer; user-select: none; }
.channel:hover { background: var(--bg-hover); color: var(--text); }
.channel.active { background: var(--bg-hover); color: #fff; }
.voice-members { list-style: none; margin: 2px 0 4px; padding: 0 0 0 26px; font-size: 13px; color: var(--muted); }
.voice-members li { padding: 2px 0; }
.voice-members .status-icon { position: relative; display: inline-block; margin-left: 6px; font-size: 12px; line-height: 1; }
.voice-members .status-icon::after { content: ""; position: absolute; left: -2px; right: -2px; top: 50%; height: 2px;
  background: var(--red); transform: rotate(-35deg); border-radius: 1px; box-shadow: 0 0 0 1px var(--bg-side); }
.voice-members .live { color: var(--red); font-size: 11px; font-weight: 700; margin-left: 4px; }
.voice-members li.speaking { color: var(--text); }
.voice-members li.speaking::before { content: ""; display: inline-block; width: 8px; height: 8px;
  border-radius: 50%; background: var(--green); margin-right: 6px; vertical-align: middle;
  box-shadow: 0 0 6px var(--green); }
.dm-member.speaking { color: var(--text); }
.dm-member.speaking::before { content: ""; display: inline-block; width: 8px; height: 8px;
  border-radius: 50%; background: var(--green); margin-right: 6px; vertical-align: middle;
  box-shadow: 0 0 6px var(--green); }
.voice-members li.clickable { cursor: pointer; border-radius: 4px; padding-left: 4px; }
.voice-members li.clickable:hover { background: var(--bg-hover); color: var(--text); }
button:disabled { opacity: .5; cursor: not-allowed; filter: none; }

/* user menu, challenge modal, toast */
.user-menu { position: fixed; z-index: 50; min-width: 190px; background: #111214; border-radius: 8px;
  padding: 12px; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.5); }
.user-menu .um-name { font-weight: 700; }
.user-menu .um-vol { display: flex; align-items: center; gap: 8px; }
.user-menu .um-vol-icon { font-size: 13px; }
.user-menu .um-pct { min-width: 38px; text-align: right; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.user-menu .um-pct.boost { color: var(--green); font-weight: 700; }
.user-menu .um-div { width: 100%; border: 0; border-top: 1px solid var(--bg-side); margin: 0; }
input.user-volume { flex: 1; min-width: 0; padding: 0; margin: 0; background: transparent; box-shadow: none; }
.modal { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.65); display: grid; place-items: center; padding: 16px; }
.modal-card { width: min(420px, 100%); background: var(--bg); border-radius: 10px; padding: 24px;
  display: flex; flex-direction: column; gap: 14px; text-align: center; }
.modal-card h2 { margin: 0; }
.modal-card p { margin: 0; }
.modal-row { display: flex; gap: 10px; }
.modal-row button { flex: 1; }
.big { font-size: 52px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.count { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.click-btn { height: 190px; font-size: 32px; font-weight: 800; letter-spacing: .04em; user-select: none;
  -webkit-user-select: none; touch-action: manipulation; }
.click-btn:active:not(:disabled) { transform: scale(.98); }
.bar { height: 8px; background: var(--bg-dark); border-radius: 4px; overflow: hidden; }
.bar > div { height: 100%; width: 100%; background: var(--green); }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 200; max-width: min(520px, 92vw);
  background: #111214; padding: 10px 16px; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.5); text-align: center; }
.ttt-board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: min(260px, 100%); margin: 0 auto; }
.ttt-cell { aspect-ratio: 1; padding: 0; font-size: 44px; font-weight: 800; line-height: 1; background: var(--bg-dark);
  color: var(--text); border-radius: 8px; display: grid; place-items: center; }
button.ttt-cell:hover:not(:disabled) { background: var(--bg-hover); filter: none; }
button.ttt-cell:disabled { opacity: 1; cursor: default; }
.ttt-cell.x { color: var(--accent); }
.ttt-cell.o { color: var(--green); }
.ttt-cell.win { box-shadow: inset 0 0 0 3px var(--green); }
.modal-card.wide { width: min(560px, 100%); }

/* casino */
.casino-tabs { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.casino-tab { background: var(--bg-dark); color: var(--muted); padding: 7px 12px; }
.casino-tab:hover:not(:disabled) { color: var(--text); filter: none; }
.casino-tab.active { background: var(--accent); color: #fff; }
.casino-tab.small { padding: 5px 9px; font-size: 12px; }
.casino-tab:disabled { opacity: .5; cursor: default; }
.casino-panel { min-height: 220px; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.casino-betrow { display: flex; gap: 8px; align-items: center; }
.casino-betrow input { width: 90px; }
.casino-types { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.casino-result { font-weight: 700; }
.casino-result.good { color: var(--green); }
.casino-result.bad { color: var(--red); }
/* ---- animation toolkit (disabled under prefers-reduced-motion) ---- */
@keyframes cardDeal {
  0% { opacity: 0; transform: translateY(-42px) rotateY(100deg) rotate(-8deg) scale(.55); }
  60% { opacity: 1; transform: translateY(4px) rotateY(12deg) rotate(2deg) scale(1.04); }
  100% { opacity: 1; transform: none; }
}
@keyframes cardFlip {
  0% { transform: rotateY(0); }
  49% { transform: rotateY(90deg); }
  51% { transform: rotateY(90deg) scaleX(-1); }
  100% { transform: rotateY(0) scaleX(1); }
}
@keyframes reelSettle {
  0% { transform: translateY(-14px); }
  55% { transform: translateY(4px); }
  80% { transform: translateY(-2px); }
  100% { transform: translateY(0); }
}
@keyframes msgIn { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes resultPop { 0% { opacity: 0; transform: scale(.7); } 70% { transform: scale(1.06); } 100% { opacity: 1; transform: scale(1); } }

.bj-felt { background: radial-gradient(ellipse at 50% 30%, #2f6b46, #1d4a2f 70%, #163b24);
  border-radius: 12px; padding: 18px 14px; width: 100%; box-shadow: inset 0 2px 14px rgba(0,0,0,.45);
  display: flex; flex-direction: column; gap: 10px; align-items: center; }
.bj-row { display: flex; align-items: center; justify-content: center; min-height: 56px; }
.bj-label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: rgba(255,255,255,.55); margin-bottom: -4px; }
.bj-card { min-width: 46px; padding: 9px 6px; background: #fff; color: #111; border-radius: 7px;
  font-weight: 800; font-size: 17px; text-align: center; box-shadow: 0 3px 6px rgba(0,0,0,.45);
  transition: transform .12s ease; }
.bj-card.red { color: #c0232b; }
.bj-card.back { background: repeating-linear-gradient(45deg, #2b3a67, #2b3a67 6px, #34447a 6px, #34447a 12px);
  color: transparent; border: 2px solid #1d2742; }
.bj-row .bj-card { margin-left: -16px; }
.bj-row .bj-card:first-child { margin-left: 0; }
.bj-row .bj-card:hover { transform: translateY(-5px); }
.bj-card.dealt { animation: cardDeal .38s cubic-bezier(.2,.8,.3,1.1) both; }
.bj-card.flip { animation: cardFlip .34s ease both; }
.bj-felt .muted { color: rgba(255,255,255,.72); }
.roulette-display { min-height: 90px; display: flex; flex-direction: column; gap: 8px; align-items: center; justify-content: center; }
.roulette-num { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center;
  font-size: 30px; font-weight: 800; background: #222; border: 4px solid #555;
  animation: resultPop .35s ease both; }
.roulette-num.red { border-color: #c0232b; color: #ff6b6b; }
.roulette-num.black { border-color: #111; color: #ccc; }
.roulette-num.green { border-color: var(--green); color: var(--green); }
.dice-slider { width: min(320px, 100%); }
.dice-num { font-size: 52px; font-weight: 800; font-variant-numeric: tabular-nums; animation: resultPop .3s ease both; }
.casino-result { animation: msgIn .2s ease both; }
.casino-panel { animation: fadeIn .15s ease; }
.slot-reel.settle { animation: reelSettle .32s cubic-bezier(.3,1.4,.5,1) both; }
.scratch-cell.open { animation: cardFlip .3s ease both; }

/* roulette wheel + betting table */
.rl-wrap { position: relative; width: 170px; height: 170px; }
.rl-wheel { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle, #3a2417 30%, #241408 70%, #120a04);
  border: 6px solid #5a3a22; box-shadow: 0 4px 16px rgba(0,0,0,.5), inset 0 0 24px rgba(0,0,0,.6);
  transition: transform 3.8s cubic-bezier(.12,.75,.08,1); }
.rl-wheel.spinning { transition: transform 3.8s cubic-bezier(.12,.75,.08,1); }
.rl-pocket { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px;
  display: grid; place-items: center; font-size: 10px; font-weight: 800; border-radius: 4px; }
.rl-pocket.red { background: #a12233; color: #fff; }
.rl-pocket.black { background: #15161a; color: #ddd; }
.rl-pocket.green { background: #0c6b3a; color: #fff; }
.rl-pocket.hit { outline: 2px solid #f1c40f; box-shadow: 0 0 10px #f1c40f; }
.rl-ball { position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; margin: -6px;
  border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff, #b9bcc4);
  box-shadow: 0 1px 4px rgba(0,0,0,.6); z-index: 3;
  transform: rotate(0deg) translateY(-62px); }
.rl-ball.rolling { animation: ballOrbit .5s linear infinite; }
.rl-ball.landing { transition: transform .8s cubic-bezier(.2,.7,.3,1); }
@keyframes ballOrbit {
  from { transform: rotate(0deg) translateY(-62px); }
  to { transform: rotate(-360deg) translateY(-62px); }
}
.rl-pointer { position: absolute; top: -6px; left: 50%; transform: translateX(-50%); color: #f1c40f;
  font-size: 16px; text-shadow: 0 1px 3px rgba(0,0,0,.7); z-index: 2; }
.rl-table { display: flex; align-items: stretch; gap: 6px; background: #1d4a2f; padding: 8px;
  border-radius: 10px; box-shadow: inset 0 2px 10px rgba(0,0,0,.4); }
.rl-nums { display: grid; grid-template-columns: repeat(12, 1fr); gap: 2px; flex: 1; }
.rl-cell { display: grid; place-items: center; min-width: 24px; height: 24px; font-size: 11px;
  font-weight: 800; border-radius: 3px; cursor: pointer; transition: transform .08s, box-shadow .08s; }
.rl-cell:hover { transform: scale(1.12); z-index: 2; }
.rl-cell.red { background: #a12233; color: #fff; }
.rl-cell.black { background: #15161a; color: #ddd; }
.rl-cell.green { background: #0c6b3a; color: #fff; writing-mode: vertical-lr; }
.rl-cell.out { background: rgba(255,255,255,.08); color: var(--text); min-height: 30px; }
.rl-cell.out.red { background: #a12233; }
.rl-cell.out.black { background: #15161a; }
.rl-cell.sel { outline: 2px solid #f1c40f; box-shadow: 0 0 8px rgba(241,196,15,.7); }
.rl-outs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 2px; grid-column: 1 / -1; }
.rl-table { flex-direction: column; }

/* dice tumble + slots lever */
.dice-num.rolling { animation: diceShake .12s linear infinite; color: var(--muted); }
@keyframes diceShake {
  0% { transform: translate(0, 0) rotate(-4deg); } 25% { transform: translate(2px, -3px) rotate(3deg); }
  50% { transform: translate(-2px, 2px) rotate(-3deg); } 75% { transform: translate(3px, -1px) rotate(4deg); }
  100% { transform: translate(0, 0) rotate(-4deg); }
}
.dice-num.good { color: var(--green); }
.dice-num.bad { color: var(--red); }
.slots-machine { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px;
  background: linear-gradient(180deg, #3a3d44, #26282e); box-shadow: 0 4px 14px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.08); }
.slots-machine.win-glow { box-shadow: 0 0 22px rgba(241,196,15,.55), inset 0 1px 0 rgba(255,255,255,.08); }
.slot-reel.blurring { filter: blur(2px); }
.slots-lever { width: 14px; height: 74px; cursor: pointer; position: relative; }
.slots-lever::before { content: ''; position: absolute; left: 50%; bottom: 8px; width: 5px; height: 52px;
  margin-left: -2.5px; background: linear-gradient(180deg, #aaa, #666); border-radius: 3px;
  transform-origin: bottom; transition: transform .18s ease; }
.slots-lever::after { content: ''; position: absolute; left: 50%; top: 0; width: 18px; height: 18px;
  margin-left: -9px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ff8080, #b01616);
  box-shadow: 0 2px 5px rgba(0,0,0,.5); transition: transform .18s ease; }
.slots-lever.pulled::before { transform: rotate(28deg); }
.slots-lever.pulled::after { transform: translate(9px, 37px); }

/* split hand zones */
.bj-handzone { width: 100%; padding: 6px 8px; border-radius: 8px; border: 2px solid transparent;
  display: flex; flex-direction: column; align-items: center; gap: 4px; transition: border-color .2s, background .2s; }
.bj-handzone.active { border-color: rgba(241,196,15,.7); background: rgba(241,196,15,.07); }

/* multiplayer card tables */
.tbl-top { display: flex; align-items: center; gap: 10px; justify-content: space-between; width: 100%; }
.pot-badge { background: rgba(241,196,15,.15); color: #f5d76e; border-radius: 12px; padding: 4px 10px;
  font-size: 12px; font-weight: 700; }
.pk-seats { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; width: 100%; }
.pk-seat { background: var(--bg-dark); border: 2px solid transparent; border-radius: 8px; padding: 6px 10px;
  min-width: 100px; text-align: center; transition: border-color .2s, opacity .2s; }
.pk-seat.me { background: #2b2d31; }
.pk-seat.turn { border-color: var(--green); box-shadow: 0 0 8px rgba(35,165,89,.4); }
.pk-seat.folded { opacity: .35; }
.pk-seat-name { font-weight: 700; font-size: 13px; }
.pk-seat-stack { font-size: 12px; color: var(--muted); }
.eu-trump-label { font-size: 15px; font-weight: 800; color: #f5d76e; letter-spacing: .3px; }

/* ---- euchre table, laid out like cardgames.io: three seats up top, the
   turned card and current trick in the middle, your own seat at the bottom ---- */
.eu-board { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; align-items: start;
  background: radial-gradient(ellipse at center, #1f7a4d 0%, #145636 70%, #0d3a25 100%);
  border: 6px solid #3b2a1c; border-radius: 14px; padding: 12px; margin: 10px 0; }
.eu-score { grid-column: 1 / -1; display: flex; justify-content: center; gap: 14px; }
.eu-score-cell { background: rgba(0,0,0,.35); border-radius: 8px; padding: 5px 14px; text-align: center;
  min-width: 92px; }
.eu-score-cell.us { background: rgba(241,196,15,.18); }
.eu-score-team { font-size: 11px; color: #dfe6e9; opacity: .85; }
.eu-score-num { font-size: 22px; font-weight: 800; line-height: 1.1; }
.eu-score-tag { font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.eu-seat { background: rgba(0,0,0,.4); border: 2px solid transparent; border-radius: 9px;
  padding: 5px 8px; text-align: center; transition: border-color .2s, opacity .2s; }
.eu-seat.me { background: rgba(0,0,0,.55); }
.eu-seat.turn { border-color: var(--green); box-shadow: 0 0 10px rgba(35,165,89,.55); }
.eu-seat.out { opacity: .45; }
/* the three opponents auto-place across the top row; put your own seat under them */
.eu-seat.pos-bottom { grid-column: 2; justify-self: center; }
.eu-seat-name { font-weight: 700; font-size: 13px; display: flex; align-items: center;
  justify-content: center; gap: 5px; }
.eu-dealer { background: #fff; color: #111; border-radius: 50%; width: 16px; height: 16px;
  font-size: 10px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.eu-seat-sub { font-size: 11px; color: #cfd8dc; opacity: .8; }
.eu-backs { display: flex; justify-content: center; gap: 2px; margin-top: 3px; min-height: 4px; }
.eu-back { min-width: 15px; width: 15px; height: 22px; padding: 0; font-size: 0;
  border-radius: 3px; }
.eu-back-n { font-size: 11px; align-self: center; color: #cfd8dc; }
.eu-centre { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center;
  gap: 6px; padding: 6px 0; }
.eu-upcard { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.eu-upcard-label { font-size: 11px; text-transform: uppercase; letter-spacing: 1px;
  color: #dfe6e9; opacity: .8; }
.eu-upcard .bj-card { font-size: 20px; font-weight: 800; padding: 12px 10px; }
.eu-trick { display: flex; gap: 14px; justify-content: center; align-items: center; min-height: 54px; }
.eu-trick.live .eu-trick-card .bj-card { animation: cardDeal .3s ease both; }
.eu-trick-card.pos-left { transform: rotate(-6deg); }
.eu-trick-card.pos-right { transform: rotate(6deg); }
.eu-tricks-tally { font-size: 12px; color: #e8f1ee; opacity: .9; }
.eu-actions { display: flex; flex-direction: column; gap: 6px; align-items: center; text-align: center; }
.eu-actions p { margin: 0; }
.eu-suit-row { flex-wrap: wrap; }
.eu-suit-btn { min-width: 108px; }
.eu-hand { flex-wrap: wrap; }
.eu-autopass { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 5px; }

/* ---- type race ---- */
.tr-card { text-align: left; }
.tr-clock { font-size: 42px; font-weight: 800; text-align: center; line-height: 1.1;
  font-variant-numeric: tabular-nums; margin: 4px 0 10px; }
.tr-clock.low { color: var(--red); }
.tr-clock.ok { color: var(--green); font-size: 30px; }
.tr-text { font-size: 19px; line-height: 1.7; background: var(--bg-dark); border: 1px solid #3a3d44;
  border-radius: 8px; padding: 14px 16px; white-space: pre-wrap; word-break: break-word;
  font-family: inherit; user-select: text; max-height: 34vh; overflow-y: auto; }
.tr-ch { border-radius: 3px; padding: 1px 0; }
.tr-ch.ok { color: #6ee7a0; }
.tr-ch.bad { color: #ff7b72; text-decoration: underline wavy rgba(255,123,114,.7); }
.tr-ch.now { background: var(--accent); color: #fff; }
.tr-stats { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin: 12px 0 8px;
  font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tr-score { font-weight: 800; color: var(--text); }
.tr-opp { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.tr-bar { flex: 1; height: 10px; background: var(--bg-dark); border-radius: 5px; overflow: hidden;
  border: 1px solid #3a3d44; }
.tr-bar-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), #8b93ff);
  transition: width .18s ease; }
.tr-result { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; }
.tr-result-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 9px 12px;
  background: var(--bg-dark); border-radius: 8px; border: 2px solid transparent; }
.tr-result-row.me { border-color: var(--accent); }
.tr-result-name { font-weight: 700; font-size: 14px; }
.tr-result-score { font-weight: 800; font-variant-numeric: tabular-nums; align-self: center; }
.tr-result-detail { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }

/* ---- settings page ---- */
.settings-card { max-height: 86vh; overflow-y: auto; text-align: left; }
.set-row { display: flex; flex-direction: column; gap: 5px; margin: 10px 0; }
.set-head { display: flex; justify-content: space-between; align-items: baseline; }
.set-label { font-size: 13px; font-weight: 600; }
.set-value { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.set-row input[type=range] { width: 100%; accent-color: var(--accent); }
.set-select { background: var(--bg-dark); color: var(--text); border: 1px solid #3a3d44;
  border-radius: 6px; padding: 8px 10px; font-size: 13px; width: 100%; }
.set-meter { height: 10px; background: var(--bg-dark); border-radius: 5px; overflow: hidden;
  border: 1px solid #3a3d44; }
.set-meter-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--green), #7bd88f);
  transition: width .08s linear; }
.set-meter-fill.hot { background: linear-gradient(90deg, #e6a23c, #e74c3c); }
.settings-card .shop-head { margin-top: 18px; }
.settings-card > button { margin-top: 18px; width: 100%; }
.settings-card .set-logout { margin-top: 8px; width: 100%; background: none; color: var(--muted);
  border: 1px solid #3a3d44; }
.settings-card .set-logout:hover { color: var(--red); border-color: var(--red); filter: none; }
.settings-card p { margin: 6px 0 0; font-size: 12px; line-height: 1.45; }
.eu-trump { font-size: 18px; font-weight: 800; }
.eu-trick-card { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.eu-trick-card .muted { font-size: 11px; }
.bj-card.playable { cursor: pointer; box-shadow: 0 0 0 2px var(--green), 0 3px 6px rgba(0,0,0,.45);
  transform: translateY(-4px); }
.bj-card.playable:hover { transform: translateY(-8px); }
.race-lane { display: flex; gap: 8px; align-items: center; width: 100%; }
.race-lane .casino-tab { width: 170px; flex: none; text-align: left; }
.race-track { position: relative; flex: 1; height: 26px; background: var(--bg-dark); border-radius: 13px; overflow: hidden; }
.race-horse { position: absolute; left: 0; top: 1px; font-size: 20px; transition: left .05s linear; }
.casino-mercy { background: rgba(241,196,15,.12); border: 1px solid rgba(241,196,15,.4); border-radius: 8px;
  padding: 12px 16px; display: flex; flex-direction: column; gap: 8px; align-items: center; width: 100%; }
.casino-mercy p { margin: 0; }
.slots-reels { display: flex; gap: 12px; }
.slot-reel { width: 84px; height: 84px; display: grid; place-items: center; font-size: 46px;
  background: var(--bg-dark); border-radius: 10px; box-shadow: inset 0 -4px 0 rgba(0,0,0,.35); }
.hilo-card { font-size: 34px; min-width: 72px; padding: 16px 10px; }
.scratch-grid { display: grid; grid-template-columns: repeat(3, 64px); gap: 8px; }
.scratch-cell { width: 64px; height: 64px; display: grid; place-items: center; font-size: 30px;
  background: var(--bg-hover); border-radius: 8px; }
.scratch-cell.open { background: var(--bg-dark); box-shadow: inset 0 0 0 2px var(--accent); }

/* date dividers, unread badges, connection bar */
.day-divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 11px;
  font-weight: 700; margin: 14px 0 4px; text-transform: uppercase; letter-spacing: .04em; }
.day-divider::before, .day-divider::after { content: ''; flex: 1; border-top: 1px solid #3f4147; }
a.channel { display: flex; align-items: center; gap: 6px; }
a.channel .unread { margin-left: auto; }
a.channel.has-unread { color: #fff; font-weight: 700; }
.srv-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--red); margin-left: 6px; }
.conn-bar { background: var(--red); color: #fff; text-align: center; font-size: 12px; padding: 4px 8px; }

/* pins + search */
.pin-row { background: var(--bg-dark); border-radius: 6px; padding: 8px 10px; text-align: left;
  display: flex; flex-direction: column; gap: 4px; }
.pin-top { display: flex; align-items: baseline; gap: 8px; }
.pin-author { font-weight: 700; }
.pin-text { font-size: 13px; overflow-wrap: anywhere; }
.search-form { display: flex; flex-direction: column; gap: 10px; }
.search-all { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.search-all input { width: auto; }
.search-results { display: flex; flex-direction: column; gap: 8px; max-height: 300px; overflow-y: auto; }

/* custom status */
.mstatus { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; max-width: 70px; }
.pf-custom-status { margin: 8px 16px 0; padding: 8px 10px; background: var(--bg-dark);
  border-radius: 6px; font-size: 13px; }

/* profile card (Discord-style popout) */
.modal-card { position: relative; }
/* red cross in the corner instead of a fat button along the bottom */
.modal-x { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; padding: 0;
  border-radius: 50%; background: var(--red); color: #fff; font-size: 14px; line-height: 1;
  display: flex; align-items: center; justify-content: center; z-index: 2; }
.modal-x:hover { filter: brightness(1.15); }
.modal-card.profile-card { padding: 0; overflow: hidden; text-align: left; gap: 0; width: min(340px, 100%); }
.pf-close { position: absolute; top: 10px; right: 10px; z-index: 3; width: 28px; height: 28px;
  padding: 0; border-radius: 50%; background: rgba(0,0,0,.45); color: #fff; font-size: 13px;
  display: grid; place-items: center; }
.pf-close:hover { background: rgba(0,0,0,.7); }
.pf-banner { height: 60px; }
.pf-avatar { width: 80px; height: 80px; border-radius: 50%; border: 6px solid var(--bg); margin: -46px 0 0 16px;
  display: grid; place-items: center; font-size: 34px; font-weight: 800; color: #fff; overflow: hidden; }
.pf-avatar img { width: 100%; height: 100%; object-fit: cover; }
.pf-name { display: flex; align-items: center; gap: 6px; font-size: 20px; font-weight: 800; padding: 8px 16px 0; }
.pf-badge { font-size: 18px; }
.pf-crown { margin: 8px 16px 0; padding: 8px 10px; border-radius: 6px; font-size: 12px;
  background: rgba(241,196,15,.15); color: #f5d76e; }
.pf-status { padding: 8px 16px 0; font-size: 13px; color: var(--muted); }
.pf-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px 16px; }
.pf-stat { display: flex; align-items: center; gap: 8px; background: var(--bg-dark); border-radius: 6px;
  padding: 8px 10px; font-size: 12px; }
.pf-stat-icon { font-size: 15px; }
.pf-actions { padding: 0 16px 16px; display: flex; gap: 8px; }
.pf-actions button { flex: 1; }
.clickable { cursor: pointer; }
.avatar.clickable:hover { filter: brightness(1.2); }
.author.clickable:hover { text-decoration: underline; }
.wd-boards { display: flex; gap: 22px; justify-content: center; align-items: flex-start; }
.wd-board { display: grid; gap: 5px; }
.wd-row { display: flex; gap: 5px; }
.wd-cell { width: 44px; height: 44px; display: grid; place-items: center; font-size: 22px; font-weight: 800;
  background: var(--bg-dark); border: 2px solid #3f4147; border-radius: 4px; }
.wd-cell.filled { border-color: var(--muted); }
.wd-cell.g, .wd-key.g { background: var(--green); border-color: var(--green); color: #fff; }
.wd-cell.y, .wd-key.y { background: #b59f3b; border-color: #b59f3b; color: #fff; }
.wd-cell.x, .wd-key.x { background: #4e5058; border-color: #4e5058; color: #fff; }
.wd-op { display: grid; gap: 3px; font-size: 12px; color: var(--muted); text-align: left; }
.wd-op .wd-row { gap: 3px; }
.wd-op .wd-cell { width: 14px; height: 14px; border-width: 0; border-radius: 3px; }
.wd-keys { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; }
.wd-key { min-width: 22px; padding: 3px 0; font-size: 12px; font-weight: 700; border-radius: 4px; background: var(--bg-dark); color: var(--text); }
.wd-entry { display: flex; gap: 8px; }
.wd-input { flex: 1; min-width: 0; text-transform: uppercase; letter-spacing: .2em; text-align: center; font-weight: 700; }
.call-timer { margin-left: 8px; font-size: 12px; color: var(--green); font-variant-numeric: tabular-nums; }
.bar-timer { color: var(--text); font-variant-numeric: tabular-nums; }

.voice-bar { margin-top: auto; padding: 10px 12px; border-top: 1px solid var(--bg-dark); background: #232428; }
.voice-status { color: var(--green); font-weight: 600; font-size: 13px; }
.voice-status small { color: var(--muted); font-weight: 400; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--green); margin-right: 4px; }
.voice-diag { margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: #1b1c20;
  color: var(--muted); font-size: 12px; line-height: 1.55; white-space: pre-line;
  font-family: ui-monospace, Consolas, monospace; }
.voice-diag[hidden] { display: none; }
.voice-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; }
.voice-buttons button { padding: 7px 4px; font-size: 12px; background: var(--bg-hover); }
.voice-buttons button.danger { background: var(--red); }
.voice-buttons button.active { background: var(--red); }

.share-audio { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 12px; color: var(--muted); cursor: pointer; }
.share-audio input { width: auto; padding: 0; margin: 0; box-shadow: none; }
.screen-volume { width: 100%; padding: 0; margin: 0; background: transparent; box-shadow: none; }
.user-bar { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: #232428; }
.user-bar .link { width: 28px; height: 28px; display: grid; place-items: center; padding: 0;
  font-size: 15px; border-radius: 6px; background: var(--bg-hover); color: var(--text); }
.user-bar .link:hover { background: #4a4c52; color: var(--text); }
.voice-bar.hidden + .user-bar { margin-top: auto; }
.me-name { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-bar form { margin: 0; display: flex; align-items: center; }
.user-bar form button { background: var(--bg-hover); color: var(--muted); padding: 6px 10px;
  border-radius: 6px; font-size: 12px; white-space: nowrap; }
.user-bar form button:hover { color: var(--text); filter: brightness(1.15); }
.user-bar .avatar, .user-bar .me-points, .user-bar .link { flex: none; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; flex: none; }
img.avatar { object-fit: cover; background: var(--bg-dark); }
.avatar.big { width: 64px; height: 64px; font-size: 26px; }
.badge { margin-left: 4px; font-size: 13px; }

/* message actions, editing, reactions */
.msg .actions { opacity: 0; margin-left: 6px; transition: opacity .1s; }
.msg:hover .actions { opacity: 1; }
.msg .actions button { color: var(--muted); font-size: 13px; }
.msg .actions button:hover { color: var(--text); }
.edited { color: var(--muted); font-size: 11px; margin-left: 4px; }
.edit-input { width: 100%; margin-top: 4px; padding: 8px 10px; }
.reactions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.react-chip { background: var(--bg-dark); color: var(--text); padding: 2px 8px; font-size: 13px; border-radius: 12px; }
.react-chip.mine { background: rgba(88,101,242,.25); box-shadow: inset 0 0 0 1px var(--accent); }
.react-add { opacity: 0; }
.msg:hover .react-add, .reactions:has(.react-picker) .react-add { opacity: 1; }
.react-picker { display: inline-flex; gap: 4px; margin-left: 4px; }

/* members tabs + leaderboard */
.members-tabs { display: flex; gap: 12px; padding: 14px 16px 4px; }
.members-tabs .tab { flex: 1; background: none; color: var(--muted); font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em; padding: 4px 0; border-radius: 0; }
.members-tabs .tab.active { color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }
.lb-list { padding: 4px 10px; font-size: 13px; }
.lb-row { display: flex; align-items: center; gap: 6px; padding: 4px 0; color: var(--muted); }
.lb-row.clickable { cursor: pointer; border-radius: 4px; padding-left: 4px; }
.lb-row.clickable:hover { background: var(--bg-hover); }
.lb-row .lb-rank { width: 20px; text-align: right; flex: none; }
.lb-row .lb-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.lb-row .lb-stats { font-size: 12px; white-space: nowrap; }

/* shop */
.shop-head { margin: 6px 0 0; font-size: 14px; text-align: left; }
.shop-avatar { display: flex; align-items: center; gap: 10px; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px;
  max-height: 40vh; overflow-y: auto; }
.shop-item { background: var(--bg-dark); border-radius: 8px; padding: 10px; display: flex; flex-direction: column;
  align-items: center; gap: 6px; font-size: 13px; }
.shop-item.owned { box-shadow: inset 0 0 0 2px var(--green); }
.shop-item.throne { box-shadow: inset 0 0 0 2px #f1c40f; background: rgba(241,196,15,.08); }
.shop-item.throne.owned { box-shadow: inset 0 0 0 2px #f1c40f; }
.shop-item button { padding: 4px 10px; font-size: 12px; width: 100%; }
.swatch { width: 24px; height: 24px; border-radius: 50%; }
.swatch-emoji { font-size: 24px; line-height: 1; }
.shop-label { text-align: center; }

.chat { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.chat.dragging { outline: 2px dashed var(--accent); outline-offset: -6px; }
.chat-header { padding: 14px 16px; font-weight: 700; border-bottom: 1px solid var(--bg-dark);
  display: flex; align-items: center; gap: 4px; }
.chat-header .link { font-size: 15px; padding: 4px 8px; border-radius: 6px; }
.chat-header .link:hover { background: var(--bg-hover); color: var(--text); }
  display: flex; align-items: center; gap: 10px; }
.chat-header #channel-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#btn-call { font-size: 15px; padding: 4px 10px; background: var(--bg-hover); border-radius: 6px; }
#dm-call-members { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.dm-member { font-size: 12px; color: var(--muted); margin-top: 6px; }
.dm-member.clickable { cursor: pointer; }
.dm-member.clickable:hover { color: var(--text); text-decoration: underline; }

/* screen share stage */
.stage { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 12px; background: #000;
  border-bottom: 1px solid var(--bg-dark); max-height: 55vh; overflow: auto; }
.screen-tile { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.screen-label { font-size: 12px; color: var(--muted); }
.screen-tile video { width: 100%; max-height: 48vh; object-fit: contain; background: #000; cursor: pointer; }

.messages { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 16px; }
.msg { display: flex; gap: 12px; padding: 4px 8px; margin: 0 -8px; border-radius: 6px;
  animation: msgIn .16s ease-out; }
.msg:hover { background: rgba(255,255,255,.025); }
.messages.loading .msg { animation: none; } /* bulk history renders skip the entrance */

/* smooth transitions on the interactive bits */
a.channel, .server-chip, .friend-list li.friend { transition: background .12s ease, color .12s ease, filter .12s ease; }
button { transition: filter .12s ease, background .12s ease, transform .05s ease; }
button:active:not(:disabled) { transform: scale(.97); }
.modal { animation: fadeIn .14s ease; }
.modal-card { animation: modalIn .18s cubic-bezier(.2,.8,.3,1.05); }
.toast { animation: toastIn .22s cubic-bezier(.2,.8,.3,1.1); }
.typing { animation: msgIn .15s ease; }

/* themed scrollbars */
.messages::-webkit-scrollbar, .sidebar-scroll::-webkit-scrollbar, .members::-webkit-scrollbar,
.search-results::-webkit-scrollbar, .member-list::-webkit-scrollbar { width: 8px; }
.messages::-webkit-scrollbar-thumb, .sidebar-scroll::-webkit-scrollbar-thumb, .members::-webkit-scrollbar-thumb,
.search-results::-webkit-scrollbar-thumb, .member-list::-webkit-scrollbar-thumb {
  background: #1e1f22; border-radius: 4px; }
.messages::-webkit-scrollbar-thumb:hover, .sidebar-scroll::-webkit-scrollbar-thumb:hover,
.members::-webkit-scrollbar-thumb:hover { background: #111214; }

/* member list status on its own line */
.member-list li { flex-wrap: wrap; }
.member-list li .mname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-list .group-header { font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--muted); padding: 10px 10px 3px; }
.member-list .group-header:first-child { padding-top: 4px; }
.member-list .mstatus { flex-basis: 100%; max-width: none; padding-left: 32px; margin-top: -2px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; }
}
.msg .body { min-width: 0; }
.msg .author { font-weight: 600; margin-right: 8px; }
.msg .time { color: var(--muted); font-size: 12px; }
.msg .content { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg .content a { color: #00a8fc; }
.msg-image { display: block; max-width: min(420px, 100%); max-height: 320px; border-radius: 6px;
  margin-top: 6px; cursor: zoom-in; background: var(--bg-dark); }

/* typing indicator ("X is typing…" bubble, iMessage style) */
.typing { display: flex; align-items: center; gap: 8px; padding: 0 16px 6px; font-size: 12px;
  color: var(--muted); min-height: 24px; }
.typing-dots { display: inline-flex; align-items: center; gap: 4px; background: var(--bg-side);
  border-radius: 12px; padding: 7px 9px; }
.typing-dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--muted);
  animation: typing-bounce 1.2s infinite; }
.typing-dots span:nth-child(2) { animation-delay: .15s; }
.typing-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes typing-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: .4; }
  30% { transform: translateY(-3px); opacity: 1; }
}

/* composer */
.composer { padding: 0 16px 20px; }
.composer-row { display: flex; gap: 8px; align-items: center; }
.composer-row #message-input { flex: 1; min-width: 0; padding: 12px 14px; background: #383a40; }
.icon-btn { width: 40px; height: 40px; padding: 0; font-size: 22px; line-height: 1; background: #383a40; color: var(--text); flex: none; }
.attachment { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--bg-side);
  border-radius: 6px; margin-bottom: 8px; font-size: 13px; }
.attachment img { max-height: 72px; max-width: 120px; border-radius: 4px; }

.members { background: var(--bg-side); overflow-y: auto; }
.member-list li { padding: 5px 10px; color: var(--muted); display: flex; align-items: center; gap: 8px;
  border-radius: 6px; }
.member-list li:hover { background: var(--bg-hover); color: var(--text); }
.member-list .avatar { width: 24px; height: 24px; font-size: 12px; flex: none; }

@media (max-width: 800px) {
  .app-body { grid-template-columns: 180px 1fr; }
  .members { display: none; }
}
@media (max-width: 520px) {
  .app-body { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .sidebar { max-height: 45vh; overflow-y: auto; }
}
