:root {
  --bg: #f4f1ea;
  --panel: rgba(255, 255, 255, 0.88);
  --ink: #1e1f1f;
  --muted: #5b605d;
  --line: rgba(30, 31, 31, 0.12);
  --accent: #1f5c4a;
  --accent-strong: #123c30;
  --accent-soft: #e3efe9;
  --danger: #8d241c;
  --shadow: 0 18px 50px rgba(22, 27, 25, 0.12);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(31, 92, 74, 0.18), transparent 35%),
    radial-gradient(circle at bottom right, rgba(164, 101, 54, 0.2), transparent 28%),
    linear-gradient(180deg, #efe9dd 0%, var(--bg) 100%);
  font-family: Georgia, "Times New Roman", serif;
}

img,
video {
  max-width: 100%;
}

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

.shell {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1rem 0 3rem;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0 2rem;
}

.brand {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--muted);
}

.mobile-menu {
  display: none;
}

.nav a,
.admin-menu summary {
  white-space: nowrap;
}

.message-nav-count {
  color: var(--muted);
  font-weight: 700;
}

.message-nav-count.has-unread {
  color: #b42318;
}

.admin-menu {
  position: relative;
}

.admin-menu summary {
  cursor: pointer;
  list-style: none;
  color: var(--muted);
}

.admin-menu summary::-webkit-details-marker {
  display: none;
}

.admin-menu summary::after {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 0.5rem;
  border-top: 0.35rem solid currentColor;
  border-right: 0.28rem solid transparent;
  border-left: 0.28rem solid transparent;
  vertical-align: middle;
}

.admin-menu[open] summary {
  color: var(--accent-strong);
}

.admin-menu-dropdown {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  z-index: 10;
  display: grid;
  min-width: 13rem;
  padding: 0.4rem;
  border: 1px solid rgba(31, 92, 74, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
}

.admin-menu-dropdown a {
  padding: 0.55rem 0.7rem;
  border-radius: 6px;
}

.admin-menu-dropdown a:hover {
  background: rgba(31, 92, 74, 0.12);
}

.hero,
.dashboard,
.auth-grid {
  align-items: stretch;
}

.hero {
  display: grid;
  gap: 1.25rem;
  max-width: 720px;
  padding: 3rem 0 4rem;
}

.home-hero {
  max-width: none;
  padding-bottom: 0;
}

.error-hero {
  min-height: 52vh;
  align-content: center;
}

.eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

h1,
h2 {
  margin: 0;
  line-height: 1.05;
}

h1 {
  font-size: clamp(2.8rem, 6vw, 5rem);
}

h2 {
  font-size: 2rem;
}

.lede,
.subtle {
  color: var(--muted);
}

.lede {
  font-size: 1.15rem;
  line-height: 1.7;
}

.actions,
.oauth-block {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.8rem 1.2rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}

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

.button-primary {
  background: var(--accent);
  color: white;
}

.button-primary:hover {
  background: var(--accent-strong);
}

.button-secondary {
  background: var(--panel);
  border-color: var(--line);
}

.button-danger {
  background: rgba(159, 45, 34, 0.12);
  border-color: rgba(159, 45, 34, 0.24);
  color: var(--danger);
}

.button-fit {
  width: fit-content;
}

.button-right {
  justify-self: end;
}

.auth-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.panel {
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.profile-form textarea {
  width: 100%;
  min-height: 10rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.75);
  font: inherit;
  resize: vertical;
}

.dashboard {
  display: grid;
  gap: 1.25rem;
}

.account-panel {
  display: grid;
  gap: 1.25rem;
}

.account-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.56);
}

.account-summary p {
  margin: 0.45rem 0 0;
  color: var(--muted);
}

.banner {
  margin: 0;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  border: 1px solid var(--line);
}

.banner-success {
  background: rgba(31, 92, 74, 0.1);
  color: var(--accent-strong);
}

.banner-error {
  background: rgba(159, 45, 34, 0.1);
  color: #8d241c;
}

.banner-warning {
  background: rgba(164, 107, 28, 0.14);
  color: #6f4311;
}

.banner-sold {
  background: rgba(159, 45, 34, 0.14);
  color: #8d241c;
  font-weight: 800;
  text-transform: uppercase;
}

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

