/* ===============================
   RESET BASE
================================ */
* {
  box-sizing: border-box;
}

html, body{
  margin: 0;
  height: 100%;
  overflow: hidden;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #F3ECDD;
  color: #2b2b2b;
}

#admin-viewport {
  height: 100vh;
  display: flex;
  align-items: center;     /* centra verticalmente */
  justify-content: center;
  background: #F3ECDD;
}

#admin-3col {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: auto 1fr auto; /* header / contenuto / footer */

  height: 95vh;
  width: calc(100vw - 48px);
  margin: 24px auto;

  background: #F3ECDD;
  border-radius: 28px;
  overflow: hidden;

  box-shadow:
    0 -8px 18px rgba(140, 90, 40, 0.12),
    0 18px 40px rgba(140, 90, 40, 0.22);
}

/* ===============================
   HEADER UNICO
================================ */
#admin-unified-header {
  border-bottom: 0.5px solid rgba(63, 42, 27, 0.18);
  height: 68px;    
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
  background: transparent;
  position: relative;
}

#admin-unified-header .admin-logo{
  transform: translateY(9px); /* ← abbassa qui */
}

/* Logo Arkanis */
.admin-logo {
  font-family: "Cormorant Garamond", "Georgia", serif;
  font-size: 1.7rem;
  letter-spacing: 0.06em;
  color: #3f2a1b; /* caldo, sabbia */
  display: flex;
  align-items: baseline;
}

/* Prima lettera — COME CLIENTI */
.logo-a {
  font-family: "Vivaldi", "Zapfino", "Snell Roundhand", cursive;
  font-weight: normal;
  margin-right: 0.12em;
  transform: translateY(4px);
}

.admin-logo {
  margin: 0 auto;
}

#admin-unified-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;

  height: 1.1px;

  background: rgba(210, 175, 135, 0.32);

  /* micro morbidezza, quasi impercettibile */
  box-shadow:
    0 0.5px 1px rgba(140, 90, 40, 0.08);
}

/* ===============================
   PANNELLI (ATTACCATI)
================================ */
.panel {
  display: flex;
  flex-direction: column;
  background: #FCF8F2; /* sabbia chiara, riposa l’occhio */
}

.panel {
  border-right: 1px solid rgba(180, 140, 90, 0.25);
}

.panel:last-child {
  border-right: none;
}

/* ===============================
   HEADER PANNELLI
================================ */
.panel-head {
  padding: 14px 18px;
  background: #f1ebdf;
  border-bottom: 1px solid #e1dacb;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

/* ===============================
   CORPO PANNELLI
================================ */
.panel-body {
  flex: 1;
  padding: 18px;
  overflow-y: auto;
  background: #FDFBF6;
}

/* ===============================
   CHAT (stessa base degli altri)
================================ */
.chat-wrap {
  display: flex;
  height: 100%;
  position: relative;
  background: #FDFBF6;
}

.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #FDFBF6;
}

/* header chat */
#chat-header {
  padding: 12px 16px;
  background: #f7f2e8;
  border-bottom: 1px solid #e1dacb;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* messaggi */
#messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  background: #fffdfa;
}

/* input */
#chat-controls {
  padding: 12px;
  border-top: 1px solid #e1dacb;
  background: #f7f2e8;
  display: flex;
  gap: 10px;
}

#reply-input {
  flex: 1;
  resize: none;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #d7cfbf;
  background: #fffdfa;
  font-family: inherit;
}

#send-btn {
  padding: 10px 18px;
  border-radius: 12px;
  border: none;
  background: #d8c9b4;
  font-weight: 600;
  cursor: pointer;
}

#send-btn:hover {
  background: #cdbda6;
}

/* ===============================
   DRAWER CHAT LISTA
================================ */
.chat-drawer {
  position: absolute;
  top: 0;
  right: 0;
  width: 280px;
  height: 100%;
  background: #fffdfa;
  border-left: 1px solid #e1dacb;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  z-index: 10;

  box-shadow: -10px 0 30px rgba(0,0,0,0.18);
}

.chat-drawer.open {
  transform: translateX(0);
}

.drawer-head {
  padding: 14px 16px;
  background: #f1ebdf;
  border-bottom: 1px solid #e1dacb;
}

#chat-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

#chat-list li {
  padding: 12px 16px;
  border-bottom: 1px solid #eee5d6;
  cursor: pointer;
}

#chat-list li:hover {
  background: #f6f1e7;
}

/* ===============================
   BOTTONI
================================ */
.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
}

.danger {
  background: none;
  border: none;
  font-size: 13px;
  color: #8a3a3a;
  cursor: pointer;
}

