:root {
  --bg: #15130f;
  --panel: #1e1b15;
  --accent: #ff7a29;
  --accent-deep: #c85a12;
  --ink: #f5eedf;
  --ink-dim: #b8af9c;
  --line: rgba(245, 238, 223, 0.12);
  --font-body: "VT323", monospace;
  --radius-bubble: 4px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none; /* pas de rebond "page web" au bord du fil */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation; /* pas de double-tap-zoom sur les boutons */
}

.app {
  max-width: 560px;
  margin: 0 auto;
  position: fixed;
  top: var(--app-top, 0px);
  left: 0;
  right: 0;
  height: var(--app-height, 100dvh);
  display: flex;
  flex-direction: column;
  background: var(--bg);
  overflow: hidden;
}

/* Splash */
.splash {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  opacity: 1;
  overflow: hidden;
  transition: opacity 0.4s ease;
}

.splash.hide {
  opacity: 0;
  pointer-events: none;
}

.splash-word {
  margin: 0;
  font-family: var(--font-body);
  font-size: 2.6rem;
  color: var(--ink);
}

.splash-tail {
  transform-origin: 0 0;
  animation: splashTail 1.3s ease-in-out infinite;
}

@keyframes splashTail {
  0% {
    transform: translate(78px, 30px);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  85% {
    opacity: 1;
  }
  100% {
    transform: translate(122px, 30px);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .splash-tail {
    animation: none;
    opacity: 0;
  }
}

/* Pseudo gate — pas un profil, juste un nom pour la ligne */
.pseudo-gate {
  position: fixed;
  top: var(--app-top, 0px);
  left: 0;
  right: 0;
  height: var(--app-height, 100dvh);
  z-index: 45;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 24px;
  text-align: center;
  overflow: hidden;
}

.pseudo-gate[hidden] {
  display: none;
}

.pseudo-word {
  margin: 0;
  font-size: 2.4rem;
  color: var(--accent);
}

/* Animation d'inactivité sur l'accueil : Pac-Man mange "Gbairai" */
.pac-stage {
  position: relative;
  display: inline-block;
}

.pac-stage .ltr {
  display: inline-block;
  transition: opacity 0.12s ease;
}

.pac-stage .ltr.eaten {
  opacity: 0;
}

.pac-eater {
  position: absolute;
  top: 50%;
  left: 0;
  width: 24px;
  height: 28px;
  border-radius: 48% 48% 44% 44% / 54% 54% 42% 42%;
  background: var(--accent);
  transform: translateY(-50%);
  opacity: 0;
  clip-path: circle(50%);
}

.pac-eater.chomping {
  animation: pacChomp 0.22s linear infinite;
}

@keyframes pacChomp {
  0%,
  100% {
    clip-path: polygon(100% 74%, 44% 48%, 100% 25%, 100% 0, 0 0, 0 100%, 100% 100%);
  }
  50% {
    clip-path: circle(50%);
  }
}

/* Le blanc écoute : de face, bouche fixe (il ne parle pas), surexcité,
   main tremblante contre l'oreille gauche. */
.pac-white-face {
  position: absolute;
  top: 50%;
  right: -8px;
  width: 24px;
  height: 28px;
  border-radius: 48% 48% 44% 44% / 54% 54% 42% 42%;
  background: var(--ink);
  transform: translateY(-50%);
  opacity: 0;
}

.pac-white-face.visible {
  opacity: 1;
}

.pac-white-face.listening {
  animation: pwBounce 0.35s ease-in-out infinite;
}

.pw-eye {
  position: absolute;
  top: 24%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--bg);
}

.pw-eye-l {
  left: 26%;
}

.pw-eye-r {
  left: 62%;
}

.pac-white-face.listening .pw-eye {
  animation: pwEyeWiden 0.35s ease-in-out infinite;
}

.pw-mouth {
  position: absolute;
  top: 54%;
  left: 28%;
  width: 10px;
  height: 5px;
  border: 1.5px solid transparent;
  border-bottom: 1.5px solid var(--bg);
  border-radius: 0 0 10px 10px;
}

.pw-hand {
  position: absolute;
  top: -4px;
  left: -6px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--ink);
  border: 1.5px solid var(--bg);
  opacity: 0;
}

.pac-white-face.listening .pw-hand {
  animation: pwEarHand 0.5s ease-in-out infinite;
}

@keyframes pwBounce {
  0%,
  100% {
    transform: translateY(-50%) rotate(0deg);
  }
  25% {
    transform: translateY(calc(-50% - 2px)) rotate(-3deg);
  }
  75% {
    transform: translateY(calc(-50% - 2px)) rotate(3deg);
  }
}

