/* Design tokens */
:root {
  --primary-50: #fef2f2;
  --primary-100: #fee2e2;
  --primary-500: #ef4444;
  --primary-600: #dc2626;
  --primary-700: #b91c1c;
  --primary-800: #991b1b;

  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;

  --red-500: #ef4444;
  --red-50: #fef2f2;
  --amber-50: #fffbeb;
  --amber-700: #b45309;
  --green-50: #ecfdf5;
  --green-800: #065f46;

  --color-bg: var(--slate-50);
  --color-surface: #ffffff;
  --color-text: var(--slate-900);
  --color-muted: var(--slate-500);
  --color-border: var(--slate-200);
  --color-primary: var(--primary-700);
  --color-primary-hover: var(--primary-600);
  --color-danger: var(--red-500);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.1);

  --header-h: 64px;
  --mobile-nav-h: 72px;
  --container-max: 1200px;
  --sidebar-w: 300px;

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100dvh;
}

a { color: inherit; text-decoration: none; }

img { display: block; max-width: 100%; height: auto; }

.app-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 768px) {
  .container { padding: 0 24px; }
}

/* Icons */
.icon {
  width: 20px;
  height: 20px;
  stroke-width: 2px;
  flex-shrink: 0;
}

.icon-xs { width: 14px; height: 14px; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 24px; height: 24px; }
.icon-xl { width: 32px; height: 32px; opacity: 0.45; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

@media (max-width: 767px) {
  .site-header {
    background: #fff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .page-home .site-header {
    position: static;
  }
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: transparent;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.brand-text { min-width: 0; }

.brand-title {
  display: block;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--slate-900);
  line-height: 1.2;
}

.brand-sub {
  display: block;
  font-size: 12px;
  color: var(--color-muted);
  line-height: 1.2;
}

.header-nav {
  display: none;
  align-items: center;
  gap: 8px;
}

.header-bell-mobile {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  margin-left: auto;
  border-radius: var(--radius-sm);
  color: var(--slate-700);
  transition: background 0.15s, color 0.15s;
}

.header-bell-mobile:focus-visible {
  background: var(--slate-100);
  color: var(--slate-900);
}

@media (hover: hover) and (pointer: fine) {
  .header-bell-mobile:hover {
    background: var(--slate-100);
    color: var(--slate-900);
  }
}

.header-bell-mobile .nav-unread-badge {
  top: -4px;
  right: -6px;
}

@media (min-width: 768px) {
  .header-bell-mobile { display: none; }
}

.header-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  min-width: 48px;
  height: 48px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--slate-600);
  transition: background 0.15s, color 0.15s;
}

.header-nav-link:hover { background: var(--slate-100); color: var(--slate-900); }
.header-nav-link.is-active { background: var(--primary-50); color: var(--primary-800); }
.header-nav-link-btn,
.mobile-nav-item-btn {
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
}
.header-logout-form,
.mobile-nav-logout-form {
  display: contents;
}

.header-cta { margin-left: 4px; }

@media (min-width: 768px) {
  .header-nav { display: flex; }
}

/* Main */
.site-main {
  flex: 1;
  padding: 20px 0 24px;
}

@media (min-width: 768px) {
  .site-main { padding: 28px 0 40px; }
}

body:not(.page-home) .site-main {
  padding-bottom: calc(var(--mobile-nav-h) + 16px);
}

@media (min-width: 768px) {
  body:not(.page-home) .site-main { padding-bottom: 40px; }
}

.page-home .site-main { padding-bottom: calc(var(--mobile-nav-h) + 8px); }

@media (min-width: 768px) {
  .page-home .site-main { padding-bottom: 40px; }
}

/* Mobile nav */
.mobile-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  height: calc(var(--mobile-nav-h) + env(safe-area-inset-bottom));
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: end;
  background: #fff;
  border-top: 1px solid var(--color-border);
  box-shadow: none;
}

@media (min-width: 768px) {
  .mobile-nav {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 -4px 24px rgba(15, 23, 42, 0.06);
  }
}

.mobile-nav-auth {
  grid-template-columns: repeat(5, 1fr);
  padding-left: 6px;
  padding-right: 6px;
}

.mobile-nav-auth .mobile-nav-item {
  min-width: 0;
  padding: 4px 2px;
  font-size: 10px;
}

.mobile-nav:not(.mobile-nav-auth) .mobile-nav-item {
  justify-self: center;
  width: 100%;
}

@media (min-width: 768px) {
  .mobile-nav { display: none; }
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 52px;
  min-height: 48px;
  padding: 4px 6px;
  font-size: 11px;
  font-weight: 500;
  color: var(--slate-500);
  transition: color 0.15s;
}

.mobile-nav-item.is-active {
  color: var(--primary-700);
  font-weight: 600;
}

.mobile-nav-item.is-active > .icon {
  color: var(--primary-700);
  background: var(--primary-50);
  border-radius: var(--radius-sm);
  padding: 4px;
  width: 28px;
  height: 28px;
}

.mobile-nav-fab {
  justify-self: center;
  width: 72px;
  min-width: 72px;
  height: auto;
  margin-top: -22px;
  padding: 0 6px 2px;
  border-radius: 0;
  background: transparent;
  color: var(--primary-700) !important;
  box-shadow: none;
  font-size: 11px;
}

.mobile-nav-fab .icon {
  width: 54px;
  height: 54px;
  padding: 14px;
  border-radius: var(--radius-full);
  background: var(--primary-700);
  color: #fff;
  box-shadow: var(--shadow-md);
  stroke-width: 2.5px;
}

/* Footer — visible on mobile above bottom nav (Play: easy access to privacy) */
.site-footer {
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
  padding: 12px 0;
  margin-bottom: calc(var(--mobile-nav-h) + env(safe-area-inset-bottom));
}

@media (min-width: 768px) {
  .site-footer {
    display: block;
    padding: 20px 0;
    margin-bottom: 0;
  }
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--color-muted);
  text-align: center;
}

@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    font-size: 13px;
    text-align: left;
  }
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 16px;
}

.footer-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--slate-600);
  transition: color 0.15s;
}

.footer-link:hover { color: var(--primary-700); }

/* Home page */
.home-page {
  max-width: 1200px;
  margin: 0 auto;
}

.home-search-form { margin-bottom: 12px; }

.search-bar {
  position: relative;
  display: flex;
  align-items: center;
}

.search-bar--split {
  align-items: stretch;
  min-height: 48px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: var(--shadow-xs);
  overflow: visible;
}

.search-bar--split:focus-within {
  border-color: var(--slate-300);
  box-shadow: var(--shadow-sm);
}

.search-bar-query {
  position: relative;
  flex: 1;
  min-width: 0;
}

.search-bar-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--slate-400);
  pointer-events: none;
  z-index: 1;
}

.search-bar--split .search-bar-input {
  width: 100%;
  height: 100%;
  min-height: 46px;
  padding: 0 14px 0 48px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font: inherit;
  font-size: 15px;
  color: var(--color-text);
}

.search-bar--split .search-bar-input:focus {
  outline: none;
  border: 0;
  box-shadow: none;
}

.search-bar-input::placeholder { color: var(--slate-400); }

.search-bar-city {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: stretch;
  max-width: 42%;
  border-left: 1px solid var(--color-border);
}

.search-bar-city-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 0 12px 0 14px;
  border: 0;
  background: transparent;
  color: var(--slate-600);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}

.search-bar-city-pin,
.search-bar-city-chevron {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--slate-400);
}

.search-bar-city-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-bar-city-btn:hover {
  background: var(--slate-50);
  color: var(--slate-800);
}

.search-bar-city-btn.is-active {
  color: var(--primary-800);
}

.search-bar-city-btn.is-active .search-bar-city-pin {
  color: var(--primary-700);
}

.search-bar-city-btn[aria-expanded="true"] {
  background: var(--slate-50);
}

.search-bar-city-btn[aria-expanded="true"] .search-bar-city-chevron {
  transform: rotate(180deg);
}

.home-city-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: auto;
  width: min(380px, calc(100vw - 24px));
  max-height: min(72vh, 520px);
  overflow: visible;
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.14);
  z-index: 90;
}

.home-city-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.home-city-panel__title {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--slate-500);
}

.home-city-clear-link {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--primary-700);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.home-city-clear-link:hover {
  text-decoration: underline;
}

.home-city-panel__field {
  position: relative;
}

.home-city-input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: #fff;
  font: inherit;
  font-size: 15px;
  color: var(--color-text);
  outline: none;
}

.home-city-input:focus {
  border-color: var(--slate-400);
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.08);
}

.home-city-input::placeholder { color: var(--slate-400); }

