.pagina_forum {
  --forum-board: #0d0d12;
  --forum-board-soft: rgba(17, 17, 24, .88);
  --forum-paper: #e9dfd2;
  --forum-paper-2: #dfd2c2;
  --forum-paper-cool: #e2e0d6;
  --forum-ink: #302b28;
  --forum-ink-soft: #645b54;
  --forum-ink-muted: #8a7f76;
  --forum-pink: #d86f9f;
  --forum-pink-soft: rgba(216, 111, 159, .34);
  --forum-cyan: #6199a5;
  --forum-cyan-soft: rgba(97, 153, 165, .28);
  --forum-paper-border: rgba(68, 52, 42, .16);
  --forum-paper-shadow: rgba(0, 0, 0, .26);
  --forum-action-red: #b34c45;
  --forum-action-wine: #892253;
  --forum-action-dark: #24101d;
  --forum-action-text: #f5e8ef;
  color: #d9d3d7;
  font-family: 'Outfit', Verdana, sans-serif;
  font-size: 12px;
  text-rendering: optimizeLegibility;
}

.pagina_forum *,
.pagina_forum *::before,
.pagina_forum *::after {
  box-sizing: border-box;
}

.hidden { display: none; }

/* Campi base del forum; il tema interno di WysiBB resta invariato. */
.pagina_forum input,
.pagina_forum select {
  font-family: 'Outfit', Verdana, sans-serif;
}

.pagina_forum input[type='submit'] {
  appearance: none;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 118px;
  height: 32px;
  min-height: 0;
  margin: 0;
  padding: 0 22px;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  clip-path: polygon(2% 14%, 8% 4%, 96% 8%, 100% 84%, 92% 96%, 4% 91%);
  color: var(--forum-action-text);
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 91, 168, .27), transparent 53%),
    linear-gradient(104deg, var(--forum-action-red), var(--forum-action-wine) 40%, var(--forum-action-dark));
  box-shadow:
    0 0 9px rgba(246, 114, 183, .14),
    0 5px 9px rgba(0, 0, 0, .27);
  font-family: 'Outfit', sans-serif;
  font-size: 10px;
  font-weight: 700;
  line-height: 32px;
  letter-spacing: .65px;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 140ms ease, filter 140ms ease;
}

.pagina_forum input[type='submit']:hover {
  color: #fff;
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.pagina_forum input[type='image'] {
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0 !important;
  background: none !important;
  box-shadow: none !important;
}

/* ============================================================
   COMANDI LATERALI â€” toolbar grafica coordinata ai pulsanti
   ============================================================ */

.menu_ticket.forum_sidebar_tools {
  width: 100%;
  margin: 0 0 14px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.forum_top_switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  margin: 0;
  padding: 3px 0 7px;
}

.forum_top_switch a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 46px;
  width: 46px;
  height: 30px;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  clip-path: polygon(4% 16%, 12% 3%, 96% 8%, 100% 82%, 90% 97%, 3% 90%);
  color: var(--forum-action-text) !important;
  text-decoration: none !important;
  background:
    radial-gradient(circle at 50% 44%, rgba(255, 91, 168, .24), transparent 55%),
    linear-gradient(104deg, rgba(179, 76, 69, .96), rgba(137, 34, 83, .98) 42%, rgba(36, 16, 29, .98));
  box-shadow:
    0 0 8px rgba(246, 114, 183, .12),
    0 4px 7px rgba(0, 0, 0, .28);
  transition: transform 140ms ease, filter 140ms ease;
}

.forum_top_switch a::before {
  content: '';
  position: absolute;
  z-index: 1;
  top: -2px;
  right: 5px;
  width: 25px;
  height: 6px;
  background: rgba(241, 164, 157, .24);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .28);
  transform: rotate(4deg);
  pointer-events: none;
}

.forum_top_switch a::after {
  content: none;
}

.forum_top_switch a:nth-child(1) { transform: rotate(-1.2deg); }
.forum_top_switch a:nth-child(2) { transform: rotate(.7deg); }
.forum_top_switch a:nth-child(3) { transform: rotate(-.35deg); }

.forum_top_switch a:nth-child(2)::before {
  background: rgba(126, 190, 198, .22);
  transform: rotate(-3deg);
}

.forum_top_switch a:hover {
  color: #fff !important;
  filter: brightness(1.10);
  transform: translateY(-1px) rotate(0deg);
}

.forum_top_switch a i {
  position: relative;
  z-index: 2;
  color: #f1dfe8;
  font-size: 13px;
  line-height: 1;
  text-shadow: 0 1px 3px rgba(0,0,0,.32);
}

.forum_top_switch a:nth-child(2) i {
  color: #b7d9dd;
}

/* Il testo resta nel markup per accessibilitÃ  e tooltip. */
.forum_top_switch a > span:not(.notifica_numero) {
  display: none;
}