/* ===============================
   HEADER UNICO ARKANIS
================================ */

#admin-unified-header {
  position: relative;
  height: 84px; /* come prima */
  display: flex;
  align-items: center;
  justify-content: center;

  background: #f3ecdd;
  border-bottom: 1px solid rgba(63, 42, 27, 0.20);
}

/* contenitore interno */
.admin-header-inner {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* LOGO */
.admin-logo {
  font-size: 34px;
  color: #3f2a1b;
  letter-spacing: 0.04em;
  user-select: none;
}

/* ===============================
   BOTTONI HEADER
================================ */

.header-btn {
  width: 80px;
  height: 44px;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  background: #e2d2b8;
  color: #3a281b;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 0.5px 1px rgba(63, 42, 27, 0.18),
    0 3px 8px rgba(140, 90, 40, 0.12),
    0 4px 10px rgba(140, 90, 40, 0.18),
    0 -1px 1px rgba(255, 255, 255, 0.18);
}

/* icona */
.header-btn .icon {
  line-height: 1;
}

/* =========================
   BOTTONE CHAT (TESTO)
   ========================= */

.chat-label {
  font-size: 13px;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: #5a3f2a;

  position: relative;
  top: 2.5px; /* ← abbassa leggermente */
}

.chat-count {
  margin-left: 6px;
  font-size: 11px;
  font-weight: 600;

  color: #5a3f2a;
  opacity: 0.85;

  display: none;
}

/* mostra il contatore solo se valorizzato */
.chat-count:not(:empty) {
  display: inline-block;
}

.chat-item {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 0.95rem;
  line-height: 1.2;
}

.chat-name {
  font-weight: 500;
  color: #2b241d; /* marrone quasi nero, elegante */
}

.chat-sep {
  color: rgba(63, 42, 27, 0.35);
}

.chat-time {
  color: rgba(63, 42, 27, 0.45);  /* effetto placeholder */
  font-weight: 400;
}

/* =========================
   OVERLAY CHAT (BASE)
   ========================= */

.hidden {
    display: none;
}

#chat-overlay {
  position: absolute;

  top: 107px;          /* linea header / pannelli */
  right: 24px;

  width: 220px;
  bottom: 95px;      /* 👈 stessa distanza dal fondo del contenitore */

  background: #F3ECDD;
  border-left: 1px solid rgba(140, 90, 40, 0.18);
  z-index: 20;
}

.chat-overlay-panel {
  height: 100%;
  padding: 30px;
  padding-top: 36px;
  box-sizing: border-box;
}

/* lista chat */
.chat-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* singola chat */
.chat-item {
  font-size: 15px;
  color: #3f2a1b;
}

/* nome chat */
.chat-name {
  font-weight: 500;
}

/* orario */
.chat-time {
  font-size: 12px;
  color: rgba(63, 42, 27, 0.45);
  margin-left: 6px;
}

.chat-overlay-panel {
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* =========================
   OVERLAY MENU (BASE)
   ========================= */

/* stato nascosto */
.hidden {
  display: none;
}

#menu-overlay {
  position: absolute;

  top: 107px;          /* linea header / pannelli */
  left: 24px;

  width: 280px;
  bottom: 95px;       /* stessa distanza dal fondo del contenitore */

  background: #F3ECDD;
  border-right: 1px solid rgba(140, 90, 40, 0.18);
  z-index: 20;
}

.menu-overlay-panel {
  height: 100%;
  padding: 30px;
  padding-top: 36px;
  box-sizing: border-box;
}

.menu-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.menu-item {
  position: relative;
  padding-left: 14px;
  color: #3f2a1b;
  text-decoration: none;
}

/* hover delicato */
.menu-item:hover {
  opacity: 0.80;
}

.menu-overlay-panel {
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.menu-item.active-mode {
    background: #7fdc8d;              /* verde brillante, più pieno e profondo */
    color: #000000;                   /* testo nero */
    font-weight: 600;
    border-left: 4px solid #000000;   /* bordo nero, come il testo */
    position: relative;
}

.menu-sep {
    margin: 10px 0;   /* SPAZIO VERTICALE */
    height: 1px;
    background: rgba(255,255,255,0.15);
}

/* === FOOTER UNIFICATO === */
#admin-unified-footer {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  padding: 0 18px;
  height: 72px;
  background: #F3ECDD;
  border-top: 1px solid rgba(140, 90, 40, 0.18);
  border-bottom-left-radius: 32px;
  border-bottom-right-radius: 32px;
  box-sizing: border-box;
}

