/* Dashboard-specific styles from original dashboard.html */

.notif-panel {
  position: fixed; top: 70px; right: 40px; width: 340px; max-height: 0;
  background: var(--forest); border: 1px solid var(--forest-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  overflow: hidden; opacity: 0; pointer-events: none;
  transform: translateY(-6px);
  transition: max-height .28s ease, opacity .22s ease, transform .22s ease;
  z-index: 50;
}

.notif-panel.open { max-height: 420px; opacity: 1; pointer-events: auto; transform: translateY(0); }

.notif-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px 10px; border-bottom: 1px solid var(--forest-border);
}

.notif-head h3 { font-size: 15px; }
.notif-head span { font-size: 11.5px; color: var(--muted-dim); }

.notif-list { max-height: 340px; overflow-y: auto; }

.notif-item {
  display: flex; gap: 11px; padding: 13px 18px;
  border-bottom: 1px solid var(--forest-border);
  align-items: flex-start;
}

a.notif-item-link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: background .15s ease;
}

a.notif-item-link:hover {
  background: var(--forest-hover);
}

.notif-item:last-child { border-bottom: none; }
.notif-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); margin-top: 6px; flex-shrink: 0; }
.notif-item.read .notif-dot { background: transparent; }

.notif-icon {
  width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0;
  background: var(--forest-hover);
  display: flex; align-items: center; justify-content: center;
  color: var(--mint); font-size: 14px;
}

.notif-body p { margin: 0; font-size: 12.8px; line-height: 1.45; color: var(--white); }
.notif-body p b { color: var(--mint); font-weight: 600; }
.notif-time { font-size: 11px; color: var(--muted-dim); margin-top: 2px; display: block; }

.notif-mark-all {
  display: block; width: 100%; padding: 10px;
  background: transparent; border: none; border-top: 1px solid var(--forest-border);
  color: var(--mint); font-size: 12px; font-weight: 600; text-align: center;
}

.notification-settings-card {
  margin-top: 24px;
  padding: 22px;
  background: var(--forest);
  border: 1px solid var(--forest-border);
  border-radius: var(--radius-md);
}

.settings-section-heading h2 { margin: 0; font-size: 17px; }
.settings-section-heading p { margin: 6px 0 18px; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.notification-master-toggle { padding-bottom: 16px; border-bottom: 1px solid var(--forest-border); }
.notification-master-toggle label,
.notification-preference-row { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13px; }
.notification-master-toggle input,
.notification-preference-row input { accent-color: var(--mint); width: 17px; height: 17px; flex: 0 0 auto; }
.notification-master-toggle .field-hint { margin: 7px 0 0 27px; }
.notification-preference-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; padding: 16px 0 4px; }
.notification-preference-row { min-height: 34px; color: var(--white); }

@media (max-width: 560px) {
  .notification-settings-card { padding: 17px 14px; }
  .notification-preference-grid { grid-template-columns: 1fr; gap: 8px; }
  .notif-panel { top: 62px; max-height: calc(100vh - 80px); }
  .notif-list { max-height: calc(100vh - 170px); }
}

.hero {
  margin: 18px 40px 6px;
  background: radial-gradient(120% 160% at 15% 0%, var(--hero-glow) 0%, var(--forest) 55%, var(--forest) 100%);
  border: 1px solid var(--forest-border);
  border-radius: var(--radius-lg);
  padding: 28px 30px 24px;
  box-shadow: var(--shadow-soft);
}

.hero-top {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 20px; flex-wrap: wrap; margin-bottom: 20px;
}

.hero-top h2 { font-size: 19px; }
.hero-top p { margin: 6px 0 0; font-size: 12.5px; color: var(--muted); max-width: 440px; line-height: 1.5; }

.overlap-pill {
  background: var(--forest-hover); border: 1px solid var(--mint-dim);
  color: var(--mint); padding: 8px 14px; border-radius: 100px;
  font-size: 12.5px; font-weight: 600; white-space: nowrap;
}

.overlap-pill strong { font-family: 'Fraunces', serif; font-weight: 600; margin-right: 4px; }

.ribbon-day-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.ribbon-today-btn {
  border-color: var(--mint-dim);
  color: var(--mint);
}

.ribbon-day-btn {
  min-width: 72px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--forest-border);
  background: var(--forest-light);
  color: var(--white);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease;
}

.ribbon-day-btn:hover {
  border-color: var(--mint-dim);
  background: var(--forest-hover);
}

.ribbon-day-btn:disabled {
  opacity: 0.55;
  cursor: wait;
}

.ribbon-day-picker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.ribbon-day-picker-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.ribbon-day-input {
  min-width: 170px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--forest-border);
  background: var(--forest-light);
  color: var(--white);
  font: inherit;
  font-size: 13px;
}

.ribbon-day-input.hidden { display: none; }

.ribbon { display: flex; gap: 3px; align-items: stretch; }

.ribbon-block {
  flex: 1; height: 44px; border-radius: 6px;
  background: var(--forest-light);
  border: 1px solid var(--forest-border);
  position: relative;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}

.ribbon-block:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 2px;
}

.ribbon-block.free {
  background: rgba(var(--mint-rgb), .42);
  border-color: var(--mint);
  box-shadow: inset 0 0 0 1px rgba(var(--mint-rgb), .16);
}

.ribbon-block.overlap { background: var(--mint); border-color: var(--mint); }

.ribbon-block.overlap::after {
  content: ''; position: absolute; inset: -4px; border-radius: 9px;
  box-shadow: 0 0 0 1px var(--mint), 0 0 18px 1px rgba(var(--mint-rgb), .45);
  pointer-events: none;
}

.ribbon-labels { display: flex; justify-content: space-between; margin-top: 8px; padding: 0 1px; }
.ribbon-labels span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-size: 9px;
  color: var(--muted-dim);
  text-align: center;
  white-space: nowrap;
}

.ribbon-details {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 14px;
  padding: 12px 14px;
  background: var(--forest-light);
  border: 1px solid var(--mint-dim);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 12px;
}

.ribbon-details.hidden { display: none; }
.ribbon-details > strong { color: var(--mint); }
.ribbon-friends { display: flex; flex-wrap: wrap; gap: 8px; }

.ribbon-friend {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px 4px 4px;
  background: var(--forest);
  border: 1px solid var(--forest-border);
  border-radius: 999px;
  color: var(--white);
}

.ribbon-friend:hover {
  border-color: var(--mint);
  color: var(--mint);
}

.ribbon-friend-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.availability-list { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }

.availability-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--forest-light); border: 1px solid var(--forest-border);
  border-radius: var(--radius-sm); padding: 12px 14px;
}

.availability-time { font-size: 13px; font-weight: 600; color: var(--mint); }
.availability-label { font-size: 11px; color: var(--muted-dim); text-transform: uppercase; letter-spacing: .1em; }

.tabs {
  display: flex; gap: 6px; background: var(--forest);
  border: 1px solid var(--forest-border); padding: 4px; border-radius: 100px;
}

.tab {
  border: none; background: transparent; color: var(--muted);
  font-size: 12.5px; font-weight: 500; padding: 7px 14px; border-radius: 100px;
  transition: background .15s ease, color .15s ease;
}

.tab.active { background: var(--mint); color: var(--ink); font-weight: 600; }
.tab:not(.active):hover { color: var(--white); }

.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.plans-row {
  display: flex;
  overflow-x: auto;
  gap: 16px;
  padding: 2px 2px 12px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: var(--mint-dim) var(--forest-light);
}

.plans-row::-webkit-scrollbar { height: 8px; }
.plans-row::-webkit-scrollbar-track { background: var(--forest-light); border-radius: 999px; }
.plans-row::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, var(--mint-dim), var(--gold));
  border-radius: 999px;
}

.plans-row .plan-card {
  flex: 0 0 min(360px, 82vw);
  scroll-snap-align: start;
}

/* Confirmed plans are the shared success state for people and venues. */
.plan-section-accepted {
  position: relative;
  padding: 20px 18px 22px;
  border: 1px solid rgba(var(--gold-rgb), .5);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(90% 150% at 8% 0%, rgba(var(--gold-rgb), .18), transparent 62%),
    linear-gradient(135deg, rgba(var(--mint-rgb), .08), rgba(var(--forest), .92));
  box-shadow: 0 0 26px rgba(var(--gold-rgb), .12), 0 12px 30px rgba(0, 0, 0, .16);
}

.plan-section-accepted .section-head h2 {
  color: var(--gold);
  text-shadow: 0 0 16px rgba(var(--gold-rgb), .42);
}

.plan-section-accepted .plan-card {
  border-color: rgba(var(--gold-rgb), .42);
  background: linear-gradient(145deg, rgba(var(--gold-rgb), .14), var(--forest));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 0 18px rgba(var(--gold-rgb), .1);
}

.plan-section-accepted .plan-card:hover {
  border-color: var(--gold);
  box-shadow: 0 0 24px rgba(var(--gold-rgb), .22);
}

.venue-plans-section {
  position: relative;
  padding-top: 22px;
  padding-bottom: 24px;
}