.forum_top_switch .notifica_numero {
  position: absolute;
  z-index: 5;
  top: -6px;
  right: -5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 2px;
  color: #fff;
  background: #c45f91;
  box-shadow: 0 2px 4px rgba(0,0,0,.28);
  font-family: 'Outfit', sans-serif;
  font-size: 9px;
  font-weight: 800;
  line-height: 17px;
  transform: rotate(4deg);
}

/* Le sezioni mantengono il foglietto verticale giÃƒÂ  approvato. */
.forum_section_row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 38px;
  padding: 8px 11px;
  overflow: visible;
  border: 0;
  color: var(--forum-ink);
  background:
    radial-gradient(circle at 18% 23%, rgba(87,61,44,.045) 0 .7px, transparent 1.35px),
    radial-gradient(circle at 76% 69%, rgba(87,61,44,.035) 0 .65px, transparent 1.25px),
    radial-gradient(ellipse at 84% 88%, rgba(99,70,48,.065), transparent 43%),
    linear-gradient(148deg, #eee4d7 0%, #dfd1c0 54%, #eadfce 100%);
  clip-path: polygon(
    1.1% 4.5%, 14% 1.8%, 29% 3.1%, 45% 1.2%,
    61% 3%, 79% 1.5%, 98.8% 4.7%,
    98.1% 25%, 99.2% 49%, 98.4% 75%, 98.9% 95.8%,
    82% 98.4%, 64% 96.9%, 47% 99%, 30% 97.5%,
    14% 98.5%, 1.2% 95.7%, 1.9% 73%, .8% 48%, 1.7% 25%
  );
  box-shadow:
    0 1px 0 rgba(255,255,255,.34) inset,
    -5px -5px 12px rgba(91,63,44,.07) inset;
  filter: drop-shadow(0 4px 4px rgba(0,0,0,.24));
  transition: transform .14s ease, filter .14s ease;
}

.forum_section_row::before {
  content: '';
  position: absolute;
  left: 10px;
  right: 12px;
  bottom: 5px;
  height: 5px;
  border-radius: 60% 45% 55% 40%;
  background: linear-gradient(90deg, rgba(216,111,159,.58), rgba(216,111,159,.20), transparent 76%);
  opacity: .78;
  transform: rotate(-.7deg);
  pointer-events: none;
}

.forum_section_row:nth-child(even)::before {
  background: linear-gradient(90deg, rgba(97,153,165,.58), rgba(97,153,165,.20), transparent 76%);
  transform: rotate(.55deg);
}

.forum_section_row:nth-child(4n + 1) { transform: rotate(-.65deg); }
.forum_section_row:nth-child(4n + 2) { transform: rotate(.42deg); }
.forum_section_row:nth-child(4n + 3) { transform: rotate(-.24deg); }
.forum_section_row:nth-child(4n) { transform: rotate(.72deg); }

.forum_section_row:hover {
  color: #1d1815 !important;
  filter: drop-shadow(0 6px 5px rgba(0,0,0,.28)) brightness(1.025);
  transform: translateY(-1px) rotate(0deg);
}

/* Pieghe sovrapposte ai foglietti: nessun taglio del foglio, quindi niente vuoti neri. */
.forum_section_row::after {
  content: '';
  position: absolute;
  z-index: 3;
  right: 4px;
  bottom: 3px;
  width: 21px;
  height: 18px;
  background: linear-gradient(
    135deg,
    rgba(106, 79, 59, .15) 0 48%,
    rgba(255, 247, 233, .78) 51% 100%
  );
  clip-path: polygon(0 100%, 100% 0, 100% 100%);
  filter: drop-shadow(-2px -1px 1px rgba(0, 0, 0, .13));
  pointer-events: none;
}

.forum_section_row:nth-child(even)::after {
  top: 3px;
  right: 4px;
  bottom: auto;
  left: auto;
  background: linear-gradient(
    45deg,
    rgba(255, 247, 233, .78) 0 49%,
    rgba(106, 79, 59, .15) 52% 100%
  );
  clip-path: polygon(0 0, 100% 0, 100% 100%);
  filter: drop-shadow(-2px 1px 1px rgba(0, 0, 0, .13));
}

.forum_section_row::before,
.forum_section_link,
.forum_section_count {
  z-index: 5;
}

/* ============================================================
   LAYOUT ORIGINALE
   ============================================================ */

.page_body,
.elenco_esteso,
.forum_schema_home {
  width: 100%;
}

.forum_schema_home {
  margin: 0 auto 15px;
  padding: 0;
}

.forum_layout_flex {
  display: inline-flex;
  flex-direction: row-reverse;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: flex-start;
  height: 580px;
}

#ajax_forum {
  width: 730px;
  max-height: 600px;
  overflow: auto;
  padding-right: 15px;
}

#forum_contenitore,
#contenitore_menu_forum {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

#forum_contenitore {
  width: 215px;
  margin: 0;
  padding: 0;
}