.footer-col {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.footer-input {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 14px 18px;
  background: #FAF6F0;
  color: #3f2a1b;
  border: 1px solid rgba(140, 90, 40, 0.28);
  border-radius: 14px;
  outline: none;
  box-shadow:
    inset 0 0.5px 1px rgba(140, 90, 40, 0.10),
    0 1px 9px rgba(140, 90, 40, 0.18);
  box-sizing: border-box;
}

.footer-input::placeholder {
  font-style: italic;
  opacity: 0.55;
  color: #7e7363;
}

.footer-btn-wrapper {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-shrink: 0;
}

.footer-btn {
  height: 22px;
  padding: 0 15px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid rgba(140, 90, 40, 0.18);
  cursor: pointer;
  background-color: #d4c7ad;
  color: #3a281b;
  transition: background-color 0.2s ease;
}

.footer-btn:hover {
  background-color: #c8bca2;
}

.footer-chat-timer {
  height: 22px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e8ddc4;
  color: #3f2a1b;
  border: 1px solid rgba(140, 90, 40, 0.18);
  border-bottom: none;
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
}

.footer-btn-close {
  height: 22px;
  font-size: 12px;
  font-weight: 600;
  background: #e8ddc4;
  color: #3f2a1b;
  border: 1px solid rgba(140, 90, 40, 0.18);
  border-top: none;
  border-bottom-left-radius: 6px;
  border-bottom-right-radius: 6px;
  cursor: pointer;
}

/* ===============================
   LARGHEZZA FISSA BOTTONI STESA
================================ */

#stesa-switch,
#carto-switch {
  width: 2.5cm;
  min-width: 2.5cm;
  max-width: 2.5cm;
  box-sizing: border-box;
}

/* === LAYOUT A 3 CONTAINER STABILI === */

/* Ogni colonna è un container */
.container {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #FCF8F2;
  border-right: 1px solid rgba(180, 140, 90, 0.25);
  min-height: 0;
}

.container:last-child {
  border-right: none;
}

.container-body {
  flex: 1;
  padding: 18px;
  overflow-y: auto;
  background: #FDFBF6;
  min-height: 0;
}

.header-btn-left {
  position: absolute;
  left: 20px;
}

.header-btn-group {
  position: absolute;
  right: 20px;
  display: flex;
  gap: 10px;
}

.footer-col {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
}

.footer-input {
  flex: 1;
  min-width: 0;
  width: auto;
}

.footer-btn-wrapper {
  flex-shrink: 0;
}

.footer-col-left {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

#input-carte {
  flex: 1;
  min-width: 0;
  width: auto;
}

.footer-col-center {
  position: relative;
}

.footer-col-center .footer-btn-wrapper {
  position: absolute;
  left: -100%;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-btn-wrapper {
  flex-shrink: 0;
}

/* spazio tra Cartomanzia e Thaloria */
.footer-col-left {
  padding-right: 18px;   /* aria verso la colonna centrale */
}

/* spazio tra Thaloria e Chat */
.footer-col-center {
  padding-left: 4px;    /* aria dalla cartomanzia */
  padding-right: 4px;   /* aria verso la chat */
}

/* spazio tra Chat e bordo destro */
.footer-col-right {
  padding-left: 18px;    /* aria dalla colonna centrale */
}

/* === CHAT CHIUSA === */
#admin-3col.chat-closed {
    grid-template-columns: 1fr 1fr;
}

/* === CHAT APERTA === */
#admin-3col:not(.chat-closed) {
    grid-template-columns: 1fr 1fr 1fr;
}

/* === CHAT FOOTER NASCOSTO SE PANEL CHIUSO === */
#admin-3col.chat-closed [data-chat-footer] {
    display: none;
}

/* === STATO CHAT CHIUSA === */
#admin-3col.chat-closed {
    grid-template-columns: 1fr 1fr;
}

/* footer segue le colonne */
#admin-3col.chat-closed #admin-unified-footer {
    grid-template-columns: 1fr 1fr;
}

/* nasconde SOLO la parte chat del footer */
#admin-3col.chat-closed [data-chat-footer] {
    display: none;
}

/* CONTAINER */
#carte-root {
    display: flex;
    flex-direction: column;
    padding: 14px;
    box-sizing: border-box;
    font-family: "Optima", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    font-size: 18px;
    line-height: 1.45;
    font-weight: 400;
    align-items: flex-start;
}

/* MESSAGGI */
#carte-root .rituale-msg {
    max-width: 90%;
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
}

/* ALLINEAMENTO */
#carte-root .rituale-msg.assistant {
    align-self: flex-start;
    text-align: left;
}

