:root {
  --bg: #f4f1e8;
  --ink: #151515;
  --muted: #57595f;
  --panel: rgba(255, 255, 255, 0.82);
  --line: rgba(20, 20, 20, 0.12);
  --shadow: 0 12px 35px rgba(22, 30, 39, 0.14);

  --chatgpt: #22a86f;
  --gemini: #f39f32;
  --claude: #2686e8;
  --openrouter: #7c3aed;
  --deepseek: #4d6bfe;
  --mistral: #f97316;
}

* {
  box-sizing: border-box;
}

html {
  width: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  height: 100vh;
  width: 100%;
  font-family: "Space Grotesk", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 12% 18%, #dbeaf4, transparent 40%),
    radial-gradient(circle at 92% 75%, #f8deb8, transparent 35%), var(--bg);
  overflow: hidden;
  overflow-x: hidden;
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(circle at center, black 35%, transparent 85%);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.2rem;
  gap: 1rem;
}

.brand h1 {
  margin: 0;
  font-size: 1.25rem;
}

.brand p {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.menu-toggle {
  position: fixed;
  top: 0.7rem;
  right: 0.75rem;
  z-index: 50;
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(8px);
  border-radius: 8px;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(22, 30, 39, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.menu-toggle:hover {
  border-color: rgba(20, 20, 20, 0.3);
}

.menu-open .menu-toggle {
  background: #111;
  color: #fff;
  border-color: #111;
}

.panel-toggles {
  position: fixed;
  top: 3.6rem;
  right: 0.75rem;
  z-index: 40;
  display: grid;
  gap: 0.42rem;
  width: min(52vw, 148px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.menu-open .panel-toggles {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.panel-toggle,
.icon-btn {
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(8px);
  border-radius: 8px;
  font-size: 0.74rem;
  cursor: pointer;
  padding: 0.55rem 0.45rem;
  box-shadow: 0 8px 20px rgba(22, 30, 39, 0.1);
}

.panel-toggle:hover,
.icon-btn:hover {
  border-color: rgba(20, 20, 20, 0.3);
}

#admin-toggle {
  background: #111;
  border-color: #111;
  color: #fff;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  padding: 0 1.2rem 1.2rem;
  height: calc(100vh - 86px);
}

.chat-panel,
.archive-panel,
.admin-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 1.1rem;
}

.archive-panel {
  position: fixed;
  top: 4.8rem;
  left: 1.2rem;
  z-index: 30;
  width: min(88vw, 340px);
  height: calc(100vh - 6rem);
  overflow: hidden;
  padding: 0.85rem;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 0.7rem;
  transform: translateX(calc(-100% - 1.6rem));
  transition: transform 0.24s ease;
}

.archive-open .archive-panel {
  transform: translateX(0);
}

.archive-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.archive-head h2 {
  margin: 0;
  font-size: 1rem;
}

.archive-head button {
  padding: 0.45rem 0.65rem;
  font-size: 0.78rem;
}

.archive-list {
  min-height: 0;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 0.12rem;
}

.archive-empty {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.archive-row {
  display: flex;
  align-items: stretch;
}

.archive-share-btn {
  flex: 0 0 auto;
  background: transparent;
  border: none;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.65rem;
  font-family: "IBM Plex Mono", monospace;
  padding: 0 0.55rem;
  cursor: pointer;
  transition: color 0.15s;
  border-radius: 0 6px 6px 0;
  white-space: nowrap;
}

.archive-share-btn:hover {
  color: var(--ink);
}

.archive-item {
  text-align: left;
  display: grid;
  gap: 0.22rem;
  padding: 0.62rem 0.58rem;
  flex: 1 1 0;
  min-width: 0;
  border: 0;
  border-radius: 6px 0 0 6px;
  background: transparent;
}

.archive-item.active {
  background: rgba(255, 255, 255, 0.82);
  box-shadow: inset 3px 0 0 #111;
}

.archive-item:hover {
  background: rgba(255, 255, 255, 0.72);
}

.archive-item strong,
.archive-item span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.archive-item strong {
  white-space: nowrap;
  font-size: 0.84rem;
}

.archive-item span {
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
}

.chat-panel {
  height: 100%;
  width: min(100%, 1180px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding: 1rem;
  gap: 0.9rem;
  overflow: hidden;
}

.chat-head {
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.68);
  padding: 0.75rem 0.9rem;
}

.chat-head-label {
  margin: 0;
  font-size: 0.74rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: "IBM Plex Mono", monospace;
}

.chat-head h2 {
  margin: 0.2rem 0 0;
  font-size: 1.12rem;
  font-weight: 700;
}

.scoreboard {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.65rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  color: var(--muted);
}

.scoreboard span {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.75);
  padding: 0.28rem 0.42rem;
}

.scoreboard strong {
  color: var(--ink);
}

.avatar-strip {
  overflow: hidden;
  margin-top: 0.65rem;
  position: relative;
  mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
}

.avatar-strip-track {
  display: flex;
  width: 200%; /* 10 avatars × (W/5) = 2W pour 5 visibles sur desktop */
  animation: avatarTicker 24s linear infinite;
}

.avatar-strip:hover .avatar-strip-track {
  animation-play-state: paused;
}

.avatar {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  padding: 0.38rem;
  min-width: 0;
  /* flex sizing : chaque slot = 10% du track = W/visible */
  flex: 0 0 calc(10% - 0.4rem);
  margin: 0 0.2rem;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.vote-section {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  margin-top: 0.05rem;
}

.vote-btn {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.58rem;
  line-height: 1.4;
  padding: 0.1rem 0.25rem;
  border-radius: 4px;
  border: 1px solid rgba(20, 20, 20, 0.18);
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink);
  cursor: pointer;
  width: 100%;
  text-align: center;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vote-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(20, 20, 20, 0.35);
}

.vote-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.vote-btn.voted {
  background: rgba(20, 20, 20, 0.07);
  border-color: rgba(20, 20, 20, 0.3);
  font-weight: 600;
}

.vote-bar-track {
  width: 100%;
  height: 3px;
  background: rgba(20, 20, 20, 0.1);
  border-radius: 2px;
  overflow: hidden;
}

.vote-bar-fill {
  height: 100%;
  background: rgba(20, 20, 20, 0.38);
  border-radius: 2px;
  width: 0%;
  transition: width 0.45s ease;
}

.avatar-face {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  color: #fff;
  font-weight: 700;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  position: relative;
  overflow: hidden;
}

.avatar-letters {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.avatar-emoji {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 1.05rem;
  font-family: sans-serif;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* emoji-pop: emoji visible, letters hidden */
@keyframes emoji-pop-kf {
  0%   { }
  15%  { }
  85%  { }
  100% { }
}

.avatar.emoji-pop .avatar-emoji {
  opacity: 1;
  transform: scale(1);
}

.avatar.emoji-pop .avatar-letters {
  opacity: 0;
  transform: scale(0.6);
}

.avatar.chatgpt .avatar-face {
  background: var(--chatgpt);
}

.avatar.gemini .avatar-face {
  background: var(--gemini);
}

.avatar.claude .avatar-face {
  background: var(--claude);
}

.avatar.openrouter .avatar-face {
  background: var(--openrouter);
}

.avatar.deepseek .avatar-face {
  background: var(--deepseek);
}

.avatar.mistral .avatar-face {
  background: var(--mistral);
}

.avatar.quota-exceeded {
  background: rgba(239, 68, 68, 0.07);
  border-color: rgba(239, 68, 68, 0.28);
}

.avatar.quota-exceeded .avatar-name {
  color: #dc2626;
}

.avatar.quota-exceeded .avatar-face {
  opacity: 0.45;
}

.avatar-name,
.avatar-mood {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.avatar-name {
  font-size: 0.78rem;
  font-weight: 700;
}

.avatar-mood {
  color: var(--muted);
  font-size: 0.68rem;
  font-family: "IBM Plex Mono", monospace;
}

.avatar.speaking {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(20, 20, 20, 0.12);
  animation: avatarPulse 0.9s ease-in-out infinite;
}

.avatar.chatgpt.speaking {
  border-color: color-mix(in srgb, var(--chatgpt) 65%, black 10%);
}

.avatar.gemini.speaking {
  border-color: color-mix(in srgb, var(--gemini) 65%, black 10%);
}

.avatar.claude.speaking {
  border-color: color-mix(in srgb, var(--claude) 65%, black 10%);
}

.avatar.openrouter.speaking {
  border-color: color-mix(in srgb, var(--openrouter) 65%, black 10%);
}

.avatar.deepseek.speaking {
  border-color: color-mix(in srgb, var(--deepseek) 65%, black 10%);
}

.avatar.mistral.speaking {
  border-color: color-mix(in srgb, var(--mistral) 65%, black 10%);
}

.duel-card {
  margin-top: 0.6rem;
  border: 1px solid rgba(20, 20, 20, 0.18);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(17, 17, 17, 0.92), rgba(59, 48, 37, 0.88));
  color: #fff;
  padding: 0.58rem 0.68rem;
  box-shadow: 0 10px 26px rgba(20, 20, 20, 0.16);
  animation: popIn 0.22s ease-out;
}

.duel-card strong,
.duel-card span {
  display: block;
}

.duel-card strong {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: "IBM Plex Mono", monospace;
}

.duel-card span {
  margin-top: 0.18rem;
  font-size: 0.88rem;
}

.chat-frame {
  flex: 1;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: #fff;
  overflow: hidden;
}

.chat-log {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.bubble {
  max-width: min(86%, 820px);
  border-radius: 1rem;
  padding: 0.8rem;
  border: 1px solid var(--line);
  animation: fadeIn 0.22s ease-out;
}

.meta {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.35rem;
  font-size: 0.75rem;
  font-family: "IBM Plex Mono", monospace;
  color: #1f2937;
}

.bubble p {
  margin: 0;
  line-height: 1.45;
}

.bubble p.typing::after {
  content: "▍";
  display: inline-block;
  margin-left: 1px;
  color: var(--muted);
  animation: typingCursor 0.65s step-end infinite;
}

.bubble.chatgpt {
  align-self: flex-start;
  background: color-mix(in srgb, var(--chatgpt) 17%, white);
  border-color: color-mix(in srgb, var(--chatgpt) 32%, black 10%);
}

.bubble.gemini {
  align-self: center;
  background: color-mix(in srgb, var(--gemini) 18%, white);
  border-color: color-mix(in srgb, var(--gemini) 35%, black 10%);
}

.bubble.claude {
  align-self: flex-end;
  background: color-mix(in srgb, var(--claude) 17%, white);
  border-color: color-mix(in srgb, var(--claude) 30%, black 10%);
}

.bubble.openrouter {
  align-self: flex-start;
  background: color-mix(in srgb, var(--openrouter) 14%, white);
  border-color: color-mix(in srgb, var(--openrouter) 30%, black 10%);
}

.bubble.deepseek {
  align-self: center;
  background: color-mix(in srgb, var(--deepseek) 14%, white);
  border-color: color-mix(in srgb, var(--deepseek) 30%, black 10%);
}

.bubble.mistral {
  align-self: flex-end;
  background: color-mix(in srgb, var(--mistral) 12%, white);
  border-color: color-mix(in srgb, var(--mistral) 30%, black 10%);
}

.bubble.viewer {
  align-self: center;
  background: rgba(255, 255, 255, 0.75);
  border: 1.5px dashed rgba(20,20,20,0.25);
  border-radius: 10px;
  padding: 0.4rem 0.75rem;
  max-width: 82%;
  font-size: 0.88rem;
}

.bubble.viewer p {
  margin: 0.15rem 0 0;
}

.viewer-name {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  display: block;
}

.system-note {
  align-self: center;
  font-size: 0.78rem;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
}

.time-separator {
  align-self: center;
  font-size: 0.72rem;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  opacity: 0.65;
  margin: 0.6rem 0 0.2rem;
  letter-spacing: 0.03em;
}

.reaction-note {
  align-self: center;
  max-width: 88%;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: none;
  padding: 0.45rem 0.6rem;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  font-weight: 400;
  animation: popIn 0.22s ease-out;
}

.topic-form {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 0.8rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--line);
}

input,
select,
textarea {
  padding: 0.75rem;
  border-radius: 0.7rem;
  border: 1px solid var(--line);
  font-family: inherit;
  font-size: 16px;
  background: #fff;
}

input[type="range"] {
  padding: 0;
  border: 0;
  background: transparent;
}

.toggle-line {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.toggle-line input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
}

.muted-inline {
  color: var(--muted);
  font-size: 0.78rem;
  font-family: "IBM Plex Mono", monospace;
}

.topic-actions {
  display: flex;
  gap: 0.5rem;
}

.topic-actions button {
  flex: 1;
}

.link-button {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0.35rem 0;
  color: #111;
  text-decoration: underline;
  text-align: center;
}

.recover-box {
  display: grid;
  gap: 0.35rem;
  padding-top: 0.2rem;
}

.recover-box button {
  width: 100%;
  padding: 0.62rem 0.72rem;
  font-size: 0.82rem;
}

.recover-box p {
  min-height: 1rem;
  margin: 0;
}

.export-actions button {
  padding: 0.62rem 0.72rem;
  font-size: 0.82rem;
}

button {
  font: inherit;
  border-radius: 0.7rem;
  border: 1px solid var(--line);
  background: #fff;
  padding: 0.75rem 0.9rem;
  cursor: pointer;
}

#start-btn {
  background: #111;
  color: #fff;
}

#auth-submit-btn,
#login-btn {
  background: #111;
  border-color: #111;
  color: #fff;
}

.admin-panel {
  padding: 1rem;
  position: fixed;
  top: 4.8rem;
  right: 0.75rem;
  width: min(92vw, 360px);
  max-height: calc(100vh - 6rem);
  overflow: auto;
  backdrop-filter: blur(12px);
  transform: translateX(115%);
  transition: transform 0.24s ease;
  z-index: 35;
}

.admin-panel.open {
  transform: translateX(0);
  z-index: 140;
}

.settings-panel {
  width: min(92vw, 420px);
}

.settings-panel.open {
  transform: translateX(0);
}

.panel-headline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.panel-headline h2,
.admin-panel h2 {
  margin: 0;
}

.panel-close {
  display: none;
  padding: 0.45rem 0.65rem;
  font-size: 0.78rem;
}

.panel-close-bottom {
  display: block;
  width: 100%;
  margin-top: 1.5rem;
  padding: 0.65rem 1rem;
  font-size: 0.9rem;
  text-align: center;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}
.panel-close-bottom:hover {
  background: var(--surface2);
  color: var(--fg);
}

.auth-session {
  display: grid;
  gap: 0.75rem;
}

.auth-session p {
  margin: 0;
  color: var(--muted);
}

.auth-session button {
  background: #111;
  border-color: #111;
  color: #fff;
}

.admin-config[hidden],
.user-list[hidden],
.auth-session[hidden],
#auth-email-label[hidden],
#auth-form[hidden] {
  display: none;
}

.auth-login-mode #auth-email-label {
  display: none;
}

.viewer-panel {
  position: fixed;
  top: 4.8rem;
  right: 1.2rem;
  z-index: 30;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 8px;
  width: min(88vw, 360px);
  height: calc(100vh - 6rem);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  transform: translateX(calc(100% + 1.6rem));
  transition: transform 0.24s ease;
}

/* Explicit row assignments so layout is correct regardless of panel visibility */
.viewer-head     { grid-row: 1; }
.chat-vote-panel { grid-row: 2; }
.viewer-messages { grid-row: 3; }
.viewer-form     { grid-row: 4; }

.poll-chat-card {
  align-self: center;
  width: min(92%, 420px);
  border: 1.5px solid rgba(38, 134, 232, 0.25);
  border-radius: 10px;
  background: rgba(240, 246, 255, 0.82);
  padding: 0.6rem 0.7rem 0.65rem;
  box-shadow: 0 2px 10px rgba(38, 134, 232, 0.08);
}

.poll-chat-card-label {
  font-size: 0.68rem;
  font-family: "IBM Plex Mono", monospace;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 0.45rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.poll-chat-card-timer {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.62rem;
}

.inline-poll {
  display: grid;
  gap: 0.22rem;
}

.inline-poll-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.4rem;
  padding: 0.32rem 0.48rem;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  font-size: 0.78rem;
  text-align: left;
  transition: background 0.15s, border-color 0.15s;
  width: 100%;
}

.inline-poll-option:hover:not(:disabled) {
  background: #f0f4ff;
  border-color: rgba(20, 20, 20, 0.28);
}

.inline-poll-option:disabled {
  opacity: 0.7;
  cursor: default;
}

.inline-poll-option.voted {
  background: rgba(38, 134, 232, 0.1);
  border-color: rgba(38, 134, 232, 0.4);
  font-weight: 600;
}

.inline-poll-option.leading:not(.voted) {
  background: rgba(34, 168, 111, 0.08);
  border-color: rgba(34, 168, 111, 0.35);
}

.inline-poll-votes {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.6rem;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.poll-login-hint {
  margin: 0.25rem 0 0;
  font-size: 0.64rem;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
}

.chat-vote-panel {
  display: none;
  border-bottom: 1px solid var(--line);
  padding: 0.5rem 0.7rem 0.55rem;
  background: rgba(255, 255, 255, 0.6);
}

.chat-vote-panel.visible {
  display: block;
}

.chat-vote-label {
  margin: 0 0 0.38rem;
  font-size: 0.66rem;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.chat-vote-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.28rem;
}

.chat-vote-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  min-width: 0;
}

.chat-vote-model-name {
  font-size: 0.56rem;
  font-family: "IBM Plex Mono", monospace;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  text-align: center;
}

.chat-vote-btn {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.6rem;
  line-height: 1.35;
  padding: 0.18rem 0.2rem;
  border-radius: 5px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  width: 100%;
  text-align: center;
  transition: background 0.15s;
}

.chat-vote-btn:hover:not(:disabled) {
  background: #f4f4f4;
}

.chat-vote-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.chat-vote-btn.voted {
  background: rgba(20, 20, 20, 0.07);
  border-color: rgba(20, 20, 20, 0.3);
  font-weight: 700;
}

.chat-vote-bar-track {
  width: 100%;
  height: 2px;
  background: rgba(20, 20, 20, 0.1);
  border-radius: 2px;
  overflow: hidden;
}

.chat-vote-bar-fill {
  height: 100%;
  background: rgba(20, 20, 20, 0.38);
  transition: width 0.4s ease;
}

.viewer-open .viewer-panel {
  transform: translateX(0);
}

.viewer-head {
  border-bottom: 1px solid var(--line);
  padding: 0.75rem;
}

.viewer-head-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.viewer-head h2 {
  margin: 0;
  font-size: 1rem;
}

.viewer-head p {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.xp-bar-container {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.4rem;
  flex-wrap: wrap;
}

.xp-level {
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.xp-bar-track {
  flex: 1;
  height: 5px;
  background: rgba(20,20,20,0.1);
  border-radius: 3px;
  min-width: 40px;
}

.xp-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #22a86f, #f39f32);
  border-radius: 3px;
  transition: width 0.6s ease;
}

.xp-label {
  font-size: 0.68rem;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  white-space: nowrap;
}

.viewer-count {
  font-size: 0.68rem;
  font-family: "IBM Plex Mono", monospace;
  color: var(--muted);
  background: rgba(20,20,20,0.06);
  border-radius: 12px;
  padding: 0.15rem 0.5rem;
  white-space: nowrap;
}

.viewer-messages {
  min-height: 0;
  overflow: auto;
  padding: 0.75rem;
  display: grid;
  align-content: start;
  gap: 0.55rem;
}

.viewer-message {
  display: grid;
  gap: 0.1rem;
  border-bottom: 1px solid rgba(20, 20, 20, 0.08);
  padding-bottom: 0.45rem;
  font-size: 0.86rem;
}

.viewer-message strong {
  color: #111;
}

.viewer-message.admin-message {
  border: 1px solid rgba(17, 17, 17, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  padding: 0.45rem;
}

.viewer-message.admin-message strong {
  color: #b45309;
}

.viewer-message span {
  color: var(--muted);
}

.viewer-form {
  display: flex;
  gap: 0.4rem;
  border-top: 1px solid var(--line);
  padding: 0.35rem;
}

.viewer-form input {
  min-width: 0;
  flex: 1;
  padding: 0.42rem 0.55rem;
  border-radius: 0.48rem;
  font-size: 16px;
}

.viewer-form button {
  flex: 0 0 auto;
  min-width: 96px;
  padding: 0.42rem 0.55rem;
  border-radius: 0.48rem;
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: visible;
  background: #111;
  border-color: #111;
  color: #fff;
}

.viewer-form button:disabled {
  background: #d8d8d8;
  border-color: #c8c8c8;
  color: #333;
}

.user-list {
  display: grid;
  gap: 0.45rem;
}

.user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.45rem;
  font-size: 0.85rem;
}

.live-mode {
  background: #111;
}

.live-mode .bg-grid {
  display: none;
}

.live-mode .topbar {
  position: static;
  z-index: 20;
  padding: 0;
}

.live-mode .brand {
  display: none;
}

.live-mode .layout {
  grid-template-columns: minmax(0, 1fr);
  width: min(100vw, 840px);
  height: 100dvh;
  margin: 0 auto;
  padding: 0.45rem;
}

.live-mode .archive-panel {
  position: fixed;
  top: 4.8rem;
  left: 0.75rem;
  width: min(86vw, 340px);
  height: calc(100dvh - 5.6rem);
  border-radius: 8px;
  box-shadow: none;
  padding: 0.55rem;
}

.live-mode .archive-head h2 {
  font-size: 0.82rem;
}

.live-mode .archive-item {
  padding: 0.48rem;
}

.live-mode .archive-item strong {
  font-size: 0.72rem;
}

.live-mode .archive-item span {
  font-size: 0.58rem;
}

.live-mode .viewer-panel {
  position: fixed;
  top: 4.8rem;
  right: 0.75rem;
  width: min(86vw, 360px);
  height: calc(100dvh - 5.6rem);
  display: grid;
  grid-template-rows: auto auto 1fr auto;
}

.live-mode .chat-panel {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: linear-gradient(180deg, #e8f4f2 0%, #f7f7f1 52%, #f2ecdf 100%);
  padding: 0.55rem;
  gap: 0.5rem;
}

.live-mode .chat-head {
  background: rgba(255, 255, 255, 0.88);
  border-radius: 8px;
  padding: 0.55rem 0.65rem;
}

.live-mode .chat-head-label {
  font-size: 0.68rem;
}

.live-mode .chat-head h2 {
  font-size: 1rem;
  line-height: 1.15;
}

.live-mode .scoreboard {
  gap: 0.28rem;
  margin-top: 0.42rem;
  font-size: 0.62rem;
}

.live-mode .scoreboard span {
  padding: 0.18rem 0.28rem;
}

.live-mode .avatar-strip {
  margin-top: 0.42rem;
}

.live-mode .avatar {
  grid-template-columns: auto;
  justify-items: center;
  gap: 0.18rem;
  padding: 0.3rem 0.22rem;
}

.live-mode .vote-btn {
  font-size: 0.52rem;
}

.live-mode .vote-bar-track {
  height: 2px;
}

.live-mode .avatar-face {
  width: 1.7rem;
  height: 1.7rem;
  font-size: 0.68rem;
}

.live-mode .avatar-emoji {
  font-size: 0.92rem;
}

.live-mode .avatar-name {
  font-size: 0.62rem;
}

.live-mode .avatar-mood {
  max-width: 4.6rem;
  font-size: 0.56rem;
}

.live-mode .duel-card {
  margin-top: 0.38rem;
  padding: 0.42rem 0.5rem;
  border-radius: 8px;
}

.live-mode .duel-card strong {
  font-size: 0.62rem;
}

.live-mode .duel-card span {
  font-size: 0.74rem;
}

.live-mode .chat-frame {
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
}

.live-mode .chat-log {
  padding: 0.55rem;
  gap: 0.55rem;
}

.live-mode .bubble {
  max-width: 96%;
  border-radius: 8px;
  padding: 0.62rem;
  font-size: 0.92rem;
}

.live-mode .meta {
  gap: 0.35rem;
  margin-bottom: 0.26rem;
  font-size: 0.62rem;
  flex-wrap: wrap;
}

.live-mode .reaction-note {
  max-width: 94%;
  padding: 0.36rem 0.5rem;
  font-size: 0.68rem;
  background: rgba(255, 255, 255, 0.78);
}

.live-mode .admin-panel {
  z-index: 30;
  top: 4.8rem;
}

.muted {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0.3rem 0 0.9rem;
}

.profiles {
  display: grid;
  gap: 0.8rem;
}

.profile-card {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  padding: 0.75rem;
  display: grid;
  gap: 0.55rem;
}

.profile-card h3 {
  margin: 0;
  font-size: 1rem;
}

label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.86rem;
}

select {
  padding: 0.6rem;
  border-radius: 0.6rem;
  border: 1px solid var(--line);
  background: #fff;
  font-family: inherit;
  font-size: 16px;
}

@media (max-width: 700px) {
  .avatar-strip-track {
    width: 250%; /* 10 avatars × (W/4) = 2.5W pour 4 visibles sur mobile */
  }

  .avatar {
    grid-template-columns: auto;
    justify-items: center;
    gap: 0.18rem;
    padding: 0.3rem 0.22rem;
  }

  .avatar-face {
    width: 1.7rem;
    height: 1.7rem;
    font-size: 0.68rem;
  }

  .avatar-name {
    font-size: 0.62rem;
  }

  .avatar-mood {
    max-width: 4.6rem;
    font-size: 0.56rem;
  }

  .vote-section {
    grid-column: 1;
  }
  body {
    height: auto;
    min-height: 100vh;
    overflow: auto;
  }

  .layout {
    grid-template-columns: 1fr;
    height: calc(100vh - 86px);
  }

  .archive-panel {
    top: 4.4rem;
    left: 0.5rem;
    width: min(92vw, 340px);
    height: calc(100vh - 5.2rem);
  }

  .viewer-panel {
    top: 4.4rem;
    right: 0.5rem;
    width: min(92vw, 360px);
    height: calc(100vh - 5.2rem);
  }

  .panel-modal-open .panel-toggles {
    opacity: 0;
    pointer-events: none;
  }

  .viewer-form {
    display: grid;
    grid-template-columns: 1fr;
  }

  .viewer-form button {
    width: 100%;
    min-width: 0;
  }

  .admin-panel {
    top: 4.4rem;
    right: 0.5rem;
    z-index: 90;
    width: min(92vw, 360px);
    height: calc(100dvh - 5.2rem);
    max-height: calc(100dvh - 5.2rem);
    border-radius: 8px;
    border: 1px solid var(--line);
    padding: 0.85rem;
    background: var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
    transform: translateX(calc(100% + 1.6rem));
  }

  .admin-panel.open {
    transform: translateX(0);
  }

  .settings-panel {
    width: min(92vw, 420px);
  }

  .panel-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .topic-actions {
    display: grid;
  }

  .chat-panel {
    min-height: 72vh;
    height: auto;
  }

  .live-mode {
    height: 100dvh;
    min-height: 100dvh;
    overflow: hidden;
  }

  .live-mode .layout {
    grid-template-columns: 1fr;
    width: 100vw;
    height: 100dvh;
    padding: 0.35rem;
  }

  .live-mode .archive-panel {
    left: 0.5rem;
    width: min(94vw, 340px);
    height: calc(100dvh - 5.2rem);
    padding: 0.4rem;
  }

  .live-mode .archive-list {
    display: grid;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .live-mode .archive-item {
    min-width: 0;
  }

  .live-mode .chat-panel {
    height: 100%;
    min-height: 0;
  }

  .live-mode .viewer-panel {
    right: 0.5rem;
    width: min(94vw, 360px);
    height: calc(100dvh - 5.2rem);
    min-height: 0;
  }

  .live-mode .admin-panel {
    top: 4.4rem;
    right: 0.5rem;
    z-index: 90;
    width: min(94vw, 360px);
    height: calc(100dvh - 5.2rem);
    max-height: calc(100dvh - 5.2rem);
    border-radius: 8px;
  }

  .live-mode .settings-panel {
    width: min(94vw, 420px);
  }

  .live-mode .viewer-head {
    padding: 0.45rem 0.55rem;
  }

  .live-mode .viewer-messages {
    height: auto;
    padding: 0.45rem 0.55rem;
    gap: 0.35rem;
  }

  .live-mode .viewer-message {
    font-size: 0.78rem;
  }

  .live-mode .viewer-form {
    padding: 0.28rem;
    gap: 0.28rem;
    display: grid;
    grid-template-columns: 1fr;
  }

  .live-mode .viewer-form input,
  .live-mode .viewer-form button {
    padding: 0.34rem 0.46rem;
    border-radius: 0.42rem;
  }

  .live-mode .viewer-form input {
    font-size: 16px;
  }

  .live-mode .viewer-form button {
    width: 100%;
    min-width: 0;
    font-size: 0.76rem;
  }

  .live-mode .icon-btn {
    width: 2.1rem;
    height: 2.1rem;
    font-size: 0.95rem;
  }

  .live-mode .admin-panel input,
  .live-mode .admin-panel select,
  .live-mode .admin-panel button {
    min-height: 42px;
  }
}

@keyframes fadeIn {
  from {
    transform: translateY(8px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes popIn {
  from {
    transform: scale(0.96) translateY(6px);
    opacity: 0;
  }
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

@keyframes typingCursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes avatarTicker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes avatarPulse {
  0%,
  100% {
    filter: saturate(1);
  }
  50% {
    filter: saturate(1.3);
  }
}

/* ── Welcome popup ─────────────────────────────────────────────────────────── */

.welcome-overlay[hidden] {
  display: none !important;
}

.welcome-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(10, 12, 18, 0.72);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.welcome-overlay.visible {
  opacity: 1;
}

.welcome-overlay.hiding {
  opacity: 0;
  pointer-events: none;
}

.welcome-modal {
  position: relative;
  background: #fff;
  border-radius: 20px;
  padding: 2.2rem 2rem 1.8rem;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 32px 80px rgba(0,0,0,0.28), 0 0 0 1px rgba(20,20,20,0.06);
  transform: translateY(18px);
  transition: transform 0.35s cubic-bezier(.22,1,.36,1);
}

.welcome-overlay.visible .welcome-modal {
  transform: translateY(0);
}

.welcome-glow {
  position: absolute;
  top: -60px;
  right: -60px;
  width: 200px;
  height: 200px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(34,168,111,0.18) 0%, transparent 70%);
  pointer-events: none;
}

.welcome-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  font-family: "IBM Plex Mono", monospace;
  letter-spacing: 0.08em;
  border-radius: 6px;
  padding: 0.18rem 0.5rem;
  margin-bottom: 0.9rem;
}

.welcome-badge::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  animation: livePulse 1.2s ease-in-out infinite;
}

@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.7); }
}

.welcome-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.55rem;
  font-weight: 700;
  margin: 0 0 0.4rem;
  color: var(--ink);
  line-height: 1.2;
}

.welcome-sub {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0 0 1.4rem;
  line-height: 1.5;
}

.welcome-steps {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-bottom: 1.6rem;
}

.welcome-step {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.ws-icon {
  font-size: 1.3rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 0.05rem;
}

.welcome-step div {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.welcome-step strong {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
}

.welcome-step span {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.45;
}

.welcome-step em {
  color: var(--ink);
  font-style: normal;
  font-weight: 600;
}

.welcome-btn {
  width: 100%;
  padding: 0.8rem 1rem;
  background: var(--ink);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s, transform 0.12s;
}

.welcome-btn:hover {
  background: #2a2a2a;
  transform: translateY(-1px);
}

.welcome-btn:active {
  transform: translateY(0);
}

.welcome-hint {
  text-align: center;
  font-size: 0.72rem;
  color: rgba(87,89,95,0.55);
  margin: 0.65rem 0 0;
  font-family: "IBM Plex Mono", monospace;
}

/* Niveaux dans le popup */
.welcome-levels {
  margin: 1rem 0 0.5rem;
  background: rgba(20,20,30,0.04);
  border-radius: 10px;
  padding: 0.75rem 0.9rem 0.6rem;
  border: 1px solid rgba(20,20,30,0.08);
}
.welcome-levels-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 0.55rem;
  font-family: "IBM Plex Mono", monospace;
}
.welcome-level-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.welcome-level-list li {
  display: grid;
  grid-template-columns: 1.4rem 6rem 3.8rem 1fr;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  padding: 0.2rem 0;
  border-bottom: 1px solid rgba(20,20,30,0.06);
}
.welcome-level-list li:last-child { border-bottom: none; }
.wl-emoji { font-size: 0.95rem; }
.wl-name { font-weight: 600; color: var(--ink); }
.wl-xp { font-family: "IBM Plex Mono", monospace; font-size: 0.68rem; color: var(--muted); }
.wl-perk { color: #555; font-size: 0.74rem; }
.welcome-xp-hint {
  margin: 0.55rem 0 0;
  font-size: 0.68rem;
  font-family: "IBM Plex Mono", monospace;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 480px) {
  .welcome-level-list li { grid-template-columns: 1.4rem 1fr 3rem; }
  .wl-perk { display: none; }
}

@media (max-width: 480px) {
  .welcome-modal {
    padding: 1.6rem 1.3rem 1.4rem;
  }
  .welcome-title {
    font-size: 1.3rem;
  }
}

/* XP gain flash */
.xp-flash {
  position: fixed;
  bottom: 5rem;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--ink);
  color: #fff;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.35rem 0.9rem;
  border-radius: 20px;
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
  z-index: 8000;
}
.xp-flash.xp-flash-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Reply preview au-dessus de l'input */
.reply-preview {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.6rem;
  background: rgba(100,100,220,0.08);
  border-left: 2px solid #6060cc;
  font-size: 0.74rem;
  flex-wrap: wrap;
}
.reply-preview-label { font-weight: 700; color: #5050bb; white-space: nowrap; }
.reply-preview-text { color: var(--muted); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reply-cancel-btn {
  background: none; border: none; cursor: pointer; color: var(--muted); font-size: 0.8rem; padding: 0 0.2rem; line-height: 1;
}
.reply-cancel-btn:hover { color: var(--ink); }

/* Bouton reply */
.reply-btn {
  background: none; border: none; cursor: pointer; color: var(--muted);
  font-size: 0.78rem; padding: 0.1rem 0.3rem; border-radius: 4px; line-height: 1;
  transition: background 0.12s, color 0.12s;
}
.reply-btn:hover { background: rgba(100,100,220,0.1); color: #5050bb; }

/* Actions groupées (like + reply) */
.bubble-actions { display: flex; align-items: center; gap: 0.2rem; margin-top: 0.3rem; }
.msg-actions { display: flex; align-items: center; gap: 0.2rem; justify-self: start; }

/* Contexte de réponse dans les bulles */
.bubble-reply-context {
  font-size: 0.68rem; color: #5050bb; margin-bottom: 0.25rem;
  font-family: "IBM Plex Mono", monospace;
}
.msg-reply-context {
  font-size: 0.68rem; color: #5050bb; margin-bottom: 0.15rem;
  font-family: "IBM Plex Mono", monospace;
}
.msg-reply-context em { color: var(--muted); font-style: normal; }

/* Panneau cartes spéciales */
.card-panel {
  border-top: 1px solid rgba(20,20,20,0.08);
  padding: 0.5rem 0.6rem 0.4rem;
  background: rgba(255,245,220,0.4);
}
.card-panel-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  margin: 0 0 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: "IBM Plex Mono", monospace;
}
.card-cooldown-timer {
  font-weight: 400;
  color: #c07000;
  font-size: 0.68rem;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.3rem;
}
.card-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  background: #fff;
  border: 1px solid rgba(20,20,20,0.12);
  border-radius: 8px;
  padding: 0.4rem 0.3rem;
  cursor: pointer;
  font-size: 0.65rem;
  color: var(--ink);
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  text-align: center;
  line-height: 1.2;
}
.card-btn:hover:not([disabled]) { background: #fff7e0; border-color: #f0b940; transform: translateY(-1px); }
.card-btn:active:not([disabled]) { transform: translateY(0); }
.card-btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.card-icon { font-size: 1.1rem; }
.card-name { font-size: 0.6rem; color: var(--muted); }

/* XP privilege badge */
.xp-privilege {
  width: 100%;
  font-size: 0.68rem;
  color: #6c6c8a;
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
  background: rgba(100,100,200,0.08);
  font-family: "IBM Plex Mono", monospace;
}
.xp-privilege.used { color: var(--muted); background: none; text-decoration: line-through; }
.xp-privilege.active { color: #22a86f; background: rgba(34,168,111,0.1); }
.xp-privilege.gold { color: #c59b00; background: rgba(197,155,0,0.1); }

/* XP notification dans TokTok */
.xp-notification {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.6rem;
  margin: 0.25rem 0;
  background: linear-gradient(90deg, rgba(34,168,111,0.12), rgba(243,159,50,0.08));
  border-left: 2px solid #22a86f;
  border-radius: 0 6px 6px 0;
  font-size: 0.72rem;
  transition: opacity 1.5s ease;
}
.xp-notification.xp-notif-fade { opacity: 0.35; }
.xp-notif-badge {
  font-family: "IBM Plex Mono", monospace;
  font-weight: 700;
  color: #22a86f;
  white-space: nowrap;
}
.xp-notif-detail { color: var(--muted); }

/* Bouton like */
.like-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.72rem;
  color: var(--muted);
  padding: 0.15rem 0.35rem;
  border-radius: 20px;
  transition: background 0.15s, color 0.15s;
  margin-top: 0.3rem;
  line-height: 1;
}
.like-btn:hover { background: rgba(100,100,200,0.1); color: var(--ink); }
.like-btn.liked { color: #e05c5c; }
.like-btn.liked .like-icon { filter: none; }
.like-icon { font-size: 0.8rem; }
.like-count { font-family: "IBM Plex Mono", monospace; font-size: 0.68rem; }

/* Like sur bulles IA */
.bubble .like-btn { display: flex; margin-top: 0.4rem; }

/* Like sur messages TokTok */
.viewer-message .like-btn { justify-self: start; margin-top: 0.1rem; }
