/* Room chat + share button (2026-11-15). Uses Salon's own tokens from shared.css. */
.share-btn { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 4px 0 14px; }
.share-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.chat { position: fixed; right: 14px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 60; }
.chat.hidden { display: none; }
.chat-bubble {
  width: 54px; height: 54px; border-radius: 50%; border: 0; cursor: pointer; position: relative;
  display: grid; place-items: center; color: #1b1300;
  background: var(--accent-gold); box-shadow: 0 10px 24px -8px rgba(255, 199, 0, .55), 0 2px 6px rgba(0, 0, 0, .35);
  transition: transform .18s cubic-bezier(.34, 1.56, .64, 1);
}
.chat-bubble:active { transform: scale(.92); }
.chat-bubble svg { width: 25px; height: 25px; fill: currentColor; }
.chat.open .chat-bubble { transform: scale(.86); opacity: .0; pointer-events: none; }
.chat-badge {
  position: absolute; top: -3px; right: -3px; min-width: 21px; height: 21px; padding: 0 6px; border-radius: 11px;
  background: var(--accent-coral); color: #fff; font: 700 12px/21px var(--font-body); text-align: center;
  box-shadow: 0 0 0 2px var(--bg-deep);
}
.chat-badge.hidden { display: none; }
.chat-badge.pop { animation: chat-pop .45s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes chat-pop { 0% { transform: scale(.4); } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }

/* a message arriving while the chat is closed: a short preview beside the bubble */
.chat-peek {
  position: absolute; right: 64px; bottom: 9px; max-width: min(250px, 64vw); padding: 9px 13px; border-radius: 16px 16px 4px 16px;
  background: var(--bg-card-raised); color: var(--text-light); font: 500 14px/1.35 var(--font-body);
  border: 1px solid var(--border-soft); box-shadow: 0 10px 26px -10px rgba(0, 0, 0, .6);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer;
}
.chat-peek.hidden { display: none; }
.chat-peek.show { animation: chat-peek 3.5s ease forwards; }
@keyframes chat-peek { 0% { opacity: 0; transform: translateX(10px) scale(.96); } 8%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; } }

.chat-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; max-width: 560px; margin: 0 auto; height: min(62vh, 520px);
  display: flex; flex-direction: column; background: var(--bg-card); border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  border: 1px solid var(--border-soft); border-bottom: 0; box-shadow: 0 -18px 50px -12px rgba(0, 0, 0, .65);
  padding-bottom: env(safe-area-inset-bottom);
  transform: translateY(105%); transition: transform .32s cubic-bezier(.22, .61, .36, 1); visibility: hidden;
}
.chat.open .chat-sheet { transform: none; visibility: visible; }
.chat-head { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0 10px; padding: 16px 18px 10px; }
.chat-head b { font: 700 17px var(--font-display); color: var(--text-light); }
.chat-head .muted { grid-column: 1; font-size: 12px; color: var(--text-muted); }
.chat-close { grid-row: 1 / span 2; grid-column: 2; width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--bg-card-raised); color: var(--text-light); font-size: 22px; line-height: 1; }
.chat-list { list-style: none; margin: 0; padding: 6px 16px 10px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 8px; overscroll-behavior: contain; }
.chat-msg { max-width: 82%; align-self: flex-start; background: var(--bg-card-raised); border-radius: 16px 16px 16px 5px; padding: 7px 12px 8px; }
.chat-msg.mine { align-self: flex-end; background: rgba(255, 199, 0, .14); border-radius: 16px 16px 5px 16px; }
.chat-msg.fresh { animation: chat-in .28s cubic-bezier(.22, .61, .36, 1); }
@keyframes chat-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.chat-meta { display: flex; gap: 8px; align-items: baseline; }
.chat-who { font: 700 12.5px var(--font-body); }
.chat-meta time { font-size: 11px; color: var(--text-muted); }
.chat-msg p { margin: 2px 0 0; color: var(--text-light); font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; }
.chat-msg p.big { font-size: 30px; line-height: 1.15; }
.chat-quick { display: flex; gap: 6px; padding: 0 14px 8px; overflow-x: auto; scrollbar-width: none; }
.chat-quick button { flex: none; height: 34px; min-width: 42px; padding: 0 10px; border-radius: 17px; border: 1px solid var(--border-soft);
  background: var(--bg-card-raised); color: var(--text-light); font: 600 15px var(--font-body); cursor: pointer; }
.chat-quick button:active { transform: scale(.94); }
.chat-form { display: flex; gap: 8px; padding: 4px 14px 14px; }
.chat-form input { flex: 1; min-width: 0; height: 46px; border-radius: 23px; padding: 0 16px; font-size: 16px; }
.chat-send { width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--accent-gold); color: #1b1300; display: grid; place-items: center; cursor: pointer; }
.chat-send svg { width: 20px; height: 20px; fill: currentColor; }
@media (prefers-reduced-motion: reduce) { .chat-sheet, .chat-bubble { transition: none; } .chat-msg.fresh, .chat-peek.show, .chat-badge.pop { animation: none; } }

/* Imposter: hold-to-reveal role card. The face covers the secret until a finger is on it. */
.hold-card { display: grid; width: 100%; border: 0; cursor: pointer; color: var(--text-light); position: relative; overflow: hidden;
  min-height: 230px; padding: 0; font: inherit; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: none;
  box-shadow: inset 0 0 0 1px var(--border-soft); }
.hold-card.compact { min-height: 150px; }
.hold-card > span { grid-area: 1 / 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 26px 20px; transition: opacity .16s ease, transform .2s cubic-bezier(.22, .61, .36, 1); }
.hold-face svg { width: 46px; height: 46px; fill: var(--accent-gold); margin-bottom: 10px; opacity: .9; }
.hold-face b { font: 700 20px var(--font-display); }
.hold-face small { color: var(--text-muted); font-size: 13px; margin-top: 4px; }
.hold-card .hold-secret { opacity: 0; transform: scale(.97); }
.hold-card.shown .hold-face { opacity: 0; transform: scale(1.03); }
.hold-card.shown .hold-secret { opacity: 1; transform: none; }
.hold-card.compact .role-word { font-size: 28px; margin: 4px 0; }
.hold-card:not(.shown) .hold-face svg { animation: hold-breathe 2.4s ease-in-out infinite; }
@keyframes hold-breathe { 50% { transform: scale(1.08); opacity: .7; } }
/* the imposter tint shows only while revealed, so the covered card looks the same for everyone */
.hold-card.imp { background: linear-gradient(160deg, var(--bg-card), var(--bg-card-raised)); border: 0; }
.hold-card.imp.shown { background: linear-gradient(160deg, #3a1c22, #201216); box-shadow: inset 0 0 0 2px var(--accent-coral); }
@media (prefers-reduced-motion: reduce) { .hold-card > span { transition: none; } .hold-card:not(.shown) .hold-face svg { animation: none; } }