#carte-root .rituale-msg.user {
    align-self: flex-end;
    text-align: right;
}

/* TESTO */
#carte-root .rituale-msg .text {
    padding: 12px 16px;
    border-radius: 12px;
    background: transparent;
    color: #3f3a2b;
}

/* LINEETTA */
#carte-root .rituale-msg .line {
    margin-top: 6px;
    margin-bottom: 8px;
    width: 1.8cm;
    border-top: 1px solid rgba(63, 42, 27, 0.35);
    opacity: 0.6;
}

#carte-root .rituale-msg.assistant .line {
    margin-left: 0;
    margin-right: auto;
}

#carte-root .rituale-msg.user .line {
    margin-left: auto;
    margin-right: 0;
}

/* META */
#carte-root .rituale-msg .meta {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    opacity: 0.55;
    overflow: visible;
}

#carte-root .rituale-msg.assistant .meta {
    justify-content: flex-start;
    text-align: left;
}

#carte-root .rituale-msg.user .meta {
    justify-content: flex-end;
    text-align: right;
}

/* ICONA COPIA */
#carte-root .rituale-msg .copy-icon {
    cursor: pointer;
    font-size: 11px;
    line-height: 1;
    opacity: 1;
    transition: opacity 0.2s ease;
}

#carte-root .rituale-msg .copy-icon:hover {
    opacity: 1;
}

/* ===============================
   CARTE — layout per stese
================================ */
#carte-root {
    display: flex;
    flex-direction: column;
    padding: 14px;
    box-sizing: border-box;
    font-family: "Optima", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    font-size: 18px;
    line-height: 1.45;
    font-weight: 400;
    align-items: flex-start;
}

.carte-layout {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.carte-row {
  display: flex;
  gap: 14px;
}

.carte-row.center {
  justify-content: center;
}

.carte-row.start {
  justify-content: flex-start;
}

.carte-row .carta {
  flex: 1;
}

/* 3 CARTE: una di fianco all’altra */
.carte-3 .carta {
  max-width: 33.333%;
}

/* TERNE: 3 per riga */
.carte-terne .carta {
  max-width: 33.333%;
}

/* STRUTTURATA: righe variabili */
.carte-2 .carta { max-width: 50%; }
.carte-3r .carta { max-width: 33.333%; }
.carte-1 .carta { max-width: 33.333%; } /* 1 carta al centro, non enorme */

/* Lineetta rituale */
.rituale-line {
  margin-top: 6px;
  margin-bottom: 8px;
  width: 1.8cm;
  border-top: 1px solid rgba(63, 42, 27, 0.35);
  opacity: 0.6;
}

.rituale-msg.assistant .rituale-line {
  margin-left: 0;
  margin-right: auto;
}

.rituale-msg.user .rituale-line {
  margin-left: auto;
  margin-right: 0;
}


/* === STILE UNIFICATO CARTE — VERSIONE COMPATTA E VISIBILE === */

/* Contenitore carta */
.carta {
  width: 140px;
  height: auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  margin-bottom: 48px;
  position: relative;
}

/* Immagine carta */
.carta-img img {
  width: 140px;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: none;
}

/* Nome carta */
.carta-nome {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  color: #3f2a1b;
  height: 32px;
  overflow: hidden;
  display: block;
}

/* Significato (toggle) */
.carta-significato {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.3;
  color: #3f3a2b;
  background: #f7f2e8;
  padding: 8px 10px;
  border-radius: 6px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
  max-width: 200px;
  display: none;
}

.carta-significato:not(.hidden) {
  display: block;
}

/* Contenitore riga di carte */
.carte-row {
  display: flex;
  justify-content: center;
  gap: 0px;               /* più vicine tra loro */
  flex-wrap: wrap;
  align-items: stretch;
  margin-bottom: 20px;    /* meno spazio verticale */
}

/* Forza larghezza fissa per tutte le carte */
.carte-row .carta {
  flex: 0 0 160px;
}

/* Pannello carte */
#carte-root {
  min-height: 200px;
  overflow-y: auto;
}

.carta-img {
  width: 140px;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  box-shadow:
    0 1px 4px rgba(0, 0, 0, 0.1),
    0 2px 6px rgba(0, 0, 0, 0.08);
}

/* ===============================
   THALORIA — STILE UNIFICATO
================================ */

/* CONTAINER */
#thaloria-root {
    display: flex;
    flex-direction: column;
    padding: 14px;
    box-sizing: border-box;
    font-family: "Optima", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    font-size: 18px;
    line-height: 1.45;
    font-weight: 400;
    align-items: flex-start;
}