.status-card {
  padding: 1rem;
  border-radius: 18px;
  background: var(--accent-soft);
}

.status-card p {
  margin: 0.6rem 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.status-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.verified-badge {
  color: var(--accent-strong);
}

.policy-note {
  padding: 1rem 1.1rem;
  border-radius: 18px;
  background: rgba(18, 60, 48, 0.08);
  line-height: 1.6;
}

.profile-form {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.admin-form-block {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}

.admin-form-block h3 {
  margin: 0;
  font-size: 1rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.listing-identity-grid {
  grid-template-columns: minmax(9rem, 11rem) repeat(2, minmax(0, 1fr));
}

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

.profile-form label {
  display: grid;
  gap: 0.45rem;
  font-weight: 700;
  min-width: 0;
}

.profile-form input,
.profile-form select,
.profile-form textarea {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.75);
  font: inherit;
  font-size: 1rem;
}

.profile-form input,
.profile-form textarea,
.compact-form input,
.compact-form textarea {
  min-width: 0;
}

.profile-form input[readonly] {
  color: var(--muted);
  background: rgba(244, 241, 234, 0.9);
}

.profile-form .checkbox-label {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  align-content: center;
}

.profile-form .checkbox-label input {
  width: auto;
  min-height: auto;
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.segmented-control {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.profile-form .segmented-option {
  display: inline-flex;
  width: auto;
  min-width: 7rem;
  cursor: pointer;
}

.profile-form .segmented-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented-option span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 2.75rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.75);
  color: var(--muted);
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.segmented-option input:checked + span {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.segmented-option input:focus-visible + span {
  outline: 3px solid rgba(31, 92, 74, 0.28);
  outline-offset: 2px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.listing-table {
  display: grid;
  gap: 0.8rem;
}

.saved-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.35fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.saved-sidebar {
  display: grid;
  gap: 1rem;
}

.saved-group-nav {
  display: grid;
  gap: 0.4rem;
}

.saved-group-nav a {
  padding: 0.7rem 0.8rem;
  border: 1px solid transparent;
  border-radius: 12px;
  font-weight: 700;
}

.saved-group-nav a.is-active {
  border-color: var(--line);
  background: var(--accent-soft);
}

.saved-group-form {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.saved-results {
  min-width: 0;
}

.saved-listing-row {
  grid-template-columns: 96px minmax(0, 1fr) auto;
}

.dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(25, 31, 29, 0.54);
}

.dialog-backdrop[hidden] {
  display: none;
}

.dialog-panel {
  display: grid;
  gap: 1rem;
  width: min(100%, 460px);
  padding: 1.4rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.dialog-panel h2 {
  margin-top: 0.3rem;
  font-size: 1.5rem;
}

.dialog-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.admin-table {
  display: grid;
  gap: 1rem;
}

.listing-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto auto;
  gap: 1rem;
  align-items: center;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.55);
}

.listing-row > div:only-child {
  grid-column: 1 / -1;
}

.category-row {
  grid-template-columns: auto minmax(0, 1fr);
  min-height: 0;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  gap: 0.75rem;
}

.category-row .listing-title {
  line-height: 1.25;
}

.category-row .button {
  min-height: 2rem;
  padding: 0.35rem 0.75rem;
}

.subcategory-table {
  display: grid;
  gap: 0.55rem;
}

.subcategory-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: end;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.55);
}

.subcategory-edit-form {
  display: grid;
  grid-template-columns: minmax(12rem, 0.35fr) minmax(16rem, 1fr) auto;
  gap: 0.75rem;
  align-items: end;
  min-width: 0;
}

.subcategory-edit-form label {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
  font-weight: 700;
}

.subcategory-edit-form span {
  font-size: 0.85rem;
  color: var(--muted);
}

.subcategory-edit-form input {
  width: 100%;
  min-width: 0;
  min-height: 2rem;
  padding: 0.4rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.75);
  font: inherit;
}

.subcategory-row .button {
  min-height: 2rem;
  padding: 0.35rem 0.75rem;
}

.message-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.55);
}

.admin-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  gap: 1rem;
  align-items: start;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.55);
}