.venue-plans-section::before,
.venue-plans-section::after {
  content: '';
  display: block;
  height: 2px;
  margin: 0 2px 20px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--mint), var(--gold), var(--mint), transparent);
  box-shadow: 0 0 9px rgba(var(--mint-rgb), .72), 0 0 18px rgba(var(--gold-rgb), .32);
}

.venue-plans-section::after {
  margin: 22px 2px 0;
}

.venue-plans-section .section-head h2 {
  color: var(--mint);
  text-shadow: 0 0 15px rgba(var(--mint-rgb), .42);
}

.venue-plans-section .plan-card {
  border-color: rgba(var(--mint-rgb), .42);
  background: linear-gradient(145deg, rgba(var(--mint-rgb), .13), var(--forest));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 0 18px rgba(var(--mint-rgb), .1);
}

.venue-plans-section .plan-card:hover {
  border-color: var(--mint);
  box-shadow: 0 0 24px rgba(var(--mint-rgb), .2);
}

.business-profile-page {
  width: min(1120px, calc(100% - 80px));
  margin: 28px auto 56px;
}

.business-profile-heading {
  margin: 8px 0 20px;
}

.business-profile-heading h1 {
  font-size: 28px;
  margin: 4px 0 6px;
}

.business-profile-heading > p:last-child {
  color: var(--muted);
  font-size: 13px;
}

.business-profile-eyebrow,
.business-profile-label {
  color: var(--mint);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.business-profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.business-profile-hero,
.business-profile-card {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: var(--forest);
  border: 1px solid var(--forest-border);
  border-radius: var(--radius-lg);
  padding: 26px 30px;
}

.business-profile-card {
  display: block;
  margin: 0;
  min-width: 0;
  box-shadow: var(--shadow-soft);
}

.business-profile-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--forest-border);
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.business-profile-card-number {
  color: var(--muted-dim);
  font-size: 11px;
  font-weight: 500;
}

.business-identity-card { display: flex; }
.business-identity-content { display: flex; align-items: center; gap: 18px; }
.business-identity-content h2 { font-size: 21px; margin: 5px 0 6px; }
.business-identity-content .business-profile-type { margin: 0; }
.business-details-card { min-height: 190px; }
.business-detail-list { display: flex; flex-direction: column; gap: 14px; }
.business-detail-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px solid var(--forest-border);
}
.business-detail-row:last-child { border-bottom: 0; }
.business-detail-row span { color: var(--muted-dim); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.business-detail-row strong { color: var(--white); font-size: 13px; text-align: right; }
.business-description-card { min-height: 120px; }
.business-posts-card { grid-column: 1 / -1; padding-bottom: 24px; }
.business-posts-intro { color: var(--muted); font-size: 13px; margin: -4px 0 18px; }

.business-comments-card {
  grid-column: 1 / -1;
  background: linear-gradient(145deg, rgba(var(--gold-rgb), .08), var(--forest));
  border-color: rgba(var(--gold-rgb), .28);
}

.business-comments-card .business-profile-card-title { border-bottom-color: rgba(var(--gold-rgb), .25); }
.business-comments-card .business-profile-card-title > span:first-child {
  color: var(--gold);
  text-shadow: 0 0 12px rgba(var(--gold-rgb), .35);
}

.business-comment-form {
  margin-bottom: 24px;
  padding: 16px;
  border: 1px solid var(--forest-border);
  border-radius: var(--radius-md);
  background: var(--forest-light);
}

.business-comment-form .form-group { margin-bottom: 14px; }
.business-comment-form select,
.business-comment-form textarea { width: 100%; box-sizing: border-box; }
.business-comment-form textarea { resize: vertical; }

.business-comments-list { display: grid; gap: 12px; }
.business-comment {
  padding: 16px;
  border: 1px solid rgba(var(--gold-rgb), .22);
  border-radius: var(--radius-md);
  background: var(--forest-light);
}
.business-comment-meta { display: flex; flex-wrap: wrap; gap: 5px 12px; align-items: baseline; }
.business-comment-meta strong { color: var(--white); font-size: 13px; }
.business-comment-meta span { color: var(--muted-dim); font-size: 11px; }
.business-comment-body { margin: 12px 0 0; color: var(--white); line-height: 1.6; white-space: pre-wrap; }
.business-comment-image { display: block; width: min(100%, 420px); max-height: 280px; object-fit: cover; margin-top: 14px; border-radius: var(--radius-sm); }

.business-dashboard-post-layout {
  display: grid;
  grid-template-columns: minmax(260px, .75fr) minmax(0, 1.25fr);
  gap: 18px;
  align-items: start;
}

.business-post-form {
  background: var(--forest-light);
  border: 1px solid var(--forest-border);
  border-radius: var(--radius-md);
  padding: 18px;
}

.business-post-grid-dashboard { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) {
  .business-post-grid-dashboard { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .business-post-grid-dashboard { grid-template-columns: 1fr; }
}

.business-profile-logo {
  width: 104px;
  height: 104px;
  flex: 0 0 104px;
  border-radius: 18px;
  object-fit: cover;
}

.business-profile-logo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gold);
  color: var(--ink);
  font: 600 42px 'Fraunces', serif;
}

.business-profile-type {
  color: var(--mint);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .12em;
  margin: 2px 0 5px;
}

.business-profile-hero h1 { font-size: 26px; }
.business-profile-address { color: var(--muted); margin-top: 6px; }
.business-profile-description { color: var(--white); max-width: 680px; line-height: 1.6; margin: 12px 0 16px; }

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

.business-post-card {
  display: flex;
  flex-direction: column;
  background: var(--forest);
  border: 1px solid var(--forest-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  min-width: 0;
  aspect-ratio: 1 / 1.08;
  box-shadow: 0 10px 24px -18px rgba(0, 0, 0, .7);
  transition: transform .18s ease, border-color .18s ease;
}

.business-post-card:hover {
  border-color: var(--mint-dim);
  transform: translateY(-2px);
}

.business-post-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.business-post-image-button {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: 220px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  background: var(--forest-light);
  cursor: zoom-in;
  flex: 0 0 auto;
}

.business-post-image-button .business-post-image {
  width: 100%;
  height: 100%;
  transition: transform .18s ease;
}

.business-post-image-button:hover .business-post-image { transform: scale(1.06); }

.business-post-grid-full {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 900px) {
  .business-post-grid,
  .business-post-grid-full {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .business-post-grid,
  .business-post-grid-full {
    grid-template-columns: 1fr;
  }
}

.image-lightbox.hidden { display: none; }
.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
}

.image-lightbox-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(3, 12, 8, .88);
  cursor: zoom-out;
}

.image-lightbox-panel {
  position: relative;
  z-index: 1;
  max-width: min(900px, 92vw);
  max-height: 90vh;
}

.image-lightbox-panel img {
  display: block;
  max-width: 100%;
  max-height: 86vh;
  object-fit: contain;
  border: 1px solid var(--forest-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}

.image-lightbox-close {
  position: absolute;
  top: -14px;
  right: -14px;
  z-index: 2;
  width: 32px;
  height: 32px;
  border: 1px solid var(--forest-border);
  border-radius: 50%;
  background: var(--forest);
  color: var(--white);
  font-size: 22px;
  line-height: 1;
}

body.image-lightbox-open { overflow: hidden; }

.business-post-content {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}
.business-post-card p {
  padding: 0;
  margin: 0;
  line-height: 1.5;
  color: var(--white);
  font-size: 13px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.business-post-date {
  display: block;
  margin-top: auto;
  padding-top: 10px;
  color: var(--muted-dim);
  font-size: 11px;
}

.business-post-actions {
  display: flex;
  gap: 8px;
  padding: 0 0 16px;
}

.business-post-actions .btn-secondary,
.business-post-actions .btn-danger {
  font-size: 11px;
  padding: 6px 11px;
}

.plan-card {
  background: var(--forest); border: 1px solid var(--forest-border);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex; flex-direction: column; gap: 14px;
  transition: border-color .18s ease, transform .18s ease;
}

.plan-card:hover { border-color: var(--forest-hover); transform: translateY(-2px); }

.plan-card-expired {
  border-color: var(--muted-dim) !important;
  background: linear-gradient(145deg, rgba(160, 170, 180, .12), var(--forest));
  color: var(--muted);
}

.plan-card-expired:hover { border-color: var(--muted) !important; }
.plan-expired-flag {
  display: inline-block;
  max-width: 170px;
  color: var(--muted);
  border: 1px solid var(--muted-dim);
  border-radius: 999px;
  padding: 6px 9px;
  font-size: 10px;
  line-height: 1.25;
  text-align: center;
}

.plan-top { display: flex; gap: 12px; align-items: flex-start; }

.plan-icon {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  background: var(--forest-hover);
  display: flex; align-items: center; justify-content: center;
  color: var(--mint);
}

.plan-icon svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.6; }

.plan-info { flex: 1; min-width: 0; }
.plan-info h3 { font-size: 16px; color: var(--white); }

.plan-meta {
  margin: 5px 0 0; font-size: 12px; color: var(--muted);
  display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center;
}

.plan-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted-dim); }
.spots-left { color: var(--gold); }

.plan-actions { display: flex; gap: 8px; flex-shrink: 0; flex-direction: column; }