#contenitore_menu_forum {
  width: 215px;
  height: 595px;
  margin-top: 8px;
  padding: 6px 8px 14px;
  overflow: auto;
}

.schema_forum,
.schema_forum_post {
  position: relative;
  top: 6px;
  width: 100%;
  min-height: 590px;
  max-height: 590px;
  margin: 0 auto;
  padding: 0 3px;
  color: #d8d0d5;
  background: transparent;
}

/* ============================================================
   SIDEBAR Ã¢â‚¬â€ foglietti veri, senza pannello e senza cerchi
   ============================================================ */

.box_link_sezioni {
  margin: 0 auto 14px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.titoli_categorie_bacheca {
  position: relative;
  margin: 2px 0 9px;
  padding: 2px 5px 8px;
  color: #f2e9ed;
  font-family: 'Infamous', 'Outfit', sans-serif;
  font-size: 17px;
  font-weight: 500;
  line-height: 18px;
  letter-spacing: .35px;
  text-align: center;
  text-transform: none;
  text-shadow: 0 2px 5px rgba(0, 0, 0, .34);
}

.titoli_categorie_bacheca::after {
  content: '';
      position: absolute;
      left: 50%;
      bottom: 6px;
      width: 106px;
      height: 1px;
      border-radius: 48% 62% 44% 58%;
      background: linear-gradient(90deg, var(--forum-pink), var(--forum-cyan), transparent);
      opacity: .68;
      transform: translateX(-50%) rotate(-1deg);
      filter: blur(.2px);
}

.forum_section_row {
  margin: 0 0 8px;
}

.forum_section_link {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
  width: auto;
  padding-right: 10px;
  line-height: 11px;
  text-align: left;
}

.forum_section_count {
  position: absolute;
  z-index: 3;
  top: 13px;
  right: 11px;
  width: auto;
  min-width: 0;
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #497984;
  background: transparent;
  box-shadow: none;
  font-family: 'Infamous', 'Outfit', sans-serif;
  font-size: 12px;
  font-weight: 600;
  line-height: 12px;
  text-align: right;
  transform: rotate(4deg);
}

.forumtitle,
a.forumtitle:visited {
  position: relative;
  z-index: 2;
  color: var(--forum-ink) !important;
  font-family: 'Outfit', sans-serif;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .3px;
  text-decoration: none;
  text-transform: uppercase;
}

a.forumtitle:hover {
  color: #171310 !important;
  background: transparent;
  border: 0;
  text-shadow: none;
}

/* ============================================================
   INTESTAZIONI E THREAD
   ============================================================ */

.wrap_newT {
  position: relative;
  min-height: 38px;
  margin: 10px auto 14px;
  padding: 10px 42px 9px 16px;
  overflow: visible;
  border: 1px solid var(--forum-paper-border);
  color: var(--forum-ink);
  background:
    radial-gradient(ellipse at 85% 86%, rgba(94, 65, 47, .05), transparent 42%),
    linear-gradient(145deg, #eee5da, #dfd2c3);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .30) inset,
    0 5px 9px rgba(0, 0, 0, .22);
  clip-path: polygon(
    .8% 6%, 17% 2%, 35% 4%, 54% 1%, 73% 4%, 99% 6%,
    98.7% 72%, 95.3% 83%, 91.7% 94.5%,
    80% 97%, 60% 94%, 39% 99%, 19% 95%, 1% 93%
  );
  font-family: 'Infamous', sans-serif;
  font-size: 16px;
  font-weight: 800;
  line-height: 13px;
  letter-spacing: .9px;
  text-align: left;
  text-transform: uppercase;
  transform: rotate(-.12deg);
}

/* Piega vera nell'angolo inferiore destro */
.wrap_newT::before {
  content: '';
  position: absolute;
  z-index: 4;
  right: 4px;
  bottom: 3px;
  width: 34px;
  height: 28px;
  background:
    linear-gradient(
      135deg,
      rgba(101, 76, 58, .20) 0 48%,
      rgba(255, 247, 233, .78) 50% 100%
    );
  clip-path: polygon(0 100%, 100% 0, 100% 100%);
  filter: drop-shadow(-3px -2px 2px rgba(0, 0, 0, .18));
  pointer-events: none;
}

/* Sottolineatura crayon */
.wrap_newT::after {
  content: '';
  position: absolute;
  z-index: 2;
  left: 16px;
  bottom: 5px;
  width: 90px;
  height: 4px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--forum-pink), transparent);
  opacity: .62;
  pointer-events: none;
}

.forum_wrap_subtitle {
  color: #65445a;
  font-size: 12px;
}

.forum_wrap_icon {
  color: var(--forum-cyan);
}

.forum_wrap_sep {
  color: rgba(48, 43, 40, .30);
  margin: 0 5px;
}

.forum_new_topic_box {
  float: right;
}

.forum_confirm_box {
  position: absolute;
  top: 40%;
  left: 195px;
  z-index: 2;
  width: 350px;
  margin: 0 auto;
  text-align: center;
}

