/* CigarPass — lounge chat (/chat). Dark mahogany room, brass trim, leather-soft bubbles. */
.chat-main { padding: 2rem 1.25rem 3rem; }
.chat { max-width: 1180px; margin: 0 auto; display: flex; flex-direction: column; height: calc(100vh - var(--header-h) - 4rem); min-height: 560px; }
.chat__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.chat__eyebrow { margin: 0; display: flex; align-items: center; gap: .5rem; font-family: var(--font-ui); font-size: .72rem; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: var(--brass); }
.chat__live { width: .55rem; height: .55rem; border-radius: 50%; background: #5fe06c; animation: chat-ping 1.8s infinite; }
@keyframes chat-ping { 0% { box-shadow: 0 0 0 0 rgba(95,224,108,.7); } 70% { box-shadow: 0 0 0 .55rem rgba(95,224,108,0); } 100% { box-shadow: 0 0 0 0 rgba(95,224,108,0); } }
.chat__count { color: #b5f0bd; letter-spacing: .14em; }
.chat__head h1 { margin: .2rem 0 0; font-size: clamp(1.6rem, 3vw, 2.2rem); color: var(--brass-hi); }
.chat__topic { margin: .25rem 0 0; font-family: var(--font-body); font-style: italic; color: var(--parchment-dim); }
.chat__rooms { display: flex; flex-wrap: wrap; gap: .4rem; }
.chat__rooms a { padding: .35rem .8rem; border-radius: 99px; font-family: var(--font-ui); font-size: .82rem; color: var(--parchment-dim); border: 1px solid rgba(212,154,66,.25); }
.chat__rooms a:hover { color: var(--brass-hi); border-color: var(--brass); }
.chat__rooms a[aria-current] { color: #2a160b; background: linear-gradient(180deg, #f3d18c, #c88f38); border-color: #e2b766; }
.chat__announce { margin: 0 0 .8rem; padding: .6rem 1rem; border-radius: 6px; font-size: .92rem; color: var(--parchment);
  background: linear-gradient(90deg, rgba(212,154,66,.18), rgba(212,154,66,.04)); border: 1px solid rgba(212,154,66,.35); }

.chat__body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 1rem; }
.chat__stream { position: relative; display: flex; flex-direction: column; min-height: 0; border-radius: 10px; overflow: hidden;
  background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(212,154,66,.08), transparent 70%), linear-gradient(180deg, #1a0f0a, #110906);
  border: 1px solid rgba(212,154,66,.3); box-shadow: 0 18px 40px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,220,160,.06); }
.chat__log { flex: 1; min-height: 0; overflow-y: auto; margin: 0; padding: 1rem 1.1rem .5rem; list-style: none; scroll-behavior: smooth; }
.chat__empty { position: absolute; inset: 40% 0 auto; margin: 0; text-align: center; font-family: var(--font-body); font-style: italic; color: var(--parchment-dim); }

/* messages */
.msg { position: relative; display: grid; grid-template-columns: 2.4rem 1fr; column-gap: .75rem; padding: .45rem .5rem .2rem; border-radius: 6px; margin-top: .35rem; }
.msg--cont { margin-top: 0; padding-top: .1rem; }
.msg--cont .msg__text { grid-column: 2; }
.msg:hover { background: rgba(255,255,255,.025); }
.msg--mention { background: rgba(212,154,66,.10); box-shadow: inset 3px 0 0 var(--brass); }
.msg__av, .here__av { position: relative; display: grid; place-items: center; overflow: hidden; border-radius: 50%; color: #fff6e6;
  background: radial-gradient(circle at 35% 30%, hsl(var(--hue, 30) 45% 48%), hsl(var(--hue, 30) 50% 24%) 80%); box-shadow: 0 0 0 1.5px rgba(212,154,66,.6); }
.msg__av { grid-row: span 2; width: 2.4rem; height: 2.4rem; font-family: var(--font-plaque); font-weight: 700; }
.msg__av img, .here__av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.msg__head { display: flex; align-items: baseline; gap: .5rem; min-width: 0; }
.msg__name { font-family: var(--font-ui); font-weight: 700; font-size: .92rem; color: var(--brass-hi); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg--mine .msg__name { color: #f6e3bd; }
.msg__tag { flex: none; padding: .05rem .4rem; border-radius: 3px; font-family: var(--font-ui); font-size: .62rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--parchment-dim); border: 1px solid rgba(184,169,153,.35); }
.msg__tag--mod { color: #2a160b; background: linear-gradient(180deg, #f3d18c, #c88f38); border-color: transparent; }
.msg__time { flex: none; font-family: var(--font-ui); font-size: .72rem; color: #8f7c66; }
.msg__text { grid-column: 2; margin: .1rem 0 0; font-family: var(--font-ui); font-size: .95rem; line-height: 1.5; color: #efe4d3; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg__text a { color: var(--brass-hi); text-decoration: underline; text-underline-offset: 2px; }
.msg__at { color: var(--brass); font-weight: 600; }
.msg__at.is-me { color: #2a160b; background: #f0c47a; padding: 0 .25rem; border-radius: 3px; }
.msg__tools { position: absolute; top: .25rem; right: .4rem; display: none; gap: .2rem; }
@media (hover: hover) { .msg:hover .msg__tools, .msg:focus-within .msg__tools { display: flex; } }
.msg__tools button { padding: .15rem .35rem; border-radius: 4px; border: 1px solid rgba(212,154,66,.3); background: #1d110b; cursor: pointer; font-size: .8rem; }
.msg__tools button:hover { border-color: var(--brass); }

.chat__jump { position: absolute; left: 50%; bottom: 5rem; transform: translateX(-50%); z-index: 3; padding: .4rem 1rem; border-radius: 99px; cursor: pointer;
  font-family: var(--font-ui); font-size: .82rem; font-weight: 600; color: #2a160b; background: linear-gradient(180deg, #f3d18c, #c88f38); border: 0; box-shadow: 0 6px 16px rgba(0,0,0,.5); }

/* composer */
.chat__composer { position: relative; display: flex; align-items: flex-end; gap: .5rem; padding: .75rem; border-top: 1px solid rgba(212,154,66,.22); background: rgba(0,0,0,.25); }
.chat__composer[hidden] { display: none; }
.chat__composer textarea { flex: 1; min-height: 2.6rem; max-height: 140px; resize: none; padding: .6rem .8rem; border-radius: 6px; font: inherit; font-family: var(--font-ui); font-size: .95rem; line-height: 1.4;
  color: var(--parchment); background: #0d0705; border: 1px solid rgba(212,154,66,.3); }
.chat__composer textarea:focus { outline: none; border-color: var(--brass); box-shadow: 0 0 0 3px rgba(212,154,66,.15); }
.chat__send { flex: none; height: 2.6rem; padding: 0 1.2rem; border: 0; border-radius: 6px; cursor: pointer; font-family: var(--font-plaque); font-weight: 700; letter-spacing: .06em; color: #2a160b;
  background: linear-gradient(180deg, #f3d18c, #c88f38); }
.chat__send:hover { filter: brightness(1.08); }
.chat__emoji-btn { flex: none; width: 2.6rem; height: 2.6rem; border-radius: 6px; cursor: pointer; font-size: 1.2rem; background: #0d0705; border: 1px solid rgba(212,154,66,.3); }
.chat__emojis { position: absolute; left: .75rem; bottom: calc(100% + .4rem); z-index: 4; display: grid; grid-template-columns: repeat(8, 2.2rem); gap: .2rem; padding: .5rem; border-radius: 8px;
  background: #1b100a; border: 1px solid rgba(212,154,66,.4); box-shadow: 0 14px 30px rgba(0,0,0,.6); }
.chat__emojis[hidden] { display: none; }
.chat__emojis button { width: 2.2rem; height: 2.2rem; border: 0; border-radius: 4px; background: none; cursor: pointer; font-size: 1.2rem; }
.chat__emojis button:hover { background: rgba(212,154,66,.15); }
.chat__status { position: absolute; left: 4.2rem; bottom: calc(100% + .2rem); margin: 0; font-family: var(--font-ui); font-size: .75rem; color: #e7a27a; pointer-events: none; }
.chat__readonly { margin: 0; padding: .9rem 1rem; border-top: 1px solid rgba(212,154,66,.22); text-align: center; font-size: .9rem; color: var(--parchment-dim); background: rgba(0,0,0,.25); }
.chat__readonly a { color: var(--brass-hi); }

/* join gate */
.chat__gate { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; padding: 1rem; background: rgba(10,5,3,.72); backdrop-filter: blur(3px); }
.chat__gate[hidden] { display: none; }
.chat__gate-card { width: min(28rem, 100%); padding: 1.6rem 1.6rem 1.3rem; text-align: center; border-radius: 10px;
  background: linear-gradient(180deg, #24140c, #160c07); border: 1px solid rgba(212,154,66,.5); box-shadow: 0 22px 50px rgba(0,0,0,.65); }
.chat__gate-card[hidden] { display: none; }
.chat__gate-card h2 { margin: 0 0 .5rem; font-size: 1.4rem; color: var(--brass-hi); }
.chat__gate-card p { margin: 0 0 .6rem; color: var(--parchment); }
.chat__gate-card a { color: var(--brass-hi); }
.chat__gate-row { display: flex; gap: .5rem; justify-content: center; margin-top: .8rem; flex-wrap: wrap; }
.chat__gate-row input { flex: 1; min-width: 10rem; padding: .6rem .8rem; border-radius: 6px; font: inherit; font-family: var(--font-ui); color: var(--parchment); background: #0d0705; border: 1px solid rgba(212,154,66,.35); }
.chat__gate-row .btn { padding: .6rem 1rem; }
.chat__err { min-height: 1.2em; margin: .6rem 0 0 !important; font-size: .85rem; color: #e7a27a !important; }

/* who's here */
.chat__side { display: flex; flex-direction: column; min-height: 0; padding: 1rem; border-radius: 10px; background: linear-gradient(180deg, #1a0f0a, #110906); border: 1px solid rgba(212,154,66,.22); }
.chat__side h2 { margin: 0 0 .8rem; display: flex; align-items: center; justify-content: space-between; font-family: var(--font-ui); font-size: .75rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--brass); }
.chat__side h2 b { padding: .05rem .5rem; border-radius: 99px; color: #b5f0bd; background: rgba(60,160,80,.15); border: 1px solid rgba(110,210,125,.35); letter-spacing: 0; }
.chat__here { flex: 1; min-height: 0; overflow-y: auto; margin: 0; padding: 0; list-style: none; display: grid; align-content: start; gap: .45rem; }
.chat__here li { display: flex; align-items: center; gap: .55rem; min-width: 0; font-family: var(--font-ui); font-size: .88rem; color: var(--parchment); }
.chat__here li.is-guest { color: var(--parchment-dim); }
.here__av { flex: none; width: 1.7rem; height: 1.7rem; font-family: var(--font-plaque); font-size: .75rem; font-weight: 700; }
.here__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat__me { margin-top: .8rem; padding-top: .8rem; border-top: 1px solid rgba(212,154,66,.2); display: grid; gap: .3rem; font-size: .8rem; color: var(--parchment-dim); }
.chat__me[hidden] { display: none; }
.chat__me .linklike { justify-self: start; color: var(--brass); font-size: .8rem; }
.chat-closed { max-width: 40rem; margin: 4rem auto; text-align: center; }

@media (max-width: 860px) {
  .chat-main { padding: 1rem .6rem 1.5rem; }
  .chat { height: calc(100vh - var(--header-h) - 2rem); min-height: 480px; }
  .chat__body { grid-template-columns: 1fr; }
  .chat__side { display: none; }
  .chat__head h1 { font-size: 1.4rem; }
  .chat__topic { font-size: .85rem; }
}
@media (prefers-reduced-motion: reduce) { .chat__live { animation: none; } .chat__log { scroll-behavior: auto; } }

/* ── Chat room view (Admin → Lounge Themes, kind "Chat room") ───────────────────────────
   The room photo fills the screen; the messages sit on the left wall panel, "In the lounge"
   on the right one. Positions are % of the photo, so they track the panels at any size.
   Small screens (panels would be too tiny) keep the normal chat layout. */
.chat__povbar, .chat__povhead { display: none; }
@media (min-width: 900px) and (min-height: 540px) {
  body.chat-pov-page { overflow: hidden; background: #070403; }
  body.chat-pov-page #site-header, body.chat-pov-page .site-footer { display: none !important; }
  body.chat-pov-page .chat-main { padding: 0; }
  .chat--pov { position: fixed; inset: 0; max-width: none; height: auto; min-height: 0; margin: 0; display: block; overflow: hidden; }
  .chat--pov .chat__head { display: none; }

  /* the photo "stage": covers the screen, but never so zoomed that the panels leave it */
  .chat--pov .chat__body {
    --sh: min(max(100vh, calc(100vw / var(--ar))), 215vh);
    --sw: calc(var(--sh) * var(--ar));
    position: absolute; display: block; gap: 0;
    width: var(--sw); height: var(--sh);
    left: calc(50vw - var(--sw) / 2);
    top: clamp(calc(100vh - var(--sh)), calc(50vh - var(--sh) * .375), 0px);
    background: var(--pov-bg) center / 100% 100% no-repeat;
  }
  .chat--pov .chat__stream, .chat--pov .chat__side { position: absolute; border-radius: 3px; box-shadow: none; border: 0; }
  .chat--pov .chat__stream { left: var(--fl); top: var(--ft); width: var(--fw); height: var(--fh);
    background: rgba(12, 7, 5, .8); box-shadow: inset 0 0 0 1px rgba(212,154,66,.14), inset 0 0 40px rgba(0,0,0,.5); }
  .chat--pov .chat__side { left: var(--rl); top: var(--rt); width: var(--rw); height: var(--rh); padding: .8rem .7rem;
    background: rgba(12, 7, 5, .72); box-shadow: inset 0 0 0 1px rgba(212,154,66,.12); }

  /* text scales with the panel (stage height) so it stays readable and fits */
  .chat--pov .chat__body { font-size: clamp(13px, calc(var(--sh) * .0125), 17px); }
  .chat--pov .chat__log { padding: .6rem .8rem .3rem; }
  .chat--pov .chat__povhead { display: flex; align-items: center; gap: .5rem; flex: none; padding: .5rem .85rem; font-family: var(--font-ui);
    font-size: .7rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--brass); border-bottom: 1px solid rgba(212,154,66,.14); }
  .chat--pov .chat__announce { margin: .5rem .7rem 0; flex: none; }
  .chat--pov .chat__side h2 { font-size: .66rem; letter-spacing: .16em; }
  .chat--pov .chat__here { font-size: .9em; }

  .chat--pov .chat__povbar { display: flex; flex-wrap: wrap; gap: .4rem; position: fixed; z-index: 5; top: 1rem; left: 1rem; }
  .chat__povbar a { padding: .4rem .9rem; border-radius: 99px; font-family: var(--font-ui); font-size: .8rem; color: var(--parchment);
    background: rgba(10,6,4,.7); border: 1px solid rgba(212,154,66,.3); backdrop-filter: blur(4px); text-decoration: none; }
  .chat__povbar a:hover { color: var(--brass-hi); border-color: var(--brass); }
  .chat__povbar a[aria-current] { color: #2a160b; background: linear-gradient(180deg, #f3d18c, #c88f38); border-color: #e2b766; }
}
@media (min-width: 900px) and (min-height: 540px) {
  .chat--pov .chat__me .linklike { padding: 0; background: none; border: 0; color: var(--brass); font: inherit; font-size: .85rem; cursor: pointer; text-decoration: underline; }
}

/* Chat room view keeps the site menu at the top: the room fills the space below it */
@media (min-width: 900px) and (min-height: 540px) {
  body.chat-pov-page #site-header { display: block !important; }
  body.chat-pov-page { padding-top: 0; }
  .chat--pov { top: var(--header-h); --vh: calc(100vh - var(--header-h)); }
  .chat--pov .chat__body {
    --sh: min(max(var(--vh), calc(100vw / var(--ar))), calc(var(--vh) * 2.15));
    top: clamp(calc(var(--vh) - var(--sh)), calc(var(--vh) / 2 - var(--sh) * .375), 0px);
  }
  .chat--pov .chat__back { display: none; }                 /* the menu is right there */
  .chat--pov .chat__povbar { top: calc(var(--header-h) + 1rem); }
  .chat--pov .chat__povbar:not(:has(.chat__povroom)) { display: none; }
}

/* =====================================================================
   v24 — the chat comes alive
   ===================================================================== */
/* room events: "Rod pulled up a chair" */
.msg--event { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: .45rem; margin: .45rem 0; padding: .15rem .5rem;
  font-family: var(--font-body); font-style: italic; font-size: .86rem; color: #a8957f; text-align: center; background: none !important; }
.msg--event .msg__time { font-style: normal; font-size: .68rem; opacity: .7; }
.msg--event .ev__icon { font-style: normal; font-size: .9em; filter: saturate(.8); }
.msg--event b { font-style: normal; font-family: var(--font-ui); font-weight: 600; color: var(--brass-hi); }
.msg--smoke, .msg--cheers { color: #d9c2a0; }
.msg--smoke .ev__icon { animation: ev-ember 2.4s ease-in-out infinite; }
@keyframes ev-ember { 50% { filter: drop-shadow(0 0 6px #ff8a3c) saturate(1.3); } }
.msg--event .msg__rx { flex-basis: 100%; justify-content: center; }

/* day dividers */
.chat__day { display: flex; align-items: center; gap: .8rem; margin: 1rem 0 .4rem; font-family: var(--font-ui); font-size: .68rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: #8f7c66; }
.chat__day::before, .chat__day::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(212,154,66,.25), transparent); }

/* reactions */
.msg__react { position: absolute; top: -.7rem; right: .6rem; z-index: 2; display: none; gap: .1rem; padding: .15rem; border-radius: 99px;
  background: #1d110b; border: 1px solid rgba(212,154,66,.35); box-shadow: 0 6px 14px rgba(0,0,0,.5); }
@media (hover: hover) { .can-react .msg:hover > .msg__react, .can-react .msg:focus-within > .msg__react { display: flex; } }
.can-react .msg.show-react > .msg__react, .msg.show-react .msg__tools { display: flex; }
.msg__react button { width: 1.8rem; height: 1.8rem; border: 0; border-radius: 50%; background: none; cursor: pointer; font-size: 1rem; line-height: 1; transition: transform .12s; }
.msg__react button:hover { transform: scale(1.25); background: rgba(212,154,66,.15); }
.msg--event { position: relative; }
.msg--event .msg__react { top: 50%; right: .3rem; transform: translateY(-50%); }
.msg__tools { right: 11rem; top: -.6rem; }
.msg__rx { grid-column: 2; display: flex; flex-wrap: wrap; gap: .3rem; margin: .25rem 0 .1rem; }
.msg__rx:empty { display: none; }
.rx { display: inline-flex; align-items: center; gap: .3rem; padding: .1rem .5rem; border-radius: 99px; cursor: pointer; font: 600 .78rem/1.4 var(--font-ui); color: var(--parchment);
  background: rgba(212,154,66,.08); border: 1px solid rgba(212,154,66,.25); transition: background .15s, transform .15s; }
.rx:hover { background: rgba(212,154,66,.16); }
.rx.is-mine { background: rgba(240,196,122,.22); border-color: #f0c47a; color: #fff1d6; }
.rx b { font-weight: 600; }
.rx, .msg__react button { animation: rx-pop .25s ease-out; }
@keyframes rx-pop { from { transform: scale(.6); opacity: 0; } }
.is-busy { opacity: .5; }

/* who's here: away + now smoking */
.here__who { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.2; }
.here__cigar, .here__away { font-size: .74rem; color: #d8a868; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.here__away { color: #8f7c66; font-style: italic; }
.chat__here li.is-away { opacity: .5; }
.chat__here li.is-away .here__av { filter: grayscale(.7); }
.chat__here li.is-smoking .here__av { box-shadow: 0 0 0 1.5px #ff9a4a, 0 0 .55rem rgba(255,120,40,.75); animation: here-ember 3.2s ease-in-out infinite; }
@keyframes here-ember { 50% { box-shadow: 0 0 0 1.5px #ffb26b, 0 0 1rem rgba(255,120,40,.95); } }

/* typing */
.chat__typing { flex: none; height: 1.4rem; margin: 0; padding: 0 1rem; display: flex; align-items: center; gap: .4rem; font-family: var(--font-ui); font-size: .76rem; font-style: italic; color: #a8957f; opacity: 0; transition: opacity .25s; }
.chat__typing.is-on { opacity: 1; }
.chat__dots { display: inline-flex; gap: 3px; }
.chat__dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--brass); animation: dots 1.2s infinite ease-in-out; }
.chat__dots i:nth-child(2) { animation-delay: .15s; } .chat__dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dots { 0%, 60%, 100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-4px); opacity: 1; } }

/* vHerf banner */
.chat__vh { flex: none; display: flex; align-items: center; gap: .5rem; margin: .5rem .7rem 0; padding: .45rem .8rem; border-radius: 6px; text-decoration: none;
  font-family: var(--font-ui); font-size: .82rem; color: #ffd9d3; background: linear-gradient(90deg, rgba(217,69,59,.28), rgba(217,69,59,.08)); border: 1px solid rgba(217,69,59,.55); }
.chat__vh[hidden] { display: none; }
.chat__vh b { color: #fff; letter-spacing: .04em; }
.chat__vh span:not(.chat__vh-dot) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat__vh em { font-style: normal; font-weight: 700; color: #fff; }
.chat__vh:hover { border-color: #ff8b80; }
.chat__vh-dot { width: .55rem; height: .55rem; border-radius: 50%; background: #e0483c; box-shadow: 0 0 .6em #e0483c; animation: vh-blink 1.5s infinite; flex: none; }
@keyframes vh-blink { 50% { opacity: .35; } }

/* the quiet room */
.chat__empty { position: static; inset: auto; flex: 1 1 auto; min-height: 0; overflow: hidden; display: grid; align-content: center; justify-items: center; gap: .8rem; padding: .4rem 1.2rem .8rem; font-style: normal; }
.chat__stream.is-quiet .chat__log { flex: 0 1 auto; max-height: 40%; }
.chat__empty[hidden] { display: none; }
.chat__empty-lead { margin: 0; font-family: var(--font-body); font-style: italic; font-size: 1.05rem; color: var(--parchment-dim); }
.chat__quiet { display: grid; gap: .5rem; width: min(30rem, 100%); pointer-events: auto; }
.chat__quiet:empty { display: none; }
.quiet__row { display: grid; grid-template-columns: 8.2rem 1fr; align-items: center; gap: .7rem; padding: .45rem .75rem; border-radius: 8px; text-align: left; text-decoration: none;
  background: rgba(212,154,66,.05); border: 1px solid rgba(212,154,66,.16); font-family: var(--font-ui); }
.quiet__k { font-size: .64rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--brass); }
.quiet__v { display: flex; flex-direction: column; min-width: 0; }
.quiet__v b { color: var(--parchment); font-size: .9rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quiet__v small { color: #a8957f; font-size: .76rem; }
.quiet__people { display: flex; flex-wrap: wrap; gap: .4rem .9rem; }
.quiet__p { display: inline-flex; align-items: center; gap: .35rem; }
.quiet__p b { color: var(--parchment); font-size: .84rem; font-weight: 600; }
.quiet__p small { color: #8f7c66; font-size: .72rem; }
.quiet__p .here__av { width: 1.4rem; height: 1.4rem; font-size: .62rem; }
.quiet__row--vh { border-color: rgba(217,69,59,.35); }
.quiet__row--vh:hover { border-color: #ff8b80; }
.quiet__row--vh .quiet__k { color: #ff8b80; }
@media (max-width: 560px) { .quiet__row { grid-template-columns: 1fr; gap: .3rem; } }

/* raise a glass */
.chat__clink { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; pointer-events: none; opacity: 0; }
.chat__clink span { grid-area: 1 / 1; font-size: 3.4rem; filter: drop-shadow(0 6px 14px rgba(0,0,0,.6)); }
.chat__clink.is-on { animation: clink-fade 1.9s ease forwards; }
.chat__clink.is-on span:first-child { animation: clink-l 1.9s cubic-bezier(.3,1.4,.5,1) forwards; }
.chat__clink.is-on span:last-child { animation: clink-r 1.9s cubic-bezier(.3,1.4,.5,1) forwards; }
.chat__clink::after { content: "✨"; grid-area: 1 / 1; font-size: 2rem; transform: translateY(-2.4rem); opacity: 0; }
.chat__clink.is-on::after { animation: clink-spark 1.9s ease forwards; }
@keyframes clink-fade { 0% { opacity: 0; } 10%, 75% { opacity: 1; } 100% { opacity: 0; } }
@keyframes clink-l { 0% { transform: translateX(-7rem) rotate(-25deg); } 40%, 100% { transform: translateX(-1.1rem) rotate(14deg); } }
@keyframes clink-r { 0% { transform: translateX(7rem) rotate(25deg) scaleX(-1); } 40%, 100% { transform: translateX(1.1rem) rotate(-14deg) scaleX(-1); } }
@keyframes clink-spark { 0%, 38% { opacity: 0; transform: translateY(-2rem) scale(.4); } 48% { opacity: 1; transform: translateY(-2.6rem) scale(1.2); } 80%, 100% { opacity: 0; transform: translateY(-3.2rem) scale(.9); } }

/* composer extras: now smoking, cheers, @mention picker */
.chat__smoke-btn.is-lit { border-color: #ff9a4a; box-shadow: 0 0 .7rem rgba(255,120,40,.55); animation: here-ember 3.2s ease-in-out infinite; }
.chat__cheers-btn:active { transform: rotate(-12deg) scale(.95); }
.chat__smokepop { position: absolute; left: 3.6rem; bottom: calc(100% + .4rem); z-index: 4; display: grid; gap: .5rem; width: min(22rem, calc(100% - 4.5rem)); padding: .8rem; border-radius: 8px;
  background: #1b100a; border: 1px solid rgba(212,154,66,.4); box-shadow: 0 14px 30px rgba(0,0,0,.6); font-family: var(--font-ui); }
.chat__smokepop[hidden] { display: none; }
.chat__smokepop label { font-size: .78rem; font-weight: 600; letter-spacing: .06em; color: var(--brass); }
.chat__smokerow { display: flex; gap: .4rem; }
.chat__smokerow input { flex: 1; min-width: 0; padding: .5rem .7rem; border-radius: 6px; font: inherit; font-size: .9rem; color: var(--parchment); background: #0d0705; border: 1px solid rgba(212,154,66,.3); }
.chat__smokerow .chat__send { height: auto; padding: 0 .9rem; font-size: .8rem; }
.chat__smokepop .linklike { justify-self: start; padding: 0; background: none; border: 0; cursor: pointer; font: inherit; font-size: .78rem; color: #a8957f; text-decoration: underline; }
.chat__mention { position: absolute; left: 6rem; bottom: calc(100% + .3rem); z-index: 5; min-width: 13rem; margin: 0; padding: .3rem; list-style: none; border-radius: 8px;
  background: #1b100a; border: 1px solid rgba(212,154,66,.4); box-shadow: 0 14px 30px rgba(0,0,0,.6); font-family: var(--font-ui); font-size: .88rem; }
.chat__mention[hidden] { display: none; }
.chat__mention li { display: flex; align-items: center; gap: .5rem; padding: .35rem .5rem; border-radius: 5px; cursor: pointer; color: var(--parchment); }
.chat__mention li.is-sel, .chat__mention li:hover { background: rgba(212,154,66,.18); color: #fff1d6; }
.chat__mention .here__av { width: 1.4rem; height: 1.4rem; font-size: .62rem; }
@media (max-width: 560px) { .chat__composer { flex-wrap: wrap; } .chat__composer textarea { flex-basis: calc(100% - 9rem); } }

/* ---- room effects in the chat-room photo (desktop room view only) ---- */
.chatfx { display: none; }
@media (min-width: 900px) and (min-height: 540px) {
  .chat--pov .chatfx { display: block; position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
  .chat--pov .chat__stream, .chat--pov .chat__side { z-index: 1; }
  /* firelight: a warm pool that breathes and flickers, plus a faint wash across the room */
  .chatfx__fire { position: absolute; left: var(--fx-firex); top: var(--fx-firey); width: 26%; aspect-ratio: 1; transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(255,150,60,.5), rgba(255,110,30,.2) 38%, transparent 68%); mix-blend-mode: screen; animation: fx-flicker 3.1s steps(1) infinite; }
  .chatfx__fire--wash { width: 70%; opacity: .5; background: radial-gradient(circle, rgba(255,140,60,.18), rgba(255,120,40,.06) 45%, transparent 70%); animation: fx-flicker2 4.3s ease-in-out infinite; }
  @keyframes fx-flicker { 0% { opacity: .85; } 8% { opacity: .6; } 15% { opacity: 1; } 27% { opacity: .72; } 34% { opacity: .95; } 46% { opacity: .66; }
    55% { opacity: .9; } 63% { opacity: .78; } 71% { opacity: 1; } 82% { opacity: .7; } 90% { opacity: .92; } }
  @keyframes fx-flicker2 { 0%, 100% { opacity: .45; transform: translate(-50%, -50%) scale(1); } 30% { opacity: .62; transform: translate(-50%, -50%) scale(1.04); } 60% { opacity: .38; } }
  /* the cigar's ember: someone's taking slow draws */
  .chatfx__ember { position: absolute; left: var(--fx-emberx); top: var(--fx-embery); width: 2.2%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%;
    background: radial-gradient(circle, rgba(255,220,150,1), rgba(255,120,30,.85) 30%, rgba(255,70,20,0) 70%); mix-blend-mode: screen; animation: fx-ember 5.5s ease-in-out infinite; }
  @keyframes fx-ember { 0%, 100% { opacity: .45; transform: translate(-50%, -50%) scale(.85); } 18% { opacity: 1; transform: translate(-50%, -50%) scale(1.25); } 40% { opacity: .6; } }
  /* drifting smoke */
  .chatfx__smoke { position: absolute; left: var(--fx-emberx); top: var(--fx-embery); width: 0; height: 0; }
  .chatfx__smoke i { position: absolute; left: 0; top: 0; width: calc(var(--sw, 100vw) * .03); aspect-ratio: .7; border-radius: 50%; transform: translate(-50%, -50%);
    background: radial-gradient(ellipse, rgba(235,230,222,.55), rgba(225,220,212,.18) 45%, transparent 70%); filter: blur(5px); opacity: 0; mix-blend-mode: screen; animation: fx-smoke 9s linear infinite; }
  .chatfx__smoke i:nth-child(2) { animation-delay: -1.8s; animation-duration: 10s; }
  .chatfx__smoke i:nth-child(3) { animation-delay: -3.6s; animation-duration: 8.5s; }
  .chatfx__smoke i:nth-child(4) { animation-delay: -5.4s; animation-duration: 11s; }
  .chatfx__smoke i:nth-child(5) { animation-delay: -7.2s; animation-duration: 9.5s; }
  @keyframes fx-smoke {
    0%   { opacity: 0;   transform: translate(-50%, -50%) scale(.4); }
    12%  { opacity: .75; }
    35%  { transform: translate(calc(-50% + var(--sw, 100vw) * .006), calc(-50% - var(--sh, 100vh) * .09)) scale(1); }
    60%  { opacity: .45; transform: translate(calc(-50% - var(--sw, 100vw) * .008), calc(-50% - var(--sh, 100vh) * .17)) scale(1.7); }
    100% { opacity: 0;   transform: translate(calc(-50% + var(--sw, 100vw) * .012), calc(-50% - var(--sh, 100vh) * .28)) scale(2.6); }
  }
  /* a glint in the crystal now and then */
  .chatfx__glint { position: absolute; left: var(--fx-glassx); top: var(--fx-glassy); width: 1.8%; aspect-ratio: 1; transform: translate(-50%, -50%) scale(0);
    background: radial-gradient(circle, #fff 0 8%, rgba(255,240,210,.7) 12%, transparent 40%),
                linear-gradient(90deg, transparent 46%, rgba(255,250,235,.95) 50%, transparent 54%),
                linear-gradient(0deg, transparent 46%, rgba(255,250,235,.95) 50%, transparent 54%);
    mix-blend-mode: screen; animation: fx-glint 9s ease-in-out infinite 2s; }
  @keyframes fx-glint { 0%, 88%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(0) rotate(0); } 93% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(45deg); } }
}
@media (prefers-reduced-motion: reduce) {
  .chatfx i, .chatfx__smoke i, .chat__dots i, .chat__here li.is-smoking .here__av, .chat__smoke-btn.is-lit, .msg--smoke .ev__icon, .chat__vh-dot { animation: none !important; }
  .chatfx__smoke { display: none; }
}
/* quiet room inside the photo's wall panel: three compact tiles side by side */
@media (min-width: 900px) and (min-height: 540px) {
  .chat--pov .chat__empty { overflow-y: auto; gap: .55rem; padding: .3rem .8rem .6rem; }
  .chat--pov .chat__empty-lead { font-size: .95rem; }
  .chat--pov .chat__quiet { width: 100%; grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); gap: .45rem; }
  .chat--pov .quiet__row { grid-template-columns: 1fr; align-content: start; gap: .25rem; padding: .45rem .6rem; }
  .chat--pov .quiet__k { font-size: .58rem; }
  .chat--pov .quiet__v b { font-size: .82rem; }
  .chat--pov .quiet__v small { font-size: .7rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .chat--pov .quiet__people { flex-direction: column; gap: .2rem; }
  .chat--pov .quiet__p small { display: none; }
  .chat--pov .chat__stream.is-quiet .chat__log { max-height: 30%; }
}
@media (min-width: 900px) and (min-height: 540px) {
  .chat--pov .chat__empty-lead, .chat--pov .chat__stream.is-quiet .chat__day { display: none; }
  .chat--pov .chat__stream.is-quiet .chat__log { padding-top: .2rem; }
  .chat--pov .quiet__v small { -webkit-line-clamp: 1; }
  .chat--pov .chat__empty { align-content: end; }
}
@media (min-width: 900px) and (min-height: 540px) {
  .chat--pov .quiet__people { flex-direction: row; flex-wrap: nowrap; overflow: hidden; gap: .15rem; }
  .chat--pov .quiet__p .here__av { display: none; }
  .chat--pov .quiet__p b { font-size: .82rem; white-space: nowrap; }
  .chat--pov .quiet__p + .quiet__p b::before { content: "· "; color: #8f7c66; }
}

/* =====================================================================
   Phones: chat behaves like a messaging app
   ===================================================================== */
.chat__mbar, .chat__plus, .chat__sidex, .chat__siderooms, .chat__scrim { display: none; }
.chat__tools { display: contents; }
@media (max-width: 860px) {
  body.chat-page { overflow: hidden; overscroll-behavior: none; }
  body.chat-page .site-footer { display: none; }
  body.chat-page .chat-main { padding: 0; }
  .chat { position: fixed; z-index: 5; left: 0; right: 0; margin: 0; min-height: 0; max-width: none;
    top: calc(var(--vvt, 0px) + var(--header-h)); height: calc(var(--vvh, 100dvh) - var(--header-h)); }
  body.kb-open .chat { top: var(--vvt, 0px); height: var(--vvh, 100dvh); }
  body.kb-open.chat-page .site-header { visibility: hidden; }
  .chat__head { display: none; }
  .chat__mbar { display: flex; align-items: center; gap: .55rem; flex: none; padding: .55rem .9rem; border-bottom: 1px solid rgba(212,154,66,.22);
    background: linear-gradient(180deg, #1d100a, #140a06); font-family: var(--font-ui); }
  .chat__mroom { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-plaque); font-size: 1.05rem; color: var(--brass-hi); letter-spacing: .04em; }
  .chat__herebtn { flex: none; display: inline-flex; align-items: center; gap: .3rem; padding: .35rem .75rem; border-radius: 99px; cursor: pointer;
    font: 600 .8rem/1 var(--font-ui); color: #b5f0bd; background: rgba(60,160,80,.14); border: 1px solid rgba(110,210,125,.4); }
  .chat__herebtn::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: #5ed36c; box-shadow: 0 0 .5em #5ed36c; }
  .chat__body { display: flex; flex-direction: column; flex: 1; min-height: 0; gap: 0; }
  .chat__stream { flex: 1; border-radius: 0; border: 0; box-shadow: none; }
  .chat__log { padding: .6rem .7rem .3rem; }
  .msg { grid-template-columns: 2rem 1fr; column-gap: .6rem; padding: .35rem .3rem .15rem; }
  .msg__av { width: 2rem; height: 2rem; font-size: .85rem; }
  .msg__text { font-size: 1rem; }
  /* pinned note and vHerf banner: one thin line (tap the note to read it all) */
  .chat__announce { margin: .4rem .6rem 0 !important; padding: .35rem .7rem; font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; flex: none; }
  .chat__announce.is-open { white-space: normal; }
  .chat__vh { margin: .35rem .6rem 0; padding: .3rem .7rem; font-size: .78rem; }
  .chat__typing { height: 1.2rem; padding: 0 .8rem; }
  /* composer: "+" opens the 🙂 🔥 🥃 tray; the text box gets the width, at 16px so iPhones don't zoom */
  .chat__composer { flex-wrap: wrap; gap: .4rem; padding: .5rem .55rem calc(.5rem + env(safe-area-inset-bottom, 0px)); }
  .chat__composer textarea { flex: 1 1 0; min-width: 0; font-size: 16px; min-height: 2.5rem; padding: .55rem .75rem; border-radius: 1.25rem; }
  .chat__send { height: 2.5rem; padding: 0 1rem; border-radius: 1.25rem; }
  .chat__plus { display: grid; place-items: center; order: -2; width: 2.5rem; height: 2.5rem; border-radius: 50%; font: 400 1.5rem/1 var(--font-ui); color: var(--brass-hi); transition: transform .2s; }
  .chat__composer.is-tools .chat__plus { transform: rotate(45deg); }
  .chat__tools { display: none; order: -3; flex-basis: 100%; gap: .4rem; padding: 0 0 .1rem; }
  .chat__composer.is-tools .chat__tools { display: flex; }
  .chat__tools .chat__emoji-btn { width: auto; flex: 1; height: 2.4rem; border-radius: 8px; font-size: 1.15rem; }
  .chat__emojis { left: .5rem; right: .5rem; grid-template-columns: repeat(8, 1fr); }
  .chat__emojis button { width: auto; }
  .chat__smokepop { left: .5rem; right: .5rem; width: auto; }
  .chat__mention { left: .5rem; right: .5rem; }
  .chat__status { left: .8rem; }
  .chat__jump { bottom: 4.5rem; }
  /* who's here: a drawer from the right */
  .chat__side { display: flex; position: fixed; z-index: 70; top: 0; right: 0; bottom: 0; width: min(82vw, 320px); border-radius: 0; border: 0; border-left: 1px solid rgba(212,154,66,.35);
    padding: calc(1rem + env(safe-area-inset-top, 0px)) 1rem calc(1rem + env(safe-area-inset-bottom, 0px)); transform: translateX(105%); transition: transform .25s ease; box-shadow: -18px 0 40px rgba(0,0,0,.6); }
  .chat__side.is-open { transform: none; }
  .chat__sidex { display: grid; place-items: center; width: 2rem; height: 2rem; margin-left: .4rem; border: 0; border-radius: 50%; cursor: pointer; font-size: 1.4rem; line-height: 1; color: var(--parchment); background: rgba(255,255,255,.06); }
  .chat__side h2 { gap: .4rem; } .chat__side h2 b { margin-left: auto; }
  .chat__siderooms { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0 0 .9rem; }
  .chat__siderooms a { padding: .3rem .7rem; border-radius: 99px; font-family: var(--font-ui); font-size: .8rem; color: var(--parchment-dim); border: 1px solid rgba(212,154,66,.25); }
  .chat__siderooms a[aria-current] { color: #2a160b; background: linear-gradient(180deg, #f3d18c, #c88f38); }
  .chat__here li { font-size: .95rem; } .here__av { width: 2rem; height: 2rem; }
  .chat__scrim { display: block; position: fixed; inset: 0; z-index: 69; background: rgba(0,0,0,.55); }
  .chat__scrim[hidden] { display: none; }
  /* reactions: press and hold a message */
  .msg { -webkit-touch-callout: none; }
  .msg__react { top: auto; bottom: calc(100% - .4rem); right: .3rem; padding: .25rem; }
  .msg__react button { width: 2.3rem; height: 2.3rem; font-size: 1.25rem; }
  .msg__tools { right: auto; left: 2.6rem; top: -.4rem; }
  .msg.show-react { background: rgba(212,154,66,.08); }
  .quiet__row { grid-template-columns: 1fr; gap: .3rem; }
}
@media (max-width: 860px) {
  .chat__side { z-index: 1001; }
  .chat__scrim { z-index: 1000; }
  .chat__me .linklike { padding: 0; background: none; border: 0; color: var(--brass); font: inherit; font-size: .9rem; cursor: pointer; text-decoration: underline; }
}
@media (max-width: 860px) { body.side-open .chat { z-index: 1001; } }