.listing-row > div,
.message-row > div,
.admin-row > div,
.admin-row > form,
.listing-card-body,
.status-card,
.policy-note,
.user-card dd,
.message-bubble,
.chat-bubble,
.dialog-panel {
  min-width: 0;
  overflow-wrap: anywhere;
}

.message-thread {
  display: grid;
  align-content: start;
  gap: 0.85rem;
  overflow-y: auto;
  padding: 1rem;
}

.message-bubble {
  display: grid;
  gap: 0.45rem;
  width: min(720px, 100%);
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
}

.message-bubble-own {
  justify-self: end;
  background: var(--accent-soft);
}

.message-bubble p {
  margin: 0;
  line-height: 1.55;
}

.message-meta {
  color: var(--muted);
  font-size: 0.85rem;
}

.compact-form {
  display: grid;
  gap: 0.8rem;
}

.compact-form label {
  display: grid;
  gap: 0.35rem;
  font-weight: 700;
  min-width: 0;
}

.compact-form input[type="text"],
.compact-form textarea {
  width: 100%;
  min-height: 2.5rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.75);
  font: inherit;
}

.compact-form textarea {
  min-height: 5rem;
  resize: vertical;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.checkbox-grid label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.6);
  min-width: 0;
}

.checkbox-grid span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.checkbox-grid input {
  accent-color: var(--accent);
}

.listing-row img,
.media-placeholder {
  width: 96px;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  object-fit: cover;
  background: var(--accent-soft);
}

.media-placeholder,
.listing-card-placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.listing-title {
  font-size: 1.1rem;
  font-weight: 700;
}

.seller-listing-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(82px, 1fr));
  gap: 0.5rem;
  min-width: 180px;
}

.seller-listing-stats div {
  display: grid;
  gap: 0.1rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.65);
}

.seller-listing-stats strong {
  font-size: 1.1rem;
}

.seller-listing-stats span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.shell:has(.messages-app) {
  width: min(1560px, calc(100% - 2rem));
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding-bottom: 1rem;
}

