/* =====================================================
   BASE
===================================================== */

* {
  box-sizing: border-box;
}

body {
  font-family: 'Optima', serif;
  background-color: #F4EFE1;
  color: #2A1C08;
  margin: 0;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;

  font-size: 17px;
  line-height: 1.6;
}

/* =====================================================
   CONTAINER PRINCIPALE
===================================================== */

.app-container {
  width: calc(100% - 40px);
  height: calc(100vh - 40px);
  margin: 20px;
  display: flex;
  flex-direction: column;
  background: #F4EFE1;
  border-radius: 24px;
  box-shadow:
    0 10px 25px rgba(138, 97, 45, 0.35),
    0 -10px 25px rgba(138, 97, 45, 0.25),
    10px 0 25px rgba(138, 97, 45, 0.25),
    -10px 0 25px rgba(138, 97, 45, 0.25),
    inset 0 2px 6px rgba(255, 255, 255, 0.3);
  overflow: hidden;
  position: relative;
}

/* =====================================================
   HEADER — VERSIONE STABILE
===================================================== */

.header {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 17px 20px 13px 20px;
  padding-bottom: 0.5cm;
  background-color: #F1E8DA;
  border-bottom: 1px solid #D8C9B4;
}

/* Colonna sinistra: Home + lingua */
.header-left {
  display: flex;
  align-items: center;
  padding-top: 10px;
  gap: 12px;
}

/* Colonna destra: menu */
.header-right {
  display: flex;
  align-items: center;
  padding-top: 10px;
  gap: 12px;
}

/* Titolo centrato assoluto */
.header-brand {
  position: absolute;
  left: 50%;
  top: calc(40% + 6px); /* 6px ≈ 3 mm */
  transform: translate(-50%, -50%);
  pointer-events: none;
  white-space: nowrap;
}

/* Colonna sinistra: Home + lingua */
.header > #btn-info,
.header > #lang-switcher,
.header > #btn-menu {
  position: relative;
  z-index: 2;
}

/* ========================== */
/* 💠 Contatore crediti - base */
/* ========================== */
#crediti-box {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.85rem;
  font-style: italic;
  opacity: 0.6;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #000000;
  font-family: Optima, serif;
  justify-content: center; /* 💥 questa è la chiave */
  margin-left: 0;           /* 💥 rimuovi lo spostamento a sinistra */
}

.header-title-brand {
  font-family: Optima, "Segoe UI", serif;
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

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

/* -----------------------------
   BOTTONI HEADER
------------------------------ */

.header-btn {
  background-color: #E2D5C2;
  color: #2A1C08;
  border: none;
  border-radius: 10px;
  padding: 8px 16px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow:
    inset 0 1px 3px rgba(42, 28, 8, 0.08),
    0 2px 6px rgba(42, 28, 8, 0.2);
  transition: all 0.2s ease-in-out;
}

.header-btn:hover {
  transform: translateY(-1px);
}

.home-btn {
  margin-top: 10px;
}

/* =====================================================
   LANGUAGE SWITCHER — STABILE
===================================================== */

#lang-switcher {
  display: flex; /* inline-flex non serve: sei già in flex layout */
  align-items: center;
  gap: 8px; /* più respiro tra label e freccia */
  margin: 0; /* niente spinta laterale: è già nel flusso */
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  opacity: 0.95;
  position: relative; /* evita interferenze con elementi assoluti */
  z-index: 2; /* sopra il titolo assoluto */
}

#lang-switcher::after {
  content: "▾";
  margin-left: 6px;
  font-size: 0.75rem;
  opacity: 0.7;
  pointer-events: none;
  transform: translateY(1px);
}

/* ===============================
   MENU LINGUE
=============================== */

#lang-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;

  background: #1c1c1c;
  color: #e8dfd1;

  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;

  padding: 16px 16px;
  min-width: 140px;          /* larghezza “professionale” */

  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);

  z-index: 9999;
}

/* hover */
#lang-menu div:hover {
  background: rgba(255, 255, 255, 0.08);
  opacity: 2;
}

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

/* =====================================================
   AREA CONTENUTO
===================================================== */