.home-city-panel .city-suggest-list {
  position: static;
  margin-top: 8px;
  max-height: min(40vh, 220px);
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: #fff;
  box-shadow: none;
}

.home-city-panel .suggest-item {
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  min-width: 0;
}

.home-city-panel .suggest-meta {
  flex: 0 1 44%;
  max-width: 44%;
  margin-left: auto;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.35;
}

@media (max-width: 767px) {
  .search-bar-city {
    max-width: 38%;
  }

  .search-bar-city-btn {
    padding: 0 10px 0 12px;
    font-size: 13px;
    gap: 4px;
  }

  .home-city-panel {
    left: auto;
    right: -1px;
    width: min(320px, calc(100vw - 24px));
  }
}

@media (max-width: 420px) {
  .search-bar-city {
    max-width: 34%;
  }

  .search-bar-city-chevron {
    display: none;
  }
}

@media (max-width: 767px) {
  .home-mobile-toolbar {
    position: sticky;
    top: 0;
    z-index: 45;
    margin: 0 -16px 12px;
    padding: calc(8px + env(safe-area-inset-top, 0px)) 16px 10px;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
  }

  .page-home .htmx-indicator {
    top: calc(96px + env(safe-area-inset-top, 0px));
  }
}

/* Category carousel */
.category-carousel-wrap {
  --carousel-fade: var(--color-bg, #f8fafc);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px;
  margin: 0 -8px 16px;
  padding: 0 4px;
}

@media (min-width: 768px) {
  .category-carousel-wrap {
    margin: 0 0 20px;
    padding: 0;
    gap: 8px;
  }
}

.category-carousel-shell {
  position: relative;
  min-width: 0;
}

.category-carousel-shell::before,
.category-carousel-shell::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 4px;
  width: 28px;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.category-carousel-shell::before {
  left: 0;
  background: linear-gradient(to right, var(--carousel-fade), transparent);
}

.category-carousel-shell::after {
  right: 0;
  background: linear-gradient(to left, var(--carousel-fade), transparent);
}

.category-carousel-shell[data-fade-left]::before,
.category-carousel-shell[data-fade-right]::after {
  opacity: 1;
}

.category-carousel {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  scroll-behavior: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scroll-padding-inline: 8px;
  padding: 2px 8px 6px;
  scrollbar-width: none;
  touch-action: pan-x;
}

@media (min-width: 768px) {
  .category-carousel {
    gap: 8px;
    scroll-padding-inline: 4px;
    padding: 2px 4px 6px;
  }
}

.category-carousel::-webkit-scrollbar { display: none; }

.category-carousel:focus-visible {
  outline: 2px solid var(--primary-600);
  outline-offset: 2px;
  border-radius: var(--radius-md);
}

.category-carousel-nav {
  flex-shrink: 0;
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  background: var(--color-surface);
  color: var(--slate-600);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s, background 0.15s, color 0.15s, opacity 0.15s;
}

.category-carousel-nav:hover {
  border-color: var(--slate-300);
  background: var(--slate-50);
  color: var(--slate-800);
}

.category-carousel-nav:disabled {
  opacity: 0.35;
  cursor: default;
}

@media (min-width: 768px) {
  .category-carousel-nav {
    display: inline-flex;
  }
}

@media (max-width: 767px) {
  .category-carousel-wrap {
    grid-template-columns: minmax(0, 1fr);
  }
}

.category-chip {
  flex: 0 0 auto;
  scroll-snap-align: center;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  width: auto;
  min-width: max-content;
  min-height: 40px;
  padding: 6px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  background: var(--color-surface);
  color: var(--slate-600);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.25;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.15s, background 0.15s, color 0.15s, box-shadow 0.15s;
}

@media (min-width: 768px) {
  .category-chip {
    gap: 8px;
    min-height: 40px;
    padding: 8px 14px;
    font-size: 14px;
    scroll-snap-align: start;
  }
}

@media (min-width: 1200px) {
  .category-chip {
    padding: 8px 16px;
  }
}

@media (hover: hover) and (pointer: fine) {
  .category-chip:hover {
    border-color: var(--slate-300);
    background: var(--slate-50);
  }
}

.category-chip.is-active {
  border-color: var(--primary-600);
  background: var(--primary-50);
  color: var(--primary-800);
  box-shadow: var(--shadow-sm);
}

.category-chip-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: var(--radius-full);
  background: var(--slate-100);
  display: grid;
  place-items: center;
  color: var(--slate-600);
  transition: background 0.15s, color 0.15s;
}

.category-chip.is-active .category-chip-icon {
  background: var(--primary-600);
  color: #fff;
}

.category-chip-label {
  display: block;
  overflow: visible;
  white-space: nowrap;
}

/* Feed toolbar */
.feed-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.feed-count {
  font-size: 14px;
  color: var(--color-muted);
}

.feed-count strong {
  color: var(--slate-800);
  font-weight: 600;
}

.feed-geo-fallback {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: -4px 0 16px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(245, 158, 11, 0.28);
  background: #fffbeb;
  color: #92400e;
  font-size: 14px;
  line-height: 1.45;
}

.feed-geo-fallback p {
  margin: 0;
}

.feed-geo-fallback .icon {
  flex-shrink: 0;
  margin-top: 2px;
  color: #b45309;
}

.feed-section {
  margin: 0 0 32px;
}

.feed-section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 12px;
  margin: 0 0 14px;
}

.feed-section__title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--slate-900);
  line-height: 1.25;
}

.feed-section__hint {
  margin: 0;
  font-size: 13px;
  color: var(--slate-500);
  line-height: 1.3;
}

.feed-section__title--organic {
  margin: 0 0 12px;
}

.feed-section--promoted {
  padding: 0;
  border: 0;
  background: transparent;
}

.feed-section--promoted .feed-section__title {
  color: var(--slate-900);
}

.feed-section--promoted .feed-section__title::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary-600);
  box-shadow: 0 0 0 3px var(--primary-50);
  flex-shrink: 0;
}

.feed-section-divider {
  height: 1px;
  margin: 4px 0 20px;
  background: var(--color-border);
}

.post-card--promoted {
  border-color: rgba(185, 28, 28, 0.18);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 0 0 1px rgba(185, 28, 28, 0.06);
}

.post-card--promoted::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 0;
  background: var(--primary-600);
  z-index: 2;
}

@media (hover: hover) and (pointer: fine) {
  .post-card--promoted:hover {
    border-color: rgba(185, 28, 28, 0.28);
    box-shadow: var(--shadow-md);
  }
}

.sort-control {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--slate-500);
}

.sort-select {
  min-height: 44px;
  height: 44px;
  padding: 0 28px 0 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 8px center;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--slate-700);
  cursor: pointer;
  appearance: none;
}

.sort-select:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.12);
}

body.confirm-open {
  overflow: hidden;
}

.my-post-card-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.my-post-status {
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.6;
}

.my-post-status-active {
  background: var(--green-50);
  color: var(--green-800);
}

.my-post-status-ended {
  background: var(--slate-100);
  color: var(--slate-600);
}

.my-post-status-muted {
  background: var(--slate-100);
  color: var(--slate-500);
}

.my-post-status-hidden {
  background: var(--amber-50);
  color: var(--amber-700);
}

.my-post-status-draft {
  background: var(--slate-100);
  color: var(--slate-700);
}

.my-post-moderation-note {
  margin: 4px 0 0;
  font-size: 13px;
  color: #9a3412;
}

.listing-form-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.active-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: -4px 0 16px;
}

.filter-chip,
.filter-reset {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 10px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
}

.filter-chip {
  background: var(--slate-100);
  color: var(--slate-700);
}

.filter-reset {
  color: var(--primary-800);
  background: var(--primary-50);
}

/* Forms */
.field { margin-bottom: 14px; }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 560px) {
  .field-row {
    grid-template-columns: 1fr;
  }
}

.field-label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--slate-700);
}

.field-help {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--slate-400);
}

.condition-segment {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.condition-segment-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--slate-700);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.condition-segment-item input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.condition-segment-item:has(input:checked) {
  border-color: var(--primary-600);
  background: var(--primary-50);
  color: var(--primary-800);
}

.post-card-condition {
  font-weight: 500;
  color: var(--slate-500);
}

.input-icon-wrap { position: relative; }

.input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--slate-400);
  pointer-events: none;
}

.input,
select.input,
textarea.input,
input[type="search"],
input[type="number"],
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"] {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
  font-size: 15px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

input[type="file"].input {
  width: 100%;
  height: auto;
  padding: 10px 12px;
  font-size: 14px;
}

