/* VESPER COMMUNITY — Chat ( sticky footer bar + inline embed ) */
/* Bebas Neue for the chat page design ( names / messages / nav ). */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&display=swap');

:root {
  --vchat-red: #F10000;
  --vchat-alu: #EDEBE6;
  --vchat-bg: #0C0D0F;
  --vchat-panel: #14161A;
  --vchat-line: #26292F;
  --vchat-mute: #9098A4;
}

/* ------------------------------------------------------------- docked bar */

.vchat--docked {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(680px, 100%);
  background: var(--vchat-bg);
  border: 1px solid var(--vchat-line);
  border-bottom: none;
  border-radius: 12px 12px 0 0;
  box-shadow: 0 -14px 40px rgba(0, 0, 0, .55);
  z-index: 99990;
  display: flex;
  flex-direction: column;
  color: var(--vchat-alu);
}

.vchat--docked .vchat__panel {
  height: 0;
  overflow: hidden;
  transition: height .22s ease;
}
.vchat--docked.is-open .vchat__panel { height: min(460px, 62vh); }

.vchat--docked.is-min .vchat__panel { height: 0 !important; }
.vchat--docked.is-min { box-shadow: 0 -6px 20px rgba(0, 0, 0, .4); }

/* ------------------------------------------------------------- top bar */

.vchat__bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px 6px 46px;
  border-bottom: 1px solid var(--vchat-line);
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,.92) 100%);
  backdrop-filter: blur(8px);
  border-radius: 12px 12px 0 0;
}

/* Red plus — 10px from the top, 6px from the left of the chat footer. */
.vchat__compose-btn {
  position: absolute;
  top: 10px;
  left: 6px;
  z-index: 3;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  padding: 0;
  color: var(--vchat-red);
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}
.vchat__compose-btn span { line-height: 1; }
.vchat__compose-btn:hover { filter: drop-shadow(0 0 6px rgba(241,0,0,.8)); }

.vchat__tabs { display: flex; gap: 4px; flex: 1; justify-content: center; }