.chat-window,
.stesura-window {
  flex: 1;
  overflow-y: auto;
  background-color: #F7F2E6;
  padding: 28px;
  padding-bottom: 5cm;
  box-shadow: inset 0 1px 6px rgba(42, 28, 8, 0.06);
  display: flex;
  flex-direction: column;
}

/* =====================================================
   MESSAGGI
===================================================== */

.message {
  display: flex;
  flex-direction: column;
  margin-bottom: 10px;
  max-width: 100%;
}

.message.user {
  align-items: flex-end;
  margin-left: auto;
  max-width: 65%;
}

.message.assistant {
  align-items: flex-start;
  max-width: 100%;
}

.text {
  padding: 8px 10px;
  line-height: 1.6;
  font-size: 1.15em;
  color: rgba(42, 28, 8, 0.85);
}

.message.user .text {
  text-align: right;
}

.message.assistant .text {
  text-align: left;
}

.mazzo-usato {
  font-size: 0.85em;        /* più piccolo */
  color: rgba(0, 0, 0, 0.55); /* nero più leggero */
  margin-top: 12px;         /* distanziato dal testo */
  text-align: left;         /* allineato come il resto */
}

/* =====================================================
   PAGINE STATICHE
===================================================== */

.welcome-page {
  display: flex;
  flex-direction: column;
  justify-content: center;   /* verticale */
  align-items: center;       /* orizzontale */
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
  padding: 2rem;
  height: calc(100vh - 56px - 2.3cm);
}

.welcome-page.welcome-age {
  justify-content: flex-start !important;
  align-items: center; /* puoi tenerlo centrato orizzontalmente */
  height: auto !important;
  min-height: calc(100vh - 56px - 2.3cm);
  padding-top: 20px;
}


.static-page-content {
  text-align: center;
}

#register-view {
  display: none;
}

.link-switch a {
  text-decoration: none;
  font-weight: 600; /* leggero grassetto */
  color: inherit;   /* stesso colore del testo normale */
}

.link-switch a:hover {
  text-decoration: none;
  opacity: 0.8;     /* feedback elegante al passaggio */
}

a.link-switch {
  text-decoration: none;
  font-weight: 600;
  color: inherit;
}

a.link-switch:hover {
  text-decoration: none;
  opacity: 0.8;
}

.info-page {
  max-width: 600px;
  margin: 0 auto;
  padding: 2rem;
  font-size: 0.9rem;
  line-height: 1.6;
  color: rgba(42, 28, 8, 0.85);
}

.info-page.left {
  text-align: left;
}

.info-page.right {
  text-align: right;
}

/* menu / info link */

.menu-link,
.info-link {
  margin: 24px 0;
  cursor: default;
}

.menu-link strong,
.info-link strong {
  cursor: pointer;
}

.menu-link strong:hover,
.info-link strong:hover {
  opacity: 0.7;
}

/* SELECT — caldo e coerente */
#ricarica-select {
  width: 100%;
  padding: 12px 16px;
  font-size: 1.05rem;
  font-family: Optima, serif;
  background-color: #F4EFE1;
  border: 1px solid #D8C9B4;
  border-radius: 12px;
  box-shadow:
    inset 0 1px 2px rgba(0,0,0,0.05),
    0 2px 6px rgba(138,97,45,0.15);
  margin-top: 12px;
  margin-bottom: 16px;
}

#ricarica-select {
  color: #2A1C08 !important;
  background-color: #F4EFE1;
}

/* iOS fix: forza il colore del testo quando il valore cambia */
#ricarica-select:focus,
#ricarica-select:active {
  color: #2A1C08 !important;
}

/* Safari iOS: rimuove lo stile nativo blu */
#ricarica-select {
  -webkit-text-fill-color: #2A1C08 !important;
}

/* DESCRIZIONE — fascia calda e leggibile */
.crediti-descrizione {
  padding: 14px 18px;
  background-color: #F1E8DA;
  border-left: 4px solid #C89B6D;
  border-radius: 10px;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #2A1C08;
  box-shadow:
    inset 0 1px 2px rgba(0,0,0,0.05),
    0 2px 6px rgba(138,97,45,0.15);
  margin-top: 12px;
  transition: opacity 0.3s ease;
}