textarea.input,
.textarea {
  height: auto;
  min-height: 120px;
  padding: 12px 14px;
  resize: vertical;
  line-height: 1.5;
}

.input-with-icon { padding-left: 40px; }

.select-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15);
}

.input::placeholder { color: var(--slate-400); }

.search-bar:not(.search-bar--split) .search-bar-input {
  height: 48px;
  padding-left: 54px;
  border-radius: var(--radius-md);
}

.form .field,
.form label { display: block; margin-bottom: 16px; }

.form label { font-size: 13px; font-weight: 500; color: var(--slate-700); }

/* Buttons — min 48×48 dp touch target (Material / Google Play) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  min-width: 48px;
  height: 48px;
  padding: 0 18px;
  border: none;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.15s, background 0.15s;
  white-space: nowrap;
}

.btn:active { transform: scale(0.98); }

.btn-sm { min-height: 48px; height: 48px; padding: 0 14px; font-size: 14px; }

.btn-primary {
  background: var(--primary-700);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover {
    background: var(--primary-600);
    box-shadow: var(--shadow-md);
  }
}

.btn-primary:focus-visible {
  background: var(--primary-600);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--slate-100);
  color: var(--slate-800);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover { background: var(--slate-200); }

.btn-danger {
  background: var(--red-500);
  color: #fff;
}

.btn-block { width: 100%; }

/* Post grid */
.post-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.post-grid-append {
  display: contents;
}

@media (min-width: 640px) {
  .post-grid { gap: 16px; }
}

@media (min-width: 1024px) {
  .post-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
}

@media (min-width: 1280px) {
  .post-grid { grid-template-columns: repeat(4, 1fr); }
}

.post-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 0;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.post-card-bookmark-form {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  margin: 0;
}

.post-card-bookmark-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--slate-700);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

@media (hover: hover) and (pointer: fine) {
  .post-card {
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  }

  .post-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--slate-300);
  }

  .post-card-bookmark-btn:hover {
    background: #fff;
    color: var(--primary-700);
    transform: scale(1.05);
  }

  .post-card-dot:hover {
    background: #fff;
    transform: scale(1.08);
  }

  .post-card-bookmark-btn {
    transition: background 0.15s, color 0.15s, transform 0.15s;
  }
}

.post-card-bookmark-btn.is-active {
  color: var(--primary-700);
  background: #fff;
}

.post-card-bookmark-guest {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
}

.post-card-edit {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  min-height: 40px;
  height: 40px;
  padding: 0 12px;
  font-size: 13px;
  box-shadow: var(--shadow-sm);
}

.post-card-edit[hidden] {
  display: none !important;
}

.post-card:has(.post-card-edit:not([hidden])) .post-card-body {
  padding-bottom: 64px;
}


.post-card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--slate-100);
  overflow: hidden;
}

.post-card-media-slider {
  touch-action: pan-y;
}

.post-card-track {
  display: flex;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  cursor: grab;
}

.post-card-track:active {
  cursor: grabbing;
}

.post-card-track::-webkit-scrollbar {
  display: none;
}

.post-card-slide {
  display: block;
  flex: 0 0 100%;
  height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.post-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.post-card-img-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, var(--slate-100), var(--slate-200));
}

.post-card-dots {
  position: absolute;
  left: 50%;
  bottom: 8px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transform: translateX(-50%);
  margin: 0;
  padding: 0;
  list-style: none;
  pointer-events: none;
}

.post-card-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.18);
  opacity: 0.85;
  transition: opacity 0.15s ease, transform 0.15s ease, background 0.15s ease;
}

.post-card-dot.is-active {
  background: #fff;
  opacity: 1;
  transform: scale(1.15);
}

.post-card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px 14px;
  flex: 1;
  min-width: 0;
}

.post-card-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}

.post-card-price {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--primary-800);
  line-height: 1.2;
}

.post-card-price-muted {
  color: var(--slate-500);
  font-weight: 600;
}

.post-card-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--slate-900);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.post-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0 6px;
  margin: 0;
  margin-top: auto;
  padding-top: 2px;
  font-size: 12px;
  line-height: 1.35;
  color: var(--color-muted);
}

.post-card-meta > * {
  min-width: 0;
}

.meta-dot { opacity: 0.45; }

.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 26px;
  padding: 0 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  backdrop-filter: blur(8px);
}

.badge-promoted {
  background: rgba(255, 255, 255, 0.96);
  color: var(--primary-800);
  border: 1px solid rgba(185, 28, 28, 0.16);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.badge-photo-count {
  top: auto;
  left: auto;
  right: 10px;
  bottom: 10px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

/* Post detail */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin: -6px 0 12px;
  color: var(--primary-800);
  font-size: 14px;
  font-weight: 600;
}

.back-link:hover { color: var(--primary-600); }

.breadcrumbs {
  margin: -6px 0 8px;
}

.breadcrumbs-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  line-height: 1.4;
  color: var(--slate-500);
}

.breadcrumbs-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.breadcrumbs-item:not(:last-child)::after {
  content: "/";
  color: var(--slate-300);
  pointer-events: none;
}

.breadcrumbs-item a {
  color: var(--primary-800);
  text-decoration: none;
  font-weight: 500;
}

.breadcrumbs-item a:hover {
  color: var(--primary-600);
  text-decoration: underline;
}

.breadcrumbs-item-current {
  color: var(--slate-600);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-card {
  max-width: 720px;
  margin: 0 auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  overflow-x: clip;
  min-width: 0;
}

.page-card.post-detail {
  border-radius: 0;
}

@media (min-width: 768px) {
  .page-card { padding: 28px; }
}

.post-detail .post-gallery {
  margin: 0 0 16px;
}

@media (max-width: 767px) {
  .post-detail.post-detail {
    padding: 12px;
    border-radius: 0;
  }

  .post-detail .post-gallery {
    margin: -12px -12px 16px;
  }

  .post-detail .post-gallery-viewport {
    border-radius: 0;
  }
}

.post-detail h1 {
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.25;
  margin: 4px 0 12px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.post-price {
  font-size: clamp(1.5rem, 4.5vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--primary-800);
  margin: 0 0 4px;
}

.post-price-muted {
  color: var(--slate-500);
}

.post-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--color-muted);
}

.post-meta .icon {
  flex-shrink: 0;
}

.post-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
  font-size: 15px;
  line-height: 1.65;
  color: var(--slate-700);
  margin: 0 0 20px;
}

.safety-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 16px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--amber-50);
  color: var(--amber-700);
  font-size: 13px;
  line-height: 1.4;
}

.contact-box {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 14px;
  background: var(--slate-50);
  border: 1px solid var(--color-border);
  margin-bottom: 16px;
}

.page-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 8px;
}

.post-wizard-card .page-title {
  margin-bottom: 16px;
}

.post-wizard-header {
  margin-bottom: 20px;
}

.post-wizard-inline-hint {
  margin-top: 4px;
  margin-bottom: 0;
}

.post-submit-preview {
  margin: 8px 0 16px;
}

.post-submit-preview-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}

.post-submit-preview-gallery {
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  padding: 8px;
  background: var(--slate-50);
}

.post-submit-preview-gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.post-submit-preview-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 160px;
  background: var(--slate-100);
  color: var(--color-muted);
  font-size: 14px;
}

.post-submit-preview-price {
  padding: 16px 16px 0;
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-800);
}

.post-submit-preview-price-muted {
  color: var(--color-muted);
  font-size: 16px;
  font-weight: 600;
}

.post-submit-preview-title {
  padding: 8px 16px 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
}

.post-submit-preview-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  padding: 8px 16px 0;
  font-size: 13px;
  color: var(--color-muted);
}

.post-submit-preview-body {
  padding: 12px 16px;
  font-size: 15px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.post-submit-preview-phone {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--color-border);
  font-size: 14px;
  font-weight: 600;
  color: var(--slate-700);
  background: var(--slate-50);
}

@media (max-width: 560px) {
}

.hint {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 20px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--primary-50);
  border: 1px solid rgba(20, 184, 166, 0.15);
  font-size: 14px;
  color: var(--primary-800);
}

.post-gallery-viewport {
  position: relative;
  overflow: hidden;
  border-radius: 0;
  background: var(--slate-100);
  aspect-ratio: 4 / 3;
  touch-action: pan-y;
}

.post-gallery-track {
  display: flex;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.post-gallery-track::-webkit-scrollbar {
  display: none;
}

.post-gallery-slide {
  flex: 0 0 100%;
  height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.post-gallery-open {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: none;
  background: transparent;
  cursor: zoom-in;
}

.post-gallery-open img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--slate-100);
  pointer-events: none;
}

