@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&family=DM+Serif+Display&display=swap');

:root {
  --primary: #C2B280;
  --secondary: #E8D5B7;
  --accent: #F5E6CC;
  --light: #8B7355;
  --bg: #FFFDE7;
  --white: #FFFFFF;
  --text: #1a2a3a;
  --text-muted: #6b7f93;
  --border: #d8e3ed;
  --error: #e74c3c;
  --success: #27ae60;
  --warning: #f39c12;
  --card-shadow: 0 2px 8px rgba(10, 61, 98, 0.08), 0 1px 3px rgba(10, 61, 98, 0.05);
  --card-hover: 0 8px 24px rgba(10, 61, 98, 0.12), 0 2px 8px rgba(10, 61, 98, 0.08);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
}

::selection {
  background: var(--accent);
  color: var(--white);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ========== APP SHELL ========== */
.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  padding: 24px 24px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.app-header::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(130, 204, 221, 0.1);
}

.app-header::after {
  content: '';
  position: absolute;
  bottom: -60%;
  left: -10%;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(96, 163, 188, 0.08);
}

.header-content {
  position: relative;
  z-index: 1;
}

.app-title {
  font-family: 'DM Serif Display', serif;
  font-size: 1.6rem;
  color: var(--white);
  font-weight: 400;
  letter-spacing: -0.02em;
}

.app-subtitle {
  color: var(--light);
  font-size: 0.85rem;
  font-weight: 300;
  margin-top: 2px;
}

.btn-add {
  position: relative;
  z-index: 1;
  background: var(--white);
  color: var(--primary);
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-add:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ========== TAB BAR ========== */
.tab-bar {
  display: flex;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.tab-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  position: relative;
  transition: color 0.2s ease;
}

.tab-btn.active {
  color: var(--primary);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 20%;
  right: 20%;
  height: 3px;
  background: var(--accent);
  border-radius: 3px 3px 0 0;
}

.tab-icon {
  font-size: 1.2rem;
}

.tab-label {
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}

/* ========== MAIN CONTENT ========== */
.app-main {
  flex: 1;
  padding: 16px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* ========== LISTINGS BOARD ========== */
.board-controls {
  margin-bottom: 16px;
}

.search-wrapper {
  position: relative;
  margin-bottom: 12px;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9rem;
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 12px 40px 12px 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.9rem;
  background: var(--white);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}

.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(96, 163, 188, 0.15);
}

.search-clear {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 4px;
}

.filter-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.category-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  flex: 1;
}

.pill {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--white);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.pill:hover {
  border-color: var(--accent);
  color: var(--secondary);
}

.pill.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.sort-select {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.82rem;
  background: var(--white);
  color: var(--text);
  outline: none;
  cursor: pointer;
  min-width: 160px;
}

.sort-select:focus {
  border-color: var(--accent);
}

/* ========== LISTINGS GRID ========== */
.listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.listing-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  cursor: pointer;
  transition: all 0.25s ease;
  border: 1px solid rgba(10, 61, 98, 0.04);
  animation: fadeInUp 0.4s ease both;
}

.listing-card:nth-child(1) { animation-delay: 0s; }
.listing-card:nth-child(2) { animation-delay: 0.05s; }
.listing-card:nth-child(3) { animation-delay: 0.1s; }
.listing-card:nth-child(4) { animation-delay: 0.15s; }
.listing-card:nth-child(5) { animation-delay: 0.2s; }
.listing-card:nth-child(6) { animation-delay: 0.25s; }
.listing-card:nth-child(7) { animation-delay: 0.3s; }
.listing-card:nth-child(8) { animation-delay: 0.35s; }

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.listing-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--card-hover);
}

.card-image-wrapper {
  position: relative;
  height: 180px;
  overflow: hidden;
  background: linear-gradient(135deg, #e8f0f7 0%, #d8e8f2 100%);
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.listing-card:hover .card-image {
  transform: scale(1.04);
}

.card-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  background: linear-gradient(135deg, rgba(96, 163, 188, 0.1), rgba(130, 204, 221, 0.15));
}

.sold-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--error);
  color: var(--white);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.interest-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--primary);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  backdrop-filter: blur(4px);
}