.forum_confirm_back {
  color: #3f7680 !important;
}

.forum_topic_spaced {
  margin-bottom: 42px;
}

.forum_thread_card {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 9px;
  min-height: 62px;
  margin: 0 auto 7px;
  padding: 10px 12px;
  border: 1px solid var(--forum-paper-border);
  color: var(--forum-ink);
  background:
    radial-gradient(ellipse at 86% 86%, rgba(91, 63, 45, .045), transparent 44%),
    linear-gradient(145deg, #ebe1d5, #dfd1c1);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .28) inset,
    0 5px 9px rgba(0, 0, 0, .22);
  clip-path: polygon(.8% 4%, 17% 1%, 35% 3%, 54% 1%, 74% 3%, 99% 4%, 98.5% 95%, 80% 98%, 60% 96%, 39% 99%, 19% 97%, 1% 95%);
}

.forum_thread_card:nth-child(even) {
  transform: rotate(.12deg);
}

.forum_thread_main {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.forum_thread_new {
  flex: 0 0 auto;
  min-width: 28px;
  min-height: 28px;
  padding: 5px 4px 3px;
  border-radius: 50%;
  color: var(--forum-ink-muted);
  font-family: 'Outfit', sans-serif;
  font-size: 8px;
  font-weight: 800;
  line-height: 8px;
  text-align: center;
}

.forum_thread_new:empty {
  display: none;
}

.forum_thread_new.is_new {
  color: #bb5c58;
}

.forum_thread_info {
  flex: 1;
  min-width: 0;
  text-align: left;
  line-height: 0.7;
}

.forum_thread_title {
  display: inline-block;
  margin-right: 4px;
  color: var(--forum-ink) !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  letter-spacing: .1px !important;
  text-transform: none !important;
}

.forum_thread_title:hover {
  color: #1e1916 !important;
}

.forum_thread_meta {
  margin-top: 2px;
  color: var(--forum-ink-soft);
  font-size: 9.5px;
  line-height: 12px;
}

.forum_thread_stats,
.forum_thread_stats_small {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  width: 126px;
  color: var(--forum-ink-soft);
  font-size: 9px;
  line-height: 11px;
  text-align: right;
}

.forum_thread_stats_small {
  width: 104px;
}

.forum_thread_actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
}

.forum_inline_form {
  display: inline;
  margin: 0;
}

.forum_icon_button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 25px !important;
  height: 25px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid rgba(68, 52, 42, .12) !important;
  border-radius: 50%;
  color: #746960;
  background: rgba(255, 255, 255, .26) !important;
  box-shadow: none !important;
  cursor: pointer;
}

.forum_icon_button:hover {
  color: #423a34;
  background: rgba(255, 255, 255, .42) !important;
}

.forum_icon_saved,
.forum_icon_important {
  color: #b75282;
}

.forum_icon_dim {
  opacity: .45;
}

.forum_icon_locked {
  color: #9d4f73;
  font-size: 9px;
}

.new_msgN {
  color: #1a6b7c;
  font-family: 'Outfit', sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0;
  text-align: center;
}

span.new_msg {
  color: #b94f80;
  font-family: 'Outfit', sans-serif;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .7px;
  text-transform: uppercase;
}

span.msg_imp {
  color: #ad4d79;
  font-family: 'Outfit', sans-serif;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .6px;
  text-transform: uppercase;
}

span.msg_x {
  color: #7869a5;
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
}

a.new_post,
a.new_post:visited {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 126px;
  height: 30px;
  min-height: 0;
  padding: 0 17px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  clip-path: polygon(2% 14%, 8% 4%, 96% 8%, 100% 84%, 92% 96%, 4% 91%);
  color: var(--forum-paper-cool) !important;
  background: radial-gradient(circle at 50% 45%, rgba(255, 91, 168, .27), transparent 53%),
    linear-gradient(104deg, var(--forum-action-red), var(--forum-action-wine) 40%, var(--forum-action-dark)) !important;
  box-shadow:
    0 0 9px rgba(246, 114, 183, .14),
    0 5px 9px rgba(0, 0, 0, .27);
  font-family: 'Outfit', sans-serif;
  font-size: 9px;
  font-weight: 700;
  line-height: 30px;
  letter-spacing: .65px;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform 140ms ease, filter 140ms ease;
}

a.new_post::before {
  content: '';
  position: absolute;
  top: -3px;
  right: 12px;
  width: 42px;
  height: 7px;
  background: rgba(241, 164, 157, .25);
  box-shadow: 0 1px 2px rgba(0,0,0,.30);
  transform: rotate(5deg);
  pointer-events: none;
}

a.new_post:hover {
  color: #fff !important;
  font-weight: 700;
  text-shadow: none;
  filter: brightness(1.08);
  transform: translateY(-1px);
}

/* ============================================================
   POST â€” avatar esterno, foglio reale e piega sovrapposta
   ============================================================ */