.post-gallery-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-top: -20px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--slate-800);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.14);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.post-gallery-prev { left: 10px; }
.post-gallery-next { right: 10px; }

.post-gallery-nav[hidden] {
  display: none !important;
}

@media (hover: hover) and (pointer: fine) {
  .post-gallery-nav {
    display: inline-flex;
  }

  .post-gallery-viewport:hover .post-gallery-nav:not([hidden]) {
    opacity: 1;
  }
}

.post-gallery-dots {
  position: absolute;
  left: 50%;
  bottom: 10px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
  transform: translateX(-50%);
  pointer-events: none;
}

.post-gallery-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.16);
  opacity: 0.85;
  transition: opacity 0.15s ease, transform 0.15s ease, background 0.15s ease;
}

.post-gallery-dot.is-active {
  background: #fff;
  opacity: 1;
  transform: scale(1.2);
}

/* Lightbox */
body.lightbox-open {
  overflow: hidden;
}

.post-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
}

.post-lightbox[hidden] {
  display: none;
}

.post-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.92);
}

.post-lightbox-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 1100px);
  height: min(100dvh, 900px);
  display: flex;
  flex-direction: column;
  padding: 12px;
}

.post-lightbox-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.post-lightbox-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-sm);
  background: rgba(15, 23, 42, 0.58);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.post-lightbox-tool:hover {
  background: rgba(15, 23, 42, 0.74);
}

.post-lightbox-zoom-label {
  min-width: 56px;
}

.post-lightbox-zoom-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.post-lightbox-counter {
  margin-left: auto;
  margin-right: 8px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  font-weight: 500;
}

.post-lightbox-close {
  margin-left: 0;
}

.post-lightbox-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.35);
  touch-action: none;
}

.post-lightbox-pan {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  transform-origin: center center;
  transition: none;
}

.post-lightbox-pan img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.post-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius-full);
  background: rgba(15, 23, 42, 0.66);
  color: #fff;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(8px);
  cursor: pointer;
}

.post-lightbox-nav:hover {
  background: rgba(15, 23, 42, 0.8);
}

.post-lightbox-prev { left: 12px; }
.post-lightbox-next { right: 12px; }

@media (max-width: 640px) {
  .post-lightbox-panel {
    height: 100dvh;
    padding: 8px;
    padding-top: max(8px, env(safe-area-inset-top));
    padding-bottom: max(8px, env(safe-area-inset-bottom));
  }

  .post-lightbox-nav {
    width: 38px;
    height: 38px;
  }

  .post-lightbox-zoom-controls {
    display: none;
  }
}

.admin-preview-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 16px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
  border: 1px solid rgba(245, 158, 11, 0.45);
  box-shadow: 0 1px 2px rgba(146, 64, 14, 0.06);
  color: #92400e;
  font-size: 14px;
  line-height: 1.5;
}

.admin-preview-banner-owner {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border-color: rgba(59, 130, 246, 0.35);
  color: #1e40af;
  box-shadow: 0 1px 2px rgba(30, 64, 175, 0.06);
}

.admin-preview-banner-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  margin-top: 2px;
  color: #d97706;
}

.admin-preview-banner-owner .admin-preview-banner-icon {
  color: #2563eb;
}

.admin-preview-banner-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.admin-preview-banner-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  color: #78350f;
}

.admin-preview-banner-owner .admin-preview-banner-title {
  color: #1e3a8a;
}

.admin-preview-banner-desc {
  font-size: 14px;
  line-height: 1.45;
  color: #9a3412;
}

.admin-preview-banner-owner .admin-preview-banner-desc {
  color: #1d4ed8;
}

.contact-box .btn {
  height: auto;
  min-height: 48px;
  padding: 12px 14px;
  white-space: normal;
  text-align: center;
  line-height: 1.25;
}

.contact-guest-note {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--color-muted);
  text-align: center;
}

.post-owner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--slate-50);
  border: 1px solid var(--color-border);
}

.post-owner-action-form {
  margin: 0;
}

.phone-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 0;
  padding: 14px;
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  border: 1px dashed var(--slate-300);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.link-muted {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--color-muted);
  transition: color 0.15s;
}

.link-muted:hover { color: var(--red-500); }

.hidden { display: none !important; }

/* Empty & misc */
.empty-state {
  text-align: center;
  padding: 56px 20px;
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

.empty-state-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: var(--radius-full);
  background: var(--slate-100);
  display: grid;
  place-items: center;
  color: var(--slate-400);
}

.empty-state p {
  color: var(--color-muted);
  font-size: 15px;
  margin-bottom: 8px;
}

.empty-state .btn { margin-top: 16px; }

.sw-update-banner,
.pwa-install-banner {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + var(--mobile-nav-h) + env(safe-area-inset-bottom, 0px));
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--slate-800);
  font-size: 14px;
  line-height: 1.35;
}

.sw-update-banner-text,
.pwa-install-banner-body {
  flex: 1;
  min-width: 0;
}

.pwa-install-banner-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pwa-install-banner-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--slate-900);
}

.pwa-install-banner-text {
  font-size: 12px;
  color: var(--slate-600);
}

.sw-update-banner-dismiss {
  border: 0;
  background: transparent;
  color: var(--slate-500);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  flex-shrink: 0;
}

.sw-update-banner-dismiss:hover {
  color: var(--slate-800);
}

@media (min-width: 768px) {
  .sw-update-banner,
  .pwa-install-banner {
    left: auto;
    right: 20px;
    bottom: 20px;
    width: min(420px, calc(100vw - 40px));
  }
}

.results-count {
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-muted);
}

.feed-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 12px 0 4px;
  font-size: 14px;
}

.feed-pagination-link {
  color: var(--color-primary);
  text-decoration: none;
}

.feed-pagination-link:hover {
  text-decoration: underline;
}

.feed-pagination-current {
  color: var(--color-muted);
}

/* Flash */
.flash-messages { margin-bottom: 16px; }

.flash {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 8px;
}

.flash-success { background: var(--green-50); color: var(--green-800); border: 1px solid rgba(16, 185, 129, 0.2); }
.flash-error { background: var(--red-50); color: #991b1b; border: 1px solid rgba(239, 68, 68, 0.2); }
.flash-warning { background: #fffbeb; color: #92400e; border: 1px solid rgba(245, 158, 11, 0.28); }
.flash-info { background: var(--primary-50); color: var(--primary-800); border: 1px solid rgba(37, 99, 235, 0.18); }

.promote-panel {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 0 0 16px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--color-border);
  background: var(--slate-50);
}

.promote-panel.is-active {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.28);
}

.promote-panel.is-pending {
  background: #fffbeb;
  border-color: rgba(245, 158, 11, 0.35);
}

.promote-panel__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: #fff;
  color: var(--slate-600);
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.promote-panel.is-active .promote-panel__icon {
  color: var(--green-800);
}

.promote-panel.is-pending .promote-panel__icon {
  color: #b45309;
}

.promote-panel__title {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
  color: var(--slate-900);
  line-height: 1.3;
}

.promote-panel__text {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--slate-600);
}

.promote-panel__actions {
  margin-top: 10px;
}

.promote-panel .btn {
  margin-top: 10px;
}

.errors {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--red-50);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.errors .error {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #991b1b;
}

.success-box {
  max-width: 520px;
  margin: 0 auto;
  text-align: center;
  padding: 32px 24px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

/* Post publish success (wizard step 6 + standalone page) */
/* Legacy success page (kept for compatibility) */
.success-page {
  max-width: 420px;
  margin: 0 auto;
  padding: 8px 0 24px;
  text-align: center;
}

.success-stay-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: -8px 0 20px;
  padding: 14px 16px;
  background: var(--amber-50);
  border: 2px solid rgba(245, 158, 11, 0.5);
  border-radius: var(--radius-md);
  font-size: 20px;
  font-weight: 700;
  color: #92400e;
}

.success-stay-banner .icon {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}

.success-published {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 16px;
  font-weight: 600;
  color: var(--green-800);
}

.success-hero {
  margin-bottom: 28px;
}

.success-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 16px;
  border-radius: var(--radius-full);
  background: var(--green-50);
  color: var(--green-800);
  display: grid;
  place-items: center;
}

.success-icon .icon {
  width: 44px;
  height: 44px;
}

.success-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 10px;
  color: var(--primary-800);
}

.success-title .icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.success-keyline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 700;
  color: var(--primary-800);
  margin-bottom: 8px;
}

.success-keyline .icon {
  width: 28px;
  height: 28px;
}

.success-note {
  font-size: 18px;
  color: var(--slate-600);
  line-height: 1.35;
}

.success-actions-main {
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
}