/* Quando hidden */
.crediti-descrizione.hidden {
  display: none;
  opacity: 0;
}

#prosegui-ricarica {
  display: block;
  width: 100%;
  padding: 12px 16px;
  font-size: 1.05rem;
  font-family: Optima, serif;
  background-color: #E2D5C2;
  color: #2A1C08;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  box-shadow:
    inset 0 1px 3px rgba(42, 28, 8, 0.08),
    0 2px 6px rgba(138, 97, 45, 0.25);
  transition: all 0.2s ease-in-out;
  margin-top: 0; /* come hai già fatto */
}

#prosegui-ricarica:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 3px rgba(0,0,0,0.10),
    0 4px 10px rgba(138,97,45,0.35);
}

/* Placeholder in corsivo nel select */
#ricarica-select::placeholder {
  font-style: italic;
  color: rgba(42, 28, 8, 0.5);
  font-family: Optima, "Palatino Linotype", Palatino, serif;
}

/* INPUT PERSONALIZZATO — stile Thaloria */
#custom-input-wrapper {
  margin-top: 12px;
}

#custom-input-wrapper label {
  display: block;
  font-size: 0.95rem;
  font-family: Optima, serif;
  color: #2A1C08;
  margin-bottom: 6px;
}

#custom-input {
  width: 100%;
  padding: 12px 16px;
  font-size: 1.05rem;
  font-family: Optima, serif;
  background-color: #F4EFE1;
  border: 1px solid #D8C9B4;
  border-radius: 12px;
  box-shadow:
    inset 0 1px 2px rgba(0,0,0,0.05),
    0 2px 6px rgba(138,97,45,0.15);
  color: #2A1C08;
}

/* iOS fix: forza il colore del testo */
#custom-input:focus,
#custom-input:active {
  color: #2A1C08;
}

/* Safari iOS: rimuove lo stile nativo blu */
#custom-input {
  -webkit-text-fill-color: #2A1C08;
}

.crediti-descrizione {
  padding: 14px 18px;
  background-color: #F4EFE1;
  border-left: 4px solid #C89B6D;
  border-radius: 12px;
  font-size: 1rem;
  font-family: Optima, serif;
  line-height: 1.6;
  color: #2A1C08;
  box-shadow:
    inset 0 1px 2px rgba(0,0,0,0.05),
    0 2px 6px rgba(138,97,45,0.15);
  margin-top: 16px;
  transition: opacity 0.3s ease;
}

/* Quando hidden */
.crediti-descrizione.hidden {
  display: none;
  opacity: 0;
}


/* =====================================================
   INPUT AREA
===================================================== */

.input-area {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: #F1E8DA;
  height: 2.3cm;
  padding: 12px calc(16px + env(safe-area-inset-right)) 12px calc(16px + env(safe-area-inset-left));
  border-top: 1px solid rgba(138, 97, 45, 0.25);
  border-radius: 0 0 24px 24px;
  overflow: hidden;
}

textarea {
  flex: 0 1 clamp(280px, 70vw, 640px);
  resize: none;
  border: none;
  background: #F4EFE1;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 1.1em;
  line-height: 1.5;
  min-height: 48px;
  color: #2A1C08;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    inset 0 -1px 0 rgba(255, 255, 255, 0.35),
    0 -1px 3px rgba(138, 97, 45, 0.18),
    0 1px 3px rgba(138, 97, 45, 0.18);
}

textarea:focus {
  outline: none;
  box-shadow: 0 0 6px rgba(138, 97, 45, 0.35);
}

textarea::placeholder {
  color: rgba(42, 28, 8, 0.25);
  font-style: italic;
  font-family: Optima, "Palatino Linotype", Palatino, serif;
}