.card-body {
  padding: 14px 16px 16px;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-price {
  font-family: 'DM Serif Display', serif;
  font-size: 1.2rem;
  color: var(--primary);
  margin-bottom: 6px;
}

.card-address {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-category {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  background: rgba(96, 163, 188, 0.12);
  color: var(--secondary);
  font-size: 0.72rem;
  font-weight: 500;
}

.board-footer {
  text-align: center;
  padding: 16px;
  color: var(--text-muted);
  font-size: 0.82rem;
}

/* ========== EMPTY STATE ========== */
.empty-state {
  text-align: center;
  padding: 60px 24px;
}

.empty-icon {
  font-size: 3.5rem;
  margin-bottom: 16px;
}

.empty-state h3 {
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ========== SKELETON ========== */
.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  padding: 16px 0;
}

.skeleton-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

.skeleton-img {
  height: 180px;
  background: linear-gradient(90deg, #eef3f7 25%, #dfe8ef 50%, #eef3f7 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

.skeleton-text {
  height: 14px;
  margin: 12px 16px;
  border-radius: 7px;
  background: linear-gradient(90deg, #eef3f7 25%, #dfe8ef 50%, #eef3f7 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

.skeleton-text.wide { width: 70%; }
.skeleton-text.narrow { width: 40%; margin-bottom: 16px; }

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-pulse {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #eef3f7 25%, #dfe8ef 50%, #eef3f7 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

/* ========== MAP VIEW ========== */
.map-view {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.map-stats-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.map-stat {
  font-size: 0.85rem;
  color: var(--secondary);
  font-weight: 500;
}

.map-stat.muted {
  color: var(--text-muted);
  font-weight: 400;
}

.map-container {
  width: 100%;
  height: 420px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border);
  position: relative;
}

.map-skeleton {
  width: 100%;
  height: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--white);
  border-radius: var(--radius);
  color: var(--text-muted);
}

.map-empty-overlay {
  text-align: center;
  padding: 40px 24px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
}

.map-legend {
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--card-shadow);
}

.map-legend h4 {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.legend-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: none;
  background: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: background 0.15s ease;
  width: 100%;
}

.legend-item:hover {
  background: rgba(96, 163, 188, 0.08);
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.legend-title {
  flex: 1;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.legend-price {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
}

/* ========== MODAL ========== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 30, 50, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background: var(--white);
  border-radius: var(--radius-lg);
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(10, 61, 98, 0.2);
  animation: slideUp 0.3s ease;
  position: relative;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--primary);
}

.modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--bg);
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 5;
}

.modal-close:hover {
  background: var(--border);
  color: var(--text);
}

/* ========== LISTING FORM ========== */
.listing-form {
  padding: 20px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.photo-upload-area {
  margin-bottom: 4px;
}

.photo-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 32px;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
  background: rgba(96, 163, 188, 0.03);
}

.photo-dropzone:hover {
  border-color: var(--accent);
  background: rgba(96, 163, 188, 0.08);
}

.file-input {
  display: none;
}

.dropzone-icon {
  font-size: 2rem;
}

.dropzone-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.photo-preview-wrapper {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
}

.photo-preview {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius);
}

.photo-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.6);
  color: var(--white);
  cursor: pointer;
  font-size: 0.8rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.form-row {
  display: flex;
  gap: 12px;
}

.form-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--secondary);
  letter-spacing: 0.01em;
}

.form-input {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  background: var(--white);
}

.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(96, 163, 188, 0.15);
}

.form-input.input-error {
  border-color: var(--error);
}

.form-textarea {
  resize: vertical;
  min-height: 70px;
}

.error-text {
  font-size: 0.75rem;
  color: var(--error);
  font-weight: 500;
}

.form-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: -8px;
}

.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}

.btn-primary {
  padding: 11px 24px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(10, 61, 98, 0.25);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  padding: 11px 20px;
  background: var(--bg);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: var(--border);
}

/* ========== DETAIL MODAL ========== */
.detail-modal {
  max-width: 520px;
}

.detail-image-wrapper {
  position: relative;
  width: 100%;
  height: 280px;
  overflow: hidden;
}

.detail-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-image-placeholder {
  position: relative;
  width: 100%;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(96, 163, 188, 0.1), rgba(130, 204, 221, 0.2));
}

.placeholder-emoji {
  font-size: 4rem;
}

.sold-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(231, 76, 60, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.detail-body {
  padding: 20px 24px 24px;
}

.detail-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 8px;
}

.detail-title {
  font-family: 'DM Serif Display', serif;
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--text);
  flex: 1;
}

.detail-price {
  font-family: 'DM Serif Display', serif;
  font-size: 1.6rem;
  color: var(--primary);
  white-space: nowrap;
}

.detail-category {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 14px;
  background: rgba(96, 163, 188, 0.12);
  color: var(--secondary);
  font-size: 0.78rem;
  font-weight: 500;
  margin-bottom: 12px;
}

.detail-address {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  padding: 10px 14px;
  background: var(--bg);
  border-radius: var(--radius-sm);
}

.address-icon {
  font-size: 1.1rem;
}

.detail-description {
  margin-bottom: 16px;
}

.detail-description h4 {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  margin-bottom: 6px;
}

.detail-description p {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text);
}