.btn-success-lg {
  min-height: 56px;
  font-size: 18px;
  font-weight: 700;
  border-radius: var(--radius-md);
}

.success-actions-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.btn-success-action {
  min-height: 52px;
  font-size: 16px;
  font-weight: 600;
  flex-direction: column;
  gap: 4px;
  padding: 10px 8px;
}

.btn-success-action .icon {
  width: 22px;
  height: 22px;
}

.success-feedback {
  font-size: 17px;
  font-weight: 600;
  margin: 0;
}

.success-feedback.is-success { color: var(--green-800); }
.success-feedback.is-error { color: #b91c1c; }

.success-my-hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 10px 14px;
  font-size: 16px;
  font-weight: 500;
  color: var(--primary-800);
  background: var(--primary-50);
  border-radius: var(--radius-full);
}

.success-confirm {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 18px 20px;
  margin-bottom: 16px;
  border: 2px solid var(--primary-500);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  font-size: 20px;
  font-weight: 600;
  cursor: pointer;
}

.success-confirm input {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  accent-color: var(--primary-700);
}

.success-page .btn.is-disabled {
  opacity: 0.4;
  pointer-events: none;
}

.success-done {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 16px;
  padding: 14px 16px;
  background: var(--green-50);
  border: 2px solid rgba(16, 185, 129, 0.35);
  border-radius: var(--radius-md);
  font-size: 20px;
  font-weight: 700;
  color: var(--green-800);
}

.success-done .icon {
  width: 28px;
  height: 28px;
}

.success-link-secondary {
  display: inline-block;
  margin-top: 14px;
  font-size: 17px;
  font-weight: 500;
  color: var(--slate-600);
  text-decoration: underline;
}

/* My posts */
.page-header { margin-bottom: 20px; }

.page-lead {
  margin-top: 8px;
  font-size: 14px;
  color: var(--color-muted);
  line-height: 1.5;
}

.page-hint {
  margin-top: 6px;
  font-size: 14px;
  color: var(--color-muted);
  line-height: 1.5;
}

.my-posts-list {
  list-style: none;
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.my-post-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.my-post-card-media {
  display: block;
  width: 64px;
  height: 64px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--slate-100);
}

.my-post-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.my-post-card-img-placeholder {
  display: grid;
  place-items: center;
  color: var(--slate-400);
  background: linear-gradient(180deg, var(--slate-100), var(--slate-200));
}

.my-post-card-img-placeholder .icon {
  width: 22px;
  height: 22px;
}

.my-post-card-content {
  min-width: 0;
  display: grid;
  gap: 4px;
}

@media (min-width: 480px) {
  .my-post-card {
    grid-template-columns: 72px minmax(0, 1fr);
    padding: 10px 12px;
    gap: 12px;
  }

  .my-post-card-media {
    width: 72px;
    height: 72px;
  }
}

.my-post-card-title {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.my-post-card-title-link {
  color: inherit;
  text-decoration: none;
}

.my-post-card-title-link:hover {
  color: var(--primary-700);
  text-decoration: underline;
}

.my-post-card-date {
  font-size: 11px;
  color: var(--color-muted);
  margin: 0;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.my-post-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.my-post-card-actions .btn-sm {
  min-height: 32px;
  height: 32px;
  min-width: 32px;
  padding: 0 8px;
  font-size: 11px;
  gap: 4px;
}

.my-post-card-actions .btn-sm .icon-xs {
  width: 12px;
  height: 12px;
}

.my-post-status {
  padding: 1px 6px;
  font-size: 10px;
  line-height: 1.5;
}

.my-post-card-url {
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  color: var(--slate-600);
  word-break: break-all;
  background: var(--slate-50);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
}

.my-posts-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  background: var(--slate-50);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--slate-600);
}

.my-posts-note p { margin: 0; }

.create-hint {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  margin-bottom: 20px;
  background: var(--primary-50);
  border: 1px solid rgba(20, 184, 166, 0.25);
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--primary-800);
}

.hint-lg {
  font-size: 17px;
  font-weight: 600;
  color: var(--primary-800);
  margin-bottom: 20px;
}

.hint-lg .icon {
  width: 22px;
  height: 22px;
}

.edit-link-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 20px 0;
}

@media (min-width: 480px) {
  .edit-link-box { flex-direction: row; }
}

.suggest-list {
  list-style: none;
  margin-top: 6px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  max-height: 240px;
  overflow-y: auto;
}

.suggest-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: none;
  background: none;
  font: inherit;
  font-size: 14px;
  text-align: left;
  color: var(--slate-700);
  cursor: pointer;
  transition: background 0.12s;
}

.suggest-item:hover { background: var(--slate-50); }

.suggest-meta {
  display: block;
  margin-left: auto;
  font-size: 12px;
  color: var(--slate-400);
}

.city-autocomplete {
  position: relative;
}

.city-suggest-list {
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
}

.edit-actions { margin-top: 24px; display: grid; gap: 12px; }

.delete-confirm-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--red-50);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.delete-confirm-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--slate-700);
  text-align: center;
}

.delete-confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
}

.current-images {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.current-image-item.is-marked-remove {
  opacity: 0.45;
}

.current-image-item.is-cover .thumb {
  outline: 2px solid var(--primary-600, #b91c1c);
  outline-offset: 2px;
}

.cover-select-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: #fff;
  cursor: pointer;
}

.cover-select-btn.is-active {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
  font-weight: 600;
}

.moderation-notice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 14px;
  margin-bottom: 16px;
  border-radius: var(--radius-md);
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  font-size: 14px;
}

.post-wizard-draft-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  margin-bottom: 16px;
  border-radius: var(--radius-md);
  background: var(--slate-50);
  border: 1px solid var(--color-border);
  font-size: 14px;
}

.post-wizard-draft-actions {
  display: flex;
  gap: 8px;
}

.image-preview-item.is-cover {
  outline: 2px solid var(--primary-600, #b91c1c);
  outline-offset: 2px;
}

.image-preview-cover {
  position: absolute;
  left: 6px;
  top: 6px;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(185, 28, 28, 0.92);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  pointer-events: none;
  z-index: 1;
}

.image-preview-cover-btn {
  position: absolute;
  left: 6px;
  bottom: 26px;
  z-index: 1;
  padding: 3px 7px;
  border: none;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.image-preview-cover-btn:hover {
  background: rgba(185, 28, 28, 0.92);
}

.image-preview-item {
  cursor: pointer;
}

.current-image-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.current-image-remove {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  cursor: pointer;
}

.legal-page {
  max-width: 720px;
  margin: 0 auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.legal-page h1 { font-size: 28px; font-weight: 700; margin-bottom: 16px; }
.legal-page h2 { margin: 24px 0 8px; font-size: 18px; font-weight: 600; }
.legal-page ul { margin-left: 20px; margin-bottom: 12px; color: var(--slate-700); }
.legal-page p { color: var(--slate-700); margin-bottom: 12px; }

.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin: 12px 0 16px;
}

.legal-table th,
.legal-table td {
  border: 1px solid var(--color-border);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.legal-table th {
  background: var(--slate-50);
  font-weight: 600;
}

.legal-page a { color: var(--primary-700); text-decoration: underline; }
.legal-page a:hover { color: var(--primary-800); }

.field-consent {
  margin-top: 4px;
}

.consent-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--slate-700);
  cursor: pointer;
}

.consent-label a {
  color: var(--primary-700);
  text-decoration: underline;
}

.consent-checkbox {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: var(--primary-600);
}

mark {
  background: #fef08a;
  color: inherit;
  padding: 0 2px;
  border-radius: 2px;
}

.image-picker {
  position: relative;
  margin-top: 4px;
}

.image-picker.is-processing .image-picker-control {
  opacity: 0.75;
}

.image-picker.is-processing .image-picker-add {
  cursor: wait;
}

.image-picker-control {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  padding: 12px;
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
  background: var(--slate-50);
}

.image-picker-add {
  flex: 0 0 auto;
  min-height: var(--touch-min, 44px);
}

.image-picker-add.is-disabled,
.image-picker-add:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.image-picker-status {
  flex: 1 1 180px;
  color: var(--color-muted);
  font-size: 14px;
  line-height: 1.4;
}

.image-picker-error {
  margin: 8px 0 0;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--red-50);
  color: var(--red-500);
  font-size: 13px;
}

.image-picker-error[hidden] {
  display: none !important;
}

.image-picker-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.image-preview-item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--slate-100);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-xs, 0 1px 2px rgba(15, 23, 42, 0.06));
}

.image-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.image-preview-name {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 18px 6px 4px;
  background: linear-gradient(transparent, rgba(15, 23, 42, 0.72));
  color: #fff;
  font-size: 10px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}