.messages-app {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  flex: 1;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.chat-list,
.chat-main {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.chat-list {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: 0.8rem;
  padding: 1rem 0.75rem;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.44);
}

.chat-list-header,
.chat-main-header,
.chat-title-block,
.chat-filter-row,
.chat-composer {
  display: flex;
  align-items: center;
}

.chat-list-header,
.chat-main-header {
  justify-content: space-between;
  gap: 1rem;
}

.chat-list-header {
  display: grid;
  gap: 0.45rem;
}

.chat-listing-filter {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.chat-listing-filter .subtle {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-list-header h1,
.chat-title-block h2,
.chat-main-empty h2 {
  margin: 0;
}

.chat-filter-clear {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
}

.chat-filter-clear:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.chat-search {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.45rem;
  align-items: center;
  min-height: 2.35rem;
  padding: 0 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
}

.chat-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
}

.chat-filter-row {
  gap: 0.55rem;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
}

.chat-filter-row button,
.chat-filter-row a {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.45rem 0.65rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-weight: inherit;
}

.chat-filter-row a {
  text-decoration: none;
}

.chat-filter-active {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.chat-thread-list {
  display: grid;
  align-content: start;
  gap: 0.25rem;
  min-height: 0;
  overflow-y: auto;
}

.chat-thread[hidden],
.chat-list-filter-empty[hidden] {
  display: none;
}

.chat-thread {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 0.7rem;
  align-items: center;
  padding: 0.55rem;
  border-radius: 12px;
}

.chat-thread:hover,
.chat-thread-active {
  background: var(--accent-soft);
}

.chat-avatar,
.chat-mini-avatar {
  border-radius: 999px;
  object-fit: cover;
  background: var(--accent-soft);
}

.chat-avatar {
  width: 56px;
  height: 56px;
}

.chat-mini-avatar {
  width: 26px;
  height: 26px;
}

.chat-avatar-placeholder {
  display: grid;
  place-items: center;
  color: var(--accent-strong);
  font-weight: 700;
}

.chat-thread-copy {
  min-width: 0;
}

.chat-thread-name,
.chat-thread-listing,
.chat-thread-copy p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-thread-name {
  font-weight: 700;
}

.chat-thread-listing {
  margin-top: 0.12rem;
  color: var(--accent-strong);
  font-size: 0.88rem;
  font-weight: 700;
}

.chat-thread-copy p {
  margin: 0.18rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.chat-thread-unread {
  display: grid;
  min-width: 1.55rem;
  height: 1.55rem;
  place-items: center;
  border-radius: 999px;
  background: #b42318;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
}

.chat-thread-unread.is-empty {
  display: none;
}

.chat-main {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: rgba(255, 255, 255, 0.32);
}

.chat-main-header {
  position: sticky;
  top: 0;
  z-index: 5;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
}

.chat-title-block {
  gap: 0.75rem;
}

.chat-title-block p {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.chat-title-link {
  display: inline-flex;
  align-items: center;
  min-height: 1.8rem;
  margin-top: 0.45rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.chat-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-left: auto;
}

.chat-header-action,
.chat-archive-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.2rem;
  padding: 0 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}

.chat-header-action:hover,
.chat-archive-form button:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.chat-history {
  display: grid;
  align-content: start;
  gap: 0.55rem;
  min-height: 0;
  overflow-y: auto;
  padding: 1rem;
}

.chat-day-separator {
  justify-self: center;
  margin: 0.35rem 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.listing-attachment {
  width: min(320px, 78%);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.68);
  font-weight: 700;
}

.listing-attachment-left {
  justify-self: start;
}

.listing-attachment img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.listing-attachment div {
  padding: 0.75rem;
}

.chat-message-row {
  display: grid;
  grid-template-columns: auto minmax(0, max-content);
  gap: 0.45rem;
  align-items: end;
  max-width: 78%;
  justify-self: start;
}

.chat-message-row-own {
  grid-template-columns: minmax(0, max-content);
  justify-self: end;
}

.chat-bubble {
  position: relative;
  display: grid;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
}

.chat-bubble-own {
  border-color: transparent;
  background: var(--accent);
  color: #fff;
}

.chat-bubble p {
  margin: 0;
  line-height: 1.45;
}

.chat-message-timestamp {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.28rem);
  z-index: 1;
  width: max-content;
  max-width: min(16rem, 75vw);
  padding: 0.18rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 6px 18px rgba(34, 31, 28, 0.08);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.2;
  opacity: 0;
  pointer-events: none;
  text-align: center;
  transform: translate(-50%, 0.2rem);
  transition: opacity 120ms ease, transform 120ms ease;
}

.chat-bubble:hover .chat-message-timestamp,
.chat-bubble:focus-within .chat-message-timestamp {
  opacity: 1;
  transform: translate(-50%, 0);
}

.chat-rating-row {
  grid-template-columns: auto minmax(0, 24rem);
  max-width: min(92%, 30rem);
}

.chat-rating-card {
  display: grid;
  gap: 0.75rem;
  padding: 0.85rem;
  border: 1px solid rgba(180, 35, 24, 0.18);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(34, 31, 28, 0.08);
}

.chat-rating-card strong {
  color: var(--ink);
}

.chat-rating-card p {
  margin: 0.2rem 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.chat-rating-card button {
  justify-self: start;
  min-height: 2.35rem;
  padding: 0 0.95rem;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.rating-dialog .profile-form {
  box-shadow: none;
}

.chat-composer {
  gap: 0.55rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--line);
}

.chat-composer textarea {
  width: 100%;
  min-height: 2.4rem;
  max-height: 7rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  font: inherit;
  resize: vertical;
}

.chat-composer .form-error {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--danger);
  font-size: 0.9rem;
  font-weight: 700;
}

.message-toast-region {
  position: fixed;
  right: 1rem;
  top: 1rem;
  z-index: 20;
  display: grid;
  gap: 0.75rem;
  width: min(360px, calc(100vw - 2rem));
}

.message-toast {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(180, 35, 24, 0.18);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.message-toast img,
.message-toast-thumb-placeholder {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--accent-soft);
}

.message-toast-thumb-placeholder {
  display: grid;
  place-items: center;
  color: var(--accent-strong);
  font-weight: 700;
}

.message-toast-copy {
  display: grid;
  min-width: 0;
  gap: 0.2rem;
}

.message-toast strong {
  color: var(--ink);
}

.message-toast span {
  color: var(--accent-strong);
  font-size: 0.88rem;
  font-weight: 700;
}

.message-toast p {
  margin: 0;
  color: var(--muted);
  line-height: 1.35;
}

.chat-composer button {
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.chat-composer button {
  padding: 0.65rem 0.9rem;
}

.chat-composer button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.chat-list-empty,
.chat-main-empty,
.chat-history-empty {
  display: grid;
  place-items: center;
  gap: 0.4rem;
  min-height: 14rem;
  padding: 1rem;
  color: var(--muted);
  text-align: center;
}

.chat-main-empty {
  min-height: 100%;
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.row-actions form {
  margin: 0;
}

.search-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.search-form label {
  display: grid;
  gap: 0.45rem;
  font-weight: 700;
  min-width: 0;
}

.search-form input,
.search-form select {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.75);
  font: inherit;
  font-size: 1rem;
}

.saved-search-bar {
  margin-top: 1rem;
  max-width: 28rem;
}

.saved-search-bar label,
.saved-search-form label {
  display: grid;
  gap: 0.45rem;
  font-weight: 700;
  min-width: 0;
}

.saved-search-bar select,
.saved-search-form input {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.75);
  font: inherit;
  font-size: 1rem;
}

.saved-search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: end;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

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

.listing-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.listing-card img,
.listing-card-placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--accent-soft);
}

.listing-card-body {
  display: grid;
  gap: 0.55rem;
  padding: 1rem;
}

.listing-card-body h2 {
  font-size: 1.35rem;
}

.listing-price {
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 800;
}

.listing-price-large {
  font-size: 1.45rem;
}

.listing-card-body p {
  margin: 0;
}

.listing-status-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 0.24rem 0.52rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.2;
}