.forum_main_post_message,
.forum_other_post_message {
  position: relative;
  margin-bottom: 14px;
  overflow: visible;
}

/*
 * Lo spazio superiore deve comprendere anche la parte dell'avatar che
 * fuoriesce dal foglio: cosÃ¬ il primo post non invade il titolo del thread.
 */
.forum_main_post_message {
  margin-top: 50px;
}

.forum_other_post_message {
  margin-top: 46px;
}

/* Il contenitore esterno ospita l'avatar, ma non viene ritagliato. */
.forum_post_message,
.forum_post_messageMAIN {
  position: relative;
  margin: 0 0 12px;
  padding: 0;
  overflow: visible;
  border: 0;
  color: var(--forum-ink);
  background: transparent;
  box-shadow: none;
  clip-path: none;
}

/* Il post in modifica resta sopra a quelli successivi mentre i menu sono aperti. */
.forum_post_message.forum_editor_open,
.forum_post_messageMAIN.forum_editor_open {
  z-index: 100;
}

/*
 * Il contenitore del post non viene ritagliato: i menu di WysiBB devono poter
 * uscire dal foglio. La sagoma irregolare vive sul solo livello di sfondo.
 */
.forum_post_sheet {
  position: relative;
  isolation: isolate;
  min-height: 132px;
  padding: 14px 16px 10px;
  overflow: visible;
  border: 0;
  border-radius: 1px;
  color: var(--forum-ink);
  background: transparent;
  box-shadow: none;
  clip-path: none;
}

.forum_post_sheet::before {
  content: '';
  position: absolute;
  z-index: 0;
  inset: 0;
  border: 1px solid var(--forum-paper-border);
  border-radius: 1px;
  background:
    radial-gradient(ellipse at 88% 90%, rgba(89,61,43,.045), transparent 44%),
    radial-gradient(circle at 20% 25%, rgba(87,61,44,.025) 0 .7px, transparent 1.3px),
    linear-gradient(145deg, #eee5da, #dfd2c3);
  box-shadow: 0 1px 0 rgba(255,255,255,.30) inset;
  clip-path: polygon(
    .7% 2%, 15% 0%, 47% 1.2%, 70% 0%, 88% 0%, 99.1% 2.2%,
    98.7% 98.5%, 80% 100%, 58% 100%, 30% 100%, 1% 98.7%, .9% 97%
  );
  filter: drop-shadow(0 6px 6px rgba(0,0,0,.23));
  pointer-events: none;
}

/* Tutto il contenuto rimane sopra al foglio sagomato e non viene tagliato. */
.forum_post_sheet > * {
  position: relative;
  z-index: 2;
}

/*
 * Piega piccola, come nei foglietti laterali. È posizionata all'interno del
 * profilo irregolare della carta, quindi non sporge e non richiede di
 * ritagliare il contenitore che ospita l'editor.
 */
.forum_post_sheet::after {
  content: '';
  position: absolute;
  z-index: 3;
  width: 29px;
  height: 24px;
  pointer-events: none;
}

.forum_post_sheet.forum_fold_br::after {
  right: 1.3%;
  bottom: 1.2%;
  background: linear-gradient(135deg, rgb(101 76 58 / 0%) 0 47%, rgb(236 224 211) 50% 100%);
  clip-path: polygon(0 100%, 100% 0, 100% 100%);
  filter: drop-shadow(-2px -1px 1px rgba(0, 0, 0, .14));
}

.forum_post_sheet.forum_fold_bl::after {
  left: .9%;
  bottom: 4%;
  background: linear-gradient(
    45deg,
    rgba(255, 247, 233, .86) 0 49%,
    rgba(101, 76, 58, .15) 52% 100%
  );
  clip-path: polygon(0 0, 0 100%, 100% 100%);
  filter: drop-shadow(2px -1px 1px rgba(0, 0, 0, .14));
}

/* Intestazione interna: nome a sinistra, data a destra, avatar fuori dal foglio. */
.forum_row_dati {
  position: relative;
  display: block;
  min-height: 42px;
  margin: 0;
  padding: 0 124px 8px 82px;
  text-align: left;
}

.forum_post_author {
  position: absolute;
  z-index: 8;
  top: -28px;
  left: 10px;
  right: 138px;
  display: block;
  width: auto;
  min-width: 0;
  height: 78px;
  margin: 0;
  padding: 0;
  color: var(--forum-ink);
  font-family: 'Infamous', 'Outfit', sans-serif;
  text-align: left;
  text-decoration: none;
}

.forum_avatar {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  width: 66px;
  min-width: 66px;
  height: 78px;
  pointer-events: none;
}

.forum_avatar img {
  display: block;
  width: 70px;
  height: 76px;
  margin: 0;
  border: 3px solid #faf4ed;
  border-bottom-width: 9px;
  background: #f2e8db;
  box-shadow:
    0 2px 0 rgba(255,255,255,.35) inset,
    0 5px 8px rgba(0,0,0,.28);
  object-fit: cover;
  transform: rotate(-8deg);
  transform-origin: center;
}

.forum_other_post_message:nth-of-type(even) .forum_avatar img {
  transform: rotate(2deg);
}

.forum_author_identity {
  position: absolute;
  z-index: 3;
  top: 37px;
  left: 80px;
  right: 0;
  display: block;
  min-width: 0;
  height: 27px;
  overflow: hidden;
  white-space: nowrap;
  text-align: left;
  text-overflow: ellipsis;
}

.forum_post_author a,
.forum_post_author a:visited {
  display: inline-block;
  margin: 0 !important;
  color: #302b27;
  font-family: 'Infamous', 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 500;
  line-height: 25px;
  vertical-align: top;
  text-shadow: none;
  text-transform: uppercase;
}

.forum_post_author a:hover {
  color: #285e67;
}

.forum_author_identity > a + a {
  margin-left: 0 !important;
}

.forum_date_small {
  position: absolute;
  z-index: 7;
  top: 12px;
  right: 18px;
  width: 116px;
  min-width: 116px;
  margin: 0;
  color: var(--forum-ink);
  font-family: 'Outfit', sans-serif;
  font-size: 9px;
  font-weight: 600;
  line-height: 12px;
  letter-spacing: .2px;
  text-align: right;
  white-space: nowrap;
}

.forum_author_hidden_real {
  display: inline-block;
  color: var(--forum-ink);
  font-size: 16px;
  line-height: 24px;
  letter-spacing: 0;
  vertical-align: top;
}

.forum_author_anon_note {
  display: inline-block;
  margin-left: 6px;
  color: var(--forum-ink-muted);
  font-family: 'Outfit', sans-serif;
  font-size: 9px;
  line-height: 24px;
  vertical-align: top;
}

.forum_message_icon {
  display: inline-block;
  margin: 0;
  color: #a64f77;
  font-size: 10px;
  line-height: 25px;
  vertical-align: top;
}

.contenitore_msg_forum {
  position: relative;
  z-index: 4;
  margin: 0;
  padding: 9px 10px 0;
  color: var(--forum-ink);
  font-size: 13px;
  line-height: 1.3;
  text-align: justify;
  overflow-wrap: anywhere;
}

.contenitore_msg_forum > :first-child { margin-top: 0; }
.contenitore_msg_forum > :last-child { margin-bottom: 0; }

div.contenitore_msg_forum img {
  max-width: 600px;
  object-fit: cover;
}

.forum_post_modify {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  margin: 7px 1px 0;
  padding-top: 8px;
  font-size: 10px;
  text-align: right;
}

.forum_action_link,
.forum_post_modify a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 25px;
  height: 23px;
  border-radius: 100%;
  margin: 0;
  color: #746960;
  cursor: pointer;
}