.image-preview-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: var(--radius-full);
  background: rgba(15, 23, 42, 0.76);
  color: #fff;
  cursor: pointer;
}

.image-preview-remove:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 1px;
}

.current-image-item.is-marked-remove .thumb {
  opacity: 0.4;
  filter: grayscale(0.4);
}

.current-image-item.is-marked-remove .current-image-remove {
  color: var(--red-500);
  font-weight: 600;
}

/* Accessibility & Google Play UX */
:root {
  --touch-min: 48px;
  --focus-ring: 0 0 0 3px rgba(20, 184, 166, 0.35);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Beat input[type=file] width:100% so hidden pickers don't expand the page */
input[type="file"].sr-only,
.image-picker-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hp-wrap {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 100;
  padding: 12px 16px;
  background: var(--primary-700);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.skip-link:focus {
  top: 12px;
  outline: none;
  box-shadow: var(--focus-ring);
}

:focus-visible {
  outline: 2px solid var(--primary-600);
  outline-offset: 2px;
}

.search-bar-input:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: var(--focus-ring);
}

.noscript-banner {
  padding: 12px 16px;
  background: var(--amber-50);
  color: var(--amber-700);
  text-align: center;
  font-size: 14px;
  border-bottom: 1px solid rgba(245, 158, 11, 0.2);
}

.empty-state-hint {
  margin-top: 12px;
  font-size: 14px;
  color: var(--color-muted);
}

.empty-state-hint a {
  color: var(--primary-700);
  text-decoration: underline;
}

/* HTMX loading indicator */
.htmx-indicator {
  position: fixed;
  top: calc(var(--header-h) + 8px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  padding: 8px 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.htmx-indicator.is-visible { opacity: 1; }

.htmx-spinner {
  display: block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--slate-200);
  border-top-color: var(--primary-600);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Form & account pages */
.form-page .back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--color-muted);
}

.page-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.page-header-row .page-header {
  margin-bottom: 0;
  flex: 1;
  min-width: 0;
}

.page-header-row .page-title {
  margin-bottom: 4px;
}

.listing-form .btn-block {
  margin-top: 8px;
}

.textarea-input {
  min-height: 140px;
  resize: vertical;
}

.profile-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 4px 0 40px;
}

.profile-header-card {
  margin-bottom: 28px;
  padding: 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}

.profile-header-card .profile-account-actions {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
  justify-content: flex-start;
}

.profile-header-card .profile-logout-form {
  display: inline-flex;
}

.profile-header-card .profile-account-link {
  min-height: 40px;
  padding: 0 2px;
}

.seller-stats {
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.seller-stats-title {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
  color: var(--slate-900);
}

.seller-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.seller-stats-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.seller-stats-value {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--slate-900);
  font-variant-numeric: tabular-nums;
}

.seller-stats-label {
  font-size: 12px;
  color: var(--slate-500);
}

.seller-stats-meta {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--slate-600);
}

.my-post-stats {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  font-size: 12px;
  color: var(--slate-600);
}

.my-post-stats li {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-variant-numeric: tabular-nums;
}

.my-post-stats li.is-warning {
  color: var(--amber-700, #b45309);
  font-weight: 600;
}

@media (max-width: 560px) {
  .seller-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 8px;
  }
}

.profile-user-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.profile-avatar {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: var(--primary-700);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 700;
}

.profile-user-meta {
  flex: 1;
  min-width: 0;
}

.profile-user-name {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.profile-user-email,
.profile-user-phone {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--color-muted);
  line-height: 1.35;
  word-break: break-all;
}

.profile-user-meta .seller-rating {
  margin-top: 8px;
  flex-wrap: wrap;
  gap: 4px 6px;
  line-height: 1.35;
}

.profile-public-link {
  display: inline-flex;
  align-items: center;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-700);
  text-decoration: none;
}

.profile-public-link:hover,
.profile-public-link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.profile-edit-btn {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  color: var(--slate-600);
  background: var(--slate-100);
  border: 1px solid var(--color-border);
  transition: background 0.15s, color 0.15s;
}

.profile-edit-btn:hover {
  background: var(--primary-50);
  color: var(--primary-700);
  border-color: var(--primary-100);
}

.profile-edit-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--color-border);
}

.profile-edit-header .page-title {
  margin-bottom: 4px;
}

.profile-edit-header .page-lead {
  margin: 0;
  font-size: 13px;
}

.profile-section-title {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.profile-posts-section {
  margin-bottom: 4px;
}

.profile-tabs {
  display: flex;
  gap: 6px;
  margin: 0 -16px 12px;
  padding: 4px 16px;
  background: transparent;
  border: none;
  border-radius: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  touch-action: pan-x;
}

.profile-tabs::-webkit-scrollbar {
  display: none;
}

.profile-tab {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--slate-600);
  text-decoration: none;
  white-space: nowrap;
  background: var(--slate-100);
  border: 1px solid var(--color-border);
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.profile-tab:hover {
  color: var(--slate-900);
}

.profile-tab.is-active {
  background: var(--color-surface);
  color: var(--primary-800);
  border-color: var(--primary-100);
  box-shadow: var(--shadow-xs);
}

.profile-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--radius-full);
  background: var(--slate-200);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  color: var(--slate-700);
}

.profile-tab.is-active .profile-tab-count {
  background: var(--primary-50);
  color: var(--primary-800);
}

@media (min-width: 640px) {
  .profile-tabs {
    margin: 0 0 12px;
    padding: 4px;
    background: var(--slate-100);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    overflow: visible;
  }

  .profile-tab {
    flex: 1;
    font-size: 14px;
    background: transparent;
    border-color: transparent;
  }

  .profile-tab.is-active {
    border-color: transparent;
  }
}

.profile-tab-panel[hidden] {
  display: none !important;
}

.profile-settings-form {
  margin-bottom: 0;
}

.profile-account-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--color-border);
}

.profile-account-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--primary-700);
  cursor: pointer;
  text-decoration: none;
}

.profile-account-link:hover {
  color: var(--primary-600);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.profile-account-link-muted {
  color: var(--slate-500);
}

.profile-account-link-muted:hover {
  color: var(--slate-700);
}

.profile-logout-form {
  margin: 0;
}

.profile-account-link-danger {
  color: var(--color-danger);
}

.profile-account-link-danger:hover {
  color: var(--red-700, #b91c1c);
}

.profile-danger-zone {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--color-border);
}

.profile-danger-title {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--slate-800);
}

.profile-danger-hint {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--color-muted);
}

.profile-delete-warnings {
  margin: 0 0 24px;
  padding-left: 1.2em;
  font-size: 14px;
  line-height: 1.55;
  color: var(--slate-700);
}

.profile-delete-warnings li + li {
  margin-top: 6px;
}

.profile-delete-form {
  display: grid;
  gap: 10px;
}

.profile-empty-posts {
  background: var(--color-surface);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
}

.empty-state-compact {
  padding: 28px 16px;
}

.empty-state-compact .empty-state-icon {
  width: 36px;
  height: 36px;
  margin-bottom: 10px;
  color: var(--slate-300);
}

/* Auth pages */
.auth-page {
  max-width: 440px;
  margin: 0 auto;
  padding: 8px 0 40px;
}

.auth-page-wide {
  max-width: 480px;
}

.auth-card .page-title {
  margin-bottom: 6px;
  text-align: center;
}

.auth-card-header {
  text-align: center;
  margin-bottom: 24px;
}

.auth-card-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 14px;
  color: var(--primary-700);
}

.auth-card-icon-success {
  color: var(--green-600, #16a34a);
}

.auth-card .page-lead {
  margin-top: 0;
}

.auth-form .btn-block {
  margin-top: 6px;
}

.auth-footer {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--color-border);
  text-align: center;
  display: grid;
  gap: 12px;
}

.auth-footer-actions {
  gap: 10px;
}

.auth-switch {
  margin: 0;
  font-size: 14px;
  color: var(--color-muted);
}

.auth-switch a,
.auth-link {
  color: var(--primary-700);
  font-weight: 500;
  text-decoration: none;
}

.auth-switch a:hover,
.auth-link:hover {
  color: var(--primary-800);
  text-decoration: underline;
}

.auth-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 14px;
}

.auth-note {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-muted);
  text-align: center;
}