/* MESSAGGI */
#thaloria-root .message {
    max-width: 90%;
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
}

/* ALLINEAMENTO */
#thaloria-root .core-assistant.message.assistant {
    align-self: flex-start;
    text-align: left;
}

#thaloria-root .core-user.message.user {
    align-self: flex-end;
    text-align: right;
}

/* TESTO */
#thaloria-root .message .text {
    padding: 12px 16px;
    border-radius: 12px;
    background: transparent;
    color: #3f3a2b;
}

/* LINEETTA */
#thaloria-root .message .line {
    margin-top: 6px;
    margin-bottom: 8px;
    width: 1.8cm;
    border-top: 1px solid rgba(63, 42, 27, 0.35);
    opacity: 0.6;
}

#thaloria-root .core-assistant.message.assistant .line {
    margin-left: 0;
    margin-right: auto;
}

#thaloria-root .core-user.message.user .line {
    margin-left: auto;
    margin-right: 0;
}

/* META */
#thaloria-root .message .meta {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    opacity: 0.55;
    overflow: visible;
}

#thaloria-root .core-assistant.message.assistant .meta {
    justify-content: flex-start;
    text-align: left;
}

#thaloria-root .core-user.message.user .meta {
    justify-content: flex-end;
    text-align: right;
}

/* ICONA COPIA */
#thaloria-root .message .copy-icon {
    cursor: pointer;
    font-size: 11px;
    line-height: 1;
    opacity: 1;
    transition: opacity 0.2s ease;
}

#thaloria-root .message .copy-icon:hover {
    opacity: 1;
}

/* 🎯 Thaloria — allinea grandezza font a Cartomanzia */
#thaloria-root .text {
    font-size: 18px;
    line-height: 1.45;
}

/* ===============================
   💬 CHAT — STILE UNIFICATO
   (identico a Cartomanzia e Thaloria)
================================ */

/* CONTENITORE CHAT */
#chat-root {
    display: flex;
    flex-direction: column;
    padding: 14px;
    box-sizing: border-box;
    font-family: "Optima", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    font-size: 18px;
    line-height: 1.45;
    font-weight: 400;
}

/* ===============================
   MESSAGGI — BASE
================================ */

#chat-root .message {
    max-width: 90%;
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
}

/* ===============================
   ALLINEAMENTO BOLLE
================================ */

#chat-root .message.assistant {
    align-self: flex-start;
    text-align: left;
}

#chat-root .message.user {
    align-self: flex-end;
    text-align: right;
}

/* ===============================
   TESTO BOLLA
================================ */

#chat-root .message .text {
    padding: 12px 16px;
    border-radius: 12px;
    background: transparent;
    color: #3f3a2b;
}

/* ===============================
   LINEETTA
================================ */

#chat-root .message .line {
    margin-top: 6px;
    margin-bottom: 8px;
    width: 1.8cm;
    border-top: 1px solid rgba(63, 42, 27, 0.35);
    opacity: 0.6;
}

#chat-root .message.assistant .line {
    margin-left: 0;
    margin-right: auto;
}

#chat-root .message.user .line {
    margin-left: auto;
    margin-right: 0;
}

/* ===============================
   META (ORA + COPIA)
================================ */

#chat-root .message .meta {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    opacity: 0.55;
    overflow: visible;
}

#chat-root .message.assistant .meta {
    justify-content: flex-start;
    text-align: left;
}

#chat-root .message.user .meta {
    justify-content: flex-end;
    text-align: right;
}

/* ===============================
   ICONA COPIA
================================ */

#chat-root .message .copy-icon {
    cursor: pointer;
    font-size: 11px;
    line-height: 1;
    opacity: 1;
    transition: opacity 0.2s ease;
}

#chat-root .message .copy-icon:hover {
    opacity: 1;
}

/* ASSISTANT → SINISTRA */
#chat-root .message.assistant {
    align-self: flex-start;
    text-align: left;
}

/* USER → DESTRA */
#chat-root .message.user {
    align-self: flex-end;
    text-align: right;
}

#chat-root {
    align-items: flex-start !important;
}

#container-chat .container-body {
    display: flex;
    flex-direction: column;
    align-items: flex-start !important;
}

/* RESPONSO CARTOMANZIA — padding come Thaloria */
.cartomanzia-testo {
    padding-left: 16px;
    padding-right: 16px;
    padding-top: 12px;
    padding-bottom: 12px;
}

/* 🎯 SOLO TITOLO "RESPONSO" — cartomanzia */
#carte-root .cartomanzia-titolo {
    padding-left: 16px;
}
