:root {
  --ink: #171214;
  --muted: #766b70;
  --line: #eadfe3;
  --paper: #fffafa;
  --soft: #fff1f4;
  --rose: #df3d63;
  --coral: #ff7b63;
  --mint: #45b39d;
  --night: #25202c;
  --shadow: 0 18px 50px rgba(50, 28, 38, .13);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: "Trebuchet MS", Verdana, sans-serif;
  background:
    linear-gradient(135deg, rgba(255, 123, 99, .16), rgba(69, 179, 157, .10)),
    radial-gradient(circle at 20% 0%, rgba(223, 61, 99, .14), transparent 34%),
    var(--paper);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  flex: 1 0 auto;
  margin: 0 auto;
  padding: 22px 0 46px;
}

.topbar,
.layout,
.profile-hero,
.chat-shell {
  border: 1px solid rgba(234, 223, 227, .9);
  background: rgba(255, 250, 250, .92);
  box-shadow: var(--shadow);
}

.topbar {
  position: sticky;
  top: 12px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
  padding: 12px 16px;
  border-radius: 8px;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.province-picker select {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--night);
  font: inherit;
  font-weight: 800;
}

.register-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  color: white;
  font-weight: 900;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--rose), var(--coral));
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: white;
  font-weight: 800;
  background: linear-gradient(135deg, var(--rose), var(--coral));
  border-radius: 8px;
}

.brand strong,
.brand small {
  display: block;
}

.brand small,
.hero-note,
.profile-body p,
.panel-title small,
.mini-profile small,
.chat-header small {
  color: var(--muted);
}

.live-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(69, 179, 157, .32);
  border-radius: 999px;
  background: rgba(69, 179, 157, .10);
  white-space: nowrap;
}

.area-banner {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  margin-top: 14px;
  padding: 0 14px;
  color: #693644;
  font-weight: 800;
  border: 1px solid rgba(223, 61, 99, .18);
  border-radius: 999px;
  background: rgba(255, 241, 244, .88);
}

.pulse {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 6px rgba(69, 179, 157, .16);
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  align-items: end;
  padding: 56px 0 28px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--rose);
  font-weight: 800;
  text-transform: uppercase;
}

h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(1.7rem, 4vw, 3.4rem);
  line-height: 1.05;
}

.hero-note {
  max-width: 320px;
  margin: 0 0 8px;
  font-size: .94rem;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  padding: 18px;
  border-radius: 8px;
}

.side-panel {
  position: sticky;
  top: 104px;
  min-width: 0;
  height: fit-content;
}

.profile-grid {
  min-width: 0;
}

.panel-title {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
  font-weight: 800;
}

.mini-profile {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px;
  border-bottom: 1px solid var(--line);
}

.mini-profile img {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  object-fit: cover;
  border-radius: 50%;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.profile-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.photo-link {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
}

.photo-link img,
.profile-hero > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.status {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 7px 10px;
  color: white;
  font-size: .78rem;
  font-weight: 800;
  border-radius: 999px;
  background: rgba(37, 32, 44, .78);
}

.status.hot {
  background: linear-gradient(135deg, var(--mint), #238b76);
}

.profile-body {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.profile-body h2 {
  margin: 0;
  font-size: 1.2rem;
}

.profile-body p,
.bio {
  margin: 0;
  line-height: 1.45;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.chips span {
  padding: 6px 9px;
  color: #693644;
  font-size: .82rem;
  border-radius: 999px;
  background: var(--soft);
}

.chat-button,
.composer button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  color: white;
  font-weight: 800;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--rose), var(--coral));
  cursor: pointer;
}

.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 14px;
  color: var(--night);
  font-weight: 800;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.card-actions .ghost-button:only-child {
  grid-column: 1 / -1;
}

.chat-button.wide {
  width: 100%;
}

.profile-page {
  width: min(980px, calc(100% - 32px));
  flex: 1 0 auto;
  margin: 0 auto;
  padding: 24px 0;
}

.back-link {
  display: inline-flex;
  margin-bottom: 14px;
  color: var(--muted);
  font-weight: 800;
}

.profile-hero {
  display: grid;
  grid-template-columns: minmax(260px, 420px) 1fr;
  overflow: hidden;
  border-radius: 8px;
}

.profile-hero > img {
  min-height: 560px;
}

.profile-detail {
  display: grid;
  align-content: center;
  gap: 18px;
  padding: 36px;
}

.profile-detail .status {
  position: static;
  width: fit-content;
}

.chat-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 16px;
}