#send-btn,
#mic-btn,
.send-btn {
  background-color: #E2D5C2;
  color: #2A1C08;
  border: none;
  border-radius: 10px;
  padding: 12px 20px;
  font-weight: 600;
  cursor: pointer;
  height: 48px;
  box-shadow:
    inset 0 1px 3px rgba(42, 28, 8, 0.08),
    0 2px 6px rgba(42, 28, 8, 0.2);
  transition: all 0.2s ease-in-out;
}

#send-btn,
#mic-btn,
.send-btn {
  transform: translateY(-1px);
}

.bottoni-container {
  display: flex;
  gap: 48px !important;
}

.button-grande {
  background-color: #E2D5C2;
  color: #2A1C08;
  border: none;
  border-radius: 10px;
  padding: 12px 20px;
  font-weight: 600;
  cursor: pointer;
  width: 3cm;
  height: 40px;
  box-shadow:
    inset 0 1px 3px rgba(42, 28, 8, 0.08),
    0 2px 6px rgba(42, 28, 8, 0.2);
  transition: all 0.2s ease-in-out;
  text-align: center;
}

.button-grande:hover {
  transform: translateY(-1px);
}

/* Titoli */
.chat-window strong {
    font-weight: 600;
    font-size: 0.95rem;
}

.chat-window .message.assistant strong {
  font-weight: 700;
  color: rgba(42, 28, 8, 0.75);
  letter-spacing: 0.02em;
}

/* Input */
.input-area input,
.input-area textarea {
    font-size: 1rem;
    font-weight: 400;
}

/* Placeholder */
.input-area input::placeholder,
.input-area textarea::placeholder {
    font-size: 0.75rem;
    font-weight: 300;
    opacity: 0.6;
}

/* Font più piccolo e uniforme nelle bolle chat */
.chat-window .message,
.chat-window .message.user,
.chat-window .message.bot {
  font-size: 0.95rem;
  line-height: 1.45;
  font-weight: 300;
}

/* Footer alto in TUTTE le statiche */
.chat-window.static-page ~ .input-area {
  height: 1.5cm;
  padding: 4px 8px;
}

/* Escludi le 5 pagine speciali */
.chat-window.static-page.cartomanzia ~ .input-area,
.chat-window.static-page.thaloria ~ .input-area,
.chat-window.static-page.canalizzazione ~ .input-area,
.chat-window.static-page.lettura ~ .input-area,
.chat-window.static-page.abbie ~ .input-area {
  height: auto;
}

.menu-item {
  display: flex;
  flex-direction: column;
  gap: 6px; /* distanza tra titolo e descrizione */
}

.menu-item strong {
  display: block;
  font-size: 1.1em;
  margin-bottom: 4px;
}

.menu-item small {
  display: block;
  opacity: 0.8;
  line-height: 1.4;
}

/* Font unificato per tutte le pagine */
.chat-window,
.chat-window.static-page,
.chat-window.cartomanzia,
.chat-window.thaloria,
.chat-window.canalizzazione,
.chat-window.lettura,
.chat-window.abbie,
.chat-window.welcome {
  font-size: 1.15rem;
  line-height: 1.6;
  font-family: Optima;
  font-weight: 400; /* normale, non demi */
}

/* Titoli morbidi su desktop */
.chat-window strong {
  font-weight: 650;
}

/* =============================
   WELCOME AGE — INPUT & BUTTON
============================= */

.welcome-age-input {
  margin-top: 28px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

/* INPUT ETÀ */
.welcome-age-input input {
  width: 45%;
  height: 48px;
  padding: 10px 14px;
  font-size: 1.05rem;
  border-radius: 12px;
  border: none;
  background: #f4efe1;
  color: #2a1c08;
  box-shadow:
    inset 0 1px 2px rgba(0,0,0,0.08),
    0 2px 6px rgba(138,97,45,0.25);
  text-align: center;
}

.welcome-age-input input::placeholder {
  color: rgba(42,28,8,0.4);
  font-family: Optima, "Palatino Linotype", Palatino, serif;
  font-style: italic;
}

.welcome-age-input input:focus {
  outline: none;
  box-shadow:
    inset 0 1px 2px rgba(0,0,0,0.1),
    0 0 8px rgba(138,97,45,0.45);
}

/* BOTTONE CONTINUA */
.welcome-age-input button {
  height: 48px;
  width: 45%;
  padding: 0 20px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  background-color: #e2d5c2;
  color: #2a1c08;
  box-shadow:
    inset 0 1px 3px rgba(0,0,0,0.10),
    0 2px 6px rgba(138,97,45,0.35);
  transition: all 0.2s ease;
}

.welcome-age-input button:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 3px rgba(0,0,0,0.15),
    0 4px 10px rgba(138,97,45,0.45);
}