.join-btn, .open-btn {
  flex-shrink: 0; border: 1px solid var(--mint-dim); background: transparent;
  color: var(--mint); font-size: 12px; font-weight: 600;
  padding: 8px 14px; border-radius: 100px;
  transition: background .15s ease, color .15s ease;
  text-align: center;
}

.join-btn:hover, .open-btn:hover { background: var(--forest-hover); }
.join-btn.joined { background: var(--mint); color: var(--ink); border-color: var(--mint); }

.plan-toggles { display: flex; gap: 8px; }

.toggle-btn {
  flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: var(--forest-light); border: 1px solid var(--forest-border);
  color: var(--muted); font-size: 11.5px; font-weight: 500;
  padding: 9px 12px; border-radius: var(--radius-sm);
  transition: background .15s ease, color .15s ease;
}

.toggle-btn:hover { color: var(--white); background: var(--forest-hover); }

.toggle-btn .tcount {
  background: var(--forest-hover); color: var(--white);
  font-size: 10.5px; font-weight: 700;
  min-width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

.toggle-btn.open { color: var(--mint); border-color: var(--mint-dim); }
.toggle-btn.open .tcount { background: var(--mint); color: var(--ink); }

.chev { width: 11px; height: 11px; stroke: currentColor; fill: none; stroke-width: 2; transition: transform .18s ease; }
.toggle-btn.open .chev { transform: rotate(180deg); }

.expand {
  max-height: 0; overflow: hidden; opacity: 0;
  transition: max-height .22s ease, opacity .18s ease;
}

.expand.open { max-height: 260px; opacity: 1; }

.people-list { display: flex; flex-direction: column; gap: 9px; padding-top: 2px; }

.person-row { display: flex; align-items: center; gap: 10px; }

.person-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
  overflow: hidden;
  background: var(--forest-hover);
}

.person-row > a,
.friend-row-main > a:first-child {
  display: inline-flex;
  flex-shrink: 0;
  line-height: 0;
}

.join-blocked {
  font-size: 11px;
  font-weight: 600;
  color: var(--gold);
  padding: 6px 10px;
  border: 1px solid rgba(var(--gold-rgb), 0.35);
  border-radius: 100px;
  white-space: nowrap;
}

.plan-expired-detail-flag {
  display: inline-block;
  margin-left: 8px;
  padding: 4px 8px;
  border: 1px solid var(--muted-dim);
  border-radius: 999px;
  color: var(--muted);
  font-size: 10px;
}

.plan-expired-detail-box {
  margin: 8px 0 16px;
  padding: 12px 14px;
  border: 1px solid var(--muted-dim);
  border-radius: var(--radius-sm);
  background: rgba(160, 170, 180, .10);
  color: var(--muted);
  font-size: 12px;
}