.chat-shell {
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: min(760px, 100%);
  height: min(820px, calc(100vh - 32px));
  overflow: hidden;
  border-radius: 8px;
}

@supports (height: 100dvh) {
  .chat-shell {
    height: min(820px, calc(100dvh - 32px));
  }
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: white;
}

.chat-header .back-link {
  margin: 0 6px 0 0;
}

.chat-header img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 50%;
}

.messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: auto;
  padding: 18px;
}

.message {
  max-width: min(78%, 520px);
  padding: 11px 13px;
  line-height: 1.42;
  border-radius: 8px;
  background: white;
  box-shadow: 0 8px 22px rgba(50, 28, 38, .08);
}

.message.user {
  align-self: end;
  color: white;
  background: var(--night);
}

.message.profile {
  align-self: start;
  background: white;
}

.message.system {
  align-self: center;
  max-width: 100%;
  color: var(--muted);
  font-size: .86rem;
  background: transparent;
  box-shadow: none;
}

.inline-cta {
  display: flex;
  justify-content: center;
  min-height: 40px;
  margin-top: 10px;
  padding: 10px 12px;
  color: white;
  font-weight: 800;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--rose), var(--coral));
}

.composer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: white;
}

.composer input {
  min-width: 0;
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

.paywall {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-top: 1px solid var(--line);
  background: #fff8f2;
}

.paywall p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

@media (max-width: 860px) {
  .hero,
  .layout,
  .profile-hero {
    display: block;
  }

  .hero {
    padding-top: 34px;
  }

  .hero-note {
    max-width: 100%;
    margin-top: 18px;
  }

  .side-panel {
    position: static;
    margin-bottom: 16px;
  }

  .profile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-hero > img {
    min-height: 420px;
  }
}

@media (max-width: 560px) {
  .shell,
  .profile-page {
    width: min(100% - 20px, 1180px);
  }

  .topbar {
    align-items: start;
    flex-direction: column;
  }

  .main-nav {
    width: 100%;
    justify-content: stretch;
  }

  .province-picker,
  .province-picker select,
  .register-button,
  .main-nav .live-pill {
    width: 100%;
  }

  h1 {
    font-size: 2.45rem;
  }

  .layout {
    padding: 10px;
  }

  .profile-grid {
    grid-template-columns: 1fr;
  }

  .profile-detail {
    padding: 22px;
  }

  .chat-body {
    padding: 0;
  }

  .chat-shell {
    height: 100vh;
    height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  .composer {
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }
}

.admin-body {
  display: block;
  padding: 24px;
}

.admin-card,
.admin-shell {
  width: min(980px, 100%);
  margin: 0 auto;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 250, .9);
  box-shadow: var(--shadow);
}

.admin-card {
  width: min(430px, 100%);
  margin-top: 8vh;
}

.admin-card h1,
.admin-section h1,
.admin-section h2,
.admin-form h2 {
  margin: 0 0 14px;
  font-size: 1.2rem;
}

.admin-section h2 {
  font-size: 1.05rem;
}

.admin-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.admin-nav a {
  color: var(--rose);
  font-weight: 800;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.metric {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.metric span,
.metric strong,
.admin-table small {
  display: block;
}

.metric span,
.admin-note,
.admin-table small,
.admin-list small {
  color: var(--muted);
}

.metric strong {
  margin-top: 8px;
  font-size: 2rem;
}

.admin-form {
  display: grid;
  gap: 12px;
}

.admin-form.wide {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-form h2 {
  grid-column: 1 / -1;
  margin-top: 12px;
}

.admin-form label {
  display: grid;
  gap: 6px;
  font-weight: 800;
}

.admin-form input {
  min-height: 42px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

.admin-form select {
  min-height: 42px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  font: inherit;
}

.admin-form input[type="checkbox"] {
  min-height: auto;
}

.admin-form button {
  min-height: 44px;
  color: white;
  font-weight: 800;
  border: 0;
  border-radius: 8px;
  background: var(--night);
  cursor: pointer;
}

.admin-form.wide button {
  grid-column: 1 / -1;
}

.admin-error,
.admin-success {
  padding: 10px 12px;
  border-radius: 8px;
}

.admin-error {
  color: #8b1e34;
  background: #ffe4ea;
}

.admin-success {
  color: #176854;
  background: #dff7ef;
}

.admin-list,
.admin-table {
  display: grid;
  gap: 10px;
}

.admin-list span,
.admin-table article {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.admin-table article {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  align-items: center;
  gap: 12px;
}

.admin-table img {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border-radius: 50%;
}

@media (max-width: 760px) {
  .admin-grid,
  .admin-form.wide {
    grid-template-columns: 1fr;
  }

  .admin-table article {
    grid-template-columns: 44px 1fr;
  }

  .admin-table code {
    grid-column: 1 / -1;
  }
}

.compact-hero {
  padding: 38px 0 22px;
}

.compact-hero h1 {
  max-width: 680px;
  font-size: clamp(1.5rem, 3.6vw, 3rem);
}

.lobby-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 260px;
  gap: 16px;
  height: min(720px, calc(100vh - 150px));
  min-height: 480px;
  padding: 16px;
  border: 1px solid rgba(234, 223, 227, .9);
  border-radius: 8px;
  background: rgba(255, 250, 250, .82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.mini-profile.can-chat strong {
  color: var(--rose);
}

.avatar-dot {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 38px;
  height: 38px;
  color: white;
  font-weight: 800;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--night), var(--rose));
}

.online-scroll {
  max-height: 636px;
  overflow: auto;
  padding-right: 4px;
}

.group-panel {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.join-form {
  display: grid;
  gap: 9px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.home-entry {
  display: grid;
  align-content: start;
  gap: 16px;
}

.home-join {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.home-online {
  max-height: 480px;
}

.join-form label {
  color: var(--muted);
  font-size: .9rem;
  font-weight: 800;
}

.join-form div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.join-form input {
  min-width: 0;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

.join-form button {
  min-height: 44px;
  padding: 0 18px;
  color: white;
  font-weight: 800;
  border: 0;
  border-radius: 8px;
  background: var(--night);
  cursor: pointer;
}

.join-form.joined {
  background: var(--soft);
}

.joined-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 2px;
}

.joined-bar strong {
  color: var(--rose);
}

.joined-bar button {
  min-height: 36px;
  padding: 0 12px;
  color: var(--night);
  font-weight: 800;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  cursor: pointer;
}

.group-messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  overflow-y: auto;
  padding: 16px;
  background: linear-gradient(180deg, rgba(255, 241, 244, .65), rgba(255, 255, 255, .7)), white;
}

.group-line {
  display: grid;
  gap: 4px;
  max-width: 82%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 8px 20px rgba(50, 28, 38, .07);
}

.group-line strong {
  color: var(--rose);
  font-size: .86rem;
}

.group-line span {
  line-height: 1.42;
}

.group-line.own {
  align-self: center;
  max-width: 100%;
  color: var(--muted);
  background: transparent;
  box-shadow: none;
}

.private-invite {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: #fff8f2;
}

.toast-invite {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 20;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 12px;
  width: min(360px, calc(100% - 28px));
  padding: 14px;
  border: 1px solid rgba(69, 179, 157, .24);
  border-radius: 8px;
  background: white;
  box-shadow: 0 18px 48px rgba(18, 63, 84, .22);
}

.toast-invite[hidden] {
  display: none;
}

.toast-invite img {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border-radius: 50%;
}

.toast-invite p {
  margin: 4px 0 10px;
  color: var(--muted);
  line-height: 1.35;
}

.toast-invite a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 12px;
  color: white;
  font-weight: 800;
  border-radius: 8px;
  background: #1fa885;
}

.toast-close {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 28px;
  height: 28px;
  color: var(--muted);
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
}

.private-invite[hidden] {
  display: none;
}

.private-invite img {
  width: 46px;
  height: 46px;
  object-fit: cover;
  border-radius: 50%;
}

.private-invite p {
  margin: 3px 0 0;
  color: var(--muted);
}

.private-invite a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  color: white;
  font-weight: 800;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--rose), var(--coral));
}

.profile-strip {
  display: grid;
  align-content: start;
  gap: 10px;
}

.strip-card {
  display: grid;
  grid-template-columns: 64px 1fr;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.strip-card img {
  width: 64px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
}

.strip-card strong,
.strip-card small {
  display: block;
}

.strip-card small {
  margin-top: 3px;
  color: var(--muted);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 22px;
  padding: 18px 0 0;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: .9rem;
}

.site-footer p {
  max-width: 660px;
  margin: 0;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.site-footer a {
  color: var(--rose);
  font-weight: 800;
}

.legal-page {
  width: min(820px, calc(100% - 32px));
  flex: 1 0 auto;
  margin: 0 auto;
  padding: 28px 0;
}

.legal-page h1 {
  margin-bottom: 18px;
  font-size: clamp(1.6rem, 4vw, 2.8rem);
}

.legal-page p {
  color: var(--muted);
  line-height: 1.6;
}

@media (max-width: 980px) {
  .lobby-layout {
    grid-template-columns: 220px 1fr;
  }

  .profile-strip {
    grid-column: 1 / -1;
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .strip-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .lobby-layout {
    display: flex;
    flex-direction: column;
    height: auto;
  }

  .group-messages {
    height: 56vh;
  }

  .online-scroll {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: 240px;
  }

  .profile-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-footer {
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .online-scroll,
  .profile-strip {
    grid-template-columns: 1fr;
  }

  .private-invite {
    grid-template-columns: 42px 1fr;
  }

  .private-invite a {
    grid-column: 1 / -1;
    justify-content: center;
  }

  .group-line {
    max-width: 95%;
  }

  .card-actions {
    grid-template-columns: 1fr;
  }

  .toast-invite {
    right: 14px;
    bottom: 14px;
  }
}

/* Widget chat flottante (stile bolla WhatsApp, mobile e desktop) */
.chat-bubble {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  width: 60px;
  height: 60px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  background: linear-gradient(135deg, var(--rose), var(--coral));
  box-shadow: 0 12px 30px rgba(50, 28, 38, .28);
}

.chat-bubble img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-bubble .bubble-dot {
  position: absolute;
  right: 3px;
  bottom: 3px;
  width: 13px;
  height: 13px;
  border: 2px solid white;
  border-radius: 50%;
  background: var(--mint);
}

.chat-widget {
  position: fixed;
  right: 18px;
  bottom: 92px;
  z-index: 60;
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: min(360px, calc(100% - 24px));
  height: min(520px, calc(100vh - 140px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  box-shadow: 0 22px 60px rgba(18, 28, 40, .28);
}

.chat-widget[hidden] {
  display: none;
}

.chat-widget-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: white;
}

.chat-widget-head img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 50%;
}

.chat-widget-head strong,
.chat-widget-head small {
  display: block;
}

.chat-widget-head small {
  color: var(--muted);
}

.chat-widget-head .widget-full {
  margin-left: auto;
  color: var(--rose);
  font-size: .82rem;
  font-weight: 800;
  white-space: nowrap;
}

.chat-widget-close {
  width: 30px;
  height: 30px;
  color: var(--muted);
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  font: inherit;
}

.chat-widget-messages {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  padding: 12px;
  background: linear-gradient(180deg, rgba(255, 241, 244, .55), rgba(255, 255, 255, .75)), white;
}

.chat-widget-messages .message {
  max-width: 84%;
}

.chat-widget-composer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid var(--line);
  background: white;
}

.chat-widget-composer input {
  min-width: 0;
  min-height: 40px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

.chat-widget-composer button {
  min-height: 40px;
  padding: 0 14px;
  color: white;
  font-weight: 800;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--rose), var(--coral));
  cursor: pointer;
}

@media (max-width: 560px) {
  .chat-bubble {
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
  }

  .chat-widget {
    right: 10px;
    bottom: 84px;
    width: calc(100% - 20px);
    height: min(68vh, 480px);
  }
}

/* Banner pubblicitario 300x250 */
.ad-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 14px 0;
}

.ad-slot a {
  display: block;
  width: 100%;
  max-width: 300px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.ad-slot img {
  display: block;
  width: 100%;
  height: auto;
}

.ad-slot small {
  color: var(--muted);
  font-size: .78rem;
}

.ad-side {
  align-content: start;
  gap: 16px;
  padding: 4px 0;
}

/* Banner largo (pagina profilo, es. 500x316) */
.ad-slot-wide {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 22px auto 0;
  max-width: 560px;
}

.ad-slot-wide a {
  display: block;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.ad-slot-wide img {
  display: block;
  width: 100%;
  height: auto;
}

.ad-slot-wide small {
  color: var(--muted);
  font-size: .78rem;
}