.welcome-age-input button:active {
  transform: translateY(0);
}

.welcome-age-note {
  margin-top: 24px;        /* un filo più aria */
  font-size: 0.90rem;     /* leggermente più piccola */
  opacity: 0.6;           /* più leggera */
  line-height: 1.20;
  text-align: center;
  font-family: Optima, "Palatino Linotype", Palatino, serif;
  font-style: italic;
}

.welcome-age-error {
  margin-top: 10px;
  font-size: 0.9rem;
  line-height: 1.4;
  color: #6a5f55;
  opacity: 0.85;
  text-align: center;
}

/* Disattiva il centramento verticale SOLO nella pagina età */
.chat-window.welcome-age {
  display: block !important;
  padding-top: 24px;
  overflow-y: auto;
}

/* ===============================
   CHAT SESSION BAR (ABBIE)
   =============================== */

#chat-session-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;

    width: 100%;
    margin: 0;                /* attaccata all’header */
    padding: 4px 23px;        /* fascia sottile */

    background-color: #E2D5C2;
    color: #2A1C08;

    border: none;
    border-radius: 0;         /* NESSUN angolo arrotondato */

    font-size: 13px;
    box-sizing: border-box;
}

#chat-session-bar.hidden {
    display: none;
}

/* TIMER (sinistra) */
#chat-timer {
    font-variant-numeric: tabular-nums;
    font-weight: 500;
    line-height: 1;
}

#chat-timer {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
}

#timer-warning {
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

#timer-warning.hidden {
    opacity: 0;
    pointer-events: none;
}

/* TERMINA CHAT (destra) */
#end-chat-btn {
    background: transparent;
    border: none;
    padding: 0;

    color: #8B2E2E;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1;

    cursor: pointer;
}

.chat-warning {
  font-size: 0.75rem;
  opacity: 0.7;
  margin-top: 2px;
  transition: opacity 0.4s ease;
}

.chat-warning.hidden {
  opacity: 0;
}

#end-chat-btn:hover {
    opacity: 0.85;
}

.hidden {
      display: none;
}

/* =====================================================
   MOBILE — LAYOUT + TESTI + INPUT (UNIFICATO)
===================================================== */

@media (max-width: 768px) {

  /* Base */
  body {
    align-items: stretch;
    font-size: 18px;
    line-height: 1.6;
  }

  .app-container {
    width: 100%;
    height: 100vh;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
  }

  /* Header */
  .header-title-brand {
    font-size: 20px;
  }

  .header-btn {
    font-size: 16px;
  }

  /* Titoli più presenti */
  .chat-window strong,
  .welcome-age-panel strong {
    font-size: 1.2rem;
    font-weight: 800;
  }

  /* Input area */
  .input-area {
    height: 3cm;
    padding: 8px 12px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
    border-radius: 0;
  }

  #mic-btn {
    display: none;
  }
}

/* =====================================================
   MOBILE PICCOLO — WELCOME AGE INPUT
===================================================== */

@media (max-width: 430px) {

  .welcome-age-input {
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: center;
  }

  .welcome-age-input {
    margin-top: 8px;   /* prima era più giù */
    margin-bottom: 8px;
  }

  .welcome-age-input input {
    width: 100%;
    max-width: 260px;
    height: 48px;
  }

  .welcome-age-input button {
    height: 38px;
    font-size: 0.95rem;
    opacity: 0.9;
  }
}

@media (max-width: 430px) {
  .welcome-page .welcome-age-note {
    font-size: 1.15rem !important;
    line-height: 1.20 !important;
    margin-top: 16px;
    opacity: 0.55;

    font-family: Optima, "Palatino Linotype", Palatino, serif;
    font-style: italic;
  }
}