.listing-workflow {
  display: grid;
  gap: 0.8rem;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.58);
}

.listing-workflow form {
  margin: 0;
}

.status-draft {
  background: rgba(91, 96, 93, 0.14);
  color: var(--muted);
}

.status-published {
  background: rgba(31, 92, 74, 0.12);
  color: var(--accent-strong);
}

.status-pending {
  background: rgba(164, 107, 28, 0.16);
  color: #6f4311;
}

.status-sold {
  background: rgba(159, 45, 34, 0.12);
  color: #8d241c;
}

.empty-state {
  grid-column: 1 / -1;
}

.listing-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 1.25rem;
  align-items: start;
}

.listing-media {
  display: grid;
  gap: 0.85rem;
}

.listing-gallery {
  display: grid;
  gap: 0.85rem;
}

.listing-gallery-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: min(72vh, 760px);
  padding: 1rem 4.5rem;
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff 0%, #f4efe9 100%);
  box-shadow: var(--shadow);
  touch-action: pan-y;
}

.listing-gallery-main {
  width: 100%;
  max-width: 100%;
  max-height: min(68vh, 700px);
  object-fit: contain;
  border-radius: 18px;
}

.listing-gallery-nav {
  position: absolute;
  top: 50%;
  z-index: 1;
  width: 3rem;
  height: 3rem;
  border: 0;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.78);
  color: #fff;
  cursor: pointer;
  transform: translateY(-50%);
}

.listing-gallery-nav span {
  font-size: 1.9rem;
  line-height: 1;
}

.listing-gallery-nav[data-gallery-prev] {
  left: 1rem;
}

.listing-gallery-nav[data-gallery-next] {
  right: 1rem;
}

.listing-gallery-thumbs {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding: 0.35rem 0.15rem 0.55rem;
  scroll-behavior: smooth;
}

.listing-gallery-thumb {
  flex: 0 0 auto;
  width: 96px;
  height: 72px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 14px;
  background: transparent;
  cursor: pointer;
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.listing-gallery-thumb:hover,
.listing-gallery-thumb:focus-visible {
  transform: translateY(-1px);
}

.listing-gallery-thumb.is-active {
  border-color: var(--accent);
}

.listing-gallery-thumb img,
.listing-video-strip video {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  object-fit: cover;
  background: var(--accent-soft);
}

.listing-video-strip {
  display: grid;
  gap: 0.85rem;
}

.listing-video-strip video {
  max-height: 28rem;
  box-shadow: var(--shadow);
}

.listing-summary {
  position: sticky;
  top: 1rem;
  display: grid;
  gap: 1rem;
}

.spec-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0;
}