.forum_action_link:hover,
.forum_post_modify a:hover {
  color: #3f3934;
  background: rgba(255,255,255,.36);
}

.editforum {
  margin-top: 5px;
  color: var(--forum-ink-muted);
  font-size: 8px;
  letter-spacing: .4px;
  text-align: center;
  text-transform: uppercase;
}


.badge_risp {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 178px;
  height: 32px;
  min-height: 0;
  margin: 0 0 16px;
  padding: 0 20px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  clip-path: polygon(2% 14%, 8% 4%, 96% 8%, 100% 84%, 92% 96%, 4% 91%);
  color: var(--forum-action-text);
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 91, 168, .27), transparent 53%),
    linear-gradient(104deg, var(--forum-action-red), var(--forum-action-wine) 40%, var(--forum-action-dark));
  box-shadow:
    0 0 9px rgba(246, 114, 183, .14),
    0 5px 9px rgba(0, 0, 0, .27);
  transition: transform 140ms ease, filter 140ms ease;
}

.badge_risp::before {
  content: '';
  position: absolute;
  top: -3px;
  right: 14px;
  width: 44px;
  height: 7px;
  background: rgba(241, 164, 157, .25);
  box-shadow: 0 1px 2px rgba(0,0,0,.30);
  transform: rotate(5deg);
  pointer-events: none;
}

.badge_risp:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.forum_toggle_button {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 100%;
  color: var(--forum-action-text);
  font-family: 'Outfit', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .65px;
  text-transform: uppercase;
  cursor: pointer;
}

.badge_quote {
  display: inline-block;
  width: auto;
  margin-bottom: 3px;
  padding: 2px 6px;
  border-radius: 2px;
  color: #5a4840;
  background: rgba(216, 111, 159, .13);
  font-family: 'Outfit', sans-serif;
  font-size: 8px;
  letter-spacing: .8px;
  text-align: center;
}