.field-has-error .input {
  border-color: var(--red-500, #ef4444);
}

.field-error {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--red-600, #dc2626);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .htmx-spinner { animation: none; border-top-color: var(--primary-600); }
  .btn:active { transform: none; }
  .category-carousel,
  .post-gallery-track,
  .post-card-track { scroll-behavior: auto; }
  .post-card { transition: none; }
}

/* Messages */
.header-nav-icon-badge,
.mobile-nav-icon-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-unread-badge,
.mobile-nav-badge {
  position: absolute;
  top: -5px;
  right: -7px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: var(--radius-full);
  background: var(--primary-700);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: -0.02em;
  border: 2px solid #fff;
  box-sizing: border-box;
  pointer-events: none;
}

.mobile-nav-badge {
  top: -2px;
  right: -8px;
}

.header-nav-link-messages .nav-unread-badge {
  margin-left: 0;
}

.mobile-nav-item {
  position: relative;
}

.messages-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 4px 0 40px;
}

.message-thread-page {
  max-width: 840px;
}

.message-chat-card {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}

.message-chat-card .message-post-context {
  margin-bottom: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
  border-bottom: 1px solid var(--color-border);
}

.message-chat-card .message-thread {
  margin-bottom: 0;
  border: none;
  border-radius: 0;
  background: var(--slate-50);
}

.message-chat-card .message-compose-form {
  padding: 14px;
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
}

.messages-page-header {
  margin-bottom: 20px;
}

.messages-page-header .page-title {
  margin-bottom: 6px;
}

.messages-page-header .page-lead {
  margin: 0;
  font-size: 14px;
  color: var(--color-muted);
  line-height: 1.5;
}

.conversation-list {
  display: grid;
  gap: 8px;
}

.conversation-row {
  position: relative;
  display: grid;
}

.conversation-row .conversation-item {
  padding-right: 48px;
}

.conversation-delete-form {
  position: absolute;
  top: 10px;
  right: 10px;
  margin: 0;
  z-index: 1;
}

.conversation-delete-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--slate-400);
  cursor: pointer;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.conversation-delete-btn:hover {
  color: var(--color-danger);
  background: #fef2f2;
  border-color: #fecaca;
}

.conversation-item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

@media (hover: hover) and (pointer: fine) {
  .conversation-item:hover {
    border-color: var(--primary-100);
    box-shadow: var(--shadow-xs);
  }
}

.conversation-item.is-unread {
  border-color: rgba(185, 28, 28, 0.25);
  background: linear-gradient(180deg, #fff, var(--primary-50));
}

.conversation-item-media {
  display: block;
  width: 56px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--slate-100);
}

.conversation-item-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.conversation-item-img-placeholder {
  display: grid;
  place-items: center;
  color: var(--slate-400);
}

.conversation-item-body {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.conversation-item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.conversation-item-post {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--slate-900);
}

.conversation-item-time {
  flex-shrink: 0;
  font-size: 11px;
  color: var(--color-muted);
  white-space: nowrap;
}

.conversation-item-user {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--slate-700);
}

.conversation-item-meta {
  margin: 0;
  font-size: 11px;
  color: var(--color-muted);
  line-height: 1.35;
}

.conversation-item-preview {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--slate-600);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.conversation-item-preview-muted {
  color: var(--slate-400);
  font-style: italic;
}

.conversation-unread-badge {
  align-self: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: var(--radius-full);
  background: var(--primary-700);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.messages-empty {
  text-align: center;
}

.messages-empty .btn {
  margin-top: 12px;
}

.message-thread-page .back-link {
  margin-bottom: 0;
}

.message-thread-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.message-thread-delete-form {
  margin: 0;
}

.message-thread-delete-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--slate-500);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.message-thread-delete-btn:hover {
  color: var(--color-danger);
  background: #fef2f2;
  border-color: #fecaca;
}

.message-post-context {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px;
  margin-bottom: 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
}

.message-post-context-media {
  display: block;
  width: 64px;
  height: 64px;
  border-radius: 8px;
  overflow: hidden;
}

.message-post-context-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.message-post-context-img-placeholder {
  display: grid;
  place-items: center;
  background: var(--slate-100);
  color: var(--slate-400);
}

.message-post-context-label {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--primary-700);
}

.message-post-context-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
}

.message-post-context-title-link {
  color: inherit;
  text-decoration: none;
}

.message-post-context-title-link:hover {
  color: var(--primary-700);
  text-decoration: underline;
}

.message-post-context-meta {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--color-muted);
  line-height: 1.4;
}

.message-post-context-note {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--amber-700);
}

.message-thread-header {
  margin-bottom: 12px;
}

.message-thread-participant {
  margin: 0;
  font-size: 14px;
  color: var(--slate-600);
}

.message-thread {
  min-height: 200px;
  max-height: min(52dvh, 520px);
  overflow-y: auto;
  padding: 12px;
  margin-bottom: 16px;
  background: var(--slate-50);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.message-thread:has(.message-thread-empty) {
  min-height: 0;
  max-height: none;
  padding: 28px 16px;
}

.message-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.message-bubble {
  max-width: min(78%, 420px);
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}

.message-bubble.is-mine {
  align-self: flex-end;
  background: var(--primary-700);
  border-color: var(--primary-700);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.message-bubble.is-theirs {
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.message-bubble.is-media-only {
  padding: 6px;
}

.message-bubble.is-media-only.is-mine {
  background: var(--color-surface);
  border-color: var(--color-border);
  color: inherit;
}

.message-bubble.is-media-only .message-bubble-image-link {
  margin-bottom: 0;
}

.message-bubble.is-media-only .message-bubble-meta {
  margin-top: 4px;
  padding: 0 4px;
}

.message-bubble-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.message-bubble-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.message-bubble.is-theirs .message-bubble-meta {
  justify-content: flex-start;
}

.message-bubble-time {
  font-size: 10px;
  opacity: 0.75;
}

.message-read-status {
  font-size: 10px;
  font-weight: 600;
  opacity: 0.9;
}

.message-read-status.is-read {
  opacity: 0.8;
}

.message-read-status.is-unread {
  opacity: 1;
}

.conversation-item-preview-unread {
  font-weight: 600;
  color: var(--slate-800);
}

.conversation-item-status {
  margin: 4px 0 0;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
}

.conversation-item-status-unread {
  color: var(--primary-700);
}

.conversation-item-status-read {
  color: var(--slate-500);
}

.conversation-item-status-pending {
  color: var(--slate-500);
}

.message-thread-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  text-align: center;
  color: var(--color-muted);
  font-size: 14px;
  line-height: 1.5;
}

.message-thread-empty p {
  margin: 0;
  max-width: 280px;
}

.message-compose-form {
  display: grid;
  gap: 10px;
}

.message-compose-input {
  min-height: 88px;
  resize: vertical;
}

.message-compose-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.message-compose-attach {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--slate-700);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.message-compose-attach:hover {
  background: var(--slate-50);
  border-color: var(--slate-300);
  color: var(--slate-900);
}

.message-compose-file {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.message-compose-preview {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.message-compose-preview-img {
  display: block;
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--color-border);
}

.message-compose-preview-clear {
  position: absolute;
  top: -6px;
  right: -6px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: var(--radius-full);
  background: var(--slate-800);
  color: #fff;
  cursor: pointer;
}

.message-compose-submit {
  min-height: 44px;
  margin-left: auto;
  padding: 0 16px;
}

.message-bubble-image-link {
  display: block;
  margin-bottom: 6px;
  line-height: 0;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  font: inherit;
  text-align: inherit;
}

.message-bubble-image {
  display: block;
  max-width: min(280px, 100%);
  max-height: 360px;
  width: auto;
  height: auto;
  border-radius: 10px;
  object-fit: cover;
}

.message-bubble.is-mine .message-bubble-image {
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.message-bubble.is-media-only.is-mine .message-bubble-image {
  border: 1px solid var(--color-border);
}

.conversation-item-preview-photo {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

body.page-messages .site-main {
  padding-bottom: calc(var(--mobile-nav-h) + 16px);
}

.feed-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.category-watch-form {
  margin: 0;
}

.category-watch-btn.is-active {
  border-color: var(--primary-100);
  color: var(--primary-700);
  background: var(--primary-50);
}

.bookmark-toggle-form {
  margin: 0;
}

.btn.is-bookmarked {
  border-color: var(--primary-100);
  color: var(--primary-700);
  background: var(--primary-50);
}

.bookmarks-page,
.notifications-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 4px 0 40px;
}

.bookmarks-page-header,
.notifications-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.bookmarks-page-header .page-title,
.notifications-page-header .page-title {
  margin: 0;
}

.bookmarks-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  padding: 4px;
  background: var(--slate-100);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
}

.bookmarks-tab {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--slate-600);
  text-decoration: none;
}

.bookmarks-tab.is-active {
  background: var(--color-surface);
  color: var(--primary-800);
  box-shadow: var(--shadow-xs);
}

.bookmarks-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--radius-full);
  background: var(--slate-200);
  font-size: 11px;
  font-weight: 700;
  color: var(--slate-700);
}