@keyframes pwEyeWiden {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.25);
  }
}

@keyframes pwEarHand {
  0% {
    opacity: 0;
    transform: translateY(4px) rotate(0deg);
  }
  20% {
    opacity: 1;
    transform: translateY(-3px) rotate(-14deg);
  }
  50% {
    transform: translateY(-3px) rotate(14deg);
  }
  80% {
    opacity: 1;
    transform: translateY(-3px) rotate(-8deg);
  }
  100% {
    opacity: 1;
    transform: translateY(-3px) rotate(0deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .pac-eater,
  .pac-white-face {
    display: none;
  }
}

.home-choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 260px;
}

.home-choices[hidden] {
  display: none;
}

.home-choices .group-go,
.home-choices .group-btn {
  width: 100%;
}

/* Pseudo déjà enregistré sur cet appareil : on demande si on continue
   avec lui ou si on en choisit un nouveau, plutôt que de le réutiliser en
   silence — à chaque entrée sur la ligne publique ou dans un groupe. */
.pseudo-returning {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 280px;
}

.pseudo-returning[hidden] {
  display: none;
}

.pseudo-returning-text {
  margin: 0;
  font-size: 1.2rem;
  color: var(--ink-dim);
  text-align: center;
}

.pseudo-returning-text b {
  color: var(--accent);
  font-weight: normal;
}

.pseudo-form {
  display: flex;
  gap: 10px;
  width: 100%;
  max-width: 320px;
}

.pseudo-form[hidden] {
  display: none;
}

.pseudo-form input {
  flex: 1;
  padding: 10px 14px;
  border-radius: var(--radius-bubble);
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
}

.pseudo-form input::placeholder {
  color: var(--ink-dim);
}

.pseudo-form button {
  padding: 10px 18px;
  border-radius: var(--radius-bubble);
  border: none;
  background: var(--accent);
  color: #1c1002;
  font-family: var(--font-body);
  font-size: 18px;
  cursor: pointer;
  touch-action: manipulation;
}

.pseudo-form button:hover {
  background: var(--accent-deep);
}

.pseudo-error {
  color: #e24b4a;
  font-size: 1rem;
  min-height: 1.2em;
}

/* Header */
.bar {
  padding: 18px 20px 14px;
  padding-top: calc(18px + env(safe-area-inset-top, 0px));
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.brand h1 {
  font-family: var(--font-body);
  font-weight: normal;
  font-size: 2rem;
  margin: 0;
  letter-spacing: 0.5px;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  align-self: center;
  box-shadow: 0 0 0 0 rgba(255, 122, 41, 0.6);
  animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 122, 41, 0.55);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(255, 122, 41, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 122, 41, 0);
  }
}

.bar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 2px;
}

.bar-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.bar-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.tagline {
  margin: 0;
  font-size: 1.05rem;
  color: var(--ink-dim);
}

/* "En ligne maintenant" — visible par tout le monde (pas juste l'admin),
   scopé à la ligne publique ou au groupe courant (voir get-messages.mjs). */
.online-status {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-dim);
}

.online-status[hidden] {
  display: none;
}

.online-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3ddc84;
  flex-shrink: 0;
  box-shadow: 0 0 0 0 rgba(61, 220, 132, 0.6);
  animation: pulseGreen 2.4s ease-out infinite;
}

@keyframes pulseGreen {
  0% {
    box-shadow: 0 0 0 0 rgba(61, 220, 132, 0.55);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(61, 220, 132, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(61, 220, 132, 0);
  }
}

.group-btn {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: var(--radius-bubble);
  border: 1px solid var(--line);
  background: transparent;
  color: var(--accent);
  font-family: var(--font-body);
  font-size: 1rem;
  cursor: pointer;
  touch-action: manipulation;
}

.group-btn:hover {
  border-color: var(--accent);
}

/* Cloche de notifications — compacte (juste l'icône) pour ne pas
   surcharger l'en-tête, qui affiche déjà plusieurs boutons texte dans un
   groupe. Icône dessinée au trait (même style que celles du tutoriel
   d'installation) plutôt qu'un emoji coloré, en gris tant qu'inactive —
   le fond plein remplace le changement de texte pour indiquer l'état
   "actif", donc jamais de saut de largeur au clic. */
.notif-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px 9px;
  color: var(--ink-dim);
}

.notif-btn svg {
  display: block;
}

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

.notif-btn.active {
  color: var(--bg);
  background: var(--accent);
  border-color: var(--accent);
}

.notif-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