.detail-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.meta-item {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.detail-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-interest {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, var(--accent), var(--light));
  color: var(--primary);
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-interest:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(96, 163, 188, 0.3);
}

.owner-actions {
  display: flex;
  gap: 10px;
}

.btn-sold {
  flex: 1;
  padding: 10px;
  background: var(--bg);
  color: var(--success);
  border: 1px solid var(--success);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-sold:hover {
  background: rgba(39, 174, 96, 0.08);
}

.btn-sold.is-sold {
  color: var(--secondary);
  border-color: var(--secondary);
}

.btn-delete {
  flex: 1;
  padding: 10px;
  background: var(--bg);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-delete:hover {
  color: var(--error);
  border-color: var(--error);
}

.btn-delete.confirming {
  background: var(--error);
  color: var(--white);
  border-color: var(--error);
}

/* ========== MAP POPUP ========== */
.map-popup {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.85rem;
  line-height: 1.5;
}

.popup-price {
  font-weight: 600;
  color: var(--primary);
}

.popup-address {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.popup-sold {
  display: inline-block;
  padding: 2px 8px;
  background: var(--error);
  color: white;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  margin-top: 4px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 640px) {
  .app-header {
    padding: 18px 16px 16px;
  }

  .app-title {
    font-size: 1.3rem;
  }

  .btn-add {
    padding: 8px 14px;
    font-size: 0.82rem;
  }

  .app-main {
    padding: 12px;
  }

  .listings-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
  }

  .card-image-wrapper {
    height: 140px;
  }

  .card-body {
    padding: 10px 12px 12px;
  }

  .card-title {
    font-size: 0.85rem;
  }

  .card-price {
    font-size: 1rem;
  }

  .form-row {
    flex-direction: column;
    gap: 12px;
  }

  .filter-row {
    flex-direction: column;
  }

  .sort-select {
    width: 100%;
  }

  .category-pills {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }

  .map-container {
    height: 320px;
  }

  .modal-content {
    max-height: 95vh;
    border-radius: var(--radius) var(--radius) 0 0;
    align-self: flex-end;
  }

  .detail-image-wrapper {
    height: 220px;
  }

  .detail-header-row {
    flex-direction: column;
    gap: 4px;
  }

  .owner-actions {
    flex-direction: column;
  }
}

@media (min-width: 1024px) {
  .listings-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }

  .map-container {
    height: 520px;
  }
}
```

<!-- WALKTHROUGH_SCRIPT:
[
  {"step": 1, "narration": "Welcome to Yard Sale Board — your neighborhood garage sale hub! Browse items listed for sale, view them on a map, or manage your own listings.", "view": "default", "highlight_selector": ".app-header", "wait_for": "tap_to_continue"},
  {"step": 2, "narration": "Use the search bar and category filters to find exactly what you're looking for. Sort by price or newest listings.", "view": "default", "highlight_selector": ".board-controls", "wait_for": "tap_to_continue"},
  {"step": 3, "narration": "Tap any listing card to see full details, including the description, address, and how many people are interested.", "view": "default", "highlight_selector": ".listings-grid", "wait_for": "tap_to_continue"},
  {"step": 4, "narration": "Switch to the Map tab to see items plotted on an interactive map. Items with coordinates show as clickable markers.", "view": "default", "highlight_selector": ".tab-btn:nth-child(2)", "wait_for": "user_interaction"},
  {"step": 5, "narration": "Ready to sell something? Tap '+ List Item' to add a photo, set a price, describe your item, and enter your address.", "view": "default", "highlight_selector": ".btn-add", "wait_for": "user_interaction"},
  {"step": 6, "narration": "The 'My Items' tab shows only your listings. From there you can mark items as sold or delete them when they're gone.", "view": "default", "highlight_selector": ".tab-btn:nth-child(3)", "wait_for": "tap_to_continue"}
]
-->

.card-seller {
  font-size: 0.78rem;
  color: var(--secondary);
  font-weight: 600;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.price-select {
  min-width: 170px;
}

@media (max-width: 640px) {
  .price-select {
    width: 100%;
  }
}

.detail-share {
  margin-bottom: 16px;
}

.detail-share h4 {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  margin-bottom: 6px;
}

.detail-share-hint {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.detail-share-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-share {
  width: 100%;
  padding: 12px 14px;
  background: linear-gradient(135deg, var(--secondary), var(--accent));
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-share:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(10, 61, 98, 0.18);
}

.btn-share:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.detail-share-link {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.82rem;
  outline: none;
}

.detail-share-link:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(96, 163, 188, 0.15);
}

.success-text {
  font-size: 0.75rem;
  color: var(--success);
  font-weight: 500;
}

.detail-share-textarea {
  resize: vertical;
  min-height: 96px;
}