.bookmarks-tab.is-active .bookmarks-tab-count {
  background: var(--primary-50);
  color: var(--primary-800);
}

.bookmark-post-list,
.bookmark-category-list,
.notification-list {
  display: grid;
  gap: 8px;
}

.bookmark-post-row,
.bookmark-category-row {
  position: relative;
  display: grid;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.bookmark-post-link,
.bookmark-category-link {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px 48px 12px 12px;
  color: inherit;
  text-decoration: none;
}

.bookmark-category-link {
  grid-template-columns: 40px minmax(0, 1fr);
}

.bookmark-post-media,
.bookmark-post-img {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  overflow: hidden;
  object-fit: cover;
  display: block;
  background: var(--slate-100);
}

.bookmark-post-img-placeholder {
  display: grid;
  place-items: center;
  color: var(--slate-400);
}

.bookmark-post-title,
.bookmark-category-label {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
}

.bookmark-post-meta {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--color-muted);
}

.bookmark-post-note {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--amber-700, #b45309);
}

.bookmark-category-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--slate-100);
  color: var(--slate-600);
}

.bookmark-remove-form {
  position: absolute;
  top: 10px;
  right: 10px;
  margin: 0;
}

.bookmark-remove-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--slate-400);
  cursor: pointer;
}

.bookmark-remove-btn:hover {
  color: var(--color-danger);
  background: #fef2f2;
  border-color: #fecaca;
}

.bookmark-category-picker {
  margin-top: 24px;
}

.bookmark-section-title {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 700;
}

.bookmark-category-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bookmark-category-chip-form {
  margin: 0;
}

.bookmark-category-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  background: var(--color-surface);
  color: var(--slate-700);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.bookmark-category-chip.is-active {
  border-color: var(--primary-100);
  background: var(--primary-50);
  color: var(--primary-800);
}

.notifications-header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.notifications-mark-all-form,
.notifications-delete-all-form {
  margin: 0;
}

.notifications-delete-all-btn {
  color: var(--color-danger);
}

.notification-row {
  position: relative;
  display: grid;
}

.notification-row.is-unread .notification-item {
  border-color: rgba(185, 28, 28, 0.22);
  background: linear-gradient(180deg, #fff, var(--primary-50));
}

.notification-item-form {
  margin: 0;
}

.notification-item {
  width: 100%;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 14px 48px 14px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.notification-delete-form {
  position: absolute;
  top: 10px;
  right: 10px;
  margin: 0;
  z-index: 1;
}

.notification-delete-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--slate-400);
  cursor: pointer;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.notification-delete-btn:hover {
  color: var(--color-danger);
  background: #fef2f2;
  border-color: #fecaca;
}

.notification-item-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--slate-100);
  color: var(--slate-600);
}

.notification-item-body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.notification-item-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
}

.notification-item-text {
  font-size: 13px;
  color: var(--slate-600);
  line-height: 1.4;
}

.notification-item-time {
  font-size: 11px;
  color: var(--color-muted);
}

.notification-item-dot {
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: var(--radius-full);
  background: var(--primary-700);
}

.profile-account-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--radius-full);
  background: var(--primary-700);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

body.page-bookmarks .site-main,
body.page-notifications .site-main {
  padding-bottom: calc(var(--mobile-nav-h) + 16px);
}

@media (max-width: 767px) {
  .mobile-nav-item span {
    font-size: 10px;
  }
}

/* Seller profile & reviews */
.seller-profile-page,
.review-form-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 4px 0 40px;
}

.seller-profile-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding: 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}

.seller-profile-meta {
  flex: 1;
  min-width: 0;
}

.seller-profile-name {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.seller-rating {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--slate-700);
}

.seller-rating-empty {
  color: var(--color-muted);
}

.seller-rating .icon.is-filled,
.seller-review-score .icon.is-filled,
.post-seller-rating .icon.is-filled {
  color: var(--amber-600);
  fill: var(--amber-600);
}

.seller-rating-count,
.seller-profile-stats {
  color: var(--color-muted);
}

.seller-profile-stats {
  margin: 4px 0 0;
  font-size: 13px;
}

.seller-review-cta {
  margin-bottom: 24px;
}

.seller-profile-hint {
  margin: 0 0 24px;
  font-size: 14px;
  color: var(--color-muted);
}

.seller-section {
  margin-top: 28px;
}

.seller-section-title {
  margin: 0 0 14px;
  font-size: 17px;
  font-weight: 700;
}

.seller-posts-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (min-width: 640px) {
  .seller-posts-grid {
    gap: 16px;
  }
}

.seller-reviews-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.seller-review-item {
  padding: 14px 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.seller-review-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}

.seller-review-author {
  font-weight: 600;
  font-size: 14px;
}

.seller-review-score {
  display: inline-flex;
  gap: 2px;
  color: var(--slate-300);
}

.seller-review-date {
  margin-left: auto;
  font-size: 12px;
  color: var(--color-muted);
}

.seller-review-comment {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--slate-700);
  white-space: pre-wrap;
}

.seller-review-post {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--color-muted);
}

.seller-review-reply {
  margin-top: 12px;
  padding: 10px 12px;
  border-left: 3px solid var(--primary-700);
  background: var(--slate-50);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.seller-review-reply-label {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--slate-600);
}

.seller-review-reply-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--slate-700);
  white-space: pre-wrap;
}

.seller-review-reply-date {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--color-muted);
}

.seller-review-reply-form {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.seller-review-reply-form .btn {
  justify-self: start;
}

.seller-reviews-empty {
  margin: 0;
  font-size: 14px;
  color: var(--color-muted);
}

.post-seller-link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.post-seller-link:hover {
  color: var(--primary-700);
}

.post-seller-rating {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-weight: 600;
  color: var(--slate-700);
}

.message-participant-link {
  font-weight: 700;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.message-deal-confirm {
  margin-top: 10px;
}

.message-deal-form {
  margin: 0;
}

.message-deal-status,
.message-deal-hint {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.message-deal-status.is-success {
  color: var(--green-700, #15803d);
  font-weight: 600;
}

.message-deal-status.is-pending {
  color: var(--slate-600);
}

.message-deal-hint {
  margin-bottom: 8px;
  color: var(--slate-600);
}

.message-review-cta {
  margin: 10px 0 0;
}

.review-form-page .back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--color-muted);
}

.review-rating-fieldset {
  border: 0;
  margin: 0 0 20px;
  padding: 0;
}

.review-rating-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.review-rating-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}

.review-rating-option:has(input:checked) {
  border-color: var(--amber-600);
  background: var(--amber-50);
  color: var(--amber-800);
}

.review-rating-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.home-city-panel__actions,
.home-city-panel__popular {
  margin-top: 12px;
}
.home-city-panel__popular-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--slate-500);
  margin-bottom: 8px;
}
.home-city-panel__popular-list,
.home-city-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.home-geo-chip {
  appearance: none;
  border: 1px solid var(--color-border);
  background: var(--slate-50);
  border-radius: var(--radius-full);
  padding: 8px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--slate-700);
  cursor: pointer;
  line-height: 1.2;
}
.home-geo-chip:hover {
  border-color: var(--slate-300);
  color: var(--slate-900);
  background: #fff;
}

.post-location-block {
  margin: 0 0 20px;
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: #fff;
}
.post-location-title {
  margin: 0 0 6px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--slate-500);
}
.post-location-value {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--slate-700);
  overflow-wrap: anywhere;
}
.post-location-value a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.post-location-value a:hover {
  color: var(--color-primary);
}

.post-card-location {
  color: inherit;
  text-decoration: none;
  font-weight: 500;
}
.post-card-location:hover {
  color: var(--primary-700);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.city-autocomplete .is-loading {
  /* keep quiet — avoid painting the whole search bar pink */
  opacity: 0.92;
}

.search-bar--split:focus-within {
  border-color: var(--slate-300);
  box-shadow: var(--shadow-sm);
}

.search-bar-city-btn.is-active {
  color: var(--slate-800);
  background: transparent;
}

.search-bar-city-btn.is-active .search-bar-city-pin {
  color: var(--color-primary);
}

.search-bar-city-btn[aria-expanded="true"] {
  background: var(--slate-50);
  color: var(--slate-800);
}

/* Keep geo dropdown above sticky toolbar / categories */
.search-bar-city {
  overflow: visible;
}
.home-city-panel {
  z-index: 90;
}
.home-mobile-toolbar {
  overflow: visible;
}