/* Group panel */
.group-panel {
  position: fixed;
  top: var(--app-top, 0px);
  left: 0;
  right: 0;
  height: var(--app-height, 100dvh);
  z-index: 40;
  background: rgba(21, 19, 15, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: hidden;
}

.group-panel[hidden] {
  display: none;
}

.group-panel-inner {
  width: 100%;
  max-width: 340px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.group-panel-title {
  margin: 0;
  font-size: 1.2rem;
  color: var(--ink);
}

.group-form {
  display: flex;
  gap: 8px;
}

.group-form input {
  flex: 1;
  min-width: 0;
  padding: 8px 12px;
  border-radius: var(--radius-bubble);
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
}

.group-form button {
  flex-shrink: 0;
  padding: 8px 14px;
  border-radius: var(--radius-bubble);
  border: none;
  background: var(--accent);
  color: #1c1002;
  font-family: var(--font-body);
  font-size: 1rem;
  cursor: pointer;
  touch-action: manipulation;
}

.group-go {
  padding: 8px 14px;
  border-radius: var(--radius-bubble);
  border: none;
  background: var(--accent);
  color: #1c1002;
  font-family: var(--font-body);
  font-size: 1.05rem;
  cursor: pointer;
  touch-action: manipulation;
}

.group-cancel {
  align-self: center;
  background: none;
  border: none;
  color: var(--ink-dim);
  font-family: var(--font-body);
  font-size: 1rem;
  cursor: pointer;
  touch-action: manipulation;
}

.download-link {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(28px + env(safe-area-inset-bottom, 0px));
  margin: 0 auto;
  background: none;
  border: none;
  color: var(--accent);
  text-decoration: underline;
  font-family: var(--font-body);
  font-size: 1.1rem;
  cursor: pointer;
  touch-action: manipulation;
  text-align: center;
}

.install-inner {
  max-width: 320px;
  max-height: 80vh;
  max-height: calc(var(--app-height, 100dvh) * 0.8);
  overflow: hidden;
}

.install-badge {
  align-self: center;
  padding: 6px 16px;
  border: 2px solid var(--accent);
  border-radius: 6px;
  color: var(--accent);
  font-size: 1.15rem;
  margin: 0 0 4px;
}

.install-steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 46vh;
  max-height: calc(var(--app-height, 100dvh) * 0.46);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
}

.install-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.install-step-num {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: #1c1002;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  margin-top: 2px;
}

.install-card {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: var(--panel);
  border-radius: 8px;
}

.install-step-text {
  font-size: 1rem;
  line-height: 1.3;
  color: var(--ink);
}

.install-step-text b {
  color: var(--accent);
  font-weight: normal;
}

.install-icon {
  flex-shrink: 0;
}

.install-footer {
  margin: 4px 0 0;
  padding-top: 10px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--ink-dim);
}

/* Status banner (erreurs uniquement) */
.banner {
  margin: 0;
  padding: 8px 20px;
  font-size: 0.95rem;
  color: var(--ink-dim);
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

/* Petit message d'explication après l'activation automatique des
   notifs — une seule fois par appareil (voir showNotifIntro() dans
   app.js), pas un vrai avertissement donc pas le même ton que .banner. */
.notif-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
  padding: 8px 14px;
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.notif-intro[hidden] {
  display: none;
}

.notif-intro-text {
  margin: 0;
}

.notif-intro button {
  flex-shrink: 0;
  padding: 4px 14px;
  border-radius: var(--radius-bubble);
  border: none;
  background: var(--accent);
  color: #1c1002;
  font-family: var(--font-body);
  font-size: 1rem;
  cursor: pointer;
  touch-action: manipulation;
}

/* Thread — à l'ancienne : des lignes, pas des bulles */
.thread {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 14px 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.msg {
  font-size: 1.15rem;
  line-height: 1.45;
  word-wrap: break-word;
  white-space: pre-wrap;
}

.msg .who {
  font-weight: normal;
}

.msg .sep {
  color: var(--ink-dim);
}

.msg-link {
  color: var(--accent);
  text-decoration: underline;
  word-break: break-all;
}

.msg.system {
  color: var(--ink-dim);
  font-style: italic;
  margin: 6px 0;
}

.typing {
  color: var(--ink-dim);
  font-size: 1.05rem;
}

/* Composer */
.composer {
  flex-shrink: 0;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 12px 14px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  background: var(--panel);
  border-top: 1px solid var(--line);
}

.composer textarea {
  flex: 1;
  resize: none;
  max-height: 120px;
  padding: 9px 14px;
  border-radius: var(--radius-bubble);
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px; /* jamais en dessous de 16px : sinon iOS zoome au focus */
  line-height: 1.4;
  touch-action: manipulation;
}

.composer textarea::placeholder {
  color: var(--ink-dim);
}

.composer textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.composer button {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #1c1002;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.15s ease;
}

.composer button:hover {
  background: var(--accent-deep);
}

.composer button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.thread::-webkit-scrollbar {
  width: 6px;
}
.thread::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .dot {
    animation: none;
  }
}

/* Admin — métriques d'usage, accès caché via code secret */
.admin-panel {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: var(--bg);
  overflow: hidden;
}

.admin-panel[hidden] {
  display: none;
}

.admin-inner {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 20px 16px;
  padding-top: calc(20px + env(safe-area-inset-top, 0px));
  padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  max-width: 560px;
  margin: 0 auto;
  overflow: hidden;
  box-sizing: border-box;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-shrink: 0;
  margin-bottom: 12px;
}

.admin-title {
  margin: 0;
  font-size: 1.5rem;
  color: var(--accent);
  min-width: 0;
  overflow-wrap: anywhere;
}

.admin-tabs {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}

.admin-tab {
  flex-shrink: 0;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--ink-dim);
  font-family: var(--font-body);
  font-size: 1.1rem;
  padding: 6px 10px 8px;
  cursor: pointer;
  touch-action: manipulation;
  white-space: nowrap;
}