.join-block-box {
  flex: 1;
  min-width: 220px;
  background: rgba(var(--gold-rgb), 0.08);
  border: 1px solid rgba(var(--gold-rgb), 0.25);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.conflict-plan-list {
  margin: 8px 0 0;
  padding-left: 18px;
  font-size: 12px;
  color: var(--muted);
}

.conflict-plan-list a { color: var(--mint); }
.person-name { font-size: 12.5px; color: var(--white); flex: 1; }
.person-name a { color: var(--white); text-decoration: none; }
.person-name a:hover { color: var(--mint); text-decoration: underline; }
.member-remove-btn {
  border: 1px solid rgba(var(--danger-rgb), .35);
  background: transparent;
  color: var(--danger);
  font-size: 10px;
  padding: 4px 8px;
  border-radius: 999px;
}
.member-remove-btn:hover { background: rgba(var(--danger-rgb), .1); }
.person-tag { font-size: 10.5px; color: var(--muted-dim); }

.friend-available-card {
  background: var(--forest);
  border: 1px solid var(--forest-border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  min-height: 72px;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}

a.friend-available-card:hover {
  border-color: rgba(var(--mint-rgb), 0.45);
  background: var(--forest-hover);
  transform: translateY(-1px);
}

.friends-available-section .friends-available-hint {
  margin: -6px 0 14px;
}

.friends-available-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.friend-available-avatar {
  flex: 0 0 auto;
  line-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.friend-available-card .avatar-ring-wrap {
  width: auto;
  height: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.friend-available-card .avatar-ring-wrap .person-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
}

.friend-available-card .avatar-ring-wrap .person-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.friend-available-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
}

.friend-available-name {
  font-size: 14px;
  font-family: 'Work Sans', sans-serif;
  font-weight: 600;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.friend-available-username {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.friend-available-time {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--mint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.friend-available-info h4 { font-size: 14px; margin: 0 0 4px; font-family: 'Work Sans', sans-serif; font-weight: 600; color: var(--white); }
.friend-available-info p { margin: 0; font-size: 12px; color: var(--mint); }

.profile-status-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.profile-status-dot {
  font-size: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--forest-border);
  color: var(--muted);
}

.profile-status-dot.free { color: var(--mint); border-color: var(--mint-dim); }
.profile-status-dot.invited { color: var(--gold); border-color: var(--gold); }
.profile-status-dot.busy { color: var(--danger); border-color: var(--danger); }

.profile-availability-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.profile-availability-card {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 76px;
  padding: 13px 15px;
  background: var(--forest);
  border: 2px solid var(--forest-border);
  border-radius: var(--radius-md);
  color: inherit;
  text-decoration: none;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}

.profile-availability-card:hover { transform: translateY(-1px); background: var(--forest-hover); }
.profile-availability-card.status-free { border-color: var(--mint); }
.profile-availability-card.status-invited { border-color: var(--gold); }
.profile-availability-card.status-busy { border-color: var(--danger); }

.profile-availability-card .avatar-ring-wrap { width: auto; height: auto; }
.profile-availability-card .avatar-ring-wrap .person-avatar { width: 44px; height: 44px; }
.profile-availability-card .avatar-ring-free { box-shadow: 0 0 0 3px var(--mint); }
.profile-availability-card .avatar-ring-invited { box-shadow: 0 0 0 3px var(--gold); }
.profile-availability-card .avatar-ring-busy { box-shadow: 0 0 0 3px var(--danger); }
.profile-availability-card .avatar-ring-invited::after,
.profile-availability-card .avatar-ring-busy::after { content: '⚑'; width: auto; height: auto; border: 0; background: transparent; color: inherit; font-size: 13px; bottom: -7px; right: -7px; }
.profile-availability-card .avatar-ring-invited::after { color: var(--gold); }
.profile-availability-card .avatar-ring-busy::after { color: var(--danger); }

.profile-availability-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.profile-availability-info strong { color: var(--white); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-availability-time { color: var(--mint); font-size: 12px; }
.profile-availability-flag { font-size: 11px; font-weight: 600; }
.profile-plan-counts { color: var(--muted); font-size: 10px; }
.status-free .profile-availability-flag { color: var(--mint); }
.status-invited .profile-availability-flag { color: var(--gold); }
.status-busy .profile-availability-flag { color: var(--danger); }
.profile-overlap-heading { margin-top: 24px; }

.invite-status { font-size: 10.5px; font-weight: 600; text-transform: capitalize; }
.invite-status.pending { color: var(--gold); }
.invite-status.accepted { color: var(--mint); }
.invite-status.declined { color: var(--danger); }

.empty-note { font-size: 12px; color: var(--muted-dim); font-style: italic; padding: 2px 0; }

.status-badge {
  display: inline-block; font-size: 10px; font-weight: 600;
  padding: 3px 8px; border-radius: 100px; text-transform: uppercase; letter-spacing: .06em;
}

.status-badge.open { background: rgba(var(--mint-rgb), .15); color: var(--mint); }
.status-badge.confirmed { background: rgba(var(--gold-rgb), .15); color: var(--gold); }
.status-badge.cancelled { background: rgba(var(--danger-rgb), .15); color: var(--danger); }

.plan-detail-page {
  margin: 18px 40px 40px;
  background: var(--forest); border: 1px solid var(--forest-border);
  border-radius: var(--radius-lg); padding: 28px 30px;
}

.plan-detail-page h1 { font-size: 24px; margin-bottom: 8px; }
.plan-detail-meta { color: var(--muted); font-size: 13px; margin-bottom: 24px; }

.detail-section { margin-top: 28px; }
.detail-section h3 {
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted-dim); margin-bottom: 12px;
}

.detail-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px; margin-bottom: 24px;
}

.detail-item label { display: block; font-size: 10px; color: var(--muted-dim); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 4px; }
.detail-item span { font-size: 14px; color: var(--white); }

.friends-page { margin: 18px 40px 40px; }
.friends-section { margin-bottom: 32px; }
.friends-section h2 { font-size: 18px; margin-bottom: 14px; }

.team-proposal-form {
  max-width: 720px;
  margin-top: 16px;
}

.team-proposal-form .calendar-datetime-input {
  width: 100%;
}

.team-proposal-form .calendar-dt-jalali-picker {
  max-width: none;
}

.friend-list { display: flex; flex-direction: column; gap: 10px; }

.friend-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--forest); border: 1px solid var(--forest-border);
  border-radius: var(--radius-md); padding: 14px 16px;
}

.friend-actions { display: flex; gap: 8px; }

/* Friends page — availability & interaction */
.friends-your-time,
.friends-available-box {
  background: var(--forest-light);
  border: 1px solid var(--forest-border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
}

.friends-time-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.friends-time-chip {
  font-size: 12px;
  color: var(--mint);
  background: rgba(var(--mint-rgb), .1);
  border: 1px solid rgba(var(--mint-rgb), .25);
  border-radius: 999px;
  padding: 6px 12px;
}

.friends-available-pick {
  width: 100%;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.friends-section-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.friends-section-heading h2 { margin-bottom: 6px; }

.friend-group-form,
.friend-group-card {
  min-width: 0;
  background: var(--forest-light);
  border: 1px solid var(--forest-border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
}

.friend-group-create { margin-bottom: 14px; }

.team-create-form {
  max-width: 720px;
}
.team-create-heading h2 {
  margin: 0 0 4px;
  font-size: 20px;
}
.team-create-field {
  margin-top: 18px;
}
.team-create-field label,
.team-invite-picker > label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.team-create-field input[type="text"] {
  box-sizing: border-box;
  width: 100%;
  background: var(--forest);
  border: 1px solid var(--forest-border);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  color: var(--white);
  font: inherit;
  font-size: 14px;
  -webkit-appearance: none;
  appearance: none;
}
.team-create-field input[type="text"]::placeholder,
.team-invite-search::placeholder {
  color: var(--muted-dim);
}
.team-create-field input[type="text"]:focus {
  outline: none;
  border-color: var(--mint-dim);
  box-shadow: 0 0 0 3px rgba(var(--mint-rgb), .12);
}
.team-invite-picker {
  margin-top: 20px;
  padding: 16px;
  background: var(--forest);
  border: 1px solid var(--forest-border);
  border-radius: var(--radius-md);
}
.team-invite-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}
.team-invite-header label {
  margin-bottom: 0;
}
.team-invite-header .field-hint {
  margin-top: 5px;
}
.team-invite-badge {
  flex: 0 0 auto;
  padding: 5px 9px;
  color: var(--mint);
  background: rgba(var(--mint-rgb), .1);
  border: 1px solid rgba(var(--mint-rgb), .24);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.team-invite-picker > label span,
.team-invite-picker legend span {
  color: var(--muted-dim);
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
}
.team-invite-search-box {
  margin-bottom: 12px;
  background: var(--forest-light);
  border-radius: var(--radius-sm);
}
.team-invite-selected-label {
  margin-top: 14px;
  color: var(--muted-dim);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.team-invite-selected:empty + .friend-group-members {
  margin-top: 12px;
}
.team-invite-picker .friend-group-members {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--forest-border);
}
.team-invite-picker .friend-group-member {
  min-height: 52px;
  padding: 9px 10px;
  background: var(--forest-light);
  border-radius: var(--radius-sm);
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.team-invite-picker .friend-group-member:hover {
  transform: translateY(-1px);
}
.team-invite-picker .friend-group-member:has(input:checked) {
  background: rgba(var(--mint-rgb), .1);
  border-color: var(--mint-dim);
  box-shadow: 0 0 0 2px rgba(var(--mint-rgb), .08);
}
.team-invite-picker .friend-group-member input {
  accent-color: var(--mint);
}
.team-create-actions {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--forest-border);
}

.friend-groups-layout {
  display: grid;
  grid-template-columns: minmax(280px, .85fr) minmax(380px, 1.15fr);
  gap: 18px;
  align-items: start;
}

.friend-groups-layout .friend-group-create { margin-bottom: 0; }

.friend-group-form-top {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.friend-group-form-top label,
.friend-group-name-label {
  color: var(--white);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.friend-group-form input[type="text"],
.friend-group-editor input[type="text"] {
  box-sizing: border-box;
  width: 100%;
  min-width: 200px;
  flex: 1;
  color: var(--white);
  background: var(--forest);
  border: 1px solid var(--forest-border);
  border-radius: 6px;
  padding: 9px 10px;
  font: inherit;
  -webkit-appearance: none;
  appearance: none;
}

.friend-group-form input[type="text"]:focus,
.friend-group-editor input[type="text"]:focus {
  outline: none;
  border-color: var(--mint-dim);
}

.friend-group-members {
  border: 0;
  padding: 14px 0 0;
  margin: 0;
}

.friend-group-members legend {
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 8px;
}

.friend-group-members legend span { color: var(--muted-dim); }

.friend-group-members ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.friend-group-member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}

.friend-group-member {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  color: var(--white);
  background: var(--forest);
  border: 1px solid var(--forest-border);
  border-radius: 8px;
  padding: 8px 9px;
  cursor: pointer;
  box-sizing: border-box;
}

.friend-group-member:hover {
  border-color: var(--mint-dim);
  background: var(--forest-hover);
}

.friend-group-members li { margin: 0; }

.friend-group-member input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--mint);
  flex: 0 0 16px;
  -webkit-appearance: auto;
  appearance: auto;
}
.friend-group-member .person-avatar,
.friend-group-member .person-avatar-img { width: 34px; height: 34px; flex-shrink: 0; }

.friend-group-member-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.friend-group-member-info strong,
.friend-group-member-info small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friend-group-member-info strong { font-size: 12px; }
.friend-group-member-info small { color: var(--muted-dim); font-size: 10px; }

.friend-group-member-search {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  color: var(--white);
  background: transparent;
  border: 0;
  padding: 10px 10px 10px 0;
  font: inherit;
  min-width: 0;
  -webkit-appearance: none;
  appearance: none;
}

.friend-group-member-search::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.friend-group-member-search:focus {
  outline: none;
}

.friend-group-member-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  padding: 0 10px;
  background: var(--forest);
  border: 1px solid var(--forest-border);
  border-radius: 6px;
}

.friend-group-member-search-wrap:focus-within {
  border-color: var(--mint-dim);
}

.friend-group-member-search-wrap svg {
  width: 15px;
  height: 15px;
  stroke: var(--muted-dim);
  fill: none;
  stroke-width: 1.8;
  flex-shrink: 0;
}

.friend-group-member.is-search-hidden { display: none; }

.friend-groups-panel { min-width: 0; }

.friend-groups-list {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 14px;
  overflow-x: auto;
  padding: 2px 2px 12px;
  min-width: 0;
}

.friend-groups-list-heading {
  margin: 2px 0 12px;
}

.friend-groups-list-heading h3 {
  color: var(--white);
  font-size: 18px;
  margin: 0 0 4px;
}

.friend-group-card {
  width: min(360px, 82vw);
  min-width: min(360px, 82vw);
  flex: 0 0 min(360px, 82vw);
  border-radius: var(--radius-md);
  margin: 0;
}

.friend-group-card-selected {
  border-color: var(--mint);
  box-shadow: 0 0 0 2px rgba(var(--mint-rgb), .2);
}

.friend-group-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.friend-group-card h3 { font-size: 16px; margin: 0 0 3px; }
.friend-group-name-label { display: block; margin-bottom: 6px; }
.friend-group-actions { display: flex; gap: 8px; }

.friend-group-actions form { margin: 0; }
.friend-group-actions button { white-space: nowrap; }
.friend-group-owner { color: var(--muted-dim); font-size: 10px; white-space: nowrap; }

.friend-group-member-summary {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.friend-group-summary-person {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px 5px 5px;
  color: var(--white);
  background: var(--forest);
  border: 1px solid var(--forest-border);
  border-radius: 999px;
  font-size: 11px;
}

.friend-group-card .friend-group-member-grid {
  grid-template-columns: 1fr;
}

.friend-group-summary-person .person-avatar,
.friend-group-summary-person .person-avatar-img {
  width: 24px;
  height: 24px;
}

.friend-group-editor {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--forest-border);
}

.friend-group-editor.hidden { display: none; }
.friend-group-editor > .btn-primary { margin-top: 14px; }

.avatar-ring-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
  line-height: 0;
}

.avatar-ring-wrap .person-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
}

.avatar-ring-wrap .person-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.avatar-ring-free {
  box-shadow: 0 0 0 3px var(--mint);
}

.avatar-ring-gray {
  box-shadow: 0 0 0 3px var(--muted-dim);
}

.avatar-ring-free::after,
.avatar-ring-gray::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  border: 2px solid var(--forest);
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
}

.avatar-ring-free::after { background: var(--mint); }
.avatar-ring-gray::after { background: var(--muted-dim); }

.friend-list-interactive { gap: 0; }

.friend-row-wrap {
  border: 1px solid var(--forest-border);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  overflow: hidden;
  background: var(--forest);
}

.friend-row-wrap.friend-row-overlap {
  border-color: rgba(var(--mint-rgb), .35);
}

.friend-row-wrap.is-open {
  border-color: var(--mint-dim);
}

.friend-row-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 12px;
  padding: 14px 16px;
  background: transparent;
  border: none;
  color: var(--white);
  font-family: inherit;
  cursor: pointer;
  text-align: left;
}

.friend-row-toggle:hover { background: var(--forest-hover); }

.friend-row-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.friend-row-name {
  font-weight: 600;
  font-size: 14px;
}

.friend-row-meta {
  font-size: 11px;
  color: var(--muted-dim);
}