.spec-list div {
  padding: 0.85rem;
  border-radius: 14px;
  background: var(--accent-soft);
}

.spec-list dt {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.spec-list dd {
  margin: 0.35rem 0 0;
}

.form-section {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.fulfillment-options {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  border: 0;
}

.fulfillment-options legend {
  padding: 0;
  font-weight: 700;
}

.fulfillment-option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 1rem;
}

.profile-form .fulfillment-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.25rem;
  min-width: 0;
  cursor: pointer;
  font-weight: 700;
}

.profile-form .fulfillment-option input {
  flex: 0 0 auto;
  width: 1rem;
  min-height: 1rem;
  margin: 0;
}

.fulfillment-option span {
  min-width: 0;
  line-height: 1.25;
}

.media-upload-fields {
  display: grid;
  gap: 0.75rem;
}

.media-upload-input {
  display: none;
}

.media-dropzone {
  display: grid;
  place-items: center;
  gap: 0.25rem;
  min-height: 8rem;
  padding: 1.25rem;
  border: 2px dashed rgba(18, 60, 48, 0.28);
  border-radius: 8px;
  background: rgba(18, 60, 48, 0.05);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  text-align: center;
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.media-dropzone span {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
}

.media-dropzone strong {
  color: var(--accent);
  font-size: 1rem;
}

.media-dropzone:hover,
.media-dropzone:focus-visible,
.media-dropzone-active {
  border-color: var(--accent);
  background: rgba(18, 60, 48, 0.09);
  box-shadow: 0 0 0 4px rgba(18, 60, 48, 0.08);
  outline: none;
}

.media-thumbnail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 0.9rem;
}

.media-manage-row {
  display: grid;
  gap: 0.45rem;
  align-content: start;
  justify-items: center;
  cursor: grab;
}

.media-manage-row:active {
  cursor: grabbing;
}

.media-manage-row-dragging {
  opacity: 0.55;
}

.media-manage-row-dragging .media-preview {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(18, 60, 48, 0.1);
}

.media-manage-row-uploading .media-preview::after {
  content: "";
  position: absolute;
  width: 1.35rem;
  height: 1.35rem;
  border: 3px solid rgba(255, 255, 255, 0.75);
  border-top-color: var(--accent);
  border-radius: 999px;
  animation: media-upload-spin 0.85s linear infinite;
}

.media-manage-row-removing .media-remove-overlay {
  opacity: 1;
}

.media-manage-row-removing .media-preview img,
.media-manage-row-removing .media-preview-placeholder {
  filter: grayscale(1);
}

.media-preview {
  display: grid;
  place-items: center;
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(18, 60, 48, 0.08);
}

.media-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-preview-placeholder {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.media-remove-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(70, 76, 72, 0.68);
  color: white;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  opacity: 0;
  text-transform: uppercase;
  transition: opacity 0.16s ease;
}

.media-remove-button {
  display: inline-grid;
  place-items: center;
  min-width: 2rem;
  min-height: 2rem;
  padding: 0 0.5rem;
  border: 1px solid rgba(136, 27, 27, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--danger);
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
}

.media-remove-button:hover {
  background: rgba(136, 27, 27, 0.1);
}

@keyframes media-upload-spin {
  to {
    transform: rotate(360deg);
  }
}

.checkbox-inline {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.75rem;
  font-weight: 700;
}

.profile-form .checkbox-inline input {
  width: auto;
  min-height: auto;
}

.user-card {
  display: grid;
  gap: 1rem;
  margin: 2rem 0 0;
}

.user-card div {
  padding: 1rem;
  border-radius: 18px;
  background: var(--accent-soft);
}