.forum_inner_box,
.forum_signal_box {
  margin: 7px 30px 18px;
  padding: 10px 12px;
  border: 1px solid var(--forum-paper-border);
  color: var(--forum-ink);
  background: linear-gradient(145deg, #e9dfd2, #ddcfbf);
  box-shadow: 0 4px 8px rgba(0, 0, 0, .19);
}

/* Gli editor restano scuri ma, durante la modifica, vivono dentro il foglietto del post. */
.forum_editor_panel,
.forum_composer_form {
  position: relative;
  width: 100%;
  margin: 12px 0 22px;
  padding: 0;
  overflow: visible;
  border: 0;
  color: #d9d3d7;
  background: transparent;
  box-shadow: none;
}

.forum_edit_panel {
  z-index: 40;
  margin: 16px 0 4px;
  padding: 12px 0 4px;
  overflow: visible;
  border-top: 1px dashed rgba(68,52,42,.18);
}

/* L'editor è parte del foglietto, senza creare un secondo box separato. */
.forum_post_sheet > .forum_edit_panel {
  width: 100%;
  background: transparent;
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  box-shadow: none;
}

/* Checkbox anonimo senza <label>: il testo resta cliccabile via JavaScript. */
.forum_anonymous_option {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  margin: 10px 0 0 !important;
  padding: 0;
  color: var(--forum-ink);
  font-family: 'Outfit', sans-serif;
  font-size: 10px;
  line-height: 16px;
}

.forum_anonymous_option input[type='checkbox'] {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  margin: 0;
  padding: 0;
  accent-color: #a64f77;
  cursor: pointer;
}

.forum_anonymous_text {
  color: var(--forum-ink-soft);
  cursor: pointer;
  user-select: none;
}

.forum_anonymous_text:hover {
  color: #65445a;
}

/* Nessun antenato dell'editor applica il ritaglio: la sagoma è solo ::before. */
.forum_post_sheet,
.forum_post_sheet > .forum_edit_panel,
.forum_post_sheet > .forum_edit_panel form,
.forum_post_sheet > .forum_edit_panel .form_field {
  overflow: visible !important;
  clip-path: none !important;
}

/* Palette colori, font e dimensioni di WysiBB devono sovrapporsi al post. */
.pagina_forum .wysibb,
.pagina_forum .wysibb-toolbar,
.pagina_forum .wysibb-toolbar-container {
  overflow: visible !important;
}

.pagina_forum .wysibb [class*='wbb-list'],
.pagina_forum .wysibb [class*='wbb-dropdown'],
.pagina_forum .wysibb [class*='wbb-popup'] {
  z-index: 10000 !important;
}

.forum_editor_panel form,
.forum_composer_form {
  width: 100%;
}

.forum_editor_panel .form_field,
.forum_composer_form .form_field {
  margin: 0;
  padding: 0;
}

/* Non cambia il tema interno di WysiBB: coordina soltanto la sua cornice col forum. */
.forum_editor_panel .wysibb,
.forum_composer_form .wysibb {
  width: 100% !important;
  margin: 0;
  border: 1px solid rgba(216,111,159,.20) !important;
  border-radius: 0 !important;
  background: #111018 !important;
  box-shadow:
    0 0 0 1px rgba(97,153,165,.08),
    0 7px 14px rgba(0,0,0,.28);
}

.pagina_forum .forum_inner_box.forum_editor_panel textarea,
.pagina_forum form.forum_composer_form textarea {
  color: #ece6ea;
  background: #111018;
  border: 1px solid rgba(216,111,159,.18);
  box-shadow: 0 6px 12px rgba(0,0,0,.25);
}

.forum_quick_reply_panel {
  margin-top: 8px;
}

.forum_form_label {
  color: var(--forum-ink);
  font-size: 10px;
  text-shadow: none;
}

.pagina_forum .forum_inner_box input[type='text'],
.pagina_forum .forum_signal_box input[type='text'],
.pagina_forum .forum_inner_box select,
.pagina_forum .forum_signal_box select,
.pagina_forum .forum_inner_box textarea,
.pagina_forum .forum_signal_box textarea {
  color: var(--forum-ink);
  background: rgba(255, 252, 246, .64);
  border: 1px solid rgba(68, 52, 42, .18);
  border-radius: 2px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .07);
}

.pagina_forum .forum_inner_box input[type='text'],
.pagina_forum .forum_signal_box input[type='text'] {
  min-width: 300px;
  padding: 5px 7px;
  font-size: 11px;
}

.pagina_forum .forum_inner_box select,
.pagina_forum .forum_signal_box select {
  min-width: 160px;
  padding: 4px 6px;
}

.pagina_forum .forum_inner_box textarea,
.pagina_forum .forum_signal_box textarea {
  width: 100%;
  min-height: 90px;
  padding: 7px 9px;
  resize: vertical;
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  line-height: 15px;
}

.forum_select_wide {
  width: 310px;
}

.forum_submit_center {
  position: relative;
  display: table;
  width: auto;
  margin: 12px auto 0;
  text-align: center;
}