.friend-avail-badge {
  font-size: 10px;
  color: var(--mint);
  background: rgba(var(--mint-rgb), .12);
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: auto;
}

.friend-row-chevron {
  font-size: 18px;
  color: var(--muted);
  transition: transform .2s ease;
  flex-shrink: 0;
}

.friend-row-wrap.is-open .friend-row-chevron {
  transform: rotate(90deg);
  color: var(--mint);
}

.friend-availability-panel {
  padding: 0 16px 14px 58px;
  border-top: 1px solid var(--forest-border);
}

.friend-availability-panel.hidden { display: none; }

.friend-availability-slots {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.friend-avail-empty { margin: 12px 0 0; font-size: 12px; }

.friend-row a {
  color: var(--white);
  text-decoration: none;
}

.friend-row a:hover { color: var(--mint); }

/* Business offers — compact thumbnails in lists (large photos only on profile pages) */
.offers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.offers-grid-plan {
  grid-template-columns: 1fr;
  max-width: 640px;
}

.offer-card {
  background: var(--forest);
  border: 1px solid var(--forest-border);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
  transition: border-color .18s ease;
}

.offer-card:hover { border-color: var(--mint-dim); }
.offer-card.offer-inactive { opacity: .55; }

.offer-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.offer-image-wrap {
  width: 56px;
  height: 56px;
  max-width: 56px;
  flex-shrink: 0;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin: 0;
  background: var(--forest-hover);
}

.offer-image {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  display: block;
}

.offer-business-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.offer-business-logo {
  width: 24px;
  height: 24px;
  max-width: 24px;
  max-height: 24px;
  border-radius: 6px;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}

.offer-card-top {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}

.offer-business-badge {
  font-size: 11px; font-weight: 600; color: var(--gold);
  text-transform: uppercase; letter-spacing: .08em;
}

.offer-type-badge {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; padding: 3px 8px; border-radius: 100px;
}

.offer-type-badge.public { background: rgba(var(--mint-rgb), .15); color: var(--mint); }
.offer-type-badge.personal { background: rgba(var(--gold-rgb), .15); color: var(--gold); }
.offer-type-badge.cancelled { background: rgba(var(--danger-rgb), .15); color: var(--danger); }

.offer-card h3 { font-size: 15px; color: var(--white); font-family: 'Fraunces', serif; font-weight: 500; margin: 0; }
.offer-message { font-size: 13px; color: var(--muted); line-height: 1.5; margin: 0; }
.offer-plan-link { font-size: 12px; color: var(--mint-dim); margin: 0; }
.offer-plan-link strong { color: var(--mint); }
.offer-time { font-size: 11px; color: var(--muted-dim); }

.tabs .tab { display: inline-block; text-decoration: none; }

.signup-business-fields { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--forest-border); }
.signup-business-fields.hidden,
.form-group-gender.hidden { display: none; }
.form-group-account-type { display: none; }

/* Account menu & logout */
.account-menu {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.account-menu-link {
  font-size: 12.5px;
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 100px;
  border: 1px solid var(--forest-border);
  background: var(--forest-light);
  transition: color .15s ease, border-color .15s ease;
}

.account-menu-link:hover { color: var(--white); border-color: var(--mint-dim); }

.logout-form { margin: 0; }

.logout-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--forest-border);
  color: var(--muted-dim);
  font-size: 12.5px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 100px;
  transition: color .15s ease, border-color .15s ease;
}

.logout-btn:hover { color: var(--danger); border-color: var(--danger); }
.logout-btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }

/* Auth pages extras */
.auth-divider {
  margin: 20px 0 14px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted-dim);
  text-align: center;
}

.auth-signup-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-signup-btn {
  text-align: center;
  display: block;
}

.auth-signup-btn.active-type {
  border-color: var(--mint-dim);
  color: var(--mint);
}

.auth-demo-box {
  margin-top: 20px;
  padding: 14px;
  background: var(--forest-light);
  border: 1px solid var(--forest-border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}

.auth-demo-box code {
  color: var(--mint);
  font-size: 11px;
}

.friend-row-main .person-avatar,
.friend-row-main > img.person-avatar-img {
  width: 32px;
  height: 32px;
  max-width: 32px;
  max-height: 32px;
}

/* Photos — list avatars/thumbs stay small; large only on profile pages */
img:not(.person-avatar-img):not(.user-search-avatar):not(.invite-avatar-img):not(.offer-image):not(.offer-business-logo):not(.business-logo-preview):not(.brand-logo) {
  max-width: 100%;
  height: auto;
}

.avatar-mini-link { overflow: hidden; display: flex; align-items: center; justify-content: center; }
.avatar-mini-link .person-avatar {
  width: 100%;
  height: 100%;
}
.avatar-mini-link .person-avatar-img {
  width: 100%;
  height: 100%;
  max-width: none;
}
.avatar-mini-img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.person-avatar-img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  display: block;
}

.plan-info h3 a {
  color: inherit;
  text-decoration: none;
}
.plan-info h3 a:hover { color: var(--mint); }

.plan-meta a {
  color: var(--muted);
  text-decoration: none;
}
.plan-meta a:hover { color: var(--mint); }

.friend-row a {
  color: var(--white);
  text-decoration: none;
}
.friend-row a:hover { color: var(--mint); }

.profile-photo-preview {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--forest-border);
}

.profile-photo-preview .person-avatar,
.profile-photo-preview .person-avatar-img {
  width: clamp(56px, 14vw, 72px);
  height: clamp(56px, 14vw, 72px);
  font-size: 22px;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.profile-avatar-lg .person-avatar,
.profile-avatar-lg .person-avatar-img {
  width: clamp(64px, 16vw, 80px);
  height: clamp(64px, 16vw, 80px);
  font-size: 24px;
}

.business-logo-preview {
  width: clamp(56px, 14vw, 72px);
  height: clamp(56px, 14vw, 72px);
  max-width: 100%;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid var(--forest-border);
  display: block;
}

.field-hint {
  font-size: 11px;
  color: var(--muted-dim);
  margin: 4px 0 0;
}

.plan-select-group { margin-top: 8px; }

.plan-select-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.plan-select-head label { margin: 0; }

.select-all-label {
  font-size: 12px;
  color: var(--mint);
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.plan-checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
  padding: 4px 0;
}

.plan-checkbox-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: var(--forest-light);
  border: 1px solid var(--forest-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color .15s ease;
}

.plan-checkbox-item:hover { border-color: var(--mint-dim); }

.plan-checkbox-item input { margin-top: 3px; flex-shrink: 0; }

.plan-checkbox-opportunity { border-color: rgba(var(--mint-rgb), 0.35); }

.plan-select-section { margin-bottom: 20px; }

.plan-select-section .plan-select-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--white);
}

.plan-card-opportunity { border-color: rgba(var(--mint-rgb), 0.35); }

.plan-checkbox-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 12px;
  color: var(--muted);
}

.plan-checkbox-info strong { color: var(--white); font-size: 13px; }

.offer-respond-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.offer-respond-actions form { margin: 0; }

.offer-response-status {
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
  margin: 4px 0 0;
}

.offer-response-status.accepted { color: var(--mint); }
.offer-response-status.declined { color: var(--danger); }
.offer-response-status.pending { color: var(--gold); }

.offer-response-summary {
  font-size: 11px;
  color: var(--muted-dim);
  margin: 6px 0 0;
}

.offers-grid-plan {
  grid-template-columns: 1fr;
}

@media (max-width: 860px) {
  .hero { margin: 16px 18px 6px; padding: 22px 18px 18px; }
  .notif-panel { right: 18px; left: 18px; width: auto; }
  .plan-detail-page { margin: 16px 18px 40px; }
  .friends-page { margin: 16px 18px 40px; }
  .invite-picker { grid-template-columns: 1fr; }
}

/* Plan create — friend invite picker */
.form-page-wide { max-width: 720px; }

.plan-overlap-slots {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  background: var(--forest-light);
  border: 1px solid var(--forest-border);
  border-radius: var(--radius-md);
}

.plan-overlap-slot {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(var(--mint-rgb), .28);
  background: rgba(var(--mint-rgb), .08);
  color: var(--white);
  transition: background .12s ease, border-color .12s ease, box-shadow .12s ease;
}

.plan-overlap-slot:hover {
  background: rgba(var(--mint-rgb), .14);
  border-color: rgba(var(--mint-rgb), .42);
}

.plan-overlap-slot.is-selected {
  background: rgba(var(--mint-rgb), .2);
  border-color: var(--mint);
  box-shadow: 0 0 0 2px rgba(var(--mint-rgb), .18);
}

.plan-overlap-slot-main {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
}

.plan-overlap-slot-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--mint);
  box-shadow: 0 0 0 3px rgba(var(--mint-rgb), .18);
}

.plan-overlap-slot-label {
  min-width: 0;
}