.user-card dt {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.user-card dd {
  margin: 0.5rem 0 0;
  font-size: 1.1rem;
}

@media (max-width: 1100px) {
  .shell {
    width: min(100% - 1.5rem, 1120px);
  }

  .site-header {
    position: relative;
    flex-direction: row;
    align-items: center;
    gap: 0.85rem;
  }

  .nav-desktop {
    display: none;
  }

  .mobile-menu {
    display: block;
    margin-left: auto;
  }

  .mobile-menu-toggle {
    display: inline-flex;
    width: 2.75rem;
    height: 2.75rem;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.28rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.76);
    box-shadow: 0 10px 26px rgba(22, 27, 25, 0.1);
    cursor: pointer;
    list-style: none;
  }

  .mobile-menu-toggle::-webkit-details-marker {
    display: none;
  }

  .mobile-menu-toggle span {
    width: 1.2rem;
    height: 2px;
    border-radius: 999px;
    background: var(--ink);
  }

  .nav {
    align-items: stretch;
  }

  .nav-mobile {
    position: absolute;
    top: calc(100% - 0.35rem);
    right: 0;
    z-index: 30;
    display: grid;
    width: min(18rem, calc(100vw - 1.5rem));
    max-height: calc(100dvh - 5rem);
    gap: 0.35rem;
    overflow-y: auto;
    padding: 0.55rem;
    border: 1px solid rgba(31, 92, 74, 0.18);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow);
  }

  .mobile-menu:not([open]) .nav-mobile {
    display: none;
  }

  .mobile-menu[open] .nav-mobile {
    display: grid;
  }

  .nav a,
  .admin-menu summary {
    display: flex;
    align-items: center;
    min-height: 2.65rem;
    padding: 0.65rem 0.75rem;
    border: 0;
    border-radius: 8px;
    background: transparent;
  }

  .nav a:hover,
  .admin-menu summary:hover {
    background: rgba(31, 92, 74, 0.1);
  }

  .admin-menu {
    position: static;
  }

  .admin-menu-dropdown {
    position: static;
    min-width: 0;
    margin: 0.2rem 0 0;
    padding: 0.25rem 0 0.25rem 0.65rem;
    border: 0;
    border-left: 2px solid rgba(31, 92, 74, 0.18);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .search-form,
  .saved-search-form,
  .listing-grid,
  .status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .listing-detail {
    grid-template-columns: minmax(0, 1fr);
  }

  .listing-summary {
    position: static;
  }

  .listing-gallery-stage {
    min-height: min(58vh, 640px);
  }

  .admin-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .listing-row {
    grid-template-columns: 120px minmax(0, 1fr);
    align-items: start;
  }

  .saved-listing-row {
    grid-template-columns: 120px minmax(0, 1fr);
  }

  .listing-row .seller-listing-stats,
  .listing-row .row-actions {
    grid-column: 2;
  }

  .row-actions {
    align-items: flex-start;
  }

  .saved-layout {
    grid-template-columns: minmax(180px, 0.32fr) minmax(0, 1fr);
  }

  .saved-sidebar {
    align-self: start;
  }

  .saved-group-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .messages-app {
    grid-template-columns: 300px minmax(0, 1fr);
  }
}