.vchat__tab {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  position: relative;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: var(--vchat-mute);
  font: inherit;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  white-space: nowrap;
  padding: 4px 2px;
  cursor: pointer;
  transition: color .15s;
}
.vchat__tab:hover { color: var(--vchat-alu); }
.vchat__tab.is-active { color: #F10000; }

.vchat__bar-right { display: inline-flex; }

.vchat__min {
  background: transparent;
  border: none;
  color: var(--vchat-mute);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: inline-flex;
}
.vchat__min:hover { color: var(--vchat-alu); background: #1B1E23; }

/* ------------------------------------------------------------- panel */

.vchat__panel {
  display: flex;
  min-height: 0;
  background: var(--vchat-panel);
  border-radius: 0;
}

.vchat__list {
  flex: 0 0 42%;
  max-width: 42%;
  overflow-y: auto;
  border-right: 1px solid var(--vchat-line);
  padding: 6px;
}

.vchat__room {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
.vchat__room[hidden] { display: none; }

.vchat--docked.is-room .vchat__list { display: none; }
.vchat--docked.is-room .vchat__room { display: flex; }

.vchat__hint, .vchat__empty {
  color: var(--vchat-mute);
  font-size: 13px;
  text-align: center;
  padding: 22px 14px;
  margin: 0;
}

/* ------------------------------------------------------------- compose panel */

.vchat__compose {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.vchat__compose[hidden] { display: none; }

.vchat__compose-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--vchat-line);
  background: #0F1114;
}
.vchat__compose-title { font-weight: 600; font-size: 14px; }

.vchat__compose-body { flex: 1; min-height: 0; overflow-y: auto; padding: 6px; }
.vchat__hint--sm { text-align: left; padding: 8px 9px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }

.vchat__contacts { display: flex; flex-direction: column; gap: 2px; }

.vchat__contact {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  border-radius: 8px;
  padding: 8px 9px;
  cursor: pointer;
  font: inherit;
  color: var(--vchat-alu);
}
.vchat__contact:hover { background: #1B1E23; }
.vchat__cname { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ------------------------------------------------------------- threads */

.vchat__thread {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  border-radius: 8px;
  padding: 8px 9px;
  cursor: pointer;
  font: inherit;
  color: var(--vchat-alu);
}
.vchat__thread:hover { background: #1B1E23; }
.vchat__thread.is-active { background: rgba(241, 0, 0, .12); }

.vchat__ava-wrap { position: relative; display: inline-flex; line-height: 0; flex: 0 0 auto; }
/* Original round thread avatar — fixed equal sides stop theme CSS making it oval. */
.vchat__ava {
  width: 38px !important;
  height: 38px !important;
  aspect-ratio: 1 / 1;
  flex: 0 0 38px;
  border-radius: 50% !important;
  object-fit: cover;
  border: 1px solid var(--vchat-line);
  background: #1a1a1a;
}

.vchat__badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--vchat-red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.vchat__tinfo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.vchat__tname { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vchat__tlast { font-size: 11.5px; color: var(--vchat-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vchat__ttime { font-size: 10.5px; color: var(--vchat-mute); flex: 0 0 auto; align-self: flex-start; padding-top: 2px; }
/* Right-aligned "N MESSAGES" count — chat page only ( docked keeps the
   pill badge on the avatar ). */
.vchat__tcount { display: none; }

/* ------------------------------------------------------------- room */

.vchat__roomhead {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--vchat-line);
  background: #0F1114;
}

.vchat__back {
  background: transparent;
  border: none;
  color: var(--vchat-mute);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: inline-flex;
}
.vchat__back:hover { color: var(--vchat-alu); background: #1B1E23; }

.vchat__roomtitle { flex: 1; font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.vchat__roomlink { color: var(--vchat-mute); display: inline-flex; }
.vchat__roomlink:hover { color: var(--vchat-red); }

.vchat__scroll { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; }

.vchat__more {
  align-self: center;
  background: transparent;
  border: 1px solid var(--vchat-line);
  color: var(--vchat-mute);
  border-radius: 999px;
  font: inherit;
  font-size: 11.5px;
  padding: 5px 12px;
  cursor: pointer;
  margin-bottom: 10px;
}
.vchat__more:hover { color: var(--vchat-alu); border-color: var(--vchat-mute); }

/* Vertical rhythm: the bubbles carry a hard offset shadow, so the gap has to
   clear the shadow as well as the next bubble — otherwise the rows collide. */
.vchat__msgs { display: flex; flex-direction: column; gap: 18px; padding-bottom: 14px; }

.vchat__msg { display: block; }
.vchat__msg.is-mine { text-align: right; }

.vchat__mava-wrap { display: inline-flex; align-items: center; margin-right: 6px; vertical-align: middle; }
/* Original round message avatar — never stretched into an oval by global img rules. */
.vchat__mava {
  width: 24px !important;
  height: 24px !important;
  aspect-ratio: 1 / 1;
  flex: 0 0 24px;
  border-radius: 50% !important;
  object-fit: cover;
}

.vchat__bubble {
  display: inline-block;
  max-width: 74%;
  background: transparent;
  border: 1px solid var(--vchat-line);
  border-radius: 12px;
  padding: 7px 11px 0;
  text-align: left;
  vertical-align: top;
}
.vchat__msg.is-mine .vchat__bubble {
  background: rgba(241, 0, 0, .16);
  border-color: rgba(241, 0, 0, .42);
}

.vchat__mhead {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
  min-height: 20px;
}
.vchat__msg.is-mine .vchat__mhead { justify-content: flex-end; }
.vchat__mname { font-size: 11px; font-weight: 700; color: var(--vchat-red); letter-spacing: .03em; }
.vchat__body { margin: 0; font-size: 13.5px; line-height: 1.4; word-wrap: break-word; white-space: pre-wrap; }
.vchat__mtime { font-size: 10px; color: var(--vchat-mute); white-space: nowrap; margin-left: auto; }

/* Opaque strip pinned to the very bottom of the bubble. */
.vchat__acts {
  display: flex;
  gap: 2px;
  justify-content: flex-end;
  margin: 6px -11px 0;
  padding: 4px 8px;
  background: transparent;
  border-top: 1px solid var(--vchat-line);
  border-radius: 0 0 11px 11px;
}
.vchat__msg.is-mine .vchat__acts { margin-left: 0; }

/* ------------------------------------------------- reply quote / forwarded */

.vchat__quote {
  display: block;
  width: 100%;
  text-align: left;
  font: inherit;
  background: rgba(255, 255, 255, .05);
  border: 0;
  border-left: 3px solid var(--vchat-red);
  border-radius: 0;
  padding: 4px 8px;
  margin: 0 0 5px;
  cursor: pointer;
  transition: background .15s ease;
}
.vchat__quote:hover { background: rgba(255, 255, 255, .1); }
.vchat__quote-name { display: block; font-size: 10px; font-weight: 700; color: var(--vchat-red); letter-spacing: .04em; text-transform: uppercase; }
.vchat__quote-txt { display: block; font-size: 11.5px; line-height: 1.3; color: var(--vchat-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.vchat__fwd {
  display: block;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--vchat-mute);
  margin-bottom: 2px;
}

/* --------------------------------------------------------- per-message acts */

/* ( .vchat__acts itself is defined with the message header above — it lives
   inline with the sender name, not in a footer row. ) */

/* Pointer devices: the buttons stay out of the way until the bubble is hovered
   / focused. Touch devices have no hover, so there they are always visible —
   otherwise reply / forward / delete would be unreachable on a phone. */
@media (hover: hover) and (pointer: fine) {
  .vchat__acts { opacity: 0; transition: opacity .15s ease; }
  .vchat__msg:hover .vchat__acts,
  .vchat__msg:focus-within .vchat__acts { opacity: 1; }
}

.vchat__act {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  color: var(--vchat-mute);
  padding: 3px 4px;
  margin: 0;
  line-height: 0;
  cursor: pointer;
  transition: color .15s ease;
}
.vchat__act:hover { color: var(--vchat-alu); }
.vchat__act--del:hover { color: var(--vchat-red); }

/* ------------------------------------------------------------- tombstone */

.vchat__bubble--gone {
  background: transparent;
  border: 1px dashed var(--vchat-line);
  box-shadow: none;
  padding: 6px 12px;
}
.vchat__msg.is-deleted .vchat__mava-wrap { visibility: hidden; }
.vchat__body--gone { font-size: 12px; font-style: italic; color: var(--vchat-mute); }

/* ------------------------------------------------------------- compose */

.vchat__foot {
  border-top: 1px solid var(--vchat-line);
  background: #0F1114;
  /* Sticky to the bottom edge of the room: the scroll area above it must never
     push it out of view — it stays pinned under the messages at all times. */
  position: sticky;
  bottom: 0;
  z-index: 2;
  flex: 0 0 auto;
}

.vchat__form { display: flex; align-items: center; gap: 8px; padding: 9px 10px; }

/* Reply chip — sits above the input while a reply is pending, naming the
   message being quoted, with an × to cancel. Hidden ( [hidden] ) by default. */
.vchat__replychip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-bottom: 1px solid var(--vchat-line);
  background: rgba(241, 0, 0, .07);
}
.vchat__replychip[hidden] { display: none; }
.vchat__replychip-txt {
  flex: 1;
  min-width: 0;
  font-size: 11.5px;
  color: var(--vchat-mute);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vchat__replychip-txt b { color: var(--vchat-red); font-weight: 700; }
.vchat__replychip-x {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  color: var(--vchat-mute);
  font: inherit;
  font-size: 15px;
  line-height: 1;
  padding: 2px 4px;
  cursor: pointer;
}
.vchat__replychip-x:hover { color: var(--vchat-alu); }

/* ------------------------------------------------------ forward picker */

/* Full-height pick panel that slides over the widget while a message is being
   forwarded — every thread ( private / crew / club ) is a valid target. */
.vchat__fwd {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  background: rgba(10, 11, 13, .97);
  border-radius: inherit;
  animation: vchatFwdIn .18s ease both;
}
@keyframes vchatFwdIn { from { opacity: 0; } to { opacity: 1; } }
.vchat__fwd-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--vchat-line);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--vchat-alu);
}
.vchat__fwd-x {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  color: var(--vchat-mute);
  font: inherit;
  font-size: 20px;
  line-height: 1;
  padding: 0 4px;
  cursor: pointer;
}
.vchat__fwd-x:hover { color: var(--vchat-red); }
.vchat__fwd-list { flex: 1; overflow-y: auto; padding: 6px; }
.vchat__fwd-sect {
  margin: 8px 6px 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--vchat-mute);
}

/* -------------------------------------------------------- flash on jump */

.vchat__msg.is-flash .vchat__bubble {
  animation: vchatFlash .9s ease;
}
@keyframes vchatFlash {
  0%, 100% { box-shadow: none; }
  30% { box-shadow: 0 0 0 3px var(--vchat-red); }
}

.vchat__input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  min-height: 38px;
  max-height: 128px;
  background: #1B1E23;
  border: 1px solid var(--vchat-line);
  border-radius: 14px;
  color: var(--vchat-alu);
  font: inherit;
  font-size: 13.5px;
  line-height: 1.35;
  padding: 9px 14px;
  outline: none;
  resize: none;
  overflow-y: auto;
  /* Always the topmost, typeable surface in the bar. */
  position: relative;
  z-index: 2;
  pointer-events: auto;
  -webkit-user-select: text;
  user-select: text;
}
.vchat__foot { position: relative; z-index: 6; }
.vchat__form { position: relative; z-index: 2; }
.vchat__input:focus { border-color: var(--vchat-red); }
.vchat__input::placeholder { color: var(--vchat-mute); }

.vchat__send {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--vchat-red);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.vchat__send:hover { background: #fff; color: var(--vchat-red); }
.vchat__send[disabled] { opacity: .5; cursor: not-allowed; }

/* ------------------------------------------------------------- inline embed ( Canva design ) */

.vchat--inline {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 620px;
  max-height: 78vh;
  border: 1px solid var(--vchat-line);
  border-radius: 12px;
  overflow: hidden;
  color: #fff;
  font-family: 'Bebas Neue', Impact, sans-serif;
  /* Design canvas: red glow over a dark diagonal. */
  background:
    radial-gradient(ellipse 60% 22% at 55% 55%, rgba(255, 20, 20, .45), transparent 70%),
    linear-gradient(115deg, #0b0b0d, #1a1a1d 45%, #0a0a0b);
  /* Everything below is sized in cqw = 1 % of this widget's width, so the
     894 x 1600 design scales 1:1 at any screen size ( 1cqw = 8.94 design px ). */
  container-type: inline-size;
}
.vchat--inline .vchat__panel { flex: 1; min-height: 0; background: transparent; }
.vchat--inline .vchat__room[hidden] { display: none; }
.vchat--inline.is-room .vchat__list { display: none; }
.vchat--inline.is-room .vchat__room { display: flex; }
.vchat--inline .vchat__min { display: none; }
/* The chat page has no top bar — compose floats over the list and the tabs
   live in the bottom icon nav. */
.vchat--inline .vchat__bar { display: none; }
.vchat__compose-btn--float {
  top: 12px;
  top: 1.34cqw;
  left: 12px;
  left: 1.34cqw;
  z-index: 6;
  width: 40px;
  width: max(40px, 4.47cqw);
  height: 40px;
  height: max(40px, 4.47cqw);
  font-size: 34px;
  font-size: 3.8cqw;
}

/* The docked footer would duplicate the chat page nav — drop it there. */
body:has(.vchat--inline) .vchat--docked { display: none !important; }

/* Single full-width column. direction:rtl moves the scrollbar to the left
   edge exactly like the design; children reset to ltr. */
.vchat--inline .vchat__list {
  flex: 1 1 100%;
  max-width: 100%;
  border-right: 0;
  padding: 0;
  direction: rtl;
  scrollbar-width: thin;
  scrollbar-color: #777 transparent;
}
.vchat--inline .vchat__list > * { direction: ltr; }
.vchat--inline .vchat__list::-webkit-scrollbar { width: 7px; }
.vchat--inline .vchat__list::-webkit-scrollbar-track { background: transparent; }
.vchat--inline .vchat__list::-webkit-scrollbar-thumb { background: #777; border-radius: 4px; }

.vchat--inline .vchat__hint,
.vchat--inline .vchat__empty {
  font-family: 'Oswald', sans-serif;
  font-size: 13px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

/* ------------------------------------------------- thread rows ( design ) */

.vchat--inline .vchat__thread {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 5%;
  gap: 5.59cqw;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 0;
  /* Bottom padding clears the box's hard red shadow ( 2.24cqw ) with room to
     spare, so one row's shadow never lands on the next row. */
  padding: 1.12cqw 11% 4.6cqw 10%;
  font: inherit;
  color: #fff;
}
.vchat--inline .vchat__thread:hover { background: rgba(255, 255, 255, .045); }
.vchat--inline .vchat__thread.is-active { background: rgba(241, 0, 0, .10); }

/* Thread-list avatars return to the original portrait rounded rectangle:
   height is the longer edge and the 110 x 129 design ratio is retained. */
.vchat--inline .vchat__thread .vchat__ava-wrap { margin-top: 0 !important; }
.vchat--inline .vchat__thread .vchat__ava-wrap { overflow: hidden; }
.vchat--inline .vchat__thread .vchat__ava {
  width: clamp(52px, 12.3cqw, 110px) !important;
  height: clamp(61px, 14.43cqw, 129px) !important;
  aspect-ratio: 110 / 129;
  flex: 0 0 auto;
  border-radius: clamp(7px, 1.56cqw, 14px) !important;
  object-fit: cover;
  border: 1px solid var(--vchat-line);
  background: #1a1a1a;
}
.vchat--inline .vchat__thread .vchat__ava-wrap .vchat__badge { display: none; }

.vchat--inline .vchat__tinfo { gap: 7px; gap: 0.78cqw; }
.vchat--inline .vchat__tname {
  font-size: 37px;
  font-size: 4.14cqw;
  font-weight: 400;
  line-height: 40px;
  line-height: 4.47cqw;
  letter-spacing: .02em;
  color: #fff;
  /* Design indents the name to the bubble text edge ( 29 design px ). */
  padding-left: 29px;
  padding-left: 3.24cqw;
}
.vchat--inline .vchat__ttime { display: none; }

/* The message bar: black slab, hard red offset shadow ( gray once read ).
   Its height follows the message — one line stays a slim rectangle, two
   lines grow just enough, never a fixed square slab. */
.vchat--inline .vchat__tlast {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  box-sizing: border-box;
  height: auto;
  min-height: 6.2cqw;
  padding: 1.2cqw 2.46cqw;
  background: transparent;
  border: 4px solid #ff1010;
  border-width: 0.45cqw;
  box-shadow: 18px 20px 0 #ff1010;
  box-shadow: 2.01cqw 2.24cqw 0 #ff1010;
  color: #fff;
  font-size: 34px;
  font-size: 3.8cqw;
  line-height: 40px;
  line-height: 4.2cqw;
  letter-spacing: .5px;
  white-space: normal;
  overflow: hidden;
}
.vchat--inline .vchat__thread:not(:has(.vchat__badge)) .vchat__tlast {
  border-color: #5a5a5e;
  box-shadow: 18px 20px 0 #5a5a5e;
  box-shadow: 2.01cqw 2.24cqw 0 #5a5a5e;
}

/* "N MESSAGES" — Oswald small caps, top right of the row. */
.vchat--inline .vchat__tcount {
  display: block;
  position: absolute;
  top: 14px;
  top: 1.57cqw;
  right: 15%;
  font-family: 'Oswald', sans-serif;
  font-weight: 500;
  font-variant-caps: small-caps;
  text-transform: uppercase;
  font-size: 27px;
  font-size: 3.02cqw;
  line-height: 40px;
  line-height: 4.47cqw;
  letter-spacing: .05em;
  color: #fff;
}

/* -------------------------------------------- room / conversation ( design ) */

.vchat--inline .vchat__roomhead {
  background: rgba(8, 8, 10, .92);
  border-bottom: 1px solid rgba(255, 255, 255, .14);
}
.vchat--inline .vchat__roomtitle {
  font-size: 24px;
  font-weight: 400;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.vchat--inline .vchat__scroll { padding: 18px 5%; }

/* Room rhythm: the hard offset shadows need real air between bubbles — this
   is the overlap the phone screenshot showed. */
.vchat--inline .vchat__msgs { gap: 26px; padding-bottom: 20px; }

.vchat--inline .vchat__bubble {
  max-width: 72%;
  background: transparent;
  border: 3px solid #ff1010;
  border-radius: 0;
  /* Recipient bubbles MIRROR the sender's along the Y axis — the hard shadow
     falls to the LEFT ( outward from the conversation ), where the sender's
     falls to the right. Two identical shadows read as one flat style; the
     mirror is what makes "theirs vs mine" legible at a glance. */
  box-shadow: -11px 12px 0 #ff1010;
  padding: 8px 12px 10px;
}
.vchat--inline .vchat__msg.is-mine .vchat__bubble {
  background: transparent;
  border-color: #5a5a5e;
  box-shadow: 11px 12px 0 #5a5a5e;
}
.vchat--inline .vchat__mhead { gap: 9px; margin-bottom: 4px; min-height: 16px; }
.vchat--inline .vchat__mname {
  font-family: 'Oswald', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.vchat--inline .vchat__body {
  font-family: 'Oswald', 'Segoe UI', sans-serif;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.32;
  letter-spacing: .03em;
}
.vchat--inline .vchat__mtime {
  font-family: 'Oswald', sans-serif;
  font-size: 11px;
  letter-spacing: .05em;
}

/* Message input bar — one slab. The BAR is the red-bordered box: the text,
   the camera + emoji tools and the send button all live INSIDE it. */
.vchat--inline .vchat__foot {
  background: transparent;
  border-top: 0;
  padding: 0 4% calc(8px + env(safe-area-inset-bottom, 0px));
}
.vchat--inline .vchat__form {
  padding: 4px 6px;
  gap: 2px;
  align-items: flex-end;
  background: rgba(0, 0, 0, .82);
  border: 3px solid #ff1010;
  border-radius: 0;
  box-shadow: none;
}
.vchat--inline .vchat__input {
  flex: 1 1 auto;
  min-width: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: #fff;
  font-family: 'Oswald', 'Segoe UI', sans-serif;
  font-size: 16px;
  letter-spacing: .03em;
  min-height: 40px;
  max-height: 96px;
  line-height: 1.3;
  padding: 8px 6px 8px 8px;
  resize: none;
  overflow-y: auto;
}
.vchat--inline .vchat__input:focus { box-shadow: none; outline: none; }
.vchat--inline .vchat__tools {
  align-self: flex-end;
  padding-bottom: 2px;
}
.vchat--inline .vchat__send {
  width: 42px;
  height: 42px;
  margin-bottom: 1px;
  border-radius: 0;
  box-shadow: none;
  background: #ff1010;
}
.vchat--inline .vchat__compose-head {
  background: rgba(8, 8, 10, .92);
  border-bottom: 1px solid rgba(255, 255, 255, .14);
}
.vchat--inline .vchat__compose-title { font-size: 20px; font-weight: 400; letter-spacing: .03em; text-transform: uppercase; }

/* ------------------------------------------------- bottom icon nav ( design ) */

/* FIVE icons, evenly spaced, sitting flat on the bottom edge - the design's
   friends . riders . crew . garage . club row. Transparent background so the
   running video shows through ( like the events / showcase / off-road
   footers ), while the icons themselves stay the chat set. */
.vchat__nav {
  position: relative;
  z-index: 4;
  flex: 0 0 auto;
  margin-top: auto;
  height: 64px;
  display: flex;
  align-items: flex-end;
  justify-content: space-evenly;
  gap: 4px;
  padding: 0 3% 6px;
  background: transparent;
  border-top: 1px solid rgba(255, 255, 255, .12);
}
.vchat--inline .vchat__nav {
  position: relative;
  bottom: auto;
  flex: 0 0 auto;
  height: 64px;
  min-height: 64px;
  gap: 2px;
  padding: 0 3% calc(6px + env(safe-area-inset-bottom, 0px));
  background: transparent;
}
.vchat__nav .vchat__tab,
.vchat__nav-soon,
.vchat__nav-item {
  position: relative;
  flex: 0 1 auto;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.vchat__nav a.vchat__nav-item {
  color: inherit;
  text-decoration: none;
}
.vchat__nav img {
  display: block;
  height: 40px;
  width: auto;
  max-width: 100%;
  opacity: .72;
  transition: opacity .15s ease, filter .15s ease;
}
.vchat--inline .vchat__nav img { height: clamp(24px, 6.6cqw, 46px); }

/* Restore the header plus button ( upload pill ) - it was wrongly hidden. */

/* Remove the compose plus button beside the chats. */
.vchat__compose-btn { display: none !important; }

/* Remove the previous 5-icon footer; only the 3-icon events-style footer remains. */
.vchat__nav { display: none !important; }

/* Chat footer — mirror the mainstream stream footer exactly: same bar height,
   same 30px icon ceiling, same 11.5px Oswald label with normal weight and the
   same .03em tracking, so the five sections never read as a different menu. */
/* Two classes so events.css's own .vpe-footer icon ceiling ( 64px ) can never
   win on load order — the chat bar always keeps the 30px mainstream cap. */
.vpe-footer.vpe-footer--chat {
  --vpe-ic: clamp(16px, min(5vw, 6vh), 30px);
  align-items: center;
  justify-content: space-evenly;
  gap: 4px;
  padding: 16px 14px calc(10px + env(safe-area-inset-bottom, 0px));
}
.vpe-footer--chat .vpe-footer__ico,
.vpe-footer--chat .vpe-footer__ico--svg {
  width: var(--vpe-ic);
  height: var(--vpe-ic);
  display: block;
  flex: 0 0 auto;
}
.vpe-footer--chat .vpe-footer__label {
  font: 400 11.5px/1 "Oswald", "Norwester", Impact, "Arial Narrow", sans-serif;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: inherit;
  white-space: nowrap;
}

/* The menu's own floating chrome steps aside while chat is open. */
.vmp.is-chat .vmp__ui { display: none !important; }
.vmp.is-chat .vmp__edge--bottom { display: none !important; }
.vmp.is-chat .vmp__edge--top { display: none !important; }
.vmp.is-chat .vmp__edge--bottom { display: none !important; }
.vmp.is-chat .vmp__edge--top { display: none !important; }

/* -------------------------------------------------- in-page chat overlay */

/* Mounted inside the main menu ( .vmp ), exactly like the MotoHub canvas:
   the menu's <video> keeps playing under this layer, so opening chat never
   navigates or restarts it. The conversation LIST sits straight on the video
   ( the translucent black bubbles are the only contrast, as in the design );
   a black veil only falls once a conversation is opened, so the messages
   stay legible. */
.vmp__chat {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  color: #fff;
  background: transparent;
}
.vmp__chat[hidden] { display: none; }
.vmp__chat::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #000;
  opacity: 0;
  transition: opacity .3s ease;
  pointer-events: none;
}
.vmp__chat:has(.vchat--inline.is-room)::before { opacity: .62; }
.vmp__chat.is-room::before { opacity: .62; }

.vmp__chat-chrome {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  min-height: 0;
}
.vmp__chat-top,
.vmp__chat-body { position: relative; z-index: 1; }

.vmp__chat-top { flex: 0 0 auto; padding: 4px 8px 0; }
.vmp__chat-top .vpe-topbar {
  position: static;
  top: auto;
  left: auto;
  right: auto;
  width: 100%;
  pointer-events: auto;
}

.vmp__chat-top .vpe-fpop {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  min-width: 176px;
  padding: 6px;
  background: #101114;
  border: 1px solid rgba(241, 0, 0, .5);
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .6);
}
.vmp__chat-top .vpe-fpop[hidden] { display: none; }
.vmp__chat-top .vpe-fpop__i {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  color: #EDEBE6;
  font: inherit;
  font-size: 13px;
  letter-spacing: .03em;
  text-align: left;
  padding: 9px 12px;
  border-radius: 6px;
  cursor: pointer;
}
.vmp__chat-top .vpe-fpop__i:hover { background: rgba(241, 0, 0, .14); color: #fff; }

.vmp__chat-search { padding: 6px 2px 0; }
.vmp__chat-search[hidden] { display: none; }
.vmp__chat-search input {
  width: 100%;
  box-sizing: border-box;
  background: rgba(0, 0, 0, .78);
  border: 1px solid rgba(241, 0, 0, .55);
  border-radius: 8px;
  color: #EDEBE6;
  font: inherit;
  font-size: 14px;
  padding: 10px 14px;
  outline: none;
}
.vmp__chat-search input:focus { border-color: #F10000; }

.vmp__chat-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  justify-content: center;
  overflow: hidden;
}
.vmp__chat .vchat--inline {
  flex: 1 1 auto;
  width: 100%;
  max-width: 760px;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.vmp__chat .vchat--inline .vchat__panel {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  background: transparent;
}
.vmp__chat .vchat--inline .vchat__list { overflow-y: auto; }
.vmp__chat .vchat--inline .vchat__nav { background: transparent; }

/* ============================================================ chat chrome */

/* The chat layer is a real viewport layer everywhere: inside the main menu it
   still rides over the running video, and on an ordinary page it covers the
   site header instead of letting it show above the conversation. */
.vmp__chat {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: transparent;
}
body:not(.vmp-page) .vmp__chat { background: #0C0D0F; }

/* ------------------------------------------- red name plate ( not a tab ) */

/* Appears only inside an open conversation. It is an overlay: the chat body
   starts immediately under the icon header and messages scroll behind the
   plate. It is purely a label and never consumes layout height. */
.vmp__chat-head {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 3;
  display: flex;
  justify-content: center;
  padding: 4px 12px 2px;
  pointer-events: none;
}
.vmp__chat-head[hidden] { display: none; }
/* Exact same plate as the Crew username graphic: min(54vw,330px) box,
   50px height, same notched hexagon, same white Oswald at 17px / 9.5px. */
.vmp__chat-head .vmp__hex {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  box-sizing: border-box;
  width: min(54vw, 330px);
  max-width: calc(100vw - 24px);
  height: 50px;
  padding: 0 20px;
  background: #F10000;
  clip-path: polygon(12px 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 12px 100%, 0 50%);
}
.vmp__chat-head .vmp__chat-hexseg {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
  padding: 0;
  color: #fff;
  font-family: "Norwester", "Oswald", "Bebas Neue", Impact, "Arial Narrow", sans-serif;
  text-transform: uppercase;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}
.vmp__chat-head .vmp__chat-hexname {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: .12em;
}
.vmp__chat-head .vmp__chat-hextag {
  font-family: "Oswald", "Norwester", Impact, "Arial Narrow", sans-serif;
  font-size: 9.5px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(255,255,255,.82);
  margin-top: 0;
}
.vmp__chat-head .vmp__chat-hextag[hidden] { display: none; }

/* At phone widths the crew pill shrinks ( groups.css ) — the chat plate
   follows it exactly, same box and same type sizes. */
@media (max-width: 700px) {
  .vmp__chat-head .vmp__hex {
    height: 40px;
    padding: 0 18px;
    gap: 1px;
  }
  .vmp__chat-head .vmp__chat-hexname {
    font-size: 12.5px;
    letter-spacing: .12em;
  }
  .vmp__chat-head .vmp__chat-hextag {
    font-size: 6.5px;
    letter-spacing: .2em;
  }
}

/* ------------------------------------------------------ footer in place */

/* The tab footer belongs to the conversation list only: once a room is
   open, the write bar owns the bottom edge. */
.vchat.is-room .vchat__nav--five,
.vmp__chat.is-room > .vpe-footer--chat,
.vchat-page.is-room .vpe-footer--chat { display: none !important; }

/* The events-style footer has to sit IN the chat column, right under the
   message bar — not fixed over it ( that was the overlap on the phone ). */
.vmp__chat > .vpe-footer--chat,
.vchat-page > .vpe-footer--chat {
  position: relative !important;
  inset: auto !important;
  bottom: auto !important;
  left: auto !important;
  right: auto !important;
  z-index: 3;
  flex: 0 0 auto;
  padding: 16px 14px calc(10px + env(safe-area-inset-bottom, 0px));
}
/* Crew — Private — Club: three equal cells keep Private centred. */
.vpe-footer--chat { justify-content: space-evenly; }
/* Five sections share the row evenly ( the old 33.333% cap compressed the
   five tabs into the middle third of the bar ). */
.vpe-footer--chat .vpe-footer__btn {
  flex: 1 1 0;
  min-width: 0;
  max-width: none;
  min-height: var(--vpe-ic, 30px);
  align-items: center;
  justify-content: center;
  padding: 10px 6px;
  color: rgba(255, 255, 255, .88);
  opacity: .88;
}
/* Mainstream mobile metric: .vp-tab becomes 11.5px / 12px 4px, so the chat
   cells take the same vertical rhythm instead of hugging the labels. */
@media (max-width: 767px) {
  .vpe-footer--chat .vpe-footer__btn { padding: 12px 4px; }
  /* The word tabs define the bar height ( 12 + 11.5 + 12 ). The lone icon tab
     drops its padding so the 18px glyph centres inside that same band instead
     of stretching the bar 6px past the mainstream footer. */
  .vpe-footer--chat .vpe-footer__btn--icon { padding: 0; min-height: 0; }
}
.vpe-footer--chat .vpe-footer__btn:hover,
.vpe-footer--chat .vpe-footer__btn.is-active {
  color: #F10000;
  opacity: 1;
}

/* --------------------------------------------------- media messages */

.vchat__media {
  display: block;
  max-width: 240px;
  margin: 2px 0;
  line-height: 0;
}
.vchat__img {
  display: block;
  width: 100%;
  max-width: 240px;
  height: auto;
  border: 1px solid rgba(255, 255, 255, .22);
  background: rgba(0, 0, 0, .35);
}

/* --------------------------------------------------- media / emoji tools */

/* They live INSIDE the "Write a message" bar, at its far right, just before
   the send button. */
.vchat__tools {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0;
  padding-right: 2px;
}
.vchat__tool {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #EDEBE6;
  opacity: .92;
  cursor: pointer;
  line-height: 0;
  border-radius: 50%;
  -webkit-tap-highlight-color: transparent;
  transition: color .15s ease, background .15s ease;
}
.vchat__tool:hover { color: #F10000; background: rgba(241, 0, 0, .14); }
.vchat__tool:focus-visible { outline: 2px solid #F10000; outline-offset: 2px; }
.vchat__tool svg { width: 21px; height: 21px; display: block; }

/* --------------------------------------------------- emoji picker */

.vchat__emoji {
  position: absolute;
  right: 0;
  left: auto;
  bottom: calc(100% + 10px);
  z-index: 80;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 2px;
  width: 228px;
  max-height: 196px;
  overflow-y: auto;
  padding: 6px;
  background: rgba(12, 13, 15, .98);
  border: 1px solid rgba(241, 0, 0, .5);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .65);
}
.vchat__emoji[hidden] { display: none; }
.vchat__emoji-btn {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  padding: 4px 0;
  font-size: 18px;
  line-height: 1.2;
  cursor: pointer;
  border-radius: 4px;
  -webkit-tap-highlight-color: transparent;
}
.vchat__emoji-btn:hover { background: rgba(241, 0, 0, .18); }
input.vchat__file, .vchat__file[type="file"] { display: none !important; }

/* --------------------------------------------------- chat page takeover */

.vchat-page {
  position: fixed;
  inset: 0;
  z-index: 9900;
  display: flex;
  flex-direction: column;
  background: #0C0D0F;
  color: #EDEBE6;
}
body:has(.vchat-page) { overflow: hidden; }
.vchat-page__body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  justify-content: center;
  overflow: hidden;
}
.vchat-page .vchat--inline {
  flex: 1 1 auto;
  width: 100%;
  max-width: 760px;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.vchat-page .vchat__panel { background: transparent; }
.vchat-page .vchat__list { overflow-y: auto; }

/* The site header is the "VESPER" heading the chat tab replaces — keep it
   out of the way wherever the overlay opens. */
body.vmp-chat-open #masthead,
body.vmp-chat-open #main-header,
body.vmp-chat-open .site-header,
body.vmp-chat-open .ct-header,
body.vmp-chat-open .main-header,
body.vmp-chat-open #colophon,
body.vmp-chat-open .site-footer,
body.vmp-chat-open .ct-footer,
body.vmp-chat-open .main-footer { display: none !important; }

/* ------------------------------------------ tighter message bar + send */

.vchat--inline .vchat__form {
  padding: 4px 6px;
  gap: 2px;
}
.vchat--inline .vchat__input {
  min-height: 40px;
  max-height: 96px;
  font-size: 16px;
  line-height: 1.3;
  padding: 8px 6px 8px 8px;
}
.vchat--inline .vchat__send {
  width: 42px;
  height: 42px;
}
.vchat--inline .vchat__send svg {
  width: 21px;
  height: 21px;
}

/* The video is the only background: the room head and the input bar stay
   transparent, with borders carrying the structure. */
.vchat--inline .vchat__roomhead { background: transparent; }
.vchat--inline .vchat__foot { background: transparent; }

/* Flat compose bar — no drop shadow on the input or the send button. */
.vchat--inline .vchat__input,
.vchat--inline .vchat__input:focus,
.vchat--inline .vchat__send,
.vchat--inline .vchat__send:hover {
  box-shadow: none !important;
  filter: none !important;
}

/* --------------------------------------------------- rich messages (M3) */
.vchat__poll { border: 1px solid var(--vchat-line); background: rgba(255,255,255,.03); padding: 8px; border-radius: 8px; min-width: 220px; }
.vchat__poll-q { margin: 0 0 8px; font-weight: 700; color: var(--vchat-alu); }
.vchat__poll-opt { -webkit-appearance:none; appearance:none; font:inherit; position: relative; display:flex; align-items:center; justify-content:space-between; gap:8px; width:100%; text-align:left; background:#121418; border:1px solid var(--vchat-line); color:var(--vchat-alu); border-radius:8px; padding:9px 10px; margin:0 0 6px; cursor:pointer; overflow:hidden; box-sizing:border-box; }
.vchat__poll-opt:hover { border-color: rgba(241,0,0,.45); }
.vchat__poll-opt.is-selected { border-color: var(--vchat-red); }
.vchat__poll-bar { position:absolute; left:0; top:0; bottom:0; background: rgba(241,0,0,.18); pointer-events:none; }
.vchat__poll-label, .vchat__poll-count { position:relative; z-index:1; }
.vchat__poll-meta { font-size:11px; color:var(--vchat-mute); }
.vchat__event { display:flex; gap:10px; align-items:center; text-decoration:none; color:inherit; background:#121418; border:1px solid var(--vchat-line); border-radius:8px; padding:8px; max-width:320px; }
.vchat__event:hover { border-color: rgba(241,0,0,.45); }
.vchat__event-thumb { width:72px; height:54px; flex:0 0 72px; border-radius:6px; overflow:hidden; background:#0c0d0f; display:block; }
.vchat__event-thumb img { width:100%; height:100%; object-fit:cover; display:block; }
.vchat__event-body { display:flex; flex-direction:column; gap:2px; min-width:0; }
.vchat__event-kicker { font-size:10px; letter-spacing:.08em; text-transform:uppercase; color: var(--vchat-red); font-weight:700; }
.vchat__event-title { font-size:13px; font-weight:700; color:var(--vchat-alu); }
.vchat__event-date { font-size:11px; color:var(--vchat-mute); }
.vchat__voice audio, .vchat__media--video video { width: min(280px, 100%); max-width:100%; display:block; border-radius:8px; }
a.vchat__file { display:inline-block; padding:8px 10px; border:1px solid var(--vchat-line); border-radius:8px; background:#121418; color:var(--vchat-alu); text-decoration:none; }
a.vchat__file:hover { border-color: rgba(241,0,0,.45); color:#fff; }
.vchat__livecall { border:1px solid rgba(241,0,0,.4); background: rgba(241,0,0,.08); border-radius:8px; padding:8px 10px; }
.vchat__livecall p { margin:4px 0 0; font-size:12px; color:var(--vchat-mute); }

/* --------------------------------------------------- crew comms panel (M3/M4) */
.vcomms { background: #0C0D0F; color: var(--vchat-alu); border: 1px solid var(--vchat-line); border-radius: 12px; padding: 14px; }
.vcomms__head--overlay { text-align: center; margin: 0 0 12px; }
.vcomms__head--overlay h2 { color: #F10000; font-size: 28px; }
.vcomms__sub { margin:0 0 12px; color: var(--vchat-mute); font-size: 13px; }
.vcomms__label { font-size:12px; letter-spacing:.08em; text-transform:uppercase; color: var(--vchat-mute); margin: 0 0 6px; font-weight:700; }
.vcomms__live { border:1px solid var(--vchat-line); background:#111317; border-radius:10px; padding:12px; margin-bottom:12px; }
.vcomms__live-top { display:flex; justify-content:space-between; align-items:center; gap:10px; margin-bottom:10px; }
.vcomms__live-status { font-size:12px; color: var(--vchat-mute); }
.vcomms__live-controls { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin-bottom:10px; }
.vcomms__micmode { display:flex; align-items:center; gap:6px; font-size:13px; color:var(--vchat-mute); }
.vcomms__micmode select, .vcomms__invite select { background:#1B1E23; color:var(--vchat-alu); border:1px solid var(--vchat-line); border-radius:8px; padding:6px 8px; }
.vcomms__live-row { display:grid; grid-template-columns: 1fr 1fr; gap:12px; }
.vcomms__participants ul { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:4px; max-height:140px; overflow:auto; }
.vcomms__participants li { font-size:13px; padding:4px 0; border-bottom:1px solid rgba(255,255,255,.04); }
.vcomms__invite { display:flex; flex-direction:column; gap:6px; align-items:flex-start; }
.vcomms__audio { display:none; }
.vcomms__audio:not(:empty) { display:block; }
.vcomms__audio audio { display:none; }
.vcomms__hint { margin:10px 0 0; font-size:12px; color:var(--vchat-mute); }
.vcomms__chat { border:1px solid var(--vchat-line); background:#111317; border-radius:10px; padding:12px; }
.vcomms__msgs { display:block; height:clamp(280px, 46vh, 460px); max-height:none; min-height:0; overflow-y:auto; overflow-x:hidden; overscroll-behavior:contain; padding: 4px 2px; margin-bottom:10px; border:1px solid rgba(255,255,255,.04); border-radius:8px; background:#0f1114; }
.vcomms__msgs .vchat__msg { margin-bottom: 10px; }
.vcomms__form { display:flex; align-items:flex-end; gap:8px; position:relative; }
/* Two rigid rows: utility icons on top, write bar underneath. Voice is the
   first control on the write row (far left), send is always far right. */
.vcomms__composer {
  flex:1 1 auto; min-width:0;
  display:grid;
  grid-template-columns:32px minmax(0,1fr) 34px;
  grid-template-areas:"tools tools tools" "voice input send";
  align-items:center;
  gap:5px 4px;
  padding:6px 7px 7px;
  background:#1B1E23;
  border:1px solid var(--vchat-line);
  border-radius:14px;
}
.vcomms__composer:focus-within { border-color: var(--vchat-red); }
.vcomms__tools {
  grid-area:tools;
  display:flex; align-items:center; gap:2px;
  min-width:0; padding:0 2px 5px;
  border-bottom:1px solid rgba(255,255,255,.06);
}
/* Media and emoji sit at the right end of the tools row; poll / event stay
   left. The spacer absorbs the free space. */
.vcomms__tools-sp { flex: 1 1 auto; min-width: 0; }
.vcomms__replychip { margin: 0 0 8px; }
.vcomms__voice { grid-area:voice; justify-self:start; }
.vcomms__input { grid-area:input; width:100%; min-width:0; background:transparent; border:0; outline:none; color:var(--vchat-alu); padding:6px 4px; font:inherit; }
.vcomms__input::placeholder { color:#8a9099; }
.vcomms__ico { flex:0 0 32px; width:32px; height:32px; display:inline-flex; align-items:center; justify-content:center; padding:0; border:0; border-radius:50%; background:transparent; color:#9098A4; cursor:pointer; line-height:0; transition:color .15s ease, background .15s ease; }
.vcomms__ico > svg { display:block; flex:0 0 auto; }
.vcomms__ico:hover, .vcomms__ico:focus-visible { color:#F10000; background:rgba(241,0,0,.10); outline:none; }
.vcomms__send { grid-area:send; justify-self:end; flex:0 0 34px; width:34px; height:34px; display:inline-flex; align-items:center; justify-content:center; padding:0; border:0; border-radius:50%; background:#F10000; color:#fff; cursor:pointer; }
.vcomms__send:hover { filter:brightness(1.08); }
.vcomms__emoji-wrap { position:relative; flex:0 0 auto; }
.vcomms__emoji-btn { width:32px; height:32px; border:0; background:transparent; }
.vcomms__emoji-pop { position:absolute; right:0; bottom:calc(100% + 8px); z-index:30; display:grid; grid-template-columns:repeat(8, 1fr); gap:2px; width:280px; max-height:200px; overflow:auto; padding:8px; background:#16181C; border:1px solid #2A2E34; border-radius:10px; box-shadow:0 12px 30px rgba(0,0,0,.5); }
.vcomms__emoji-pop[hidden] { display:none !important; }
.vcomms__emoji-pop button { border:0; background:transparent; font-size:19px; line-height:1; padding:5px; border-radius:6px; cursor:pointer; }
.vcomms__emoji-pop button:hover, .vcomms__emoji-pop button:focus-visible { background:rgba(255,255,255,.08); outline:none; }
@media (max-width: 720px) {
  .vcomms__live-row { grid-template-columns: 1fr; }
  .vcomms__live-controls { flex-direction: column; align-items: stretch; }
}
@media (max-width: 600px) {
  .vcomms__composer { gap:4px 2px; padding:6px 6px 7px; }
  .vcomms__ico { flex-basis:30px; width:30px; height:30px; }
  .vcomms__emoji-btn { width:30px; height:30px; }
  .vcomms__emoji-pop { width:min(280px, 86vw); }
}

/* Crew chat tab styled like forums page */
.vcomms.vcomms--forum {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  color: #EDEBE6;
}
.vcomms--forum .vcomms__head--forum {
  margin: 0 0 14px;
  padding: 14px 16px;
  background: #131518;
  border: 1px solid #26292F;
  border-radius: 3px;
}
.vcomms--forum .vcomms__head--forum h2 {
  margin: 0 0 4px;
  font-family: "Oswald", "Bebas Neue", Impact, "Arial Narrow", sans-serif;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-size: 22px;
  color: #fff;
}
.vcomms--forum .vcomms__sub {
  margin: 0;
  color: #9098A4;
  font-size: 13px;
}
.vcomms--forum .vcomms__chat {
  background: #131518;
  border: 1px solid #26292F;
  border-radius: 3px;
  padding: 14px;
}
.vcomms--forum .vcomms__label {
  font-family: "Oswald", "Bebas Neue", Impact, "Arial Narrow", sans-serif;
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #9098A4;
  margin-bottom: 8px;
}
.vcomms--forum .vcomms__msgs {
  height: clamp(320px, 52vh, 560px);
  max-height: none;
  background: #0C0D0F;
  border: 1px solid #1C1F24;
  border-radius: 3px;
  padding: 10px;
}
.vcomms--forum .vcomms__composer { border-radius: 3px; background: #191B1F; border-color: #26292F; }
.vcomms--forum .vcomms__composer:focus-within { border-color: #F10000; }
.vcomms--forum .vcomms__input { background: transparent; border: 0; color: #EDEBE6; }
.vcomms--forum .vcomms__send { border-radius: 3px; }
.vcomms--forum .vcomms__emoji-btn { border-radius: 3px; background: #191B1F; border-color: #26292F; }
.vcomms--live .vcomms__live { margin-bottom: 0; }

/* --------------------------------------------------- live room extras */
.vgar__btn[hidden] { display:none !important; }
.vcomms__live-top-end { display:flex; align-items:center; justify-content:flex-end; gap:8px; min-width:0; }
.vcomms__chat-toggle { display:inline-flex; align-items:center; gap:6px; padding:5px 10px; font-size:12px; line-height:1.2; }
.vcomms__chat-toggle.has-unread { border-color: var(--vchat-red); color: #fff; }
.vcomms__chat-toggle.has-unread .vcomms__chat-badge { animation: vliveBadgePulse 1.2s ease-in-out infinite; }
@keyframes vliveBadgePulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.15); } }
.vcomms__chat-badge {
  display:inline-flex; align-items:center; justify-content:center; min-width:17px; height:17px;
  padding:0 4px; border-radius:999px; background:var(--vchat-red); color:#fff;
  font:700 10px/1 Arial,sans-serif;
}
.vcomms__chat-badge[hidden] { display:none !important; }

.vcomms__live-chat {
  margin-top:12px; padding-top:12px; border-top:1px solid rgba(255,255,255,.07);
}
.vcomms__live-chat[hidden] { display:none !important; }
.vcomms__live-chat-head { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.vcomms__live-chat-head .vcomms__label { margin:0; }
.vcomms__live-chat-close {
  display:inline-flex; align-items:center; justify-content:center;
  width:34px; height:34px; padding:0; border:1px solid var(--vchat-line);
  border-radius:3px; background:#191B1F; color:var(--vchat-alu); cursor:pointer;
}
.vcomms__live-chat-close:hover,
.vcomms__live-chat-close:focus-visible { border-color:var(--vchat-red); color:#fff; outline:none; }

/* Live room chat is a real viewport layer: chat.js moves the pane to <body>
   on open, so no Crew card, clip-path, transform or in-flow panel can sit on
   top of it. The header stays above (99995); the Crew tab and cards go under. */
body.vlive-chat-open { overflow:hidden; }
body.vlive-chat-open #masthead,
body.vlive-chat-open #main-header,
body.vlive-chat-open .site-header,
body.vlive-chat-open .ct-header,
body.vlive-chat-open .main-header,
body.vlive-chat-open #colophon,
body.vlive-chat-open .site-footer,
body.vlive-chat-open .ct-footer,
body.vlive-chat-open .main-footer,
body.vlive-chat-open .vchat--docked { display:none !important; }
body.vlive-chat-open .vgp__nav--footer,
body.vlive-chat-open .vgp__crew-tab,
body.vlive-chat-open .vgp__panels { display:none !important; }
body.vlive-chat-open .vcomms__live-chat.vlive-chat__layer {
  position:fixed; top:0; right:0; bottom:0; left:0;
  z-index:100000; display:flex; flex-direction:column;
  box-sizing:border-box; margin:0; padding: calc(18px + env(safe-area-inset-top, 0px)) 16px calc(16px + env(safe-area-inset-bottom, 0px));
  background:#0C0D0F; border:0; border-radius:0; overflow:hidden; overscroll-behavior:contain;
}
body.vlive-chat-open .vcomms__live-chat.vlive-chat__layer[hidden] { display:none !important; }
body.vlive-chat-open .vcomms__live-chat.vlive-chat__layer .vcomms__live-chat-head { flex:0 0 auto; }
body.vlive-chat-open .vcomms__live-chat.vlive-chat__layer .vcomms__label {
  margin:0; font-family:"Oswald",sans-serif; font-size:18px; letter-spacing:.12em;
  color:#fff; text-transform:uppercase;
}
body.vlive-chat-open .vcomms__live-chat.vlive-chat__layer .vlive-chat__msgs {
  flex:1 1 auto; height:auto; max-height:none; min-height:0; margin-bottom:10px;
}
body.vlive-chat-open .vcomms__live-chat.vlive-chat__layer .vlive-chat__form {
  flex:0 0 auto; position:sticky; bottom:0; padding-bottom:env(safe-area-inset-bottom, 0px);
  background:#0C0D0F;
}
body.vlive-chat-open .vcomms__live-chat.vlive-chat__layer .vlive-chat__count { flex:0 0 auto; }
.vlive-chat__msgs {
  height:220px; max-height:220px; overflow-y:auto; overscroll-behavior:contain;
  margin:0 0 8px; padding:8px 10px; background:#0C0D0F;
  border:1px solid #1C1F24; border-radius:3px;
}
.vlive-chat__msgs[hidden] { display:none !important; }
.vlive-chat__empty { margin:0 0 8px; color:var(--vchat-mute); font-size:12px; }
.vlive-chat__form { display:flex; align-items:center; gap:6px; }
.vlive-chat__form[hidden] { display:none !important; }
.vlive-chat__input {
  flex:1 1 auto; min-width:0; padding:8px 10px; background:#1B1E23;
  border:1px solid var(--vchat-line); border-radius:3px;
  color:var(--vchat-alu); font:inherit; font-size:13px; outline:none;
}
.vlive-chat__input:focus { border-color:var(--vchat-red); }
.vlive-chat__input:disabled { opacity:.5; cursor:not-allowed; }
.vlive-chat__send { flex:0 0 34px; border-radius:3px; }
.vlive-chat__send:disabled { background:#4A2222; cursor:not-allowed; }
.vlive-chat__count { margin-top:4px; color:#757D88; font-size:10px; text-align:right; }

.vlive-msg { display:flex; align-items:flex-start; gap:8px; padding:5px 0; border-bottom:1px solid rgba(255,255,255,.035); }
.vlive-msg:last-child { border-bottom:0; }
.vlive-msg__ava {
  flex:0 0 22px; width:22px; height:22px; border-radius:50%; overflow:hidden;
  display:inline-flex; align-items:center; justify-content:center;
  background:#22262C; color:var(--vchat-alu); font-size:11px; font-weight:700;
}
.vlive-msg__ava img { width:100%; height:100%; object-fit:cover; display:block; }
.vlive-msg__main { flex:1 1 auto; min-width:0; }
.vlive-msg__meta { display:flex; align-items:baseline; gap:6px; }
.vlive-msg__meta strong { font-size:12px; font-weight:700; color:#fff; }
.vlive-msg__meta time { font-size:10px; color:#757D88; }
.vlive-msg__body { font-size:12px; line-height:1.4; color:#D8D6D1; overflow-wrap:anywhere; white-space:pre-wrap; }
.vlive-msg.is-self .vlive-msg__meta strong { color:var(--vchat-red); }
.vlive-msg.is-self .vlive-msg__ava { background:rgba(241,0,0,.18); color:#fff; }

.vcomms__participants li { display:flex; align-items:center; gap:6px; }
.vlive-ava { width:20px; height:20px; border-radius:50%; object-fit:cover; flex:0 0 20px; }
.vlive-ava--initial { display:inline-flex; align-items:center; justify-content:center; background:#22262C; font-size:10px; font-weight:700; }
.vlive-name { flex:1 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.vlive-mic { color:#757D88; font-size:10px; }
.vcomms__participants li.is-self .vlive-name { color:var(--vchat-red); }
.vlive-talk { flex:0 0 6px; width:6px; height:6px; border-radius:50%; background:#3A3F47; }
.vcomms__participants li[data-talking="1"] .vlive-talk { background:var(--vchat-red); box-shadow:0 0 0 3px rgba(241,0,0,.16); }

.vgar__btn[data-vcomms-ptt] { touch-action:none; user-select:none; -webkit-user-select:none; }
.vgar__btn[data-vcomms-ptt].is-transmitting { background:var(--vchat-red); border-color:var(--vchat-red); color:#fff; }
.vcomms__audio-unlock {
  display:block; width:100%; margin-top:8px; padding:8px 10px;
  background:#1B1E23; border:1px solid var(--vchat-red); border-radius:3px;
  color:#fff; font:600 12px/1.2 Oswald,sans-serif; letter-spacing:.04em; cursor:pointer;
}

@media (max-width: 600px) {
  .vcomms__live-top { align-items:flex-start; }
  .vcomms__live-top-end { flex-wrap:wrap; }
  .vcomms__chat-toggle { padding:5px 8px; }
  .vlive-chat__msgs { height:240px; max-height:240px; }
  body.vlive-chat-open .vcomms__live-chat.vlive-chat__layer { padding-top:14px; padding-left:8px; padding-right:8px; }
  .vcomms__composer { padding-right:4px; }
  .vcomms__composer .vcomms__ico { flex-basis:28px; width:28px; height:28px; }
  .vcomms__composer .vcomms__emoji-btn { width:32px; height:32px; }
  .vcomms__composer .vcomms__send { flex-basis:32px; width:32px; height:32px; }
  .vcomms__composer .vcomms__input { padding:7px 4px; font-size:16px; }
}


/* Shared content card */
.vchat__share{display:block;border:1px solid rgba(237,235,230,.12);border-radius:12px;overflow:hidden;background:#111215;color:#EDEBE6;text-decoration:none;margin:4px 0;max-width:320px}
.vchat__share:hover{border-color:rgba(241,0,0,.55);transform:translateY(-1px)}
.vchat__share-media{display:block;position:relative;background:#0C0D0F;aspect-ratio:16/9;overflow:hidden}
.vchat__share-media img{width:100%;height:100%;object-fit:cover;display:block}
.vchat__share-media--empty{display:flex;align-items:center;justify-content:center;min-height:88px;aspect-ratio:auto;background:linear-gradient(135deg,#1a1b1f,#0C0D0F)}
.vchat__share-badge{position:absolute;left:10px;bottom:10px;display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border-radius:999px;background:rgba(12,13,15,.78);border:1px solid rgba(237,235,230,.14);font:600 11px/1 Oswald,Arial Narrow,sans-serif;letter-spacing:.04em;text-transform:uppercase;color:#EDEBE6;backdrop-filter:blur(4px)}
.vchat__share-media--empty .vchat__share-badge{position:static}
.vchat__share-body{display:flex;flex-direction:column;gap:4px;padding:10px 12px 12px}
.vchat__share-kicker{font:600 10px/1.2 Oswald,Arial Narrow,sans-serif;letter-spacing:.08em;text-transform:uppercase;color:#F10000}
.vchat__share-title{font:600 15px/1.25 Oswald,Arial Narrow,sans-serif;color:#EDEBE6;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.vchat__share-excerpt{font:400 12px/1.45 Arial,sans-serif;color:rgba(237,235,230,.72);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.vchat__share-author{display:inline-flex;align-items:center;gap:6px;margin-top:2px;font:500 11px/1.2 Arial,sans-serif;color:rgba(237,235,230,.66)}
.vchat__share-avatar{width:18px !important;height:18px !important;aspect-ratio:1 / 1;border-radius:50% !important;object-fit:cover;flex:0 0 18px}
.vchat__share--reel .vchat__share-badge{background:rgba(241,0,0,.82);border-color:rgba(241,0,0,.9);color:#fff}
.vchat__share--event .vchat__share-kicker{color:#ffb347}
.vchat__share--institute .vchat__share-kicker{color:#7dd3fc}
.vchat__share--track .vchat__share-kicker{color:#86efac}
.vchat__share--forum .vchat__share-kicker{color:#c4b5fd}
.vchat__share--photo .vchat__share-kicker{color:#f9a8d4}
.vchat__share--garage .vchat__share-kicker{color:#fca5a5}

/* Shared-card phrases — the phrase reads as the message; the kicker stays a short label. */
.vchat__share-phrase{display:block;font:500 13px/1.35 Arial,sans-serif;color:#EDEBE6}
.vchat__share-phrase:empty,.vchat__share-title:empty,.vchat__share-excerpt:empty{display:none}
.vchat__share-body{gap:3px}
.vchat__body{overflow-wrap:anywhere}

/* Mic mode segmented control */
.vcomms__mictoggle { display:inline-flex; gap:4px; }
.vcomms__micbtn { padding:4px 8px; font-size:11px; }
.vcomms__micbtn.is-active { border-color:var(--vchat-red); color:#fff; background:rgba(241,0,0,.14); }
/* Voice note recording */
.vcomms__ico.is-recording { color:#fff; background:var(--vchat-red); animation: vliveBadgePulse 1s ease-in-out infinite; }

/* Crew comms/chat titles: centered, smaller */
.vcomms__head { text-align: center; }
.vcomms__head h2 { font-size: 18px; }


/* Forum/Channel scope rows in chat list */
.vchat__scope-head{margin:10px 12px 4px;font:600 9px/1 Oswald,"Arial Narrow",sans-serif;letter-spacing:.14em;text-transform:uppercase;color:rgba(237,235,230,.55)}
.vchat__thread--scope{text-decoration:none;color:inherit;display:flex;align-items:center;gap:10px;width:100%;padding:8px 9px;border-radius:10px}
.vchat__thread--scope .vchat__tinfo{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}
.vchat__thread--scope .vchat__tname{font-size:13.5px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.vchat__thread--scope .vchat__tlast{font-size:11.5px;color:var(--vchat-mute);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.vchat__ava-wrap--scope{width:38px;height:38px;border-radius:50%;overflow:hidden;flex:0 0 38px;background:#16181C;display:grid;place-items:center;border:1px solid var(--vchat-line)}
.vchat__scope-img{width:100%;height:100%;object-fit:cover;display:block}
.vchat__scope-fallback{font:700 14px/1 Oswald,"Arial Narrow",sans-serif;color:#F10000}
.vchat__scope-chev{margin-left:auto;color:rgba(237,235,230,.45);display:flex;align-items:center;flex:0 0 auto}
.vchat__scope-link{color:#F10000;text-decoration:none;font-weight:600}


/* Vesper modal (poll/event/share) */
.vchat__modal{position:fixed;inset:0;z-index:100000;display:flex;align-items:center;justify-content:center;padding:16px}
.vchat__modal-back{position:absolute;inset:0;background:rgba(0,0,0,.72)}
.vchat__modal-card{position:relative;width:min(520px,100%);max-height:calc(100vh - 32px);overflow:auto;background:#121418;border:1px solid rgba(237,235,230,.12);border-radius:14px;padding:16px;color:#EDEBE6;box-shadow:0 20px 60px rgba(0,0,0,.5)}
.vchat__modal-title{margin:0 0 12px;font:700 16px/1.2 Oswald,"Arial Narrow",sans-serif;letter-spacing:.04em;text-transform:uppercase}
.vchat__modal-lbl{display:block;margin:0 0 10px;font-size:12px;color:rgba(237,235,230,.75)}
.vchat__modal-inp{display:block;width:100%;box-sizing:border-box;margin-top:6px;padding:10px 12px;background:#0C0D0F;border:1px solid rgba(237,235,230,.14);border-radius:10px;color:#EDEBE6;font:inherit}
.vchat__modal-inp:focus{outline:none;border-color:rgba(241,0,0,.65)}
.vchat__modal-ta{resize:vertical;min-height:88px}
.vchat__modal-act{display:flex;justify-content:flex-end;gap:8px;margin-top:14px}
.vchat__modal-btn{appearance:none;border:1px solid rgba(237,235,230,.16);background:#1A1D22;color:#EDEBE6;border-radius:10px;padding:9px 14px;font:600 12px/1 Oswald,"Arial Narrow",sans-serif;letter-spacing:.04em;text-transform:uppercase;cursor:pointer}
.vchat__modal-btn.is-red{background:#F10000;border-color:#F10000;color:#fff}
.vchat__modal-btn.is-ghost{background:transparent}

/* Share preview modal */
.vchat__share{appearance:none;-webkit-appearance:none;width:100%;text-align:left;cursor:pointer;font:inherit;border:0;background:transparent;padding:0;color:inherit;display:block}
.vchat__sprev-media{width:100%;aspect-ratio:16/9;background:#0C0D0F;border-radius:10px;overflow:hidden;margin-bottom:12px}
.vchat__sprev-media img{width:100%;height:100%;object-fit:cover;display:block}
.vchat__sprev-media--empty{display:grid;place-items:center;color:rgba(237,235,230,.5);font:600 12px/1 Oswald,sans-serif;letter-spacing:.08em;text-transform:uppercase}
.vchat__sprev-kind{font:600 10px/1 Oswald,sans-serif;letter-spacing:.12em;text-transform:uppercase;color:#F10000;margin-bottom:6px}
.vchat__sprev-title{font-size:16px;font-weight:700;color:#EDEBE6;margin-bottom:4px;line-height:1.3}
.vchat__sprev-author{font-size:12px;color:rgba(237,235,230,.6);margin-bottom:14px}
.vchat__sprev-act{display:flex;gap:8px;flex-wrap:wrap}
.vchat__sprev-act .vchat__modal-btn{text-decoration:none;display:inline-flex;align-items:center;justify-content:center}