.admin-tab.is-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.admin-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-right: 2px;
}

.admin-section-title {
  margin: 0 0 8px;
  font-size: 1.05rem;
  color: var(--ink-dim);
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-live-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--panel);
  border-radius: 10px;
  padding: 12px 14px;
}

.admin-live-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  animation: pulse 2.2s ease-out infinite;
}

.admin-live-value {
  font-size: 1.6rem;
  color: var(--accent);
  flex-shrink: 0;
}

.admin-live-label {
  font-size: 0.95rem;
  color: var(--ink-dim);
  min-width: 0;
  overflow-wrap: anywhere;
}

.admin-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.admin-card {
  background: var(--panel);
  border-radius: 10px;
  padding: 12px 14px;
  border: none;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  font-family: var(--font-body);
  color: inherit;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.admin-card-value {
  font-size: 1.6rem;
  color: var(--accent);
  line-height: 1.1;
}

.admin-card-label {
  font-size: 0.85rem;
  color: var(--ink-dim);
  overflow-wrap: anywhere;
}

.admin-card-icon {
  flex-shrink: 0;
  opacity: 0.85;
}

.admin-card-detail {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.admin-card-detail[hidden] {
  display: none;
}

.admin-chart-toggle {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.admin-chart-toggle button {
  flex-shrink: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink-dim);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 5px 12px;
  cursor: pointer;
  touch-action: manipulation;
}

.admin-chart-toggle button.is-active {
  color: var(--accent);
  border-color: var(--accent);
}

.admin-trend-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  padding: 6px 4px;
  border: none;
  background: none;
  width: 100%;
  color: inherit;
  font-family: var(--font-body);
  cursor: pointer;
  touch-action: manipulation;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.admin-trend-day {
  width: 56px;
  flex-shrink: 0;
  color: var(--ink-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-trend-bar-track {
  flex: 1;
  min-width: 0;
  background: var(--panel);
  border-radius: 4px;
  height: 10px;
  overflow: hidden;
}

.admin-trend-bar {
  height: 100%;
  background: var(--accent);
}

.admin-trend-total {
  width: 36px;
  flex-shrink: 0;
  text-align: right;
  color: var(--ink);
}

.admin-trend-detail {
  padding: 8px 10px 12px;
  margin: -4px 0 4px;
  font-size: 0.85rem;
  color: var(--ink-dim);
  background: var(--panel);
  border-radius: 0 0 8px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-trend-detail[hidden] {
  display: none;
}

.admin-group-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: var(--panel);
  border: none;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
  cursor: pointer;
  touch-action: manipulation;
  font-family: var(--font-body);
  color: inherit;
  text-align: left;
}

.admin-group-icon {
  flex-shrink: 0;
}

.admin-group-main {
  flex: 1;
  min-width: 0;
}

.admin-group-name {
  color: var(--ink);
  font-size: 1rem;
  overflow-wrap: break-word;
  display: block;
}

.admin-group-sub {
  color: var(--ink-dim);
  font-size: 0.82rem;
}

.admin-group-count {
  color: var(--accent);
  flex-shrink: 0;
  font-size: 1rem;
}

.admin-group-detail {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  margin: -6px 0 8px;
  font-size: 0.85rem;
  color: var(--ink-dim);
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow-wrap: anywhere;
}

.admin-group-detail[hidden] {
  display: none;
}

.admin-empty {
  color: var(--ink-dim);
  font-size: 0.9rem;
}