.forum_submit_center::before {
  content: '';
  position: absolute;
  z-index: 3;
  top: -3px;
  right: 11px;
  width: 40px;
  height: 7px;
  background: rgba(241, 164, 157, .25);
  box-shadow: 0 1px 2px rgba(0,0,0,.30);
  transform: rotate(5deg);
  pointer-events: none;
}

.forum_submit_small {
  width: auto;
  min-width: 96px;
  margin: 0 auto;
}

.forum_textarea_tall {
  width: 100%;
  min-height: 150px;
}

.pinned_post {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0 0 5px 13px;
  padding: 2px 7px;
  border-radius: 99px;
  color: #48747d;
  background: rgba(97, 153, 165, .10);
  border: 1px solid rgba(97, 153, 165, .18);
  font-family: 'Outfit', sans-serif;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .7px;
  text-transform: uppercase;
}

.bb-quote {
  margin: 10px 0;
}

.bb-quote-name {
  display: inline-block;
  width: auto;
  height: auto;
  margin: 0 0 0 7px;
  padding: 2px 7px;
  border-radius: 2px 2px 0 0;
  color: #3e7079;
  background: rgba(97, 153, 165, .09);
  font-family: 'Infamous', 'Outfit', sans-serif;
  font-size: 13px;
  text-transform: none;
}

.bb-quote-body {
  margin: 0 auto;
  padding: 8px 10px;
  border: 1px solid rgba(68, 52, 42, .12);
  border-radius: 2px;
  color: var(--forum-ink-soft);
  background: rgba(255, 255, 255, .25);
  font-size: 11px;
}

code {
  padding: 2px 4px;
  border-radius: 2px;
  color: var(--forum-ink);
  background: rgba(255, 255, 255, .30);
}

/* ============================================================
   PAGINAZIONE E BOX SECONDARI
   ============================================================ */

.pagination,
.pager {
  text-align: center;
}

.pagination.forum_pagination {
  min-height: 20px;
  margin: 0 auto 35px;
}

.pagination span a,
.pagination .active,
.pager .page_button,
.pager span.attivo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin: 0 2px;
  border-radius: 50%;
  font-family: 'Outfit', sans-serif;
  font-size: 9px;
  font-weight: 700;
  text-decoration: none;
}

.pagination span a,
.pager .page_button {
  color: #cfc7cc;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .07);
}

.pagination span a:hover,
.pager .page_button:hover {
  color: #fff;
  border-color: rgba(216, 111, 159, .22);
}

.pagination .active,
span.attivo {
  color: #fff;
  background: rgba(216, 111, 159, .22);
  border: 1px solid rgba(216, 111, 159, .25);
}

.pager .button_wrap {
  display: inline-block;
  padding: 1px;
  line-height: 20px;
}

.forum_info_panel {
  width: 100%;
  padding: 11px 13px;
  color: var(--forum-ink-soft);
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 400;
  line-height: 15px;
  letter-spacing: 0;
  text-align: justify;
  text-transform: none;
}

.forum_signal_note,
.forum_signal_meta {
  margin: 5px 0 0;
  color: var(--forum-ink-soft);
  font-size: 9.5px;
}

.forum_signal_actions {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  width: 40px;
}

.forum_delete_icon {
  color: #a84f76;
}

.link_back {
  margin-top: 12px;
  text-align: center;
}

.link_back a {
  color: #8fcbd4;
  text-decoration: none;
}

.form_info,
.warning,
.error,
.profilo_status_label {
  margin: 9px 0 15px;
  padding: 10px 12px;
  border-radius: 2px;
  color: var(--forum-paper-cool) !important;
  font-family: 'Outfit', sans-serif !important;
  font-size: 10px !important;
}

@media screen and (max-width: 980px) {
  /*
   * Su telefono il forum mantiene il layout desktop:
   * thread a sinistra, sezioni a destra.
   * La modale può scorrere orizzontalmente senza incolonnare i blocchi.
   */
  .pagina_forum .page_body,
  .pagina_forum .elenco_esteso,
  .pagina_forum .forum_schema_home {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .pagina_forum .page_body {
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
  }

  .forum_layout_flex {
    display: flex;
    flex-direction: row-reverse;
    flex-wrap: nowrap;
    align-items: flex-start;
    justify-content: flex-start;
    width: 945px;
    min-width: 945px;
    height: 580px;
  }

  #ajax_forum {
    flex: 0 0 730px;
    width: 730px;
    min-width: 730px;
    max-width: 730px;
    max-height: 600px;
    overflow: auto;
    padding-right: 15px;
  }

  #forum_contenitore {
    flex: 0 0 215px;
    width: 215px;
    min-width: 215px;
    max-width: 215px;
    margin: 0;
    padding: 0;
  }

  #contenitore_menu_forum {
    width: 215px;
    min-width: 215px;
    max-width: 215px;
    height: 595px;
    max-height: 595px;
    margin-top: 8px;
    overflow: auto;
  }

  .forum_top_switch {
    width: 100%;
  }

  .forum_post_author {
    width: auto;
    max-width: 100%;
  }
}