.plan-overlap-friends {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.plan-overlap-friend {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 160px;
  padding: 4px 8px 4px 4px;
  border-radius: 999px;
  border: 1px solid var(--forest-border);
  background: var(--forest);
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  opacity: 0.72;
  transition: border-color .12s ease, background .12s ease, color .12s ease, opacity .12s ease;
}

.plan-overlap-friend:hover {
  border-color: var(--mint-dim);
  background: var(--forest-hover);
}

.plan-overlap-friend.is-chosen {
  color: var(--white);
  opacity: 1;
  border-color: rgba(var(--mint-rgb), .45);
  background: rgba(var(--mint-rgb), .14);
  box-shadow: 0 0 0 1px rgba(var(--mint-rgb), .12);
}

.plan-overlap-friend-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--forest-hover);
}

.plan-overlap-friend-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plan-overlap-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.plan-overlap-recompute,
.plan-overlap-add-all {
  align-self: flex-start;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(var(--mint-rgb), .35);
  background: transparent;
  color: var(--mint);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.plan-overlap-recompute:hover,
.plan-overlap-add-all:hover {
  background: rgba(var(--mint-rgb), .12);
}

.plan-overlap-recompute:disabled {
  opacity: 0.6;
  cursor: wait;
}

.plan-overlap-status {
  margin: 0;
}

.plan-overlap-status.is-error {
  color: #f0a8a8;
}

.invite-panel.hidden { display: none; }

.invite-panel {
  margin: 20px 0 8px;
  padding: 16px;
  background: var(--forest-light);
  border: 1px solid var(--forest-border);
  border-radius: var(--radius-md);
}

.invite-panel-label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.invite-panel-hint { margin-bottom: 10px; }

.invite-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.invite-toolbar-btn { font-size: 12px; padding: 8px 12px; }

.invite-suggested-label {
  font-size: 11px;
  color: var(--muted-dim);
}

.invite-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.invite-search-input {
  width: 100%;
  background: var(--forest);
  border: 1px solid var(--forest-border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: var(--white);
  font-family: inherit;
  font-size: 14px;
  margin-bottom: 8px;
}

.invite-search-input:focus {
  outline: none;
  border-color: var(--mint-dim);
}

.invite-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid var(--forest-border);
  border-radius: var(--radius-sm);
  background: var(--forest);
}

.invite-item-suggestion,
.invite-item-selected {
  border-bottom: 1px solid var(--forest-border);
}

.invite-item:last-child { border-bottom: none; }

.invite-add-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  background: transparent;
  border: none;
  color: var(--white);
  font-family: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: background .15s ease;
}

.invite-add-btn:hover { background: var(--forest-hover); }

.invite-item-free .invite-add-btn {
  background: rgba(var(--mint-rgb), .04);
}

.invite-avatar-wrap {
  position: relative;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.invite-avatar-wrap.invite-avatar-sm {
  width: 32px;
  height: 32px;
}

.invite-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: var(--forest-hover);
}

/* Green ring = free at plan time; gray ring = not free / unknown */
.invite-avatar-free {
  box-shadow: 0 0 0 3px var(--mint);
}

.invite-avatar-gray {
  box-shadow: 0 0 0 3px var(--muted-dim);
}

.invite-avatar-free::after,
.invite-avatar-gray::after {
  content: '';
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 11px;
  height: 11px;
  border: 2px solid var(--forest);
  border-radius: 50%;
  pointer-events: none;
}

.invite-avatar-free::after { background: var(--mint); }
.invite-avatar-gray::after { background: var(--muted-dim); }

.invite-suggestion-meta,
.invite-selected-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.invite-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.invite-name {
  font-weight: 500;
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invite-available-tick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(var(--mint-rgb), .18);
  color: var(--mint);
  flex-shrink: 0;
}

.invite-username {
  font-size: 11px;
  color: var(--muted-dim);
}

.invite-badge {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 2px 7px;
  border-radius: 999px;
  flex-shrink: 0;
}

.invite-badge-free {
  background: rgba(var(--mint-rgb), .15);
  color: var(--mint);
}

.invite-item-selected {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
}

.invite-selected-col {
  display: flex;
  flex-direction: column;
}

.invite-selected-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.invite-selected-title {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.invite-count {
  font-size: 11px;
  font-weight: 600;
  color: var(--mint);
  background: rgba(var(--mint-rgb), .12);
  padding: 2px 8px;
  border-radius: 999px;
}

.invite-remove {
  margin-left: auto;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

.invite-remove:hover { color: var(--danger); }

.invite-empty-msg {
  font-size: 12px;
  color: var(--muted-dim);
  padding: 12px;
  margin: 0;
}

.invite-list-selected:empty { display: none; }

/* Browse all friends modal */
.invite-modal.hidden { display: none; }

.invite-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.invite-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .55);
}

.invite-modal-panel {
  position: relative;
  width: min(520px, 100%);
  max-height: min(80vh, 640px);
  background: var(--forest);
  border: 1px solid var(--forest-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.invite-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--forest-border);
}

.invite-modal-head h3 { font-size: 16px; margin: 0; }

.invite-modal-close {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

.invite-modal-close:hover { color: var(--white); }

.invite-modal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid var(--forest-border);
  gap: 10px;
}

.invite-select-all-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--white);
  cursor: pointer;
}

.invite-select-all-label input { width: auto; margin: 0; }

.invite-modal-count { font-size: 11px; color: var(--muted-dim); }

.invite-all-list {
  list-style: none;
  margin: 0;
  padding: 8px 0;
  overflow-y: auto;
  flex: 1;
}

.invite-all-item { border-bottom: 1px solid var(--forest-border); }
.invite-all-item:last-child { border-bottom: none; }

.invite-all-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  cursor: pointer;
  transition: background .15s ease;
}

.invite-all-row:hover { background: var(--forest-hover); }

.invite-all-row input[type="checkbox"] {
  width: auto;
  flex-shrink: 0;
  margin: 0;
}

.invite-all-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.invite-modal-actions {
  display: flex;
  gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid var(--forest-border);
}

body.invite-modal-open { overflow: hidden; }

/* User search autocomplete */
.user-search-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
  overflow: visible;
}

.user-search-suggest {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  width: 100%;
  min-width: 300px;
  z-index: 60;
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--forest);
  border: 1px solid var(--forest-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-soft);
  max-height: min(60vh, 400px);
  overflow-y: auto;
  overflow-x: hidden;
}

@media (min-width: 861px) {
  .user-search-suggest {
    width: max(100%, 320px);
    min-width: 320px;
  }
}

.user-search-suggest.hidden { display: none; }

.user-search-item,
.search-result-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--forest-border);
  transition: background .12s ease;
}

.user-search-item:last-child,
.search-result-card:last-child {
  border-bottom: none;
}

.search-result-list {
  display: flex;
  flex-direction: column;
  background: var(--forest);
  border: 1px solid var(--forest-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.search-result-list .search-result-card:hover {
  background: var(--forest-hover);
}

.user-search-person {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.user-search-item:hover,
.user-search-item.is-active {
  background: var(--forest-hover);
}

.user-search-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--forest-hover);
  display: block;
}

.user-search-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.user-search-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--white);
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-search-username {
  font-size: 11px;
  color: var(--muted-dim);
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-search-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.user-search-name-row .user-search-name {
  flex: 1;
  min-width: 0;
}

.user-search-friend-badge {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--mint);
  background: rgba(var(--mint-rgb), .12);
  padding: 2px 6px;
  border-radius: 999px;
  flex-shrink: 0;
}

.user-search-item-friend {
  background: rgba(var(--mint-rgb), .04);
}

.user-search-hint {
  margin: 6px 0 0;
  font-size: 11px;
}

.search .user-search-wrap { width: 100%; overflow: visible; }
.search .user-search-wrap input { width: 100%; min-width: 0; }
.search { overflow: visible; }

.topbar > .search {
  flex: 1;
  max-width: 360px;
  margin-left: auto;
}

@media (max-width: 860px) {
  .topbar > .search {
    max-width: none;
    width: 100%;
    margin-left: 0;
  }
}

.user-search-profile-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
  color: inherit;
}

.user-search-name-link {
  display: block;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}

.user-search-actions,
.search-result-card .user-search-actions {
  display: flex;
  width: 100%;
}

.user-search-actions .friend-req-btn,
.search-result-card .user-search-actions .friend-req-btn {
  width: 100%;
  min-width: 0;
  justify-content: center;
}

.user-search-actions .friend-req-btn.is-friend.is-label {
  width: 100%;
  text-align: center;
  justify-content: center;
  padding: 6px 12px;
  background: var(--forest-hover);
  border-radius: var(--radius-sm);
}

.user-search-item .friend-req-btn.is-received {
  width: 100%;
  justify-content: center;
}

/* Friend request buttons (Facebook-style inline add/cancel) */
.friend-req-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s ease, color .15s ease, opacity .15s ease;
  text-decoration: none;
}

.friend-req-btn.is-add {
  background: #1a1a1a;
  color: var(--white);
}

.friend-req-btn.is-add:hover {
  background: #2a2a2a;
}

.friend-req-btn.is-sent {
  background: var(--mint);
  color: #0d2818;
}

.friend-req-btn.is-sent:hover {
  background: #7ae8a8;
}

.friend-req-btn.is-friend,
.friend-req-btn.is-label {
  background: transparent;
  color: var(--muted-dim);
  cursor: default;
  padding: 6px 0;
}

.friend-req-btn.is-received {
  background: var(--forest-hover);
  color: var(--white);
  text-decoration: none;
}