@media (max-width: 820px) {
  body {
    background:
      radial-gradient(circle at top left, rgba(31, 92, 74, 0.12), transparent 32%),
      linear-gradient(180deg, #efe9dd 0%, var(--bg) 100%);
  }

  .shell {
    width: min(100% - 1rem, 1120px);
    padding: 0.5rem 0 2rem;
  }

  .shell:has(.messages-app) {
    width: min(100% - 1rem, 1560px);
    height: auto;
    min-height: 100dvh;
    padding-bottom: 0.5rem;
  }

  .site-header {
    gap: 0.75rem;
    padding: 0.75rem 0 1rem;
  }

  .brand {
    font-size: 1rem;
  }

  .hero {
    padding: 1.25rem 0 2rem;
  }

  h1 {
    font-size: clamp(2rem, 10vw, 2.85rem);
  }

  h2 {
    font-size: 1.55rem;
  }

  .lede {
    font-size: 1rem;
    line-height: 1.55;
  }

  .panel {
    padding: 1rem;
    border-radius: 16px;
  }

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

  .status-grid,
  .form-grid,
  .search-form,
  .saved-search-form,
  .listing-grid,
  .listing-detail,
  .spec-list,
  .saved-layout,
  .messages-app {
    grid-template-columns: 1fr;
  }

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

  .section-heading .button {
    width: 100%;
  }

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

  .listing-row,
  .subcategory-row,
  .subcategory-edit-form,
  .message-row,
  .admin-row,
  .checkbox-grid,
  .fulfillment-option-grid,
  .media-upload-fields {
    grid-template-columns: 1fr;
  }

  .listing-row > div,
  .listing-row .seller-listing-stats,
  .listing-row .row-actions {
    grid-column: 1;
  }

  .listing-row {
    gap: 0.8rem;
  }

  .listing-row img,
  .listing-row .media-placeholder {
    width: 100%;
  }

  .media-placeholder {
    min-height: 8rem;
  }

  .row-actions,
  .form-actions,
  .actions {
    width: 100%;
  }

  .row-actions .button,
  .row-actions form,
  .row-actions button,
  .form-actions .button,
  .form-actions form,
  .form-actions button,
  .actions .button {
    width: 100%;
  }

  .saved-group-form {
    grid-template-columns: 1fr;
  }

  .seller-listing-stats {
    min-width: 0;
    width: 100%;
  }

  .listing-summary {
    position: static;
  }

  .listing-gallery-stage {
    min-height: auto;
    padding: 0.75rem 3rem;
    border-radius: 16px;
  }

  .listing-gallery-main {
    max-height: 52vh;
    border-radius: 12px;
  }

  .listing-gallery-nav {
    width: 2.5rem;
    height: 2.5rem;
  }

  .listing-gallery-nav[data-gallery-prev] {
    left: 0.35rem;
  }

  .listing-gallery-nav[data-gallery-next] {
    right: 0.35rem;
  }

  .messages-app {
    grid-template-rows: minmax(220px, 34%) minmax(0, 1fr);
    min-height: calc(100dvh - 6rem);
    border-radius: 16px;
  }

  .chat-list {
    border: 0;
    padding: 0.85rem;
  }

  .chat-main {
    min-height: 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .chat-message-row {
    max-width: 92%;
  }

  .chat-main-header {
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 0.75rem;
  }

  .chat-title-block {
    min-width: 0;
  }

  .chat-header-actions {
    width: 100%;
  }

  .chat-title-block h2,
  .chat-title-block p {
    overflow-wrap: anywhere;
  }

  .chat-composer {
    align-items: stretch;
    padding: 0.75rem;
  }

  .message-row > .button,
  .message-row > form,
  .admin-row .button,
  .admin-row button {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .shell {
    width: min(100% - 0.75rem, 1120px);
  }

  .button {
    width: 100%;
    min-height: 2.9rem;
    padding-inline: 0.9rem;
  }

  .nav a,
  .admin-menu summary {
    min-height: 2.15rem;
    padding: 0.38rem 0.6rem;
    font-size: 0.92rem;
  }

  .panel {
    padding: 0.85rem;
  }

  h1 {
    font-size: clamp(1.95rem, 9vw, 2.45rem);
  }

  .search-form,
  .saved-search-form,
  .profile-form {
    gap: 0.85rem;
  }

  .listing-card-body {
    padding: 0.85rem;
  }

  .listing-gallery-stage {
    padding: 0.6rem;
  }

  .listing-gallery-nav {
    top: auto;
    bottom: 0.85rem;
    transform: none;
  }

  .listing-gallery-thumb {
    width: 78px;
    height: 58px;
  }

  .spec-list div {
    padding: 0.75rem;
  }

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

  .dialog-backdrop {
    align-items: end;
    padding: 0.75rem;
  }

  .dialog-panel {
    width: 100%;
    padding: 1rem;
    border-radius: 16px;
  }

  .messages-app {
    grid-template-rows: minmax(180px, 32dvh) minmax(420px, 1fr);
  }

  .chat-thread {
    grid-template-columns: 44px minmax(0, 1fr) auto;
  }

  .chat-avatar {
    width: 44px;
    height: 44px;
  }

  .chat-main-header .chat-avatar {
    width: 38px;
    height: 38px;
  }

  .chat-filter-row {
    overflow-x: auto;
    padding-bottom: 0.2rem;
  }

  .chat-history {
    padding: 0.75rem;
  }

  .chat-message-row,
  .listing-attachment {
    max-width: 96%;
    width: auto;
  }

  .chat-composer {
    display: grid;
    grid-template-columns: 1fr;
  }
}