@media (max-width: 430px) {
  .logo-a {
    font-size: 1.15em;
  }
}

/* Titoli sezioni – più morbidi, stile overlay */
.menu-link strong,
.info-page strong {
  color: rgba(42, 28, 8, 0.82);
  font-weight: 700;
}

@media (max-width: 768px) {

  /* Abbassa il titolo di ~3 mm reali */
  .header-brand {
    top: calc(40% + 6px); /* 6px ≈ 3 mm */
    transform: translate(-50%, -50%);
  }

  /* Loghetto più neretto */
  .logo-a {
    font-weight: 700;
    opacity: 0.95;
  }

  /* Titolo più marcato */
  .header-title-brand {
    font-weight: 700;
    letter-spacing: 0.06em;
  }
}

@media (max-width: 768px) {

  .text,
  .static-page,
  .static-page p,
  .static-page li,
  .info-page,
  .welcome-page,
  .welcome-age-panel,
  .welcome-age-panel p,
  .welcome-age-panel label {
    font-size: 1.30rem;      /* leggermente più grande = più leggibile */
    line-height: 1.80;       /* più aria = meno fatica */
    font-weight: 500;        /* più deciso ma non “urlato” */
    color: #000000;          /* nero pieno */
    -webkit-text-stroke: 0.2px rgba(0,0,0,0.65); /* micro-contrasto */
    letter-spacing: 0.01em;  /* stabilizza la lettura */
  }
}

@media (max-width: 768px) {

  .menu-link strong,
  .info-page strong {
    color: #000000;        /* nero pieno */
    font-weight: 700;      /* grassetto deciso */
    letter-spacing: 0.01em; /* micro-contrasto */
    -webkit-text-stroke: 0.2px rgba(0,0,0,0.55); /* aumenta la presenza */
  }

@media (max-width: 768px) {
  .welcome-page.welcome-age {
    overflow-y: auto;
  }
}

/* ===============================
   CHAT — ORA / META (LEGGIBILE)
   =============================== */

.message .meta {
  font-size: 24px;                 /* PIÙ GRANDE */
  line-height: 1.2;
  color: #5a4a3a;                  /* più contrasto */
  opacity: 1;                      /* niente sbiadito */
  margin-top: 6px;
}

/* Mobile: ancora più leggibile */
@media (max-width: 768px) {
  .message .meta {
    font-size: 20px;               /* chiave per il cell */
  }
}

/* SELECT — caldo e coerente */
#ricarica-select {
  width: 100%;
  padding: 12px 16px;
  font-size: 1.05rem;
  font-family: Optima, serif;
  background-color: #F4EFE1;
  color: #2A1C08;
  border: 1px solid #D8C9B4;
  border-radius: 12px;
  box-shadow:
    inset 0 1px 2px rgba(0,0,0,0.05),
    0 2px 6px rgba(138,97,45,0.15);
  margin-top: 12px;
  margin-bottom: 16px;
}

/* DESCRIZIONE — fascia calda e leggibile */
.crediti-descrizione {
  padding: 14px 18px;
  background-color: #F1E8DA;
  border-left: 4px solid #C89B6D;
  border-radius: 10px;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #2A1C08;
  box-shadow:
    inset 0 1px 2px rgba(0,0,0,0.05),
    0 2px 6px rgba(138,97,45,0.15);
  margin-top: 12px;
  transition: opacity 0.3s ease;
}

/* Quando hidden */
.crediti-descrizione.hidden {
  display: none;
  opacity: 0;
}


@media (max-width: 480px) {
  .bottoni-container {
    flex-direction: column;
    align-items: center;
    gap: 12px; /* aggiunge respiro verticale tra i bottoni */
    margin-top: 16px; /* se serve più aria sopra */
  }

  .button-grande {
    width: 80%; /* oppure 100%, o mantenere 3cm se preferisci */
    max-width: 320px; /* evita che si allarghi troppo su schermi larghi */
    margin-bottom: 8px; /* se vuoi un po’ di distacco extra */
  }
}