.friend-req-btn.is-received:hover {
  background: var(--forest-border);
}

.friend-req-btn.is-loading {
  opacity: 0.6;
  pointer-events: none;
}

.friend-req-btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.friend-row .friend-req-btn,
.friend-list .friend-req-btn {
  flex-shrink: 0;
}

.outgoing-cancel-btn.is-sent {
  background: var(--forest-hover);
  color: var(--white);
}

.outgoing-cancel-btn.is-sent:hover {
  background: rgba(220, 80, 80, .25);
  color: #ffb4b4;
}

/* Calendar datetime inputs */
.calendar-dt-jalali-picker {
  width: 100%;
  max-width: 320px;
  cursor: pointer;
}

.calendar-jalali-input .field-hint,
.calendar-gregorian-input .field-hint {
  margin-top: 6px;
}

.calendar-gregorian-input.hidden,
.calendar-jalali-input.hidden {
  display: none;
}

/* JalaliDatePicker overlay tweaks */
.jdp-container {
  font-family: 'Work Sans', sans-serif;
}

.jdp-overlay {
  z-index: 2999 !important;
}

/* Responsive — dashboard & friends pages */
@media (max-width: 860px) {
  .friends-page,
  .plan-detail-page,
  .plans-page,
  .business-profile-page {
    margin: 12px 16px 32px;
    width: auto;
  }

  .business-dashboard-post-layout {
    grid-template-columns: 1fr;
  }

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

  .business-posts-card {
    grid-column: auto;
  }

  .business-profile-hero,
  .business-identity-card {
    flex-wrap: wrap;
  }

  .friend-row {
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 14px;
  }

  .friend-group-form-top,
  .friend-group-card-header {
    align-items: stretch;
    flex-direction: column;
  }

  .friend-group-form input[type="text"] { min-width: 0; }

  .friend-groups-layout { grid-template-columns: 1fr; }

  .friend-row-main {
    flex: 1 1 calc(100% - 120px);
    min-width: 0;
  }

  .friend-row .friend-req-btn,
  .friend-row .btn-secondary,
  .friend-row .btn-primary {
    flex: 1 1 auto;
  }

  .friends-available-grid {
    grid-template-columns: 1fr;
  }

  .plan-top {
    flex-wrap: wrap;
    gap: 12px;
  }

  .plan-actions {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

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

  .form-actions {
    flex-wrap: wrap;
    gap: 8px;
  }

  .invite-picker-selected,
  .invite-suggested-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .greet h1 {
    font-size: 20px;
  }

  .friend-availability-panel {
    padding-left: 16px;
  }
}

/* Availability visibility + group sharing */
.availability-visibility-options ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.availability-visibility-options li {
  margin: 0;
}

.availability-visibility-options label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--forest-border);
  border-radius: var(--radius-sm);
  background: var(--forest-light);
  color: var(--white);
  text-transform: none;
  letter-spacing: 0;
  font-size: 13px;
  cursor: pointer;
}

.availability-visibility-options input {
  width: auto;
  margin: 0;
  accent-color: var(--mint);
}

.availability-group-checks ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.availability-group-checks label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--forest-border);
  border-radius: var(--radius-sm);
  background: var(--forest);
  color: var(--white);
  text-transform: none;
  letter-spacing: 0;
  font-size: 13px;
  cursor: pointer;
}

.availability-group-checks input {
  width: auto;
  margin: 0;
  accent-color: var(--mint);
}

.availability-groups-field[hidden] {
  display: none !important;
}

/* —— Messages —— */
.messages-main { min-height: 0; }
.messages-layout {
  display: grid;
  grid-template-columns: minmax(240px, 320px) 1fr;
  gap: 0;
  margin: 0 24px 24px;
  min-height: calc(100vh - 120px);
  border: 1px solid var(--forest-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--forest);
}

.messages-archive {
  border-right: 1px solid var(--forest-border);
  background: var(--forest-light);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.messages-archive-head {
  padding: 18px 16px 10px;
  border-bottom: 1px solid var(--forest-border);
}

.messages-archive-head h2 { font-size: 16px; }

.messages-archive-list {
  overflow-y: auto;
  flex: 1;
}

.messages-archive-item {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--forest-border);
  color: inherit;
  text-decoration: none;
  transition: background .15s ease;
}

.messages-archive-item:hover,
.messages-archive-item.is-active {
  background: var(--forest-hover);
}

.messages-archive-avatar {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.messages-type-badge {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--forest);
  border: 1px solid var(--forest-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--mint);
}

.messages-archive-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.messages-archive-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.messages-archive-title-row strong {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.messages-unread-pill {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--mint);
  color: var(--ink);
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.messages-archive-sub,
.messages-archive-preview {
  font-size: 11px;
  color: var(--muted-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.messages-archive-preview { color: var(--muted); }

.messages-thread {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--forest);
}

.messages-thread-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--forest-border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.messages-thread-head h2 { font-size: 18px; }
.messages-thread-head-main { min-width: 0; }
.messages-delete-conversation { flex-shrink: 0; }

.messages-thread-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 280px;
}

.messages-load-more-wrap {
  text-align: center;
  margin-bottom: 8px;
}

.messages-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: auto;
}

.chat-bubble {
  max-width: min(520px, 92%);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--forest-border);
  background: var(--forest-light);
}

.chat-bubble.is-mine {
  align-self: flex-end;
  background: rgba(var(--mint-rgb), 0.12);
  border-color: rgba(var(--mint-rgb), 0.35);
}

.chat-bubble.is-theirs { align-self: flex-start; }

.chat-bubble-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 12px;
  color: var(--muted);
}

.chat-bubble-meta .person-avatar {
  width: 24px;
  height: 24px;
  font-size: 10px;
}

.chat-bubble-time {
  color: var(--muted-dim);
  font-size: 11px;
}

.chat-bubble-body {
  font-size: 14px;
  line-height: 1.45;
  color: var(--white);
  word-break: break-word;
}

.chat-bubble-edited {
  font-size: 11px;
  color: var(--muted);
  font-style: italic;
}

.chat-bubble-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.chat-action-btn {
  border: 0;
  background: transparent;
  color: var(--mint);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  padding: 0;
}

.chat-action-btn:hover { text-decoration: underline; }

.chat-bubble.is-deleted {
  opacity: 0.75;
}

.chat-bubble-body.is-deleted-body {
  font-style: italic;
  color: var(--muted);
}

.chat-bubble.is-venue {
  border-color: rgba(var(--mint-rgb), 0.45);
}

.chat-venue-logo {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.chat-venue-pill {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(var(--mint-rgb), 0.18);
  color: var(--mint);
}

.chat-mentions {
  margin-top: 6px;
  font-size: 11px;
  color: var(--mint);
}

.chat-mentions a { color: var(--mint); text-decoration: underline; }

.messages-composer {
  display: flex;
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid var(--forest-border);
  align-items: flex-end;
}

.messages-composer .mention-wrap {
  flex: 1;
  min-width: 0;
  position: relative;
}

.messages-composer textarea {
  width: 100%;
  flex: 1;
  resize: none;
  min-height: 44px;
  max-height: 120px;
  background: var(--forest-light);
  border: 1px solid var(--forest-border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: var(--white);
  font-family: inherit;
  font-size: 14px;
}

.messages-composer textarea:focus {
  outline: none;
  border-color: var(--mint-dim);
}

.mention-wrap {
  position: relative;
}

.form-group .mention-wrap {
  display: block;
}

.mention-suggest {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 6px);
  z-index: 70;
  list-style: none;
  margin: 0;
  padding: 4px 0;
  background: var(--forest);
  border: 1px solid var(--forest-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-soft);
  max-height: min(40vh, 280px);
  overflow-y: auto;
}

.form-group .mention-suggest {
  bottom: auto;
  top: calc(100% + 4px);
}

.mention-suggest.hidden { display: none; }

.mention-suggest-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  cursor: pointer;
  transition: background .12s ease;
}

.mention-suggest-item:hover,
.mention-suggest-item.is-active {
  background: var(--forest-hover);
}

.mention-suggest-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--forest-hover);
}

.mention-suggest-avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--mint);
}

.mention-suggest-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.mention-suggest-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--white);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mention-suggest-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.mention-suggest-name-row .mention-suggest-name {
  min-width: 0;
}

.mention-suggest-kind {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--mint);
  background: rgba(110, 231, 183, 0.12);
  border: 1px solid var(--mint-dim);
  border-radius: 999px;
  padding: 1px 7px;
}

.mention-suggest-username {
  font-size: 12px;
  color: var(--muted);
}

.messages-empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  text-align: center;
  color: var(--muted);
}

.plan-chats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
  margin: 8px 28px 48px;
}

.plan-chat-panel {
  display: flex;
  flex-direction: column;
  min-height: 360px;
  max-height: 520px;
  border: 1px solid var(--forest-border);
  border-radius: 14px;
  background: var(--surface, #fff);
  overflow: hidden;
}

.plan-chat-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--forest-border);
}

.plan-chat-head h3 {
  font-size: 16px;
  margin: 0 0 4px;
}

.plan-chat-body {
  flex: 1;
  min-height: 200px;
  overflow-y: auto;
  padding: 12px 14px;
}

.plan-chat-panel .messages-composer {
  border-top: 1px solid var(--forest-border);
}

@media (max-width: 860px) {
  .plan-chats {
    margin: 8px 12px 88px;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .messages-layout {
    grid-template-columns: 1fr;
    margin: 0 12px 88px;
    min-height: auto;
  }
  .messages-archive {
    max-height: 240px;
    border-right: none;
    border-bottom: 1px solid var(--forest-border);
  }
  .messages-thread-body { min-height: 360px; }
}

/* —— Teams —— */
.friends-subnav { margin-left: 28px !important; margin-bottom: 8px !important; }
.teams-page .team-list,
.teams-page .team-invite-list { display: flex; flex-direction: column; gap: 10px; }
.team-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--forest-border);
  border-radius: var(--radius-md);
  background: var(--forest-light);
}
.team-card-link { text-decoration: none; color: inherit; }
.team-card-link:hover { border-color: var(--mint-dim); }
.team-card-main h3 { margin: 0 0 4px; font-size: 16px; color: var(--white); }
.team-role-pill {
  display: inline-block;
  margin-left: 8px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(var(--mint-rgb), 0.15);
  color: var(--mint);
}
.team-role-pill.is-captain { background: rgba(227, 184, 114, 0.2); color: #e3b872; }
.team-search-results {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
}

.team-directory-search-form {
  position: relative;
  max-width: 620px;
}

.team-directory-search-field {
  margin: 0;
}

.team-directory-search-field input[type="search"],
.team-directory-search-field input[type="text"] {
  box-sizing: border-box;
  width: 100%;
  background: var(--forest);
  border: 1px solid var(--forest-border);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  color: var(--white);
  font: inherit;
  font-size: 14px;
  -webkit-appearance: none;
  appearance: none;
}

.team-directory-search-field input[type="search"]::placeholder,
.team-directory-search-field input[type="text"]::placeholder {
  color: var(--muted-dim);
}

.team-directory-search-field input[type="search"]:focus,
.team-directory-search-field input[type="text"]:focus {
  outline: none;
  border-color: var(--mint-dim);
  box-shadow: 0 0 0 3px rgba(var(--mint-rgb), .12);
}

.team-directory-search-results {
  display: none;
  position: absolute;
  z-index: 10;
  top: calc(100% - 4px);
  left: 0;
  right: 0;
  overflow: hidden;
  border: 1px solid var(--forest-border);
  border-radius: 0 0 12px 12px;
  background: var(--forest);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .16);
}

.team-directory-search-results.is-visible {
  display: block;
}

.team-directory-search-result,
.team-directory-search-empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 14px;
  text-decoration: none;
}

.team-directory-search-result {
  color: var(--white);
  border-bottom: 1px solid var(--forest-border);
}

.team-directory-search-result:last-child {
  border-bottom: 0;
}

.team-directory-search-result:hover,
.team-directory-search-result:focus {
  background: var(--forest-hover);
}

.team-directory-search-result-name {
  font-weight: 700;
}

.team-directory-search-result-username,
.team-directory-search-empty {
  color: var(--muted);
  font-size: 12px;
}
.team-search-result {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border: 1px solid var(--forest-border);
  border-radius: var(--radius-sm);
  background: var(--forest);
  color: var(--white);
  cursor: pointer;
}
.team-search-result:hover { border-color: var(--mint-dim); }
.team-search-result small { color: var(--muted); display: block; }
.team-post-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.team-post-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--forest-border);
  border-radius: var(--radius-md);
  background: var(--forest-light);
  min-width: 0;
  aspect-ratio: 1 / 1.12;
}
.team-post-image-link {
  display: block;
  background: var(--forest);
  aspect-ratio: 1 / 1;
  max-height: 220px;
  overflow: hidden;
  flex: 0 0 auto;
}
.team-post-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.team-post-content {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}
.team-post-description {
  margin: 0;
  line-height: 1.55;
  white-space: normal;
  font-size: 13px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.team-post-mention,
.post-mention { color: var(--mint); font-weight: 700; text-decoration: none; }
.team-post-mention:hover,
.post-mention:hover { text-decoration: underline; }
.team-post-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
  color: var(--muted);
  font-size: 12px;
}
.team-post-meta form { margin-left: auto; }
.team-post-delete { border: 0; background: transparent; color: var(--danger); cursor: pointer; font: inherit; font-size: 12px; }

@media (max-width: 900px) {
  .team-post-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .team-post-list { grid-template-columns: 1fr; }
}
.team-post-list > .empty-note,
.feed-post-list > .empty-note {
  grid-column: 1 / -1;
}
.team-invite-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.teams-page .team-invite-search,
.team-open-election-form .calendar-dt-gregorian,
.team-open-election-form .calendar-dt-jalali-picker {
  box-sizing: border-box;
  width: 100%;
  max-width: 360px;
  margin: 8px 0;
  background: var(--forest-light);
  border: 1px solid var(--forest-border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: var(--white);
  font: inherit;
  font-size: 14px;
  -webkit-appearance: none;
  appearance: none;
}
.teams-page .team-invite-search:focus,
.team-open-election-form .calendar-dt-gregorian:focus,
.team-open-election-form .calendar-dt-jalali-picker:focus {
  outline: none;
  border-color: var(--mint-dim);
  box-shadow: 0 0 0 3px rgba(var(--mint-rgb), .12);
}
.team-open-election-form .calendar-datetime-input {
  width: 100%;
  max-width: 360px;
}
.team-open-election-form .calendar-datetime-input .field-hint {
  margin-top: 2px;
}
.team-selected-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--forest);
  border: 1px solid var(--forest-border);
  font-size: 13px;
  color: var(--white);
}
.team-selected-chip button {
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}
.team-candidate-list { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.team-candidate-list h3 { font-size: 14px; margin: 0 0 4px; }
.team-candidate-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--forest-border);
  border-radius: var(--radius-md);
  background: var(--forest-light);
}
.team-candidate-row.is-selected { border-color: rgba(var(--mint-rgb), 0.5); }
.team-candidate-info { display: flex; gap: 12px; align-items: flex-start; }
.team-candidate-statement { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.team-nominate-form textarea,
.team-open-election-form input[type="datetime-local"] {
  width: 100%;
  max-width: 360px;
  margin: 8px 0;
  background: var(--forest-light);
  border: 1px solid var(--forest-border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: var(--white);
  font-family: inherit;
}
.team-rerun-box { margin-top: 16px; }
@media (max-width: 860px) {
  .friends-subnav { margin-left: 12px !important; }
  .team-invite-header { flex-direction: column; gap: 8px; }
}

.friend-row-profile-link,
.friend-available-info h4 a,
.team-card-main a,
.person-name a,
.team-candidate-info a,
.detail-item a {
  color: inherit;
  text-decoration: none;
}
.friend-row-profile-link:hover,
.friend-available-info h4 a:hover,
.team-card-main a:hover,
.person-name a:hover,
.team-candidate-info a:hover,
.detail-item a:hover {
  color: var(--mint);
  text-decoration: underline;
}
.captain-options-section .team-card { margin-top: 8px; }
.team-invites-banner { margin-bottom: 24px; }

.feed-post-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.feed-post-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--forest-border);
  border-radius: var(--radius-md);
  background: var(--forest-light);
  padding: 0;
  min-width: 0;
  aspect-ratio: 1 / 1.15;
}
.feed-post-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  margin: 0;
  padding: 12px 14px 10px;
  font-size: 11px;
  color: var(--muted);
}
.feed-post-kind {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--mint);
  font-weight: 600;
}
.feed-post-author {
  color: var(--white);
  font-weight: 600;
  text-decoration: none;
}
.feed-post-author:hover { text-decoration: underline; color: var(--mint); }
.feed-post-image-link {
  display: block;
  margin: 0;
  background: var(--forest);
  aspect-ratio: 1 / 1;
  max-height: 220px;
  overflow: hidden;
  flex: 0 0 auto;
}
.feed-post-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.feed-post-description {
  margin: 0;
  padding: 12px 14px 0;
  line-height: 1.5;
  color: var(--white);
  white-space: pre-wrap;
  font-size: 13px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1 1 auto;
}
.feed-post-open {
  display: inline-block;
  margin-top: auto;
  padding: 10px 14px 14px;
  font-size: 13px;
  color: var(--mint);
  text-decoration: none;
}
.feed-post-open:hover { text-decoration: underline; }

@media (max-width: 900px) {
  .feed-post-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .feed-post-list { grid-template-columns: 1fr; }
}

.posts-feed-section .section-head { margin-bottom: 14px; }
.posts-feed-section .section-head .field-hint { margin-top: 4px; }

.new-post-section .section-head { margin-bottom: 14px; }
.new-post-section .section-head .field-hint { margin-top: 4px; }
.new-post-form {
  border: 1px solid var(--forest-border);
  border-radius: var(--radius-md);
  background: var(--forest-light);
  padding: 16px;
}
.new-post-form .form-group { margin-bottom: 14px; }
.new-post-form textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 96px;
  resize: vertical;
}
.new-post-form .form-actions { margin-top: 4px; }
