@import './variables.css';

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

html, body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* Arts & Crafts texture overlay — subtle parchment grain */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  background: var(--primary);
  color: #fff;
  padding: 0.6rem 1.2rem;
  border-radius: 0 0 6px 6px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 0;
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Ensure focus is always visible for keyboard users */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.hours-range:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.craft-option:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.chal-part-search-input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.card-comment-textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.dm-composer-input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ── TYPOGRAPHY ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
}

h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

h2 {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1rem;
  color: var(--ink2);
}

a {
  color: var(--orange);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ── NAV — slightly lighter than page background ── */
nav {
  background: #FAF6EE;             /* lifted from #F5EDE0 page bg — creates clear separation */
  color: var(--ink);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(45, 26, 12, 0.12);
  border-bottom: 1px solid var(--bg3);
}

/* Inner content constrained to 900px on public pages — bar itself remains full width */
.nav-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0.6rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Authenticated: nav content goes full width again */
.nav--auth .nav-inner {
  max-width: none;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0;          /* logo image includes wordmark, no gap needed */
  line-height: 1;
}

/* The actual logo PNG — drop wroht-logo.png into apps/web/assets/ */
.nav-logo img.wroht-logo {
  height: 46px;
  width: auto;
  display: block;
}

/* Fallback inline SVG shown until JPEG is placed */
.nav-logo svg {
  display: block;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
  margin-left: auto; /* always push to right edge */
}

/* Prevent 768px rule from overriding right-alignment inside the actual nav element */
nav .nav-links {
  width: auto !important;
  justify-content: flex-end !important;
  margin-left: auto !important;
}

.nav-links a {
  color: var(--ink);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
  font-family: var(--font-ui);
}

.nav-links a:hover {
  color: var(--orange);
  text-decoration: none;
}

.nav-links-unauth {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.nav-links-auth {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-links-auth.hidden {
  display: none;
}

.nav-links-unauth.hidden {
  display: none;
}

.nav-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brown);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cream);
  font-weight: 700;
  cursor: pointer;
  font-size: 0.9rem;
  border: 2px solid var(--bg3);
  font-family: var(--font-ui);
}

.nav-avatar-wrap {
  position: relative;
}

.profile-nav-flyout {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: #fff;
  border: 1px solid var(--bg3);
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(45,26,12,0.14), 0 2px 8px rgba(0,0,0,0.06);
  min-width: 180px;
  padding: 0.4rem 0;
  z-index: 500;
  opacity: 0;
  transform: translateY(-6px) scale(0.97);
  pointer-events: none;
  transition: opacity 0.15s, transform 0.15s;
}

.profile-nav-flyout.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

.profile-flyout-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1rem;
  font-family: var(--font-ui);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
  white-space: nowrap;
}

.profile-flyout-item:hover {
  background: var(--bg);
  color: var(--orange-dark);
}

.profile-flyout-divider {
  height: 1px;
  background: var(--bg3);
  margin: 0.3rem 0;
}

.profile-flyout-item--logout {
  color: #c0392b;
}
.profile-flyout-item--logout:hover {
  background: #fff5f5;
  color: #c0392b;
}
.profile-flyout-item--admin {
  color: var(--accent);
  font-weight: 600;
}
.profile-flyout-item--admin:hover {
  background: rgba(224,120,40,0.08);
  color: var(--accent-dark, #B85E18);
}

/* ── nav-avatar gets a ring when flyout is open ── */
.nav-avatar-wrap.flyout-open .nav-avatar {
  border-color: var(--orange);
  box-shadow: 0 0 0 2px rgba(224,120,40,0.2);
}

/* ── BUTTONS ── */
button, .btn {
  font-family: var(--font-ui);
  border: none;
  border-radius: var(--r);
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: background 0.18s, box-shadow 0.18s, transform 0.15s;
}

/* Primary — deep chocolate, cream text  (17:1 contrast ✓) */
.btn-primary {
  background: var(--brown);     /* #2D1A0C */
  color: var(--cream);          /* #F5EDE0 */
  font-weight: 600;
}

.btn-primary:hover {
  background: #3D2A1A;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-primary:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}

/* Secondary — warm parchment with brown border */
.btn-secondary {
  background: var(--bg2);
  color: var(--ink);
  border: 1.5px solid var(--cream3);
}

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

/* Outline — used in hero (dark bg) — orange border + text */
.btn-outline {
  background: transparent;
  color: var(--cream);
  border: 1.5px solid rgba(245, 237, 224, 0.55);
}

.btn-outline:hover {
  border-color: var(--cream);
  background: rgba(245, 237, 224, 0.10);
}

/* Orange accent button — for secondary CTAs */
.btn-accent {
  background: var(--orange);    /* #E07828 */
  color: var(--brown);          /* dark brown text: very high contrast ✓ */
  font-weight: 600;
}

.btn-accent:hover {
  background: var(--orange-dark);
  color: var(--cream);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-small {
  padding: 0.45rem 0.9rem;
  font-size: 0.875rem;
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

/* Trade button = same as primary */
.btn-trade {
  background: var(--brown);
  color: var(--cream);
  font-weight: 600;
}

.btn-trade:hover {
  background: #3D2A1A;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ── CONTAINER & LAYOUT ── */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.flex {
  display: flex;
}

.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

/* ── PAGES ── */
.page {
  display: none;
}

.page.active {
  display: block;
}

/* ── HOME HERO ── */
.home-hero {
  /* Constrained to 900px, centered — aspect-ratio matches hero-bg.png (1536×1024 = 3:2) */
  max-width: 900px;
  width: 100%;
  aspect-ratio: 1536 / 1024;
  margin: 0 auto 3rem;
  padding: 2rem 10%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  background: url('../assets/hero-bg.png') center / contain no-repeat;
}

/* No decorative overlay rings — photo speaks for itself */

/* Hero wordmark image — replaces the typed h1 */
.hero-wordmark {
  display: block;
  max-width: 156px;
  width: 55%;
  height: auto;
  margin: 0 auto 1.25rem;
}

.home-hero > * {
  position: relative;
  z-index: 1;
}

/* Text — dark ink, legible over photo or light fallback gradient */
.home-hero h1 {
  color: var(--ink);
  font-family: var(--font-display);
  font-style: italic;
}

.home-hero p {
  font-size: 1.15rem;
  color: var(--ink2);
  margin-bottom: 2rem;
}

.home-hero .btn {
  margin: 0 0.5rem;
}

/* Outline button — dark treatment for light photo background */
.home-hero .btn-outline {
  color: var(--ink);
  border-color: rgba(45, 26, 12, 0.45);
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(4px);
}
.home-hero .btn-outline:hover {
  background: rgba(255, 255, 255, 0.75);
  border-color: rgba(45, 26, 12, 0.7);
}

/* ── CARDS ── */
.card {
  background: #FDFAF5;
  border-radius: var(--r-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--bg3);
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ink);
}

.card-subtitle {
  font-size: 0.9rem;
  color: var(--ink3);
}

/* (stale rule removed — card-body bottom is controlled via flex layout) */

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid var(--cream3);
}

/* ── FEED GRID ── */
.feed-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  max-width: 1600px;
  margin: 0 auto;
}

@media (max-width: 1400px) {
  .feed-grid {
    grid-template-columns: repeat(3, 1fr);
    max-width: 1200px;
  }
}

/* ── SKELETON LOADING CARDS ── */
@keyframes skeleton-shimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(200%); }
}

/* Cards fade in when swapped from skeleton → real */
@keyframes card-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.feed-card--skeleton {
  background: #FDFAF5;
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  pointer-events: none;
}

.feed-card--entering {
  animation: card-fade-in 0.28s ease both;
}

/* Shimmer wrapper — anything inside gets the moving highlight */
.skel-shimmer {
  position: relative;
  overflow: hidden;
}
.skel-shimmer::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(255,255,255,0.28) 50%,
    transparent 65%
  );
  animation: skeleton-shimmer 1.6s ease-in-out infinite;
  pointer-events: none;
}

/* Image area: 240px tall, coloured from dominant palette */
.skel-media {
  height: 240px;
  flex-shrink: 0;
  /* background-color set inline per-card */
}

/* Generic bar used for all ghost text lines */
.skel-line {
  height: 11px;
  border-radius: 5px;
  background: var(--bg3);
}

/* Maker avatar circle */
.skel-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg3);
  flex-shrink: 0;
}

/* Card body area */
.skel-body {
  padding: 1rem 1.25rem 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Maker row */
.skel-maker-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}
.skel-maker-text {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}

/* Ghost action strip at bottom */
.skel-actions {
  display: flex;
  border-top: 1px solid var(--bg3);
  margin: 0.75rem -1.25rem 0;
}
.skel-action-btn {
  flex: 1;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.skel-action-icon {
  width: 26px;
  height: 10px;
  border-radius: 4px;
  background: var(--bg3);
}

/* ── SKELETON: RESOLVED STATE (shimmer paused, bars settle before swap) ── */
.feed-card--skeleton-resolved .skel-shimmer::after {
  animation: none;
  opacity: 0;
  transition: opacity 0.18s;
}
.feed-card--skeleton-resolved .skel-line,
.feed-card--skeleton-resolved .skel-avatar,
.feed-card--skeleton-resolved .skel-action-icon {
  opacity: 0.38;
  transition: opacity 0.2s ease;
}
.feed-card--skeleton-resolved .skel-media {
  filter: brightness(0.94);
  transition: filter 0.2s ease;
}

/* ── DISCOVER CARD ── */
/* ── DISCOVER / SUGGESTION CARD ── */
/* Renders as a regular feed card with a thin "Suggested for you" banner at top */
.discover-card {
  border: 1.5px solid var(--primary);
  background: #FDFAF5;
  transition: opacity 0.22s ease, transform 0.22s ease;
  /* Don't stretch to the tallest card in the row */
  align-self: start;
}

.discover-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.9rem 0.45rem;
  background: rgba(176,101,34,0.07);
  border-bottom: 1px solid rgba(176,101,34,0.12);
  gap: 0.5rem;
}

.discover-banner-left {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  color: var(--primary);
  flex: 1;
}

/* Ghost-style follow button — stays quiet in the banner, not a bold CTA */
.discover-follow-btn {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-ui);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--primary);
  background: transparent;
  border: 1px solid rgba(176,101,34,0.4);
  border-radius: 20px;
  padding: 0.28rem 0.7rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.14s, border-color 0.14s, color 0.14s;
}
.discover-follow-btn:hover {
  background: rgba(176,101,34,0.08);
  border-color: var(--primary);
}

.discover-follow-btn--following {
  color: var(--ink3);
  border-color: var(--bg3);
  pointer-events: none;
}

/* ── EXPLORE ADVANCED FILTERS ── */
.explore-advanced-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0 0.25rem;
}

.explore-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--bg3);
  background: var(--cream);
  border-radius: 20px;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink2);
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.explore-filter-btn:hover,
.explore-filter-btn--active {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(176,101,34,0.06);
}

.explore-filter-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: var(--primary);
  color: #fff;
  border-radius: 10px;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
}

.explore-filter-panel {
  background: var(--cream);
  border: 1px solid var(--bg3);
  border-radius: var(--r-lg);
  padding: 1.25rem 1.5rem 0.75rem;
  margin-bottom: 1rem;
  animation: card-fade-in 0.18s ease both;
}

.explore-filters-toggle {
  display: none;
  align-items: center; gap: 0.4rem;
  font-size: 0.88rem; font-family: var(--font-ui);
  background: var(--bg2); border: 1px solid var(--bg3);
  border-radius: 99px; padding: 0.4rem 0.85rem;
  color: var(--ink); cursor: pointer;
}
.explore-filters-badge {
  background: var(--primary); color: #fff;
  font-size: 0.7rem; font-weight: 700;
  border-radius: 99px; padding: 0.1rem 0.4rem;
  min-width: 16px; text-align: center;
}
.explore-filters-panel { display: flex; flex-wrap: wrap; gap: 0.5rem; }

@media (max-width: 768px) {
  .explore-filters-toggle { display: inline-flex; }
  .explore-filters-panel { display: none; width: 100%; padding: 0.75rem 0 0; }
  .explore-filters-panel--open { display: flex; }
}

.filter-section {
  margin-bottom: 1.1rem;
}
.filter-section:last-of-type { margin-bottom: 0.5rem; }

.filter-section-label {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink3);
  margin-bottom: 0.5rem;
}

.filter-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.filter-pill {
  padding: 0.25rem 0.65rem;
  border: 1px solid var(--bg3);
  background: var(--cream);
  border-radius: 20px;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--ink2);
  cursor: pointer;
  transition: border-color 0.13s, background 0.13s, color 0.13s;
  white-space: nowrap;
}
.filter-pill:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.filter-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.filter-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 0.75rem;
  border-top: 1px solid var(--bg3);
  margin-top: 0.5rem;
}

/* ── DUAL-RANGE HOURS SLIDER ── */
.filter-section-label .hours-readout {
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--primary);
  margin-left: 0.4rem;
}

.hours-slider-wrap {
  position: relative;
  height: 28px;
  margin: 0.5rem 0 0.25rem;
}

.hours-track {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--bg3);
  border-radius: 2px;
  transform: translateY(-50%);
  pointer-events: none;
}

.hours-fill {
  position: absolute;
  top: 0;
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
  transition: left 0.06s, width 0.06s;
}

.hours-range {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: 0;
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: transparent;
  pointer-events: none;
  outline: none;
}

.hours-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--primary);
  box-shadow: 0 1px 4px rgba(0,0,0,0.18);
  cursor: pointer;
  pointer-events: all;
  transition: transform 0.12s, box-shadow 0.12s;
}
.hours-range::-webkit-slider-thumb:hover,
.hours-range::-webkit-slider-thumb:active {
  transform: scale(1.18);
  box-shadow: 0 2px 8px rgba(0,0,0,0.22);
}
.hours-range::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--primary);
  box-shadow: 0 1px 4px rgba(0,0,0,0.18);
  cursor: pointer;
  pointer-events: all;
}

.hours-range--max {
  z-index: 1;
}
.hours-range--min {
  z-index: 2;
}

.hours-tick-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  color: var(--ink3);
  font-family: var(--font-ui);
  margin-top: 0.15rem;
}

/* ── FILTER TYPEAHEAD ── */
.filter-typeahead {
  position: relative;
}

.filter-ta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.35rem;
  min-height: 0;
}

.filter-ta-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.22rem 0.55rem 0.22rem 0.65rem;
  background: var(--primary);
  color: #fff;
  border-radius: 20px;
  font-size: 0.76rem;
  font-family: var(--font-ui);
  font-weight: 500;
  white-space: nowrap;
}

.filter-ta-pill-x {
  background: none;
  border: none;
  color: rgba(255,255,255,0.8);
  font-size: 0.9rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.1rem;
  display: inline-flex;
  align-items: center;
  transition: color 0.12s;
}
.filter-ta-pill-x:hover { color: #fff; }

.filter-ta-input-row {
  position: relative;
}

.filter-ta-input {
  width: 100%;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--bg3);
  border-radius: var(--r-sm);
  background: var(--cream);
  font-family: var(--font-ui);
  font-size: 0.82rem;
  color: var(--ink1);
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.13s, box-shadow 0.13s;
}
.filter-ta-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(var(--primary-rgb, 180,100,40), 0.12);
}
.filter-ta-input::placeholder {
  color: var(--ink3);
}

.filter-ta-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 3px);
  left: 0;
  right: 0;
  background: var(--cream);
  border: 1px solid var(--bg3);
  border-radius: var(--r-sm);
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
  z-index: 200;
  max-height: 200px;
  overflow-y: auto;
}

.filter-ta-option {
  padding: 0.45rem 0.75rem;
  font-size: 0.82rem;
  font-family: var(--font-ui);
  color: var(--ink2);
  cursor: pointer;
  transition: background 0.1s, color 0.1s;
}
.filter-ta-option:hover {
  background: var(--bg2);
  color: var(--ink1);
}

/* ── FEED CARD ── */
.feed-card {
  background: #FDFAF5;
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--bg3);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

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

/* ── CARD MEDIA GALLERY ── */
.card-media-wrap {
  position: relative;
  height: 240px;
  overflow: hidden;
  background: var(--bg2);
  flex-shrink: 0;
}

.card-media-placeholder {
  position: absolute;
  inset: 0;
  z-index: 1;
  transition: opacity 0.5s ease;
}

.card-media-strip {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 2;
}

.card-slide-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}

/* Nav arrows */
.media-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(255,255,255,0.85);
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s;
  padding: 0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.card-media-wrap:hover .media-nav {
  opacity: 1;
}

.media-prev { left: 8px; }
.media-next { right: 8px; }

/* Dot indicators */
.media-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
  z-index: 10;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.55);
  transition: background 0.2s, transform 0.2s;
}

.dot.active {
  background: white;
  transform: scale(1.25);
}

/* Multi-photo count badge */
.media-count-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0,0,0,0.45);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 4px;
  z-index: 10;
  pointer-events: none;
}

/* ── CARD BODY ── */
.card-body {
  padding: 1rem 1.25rem 0;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-maker {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.card-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.card-maker-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink);
  line-height: 1.3;
}

.card-maker-handle {
  font-size: 0.8rem;
  color: var(--ink3);
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.4rem;
  line-height: 1.4;
}

.card-desc {
  font-size: 0.875rem;
  color: var(--ink2);
  line-height: 1.55;
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.card-tag {
  background: var(--bg2);
  color: var(--ink3);
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.78rem;
}

/* ── ACTION BUTTONS (Spark / Comment / Reshare — all identical style) ── */
.card-actions {
  display: flex;
  border-top: 1px solid var(--bg3);
  margin: 0 -1.25rem;
  padding: 0 0.25rem 0.35rem;
  /* Push actions to the very bottom of the card body so extra row height
     accumulates as content breathing room, not as padding below actions */
  margin-top: auto;
}

.action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: none;
  border: none;
  color: var(--ink3);
  font-size: 0.85rem;
  font-family: var(--font-body);
  font-weight: 500;
  padding: 0.5rem 0.5rem;
  cursor: pointer;
  border-radius: var(--r);
  transition: color 0.15s, background 0.15s;
}

.action-btn:hover {
  background: var(--bg2);
  color: var(--ink);
}

.action-btn.sparked {
  color: var(--orange);
}

.action-btn svg {
  flex-shrink: 0;
}

/* Loading skeleton for lazy-loaded cards */
.feed-loading {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  padding: 2rem;
  color: var(--ink3);
  font-size: 0.9rem;
  gap: 0.5rem;
  align-items: center;
}

/* ── ITEM DETAIL (reused in modal) ── */
.item-detail-media {
  width: 100%;
  height: 360px;
  object-fit: cover;
  border-radius: var(--r);
  margin-bottom: 1.5rem;
  display: block;
}

.item-detail-thumbs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
}

.item-detail-thumb {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid transparent;
  flex-shrink: 0;
  transition: border-color 0.2s;
}

.item-detail-thumb.active {
  border-color: var(--orange);
}

.item-detail-actions {
  display: flex;
  gap: 0;
  border-top: 1px solid var(--bg3);
  border-bottom: 1px solid var(--bg3);
  margin: 1rem 0;
}

.item-detail-comment {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--bg3);
}

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

.comment-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  flex-shrink: 0;
}

.comment-body { flex: 1; }
.comment-author { font-weight: 600; font-size: 0.9rem; margin-bottom: 0.2rem; }
.comment-text { font-size: 0.875rem; color: var(--ink2); line-height: 1.5; }
.comment-time { font-size: 0.78rem; color: var(--ink3); margin-top: 0.2rem; }

/* ── MODALS ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(46, 31, 20, 0.55);
  z-index: 1000;
}

.modal-overlay.open {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal {
  background: #FDFAF5;
  border-radius: var(--r-lg);
  padding: 0 2rem 2rem;   /* no top padding — header provides it; sticky needs top:0 flush */
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-md);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  /* Sticky — pins the header + X button as modal content scrolls.
     No negative top margin: the modal's padding-top acts as breathing room
     and the sticky snaps cleanly at the content-area edge with no peekthrough. */
  position: sticky;
  top: 0;
  z-index: 10;
  background: #FDFAF5;
  /* Extend left/right to bleed through modal's side padding */
  margin: 0 -2rem 1.5rem;
  padding: 1.25rem 2rem;
  border-bottom: 1px solid var(--bg3);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  color: var(--ink3);
  padding: 0.1rem 0.25rem;
  border-radius: 4px;
  transition: background 0.12s, color 0.12s;
  flex-shrink: 0;
}

.modal-close:hover {
  color: var(--ink);
  background: var(--bg3);
}

.create-step-indicator {
  display: flex; gap: 0.5rem; justify-content: center; margin-bottom: 1.25rem;
}
.create-step-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--bg3); transition: background 0.2s;
}
.create-step-dot--active { background: var(--primary); }
.create-step-actions {
  display: flex; gap: 0.75rem; justify-content: flex-end; margin-top: 1.25rem;
}

.modal-subtitle {
  font-size: 0.82rem;
  color: var(--ink3);
  margin-top: 0.15rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--ink);
}

.form-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.form-label-row label {
  margin-bottom: 0;
}

.char-count {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--ink3);
  font-variant-numeric: tabular-nums;
  transition: color 0.2s;
}

.char-count--near    { color: var(--orange-dark); }
.char-count--at-limit { color: #c0392b; font-weight: 600; }

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--cream3);
  border-radius: var(--r);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(224, 120, 40, 0.15);
}

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

.file-input-label {
  display: block;
  padding: 1rem;
  border: 2px dashed var(--cream3);
  border-radius: var(--r);
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--ink2);
}

.file-input-label:hover {
  border-color: var(--orange);
  background: var(--orange-pale);
}

.file-input-label input[type="file"] {
  display: none;
}

/* ── PROFILE ── */
.profile-header {
  background: var(--bg2);
  padding: 2rem 2rem 1.5rem;
  border-radius: var(--r-lg);
  margin-bottom: 0;
  text-align: center;
}

.profile-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: var(--btn-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2rem;
  font-weight: 700;
  margin: 0 auto 1rem;
  border: 3px solid var(--bg3);
}

.avatar-edit-overlay {
  position: absolute; inset: 0; border-radius: 50%;
  background: rgba(0,0,0,0.35); display: flex; align-items: center;
  justify-content: center; opacity: 0; transition: opacity 0.2s;
  pointer-events: none; color: #fff;
}
[onclick="openAvatarUpload()"]:hover .avatar-edit-overlay { opacity: 1; }

.avatar-crop-modal-inner { max-width: 360px; }
.avatar-crop-frame {
  display: inline-block;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 1rem;
  border: 2px solid var(--bg3);
}
.avatar-crop-controls { padding: 0 1rem 0.5rem; }

.profile-name {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.2rem;
}

.profile-handle { color: var(--ink3); margin-bottom: 0.75rem; font-size: 0.9rem; }
.profile-bio { color: var(--ink2); margin-bottom: 0.6rem; max-width: 480px; margin-left: auto; margin-right: auto; }

.profile-location {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.82rem;
  color: var(--ink3);
  margin-bottom: 0.85rem;
}

.profile-stats {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  margin: 1.25rem 0;
}

.profile-stat { text-align: center; }
.profile-stat-value { font-size: 1.4rem; font-weight: 700; color: var(--ink); }
.profile-stat-label { font-size: 0.8rem; color: var(--ink3); margin-top: 0.1rem; }

.profile-stat--clickable {
  cursor: pointer;
  border-radius: 8px;
  padding: 0.35rem 0.6rem;
  transition: background 0.12s;
}
.profile-stat--clickable:hover {
  background: var(--bg2);
}
.profile-stat--clickable:hover .profile-stat-value {
  color: var(--primary);
}

/* Profile tabs */
.profile-tabs {
  display: flex;
  border-bottom: 2px solid var(--bg3);
  margin-bottom: 1.5rem;
  /* no overflow:hidden — it clips the active-tab bottom border trick */
  background: var(--cream);
  border-radius: 0 0 var(--r-lg) var(--r-lg);
}

.profile-tab {
  flex: 1;
  background: none;
  border: none;
  padding: 1rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink3);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: color 0.2s, border-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.profile-tab:hover { color: var(--ink); }

.profile-tab {
  border-radius: 0;
}

.profile-tab.active {
  color: var(--brown);
  border-bottom-color: var(--orange);
  font-weight: 600;
  margin-bottom: -2px;
}

.tab-count {
  background: var(--bg2);
  color: var(--ink3);
  font-size: 0.75rem;
  padding: 1px 6px;
  border-radius: 10px;
}

.profile-tab-panel { }
.profile-tab-panel.hidden { display: none; }

/* ── Follow Overlay Modal ── */
.follow-overlay-modal {
  max-width: 440px;
  width: 100%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  padding: 0 1.75rem 1.75rem;
}

.follow-overlay-list {
  overflow-y: auto;
  flex: 1;
  padding-top: 0.25rem;
}

/* "Following" state pill button */
.follow-btn--following {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--primary);
  border-color: var(--primary);
  background: rgba(176,101,34,0.07);
}
.follow-btn--following:hover {
  background: rgba(192,57,43,0.07);
  border-color: #c0392b;
  color: #c0392b;
}

/* Maker row hover on overlay */
.follow-row {
  border-radius: 8px;
  transition: background 0.12s, opacity 0.2s;
}
.follow-row:hover {
  background: var(--bg2);
}

/* ── Follow lists (profile followers / following tabs) ── */
.profile-social-panel {
  padding: 0.5rem 0;
}

.follow-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.follow-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--bg3);
  transition: opacity 0.2s;
}

.follow-row:last-child {
  border-bottom: none;
}

.follow-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
  font-family: var(--font-ui);
}

.follow-info {
  flex: 1;
  min-width: 0;
}

.follow-name {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
}

.follow-handle {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--ink3);
  margin-top: 0.05rem;
}

.follow-action-btn {
  flex-shrink: 0;
}

.follow-action-btn--unfollow {
  color: #c0392b;
  border-color: rgba(192,57,43,0.3);
}
.follow-action-btn--unfollow:hover {
  background: #fff5f5;
  border-color: #c0392b;
}

/* Inspiration form */
.inspiration-section {
  background: var(--cream);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--bg3);
  margin-bottom: 1.25rem;
}

.inspiration-section-title {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink3);
  margin-bottom: 1rem;
}

.inspo-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.inspo-pill {
  padding: 0.35rem 0.9rem;
  border-radius: 20px;
  border: 1.5px solid var(--bg3);
  background: var(--bg);
  color: var(--ink2);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--font-body);
}

.inspo-pill:hover { border-color: var(--orange); color: var(--orange-dark); }

.inspo-pill.selected {
  background: var(--btn-gradient);
  border-color: transparent;
  color: white;
  font-weight: 500;
}

.empty-state {
  text-align: center;
  color: var(--ink3);
  padding: 3rem 1rem;
  font-size: 0.95rem;
}

/* ── SIDEBAR ── */
.sidebar {
  position: static;
  height: fit-content;
}

.sidebar-card {
  background: #F9F3EA; /* midpoint between card (#FDFAF5) and page bg (#F5EDE0) — sits quietly without disappearing */
  border-radius: var(--r-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--bg3);
  margin-bottom: 1.5rem;
}

.sidebar-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 1rem;
}

.sidebar-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--cream3);
}

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

.sidebar-link {
  display: block;
  color: var(--ink2);
  transition: color 0.2s;
}

.sidebar-link:hover {
  color: var(--orange);
  text-decoration: none;
}

/* ── TABS ── */
.tabs {
  display: flex;
  gap: 2rem;
  border-bottom: 1px solid var(--cream3);
  margin-bottom: 2rem;
}

.tab {
  padding: 1rem 0;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink3);
  font-weight: 500;
  position: relative;
  transition: color 0.2s;
}

.tab:hover {
  color: var(--ink);
}

.tab {
  border-radius: 0;
}

.tab.active {
  color: var(--ink);
  border-bottom: 2px solid var(--orange);
  margin-bottom: -2px;
}

.auth-tab.active {
  border-bottom-color: var(--orange);
}

.feed-tab.active {
  border-bottom-color: var(--brown);
}

/* ── PILLS ── */
.pill {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--bg2);
  color: var(--ink);
  border-radius: 20px;
  border: 1px solid var(--cream3);
  cursor: pointer;
  transition: all 0.2s;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.pill:hover {
  background: var(--bg3);
}

.pill.active {
  background: var(--brown);
  color: var(--cream);
  border-color: transparent;
}

.category-pill {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--bg2);
  color: var(--ink);
  border-radius: 20px;
  border: 1px solid var(--cream3);
  cursor: pointer;
  transition: all 0.2s;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.category-pill:hover {
  background: var(--bg3);
}

.category-pill.active {
  background: var(--brown);
  color: var(--cream);
  border-color: transparent;
}

/* ── CRAFT TAGS ── */
.craft-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--bg2);
  color: var(--ink);
  border-radius: 20px;
  font-size: 0.85rem;
  border: 1px solid var(--cream3);
  cursor: pointer;
  transition: all 0.2s;
  margin-right: 0.5rem;
}

.craft-tag:hover {
  background: var(--bg3);
}

.craft-tag.selected {
  background: var(--brown);
  color: var(--cream);
  border-color: transparent;
}

/* ── SEARCH ── */
.search-bar {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.search-bar input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid var(--cream3);
  border-radius: var(--r);
  font-size: 1rem;
}

.search-bar input:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(224, 120, 40, 0.15);
}

.search-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

/* ── NOTIFICATIONS ── */
.notif-item {
  background: white;
  border-left: 4px solid transparent;
  border-radius: var(--r);
  padding: 1rem;
  margin-bottom: 0.75rem;
  box-shadow: var(--shadow);
  transition: all 0.2s;
}

.notif-item:hover {
  box-shadow: var(--shadow-md);
}

.notif-item.unread {
  border-left-color: var(--orange);
  background: var(--orange-pale);
}

.notif-header {
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.25rem;
}

.notif-msg {
  font-size: 0.9rem;
  color: var(--ink2);
  margin-bottom: 0.5rem;
}

.notif-time {
  font-size: 0.8rem;
  color: var(--ink3);
}

/* ── CHALLENGES ── */
.challenge-card {
  background: var(--cream);
  border-left: 4px solid var(--moss);
  border: 1px solid var(--bg3);
  border-left: 4px solid var(--moss);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
  transition: all 0.2s;
}

.challenge-card:hover {
  box-shadow: var(--shadow-md);
}

.challenge-card.active-challenge {
  border-left-color: var(--amber);
}

.challenge-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.challenge-desc {
  color: var(--ink2);
  margin-bottom: 1rem;
}

.challenge-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: var(--ink3);
}

.challenge-deadline {
  color: var(--orange-dark);
  font-weight: 500;
}

/* ── UTILITY CLASSES ── */
.hidden {
  display: none !important;
}

.mt {
  margin-top: 1rem;
}

.mb {
  margin-bottom: 1rem;
}

.mt-2 {
  margin-top: 2rem;
}

.mb-2 {
  margin-bottom: 2rem;
}

.gap-1 {
  gap: 1rem;
}

.gap-2 {
  gap: 2rem;
}

.text-center {
  text-align: center;
}

.text-muted {
  color: var(--ink3);
}

.text-bold {
  font-weight: 600;
}

/* ── WROHT GRADIENT UTILITIES ── */
.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-btn {
  background: var(--btn-gradient);
  color: white;
  border: none;
}

.gradient-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.nav-logo img.wroht-wordmark {
  height: 38px;
  width: auto;
}

/* (hero::before now defined in the hero block above) */

/* ── MULTI-MEDIA UPLOAD ── */
.upload-zone {
  border: 2px dashed var(--bg3);
  border-radius: var(--r-lg);
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  background: var(--bg2);
}

.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--orange);
  background: var(--orange-pale);
}

.upload-zone-icon { font-size: 2rem; margin-bottom: 0.5rem; }

.upload-zone p {
  color: var(--ink3);
  font-size: 0.9rem;
  margin: 0.25rem 0;
}

.upload-limits {
  font-size: 0.78rem;
  color: var(--ink3);
  margin-top: 0.5rem;
}

.media-preview-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
  margin-top: 1rem;
}

.media-preview-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--r);
  overflow: hidden;
  background: var(--bg3);
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.2s;
}

.media-preview-item.primary {
  border-color: var(--orange);
}

.media-preview-item img, .media-preview-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media-preview-remove {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  color: white;
  border: none;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
}

.primary-badge {
  position: absolute;
  bottom: 3px;
  left: 3px;
  background: var(--btn-gradient);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.upload-count {
  font-size: 0.8rem;
  color: var(--ink3);
  margin-top: 0.5rem;
  text-align: right;
}

.sidebar-maker-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.4rem;
  border-bottom: 1px solid var(--bg3);
  border-radius: 6px;
  margin: 0 -0.4rem;
  transition: background 0.12s;
}
.sidebar-maker-row:last-child { border-bottom: none; }
.sidebar-maker-row:hover { background: var(--bg2); }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .feed-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 540px) {
  .feed-grid {
    grid-template-columns: 1fr;
  }
  .card-media-wrap {
    height: 220px;
  }
}

@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .nav {
    flex-direction: column;
    gap: 1rem;
  }

  .nav-links {
    width: 100%;
    justify-content: center;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .item-media {
    height: 250px;
  }

  .profile-stats {
    gap: 1rem;
  }

  .sidebar {
    position: static;
    margin-top: 2rem;
  }

  .home-hero {
    padding: 2rem 5%;
  }

  .hero-wordmark {
    max-width: 125px;   /* 156 × 0.8 */
    width: 44%;
  }

  .home-hero p {
    font-size: 1rem !important;   /* overrides inline style */
  }

  .hero-desc {
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
  }

  .public-hero-badge {
    font-size: 0.72rem;
  }

  .modal {
    width: 95%;
  }
}

/* ── AUTH EXTRAS ── */
.demo-credentials {
  background: var(--bg2);
  border: 1.5px dashed var(--bg3);
  border-radius: var(--r);
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: var(--ink3);
  margin-bottom: 1.25rem;
  line-height: 1.7;
}

.demo-credentials strong {
  color: var(--brown);
  font-family: monospace;
  font-size: 0.9rem;
}

.auth-pane-icon {
  font-size: 2.75rem;
  margin-bottom: 0.75rem;
  display: block;
  text-align: center;
}

.otp-input {
  letter-spacing: 0.5em;
  font-size: 1.75rem;
  text-align: center;
  font-weight: 600;
  font-family: monospace;
}

.auth-divider {
  text-align: center;
  color: var(--ink3);
  font-size: 0.85rem;
  margin: 0.5rem 0 1.25rem;
}

.forgot-link {
  display: block;
  text-align: right;
  font-size: 0.85rem;
  margin-top: -0.5rem;
  margin-bottom: 1.25rem;
  color: var(--orange);
}

/* ── PROFILE HEADER — Arts & Crafts earthen ── */
.profile-header {
  background: var(--bg2);
  border-bottom: 2px solid var(--bg3);
}

/* ══════════════════════════════════════════════════════════════
   FEED LAYOUT — sidebar collapses at tablet/mobile
   ══════════════════════════════════════════════════════════════ */
.feed-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2rem;
  margin: 2rem 0;
}

/* Tablet: hide the sidebar entirely, feed takes full width */
@media (max-width: 960px) {
  .feed-layout {
    grid-template-columns: 1fr;
  }
  .feed-sidebar {
    display: none !important;
  }
}

/* ══════════════════════════════════════════════════════════════
   FLOATING ACTION BUTTON (FAB)
   ══════════════════════════════════════════════════════════════ */
.feed-fab {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 300;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--brown);
  color: var(--cream);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(45, 26, 12, 0.35);
  transition: background 0.18s, transform 0.15s, box-shadow 0.18s;
}

.feed-fab:hover {
  background: var(--orange);
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 8px 28px rgba(224, 120, 40, 0.45);
}

.feed-fab:active {
  transform: scale(0.96);
}

.feed-fab:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}

/* ══════════════════════════════════════════════════════════════
   NAV CHALLENGE LINK
   ══════════════════════════════════════════════════════════════ */
.nav-challenge-link {
  display: flex;
  align-items: center;
  gap: 0;
  color: var(--orange) !important;
  font-weight: 600 !important;
  padding: 0.3rem 0.7rem;
  border: 1.5px solid var(--orange);
  border-radius: var(--r);
  font-size: 0.875rem !important;
  line-height: 1;
  transition: background 0.15s, color 0.15s !important;
}

.nav-challenge-link:hover {
  background: var(--orange);
  color: var(--cream) !important;
  text-decoration: none !important;
}

/* ══════════════════════════════════════════════════════════════
   CHALLENGE MATCH MODAL
   ══════════════════════════════════════════════════════════════ */
.challenge-match-modal {
  max-width: 520px;
}

/* The randomly selected challenge preview card */
.challenge-pick-card {
  background: var(--bg2);
  border: 1.5px solid var(--bg3);
  border-radius: var(--r-lg);
  padding: 1.25rem 1.5rem;
  border-left: 4px solid var(--orange);
}

.challenge-pick-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.4rem;
}

.challenge-pick-desc {
  font-size: 0.9rem;
  color: var(--ink2);
  margin-bottom: 0.75rem;
}

.challenge-pick-meta {
  display: flex;
  gap: 1.25rem;
  font-size: 0.82rem;
  color: var(--ink3);
  font-family: var(--font-ui);
}

.challenge-pick-meta span {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* The matched result shown after pairing */
.challenge-match-result {
  background: var(--bg2);
  border: 1.5px solid var(--bg3);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  text-align: left;
}

.match-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.match-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.3rem;
  font-weight: 700;
  flex-shrink: 0;
}

.match-maker-name {
  font-weight: 700;
  color: var(--ink);
  font-size: 1rem;
  margin-bottom: 0.15rem;
}

.match-maker-craft {
  font-size: 0.85rem;
  color: var(--ink3);
}

.match-challenge-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--orange);
  margin-bottom: 0.35rem;
  font-family: var(--font-ui);
}

.match-challenge-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.25rem;
}

.match-deadline {
  font-size: 0.82rem;
  color: var(--ink3);
  font-family: var(--font-ui);
}

/* ══════════════════════════════════════════════════════════════
   CRAFT HOURS — card display
   ══════════════════════════════════════════════════════════════ */

/* Overlay badge on the bottom-left of the media image */
.card-hours-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(45, 26, 12, 0.82);
  color: #F5EDE0;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 20px;
  backdrop-filter: blur(2px);
  letter-spacing: 0.02em;
  pointer-events: none;
  border: 1px solid rgba(245, 237, 224, 0.18);
}

/* ── VIDEO CARD STYLES ── */

/* The <video> element in a card's media strip */
.card-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* Slight darkening for the initial poster state */
  background: rgba(45,26,12,0.06);
}

/* "▶ Video" badge — top-right corner of media area (mirrors count badge position) */
.card-video-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(45, 26, 12, 0.78);
  color: #F5EDE0;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 3px 8px 3px 6px;
  border-radius: 20px;
  backdrop-filter: blur(2px);
  pointer-events: none;
  border: 1px solid rgba(245,237,224,0.18);
}

/* Prominent row in the card body — right below the title */
.card-hours-row {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--orange);
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin-bottom: 0.5rem;
}

.card-hours-row span {
  color: var(--orange);
}

/* ══════════════════════════════════════════════════════════════
   CRAFT TYPEAHEAD TAG INPUT
   ══════════════════════════════════════════════════════════════ */

.craft-typeahead {
  position: relative;
  min-height: 44px;
  border: 1px solid var(--cream3);
  border-radius: var(--r);
  background: var(--bg);
  padding: 6px 8px 4px;
  cursor: text;
  transition: border-color 0.18s, box-shadow 0.18s;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: flex-start;
}

.craft-typeahead:focus-within {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(224, 120, 40, 0.15);
}

/* The selected tag chips */
.craft-tags-row {
  display: contents; /* chips flow inline with the input */
}

.craft-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--brown);
  color: var(--cream);
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 3px 8px 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
  line-height: 1.5;
}

.craft-tag-remove {
  background: none;
  border: none;
  color: rgba(245, 237, 224, 0.7);
  font-size: 0.95rem;
  line-height: 1;
  padding: 0 1px;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  transition: color 0.15s;
}

.craft-tag-remove:hover { color: #fff; }

/* The text input inside the typeahead */
.craft-type-input {
  flex: 1;
  min-width: 140px;
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  outline: none;
  padding: 2px 4px;
  line-height: 1.6;
}

.craft-type-input::placeholder { color: var(--ink3); }

/* Dropdown list */
.craft-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--bg);
  border: 1px solid var(--cream3);
  border-radius: var(--r);
  box-shadow: var(--shadow-md);
  list-style: none;
  max-height: 220px;
  overflow-y: auto;
  z-index: 500;
  padding: 4px 0;
}

.craft-dropdown.open { display: block; }

.craft-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.12s;
}

.craft-option:hover,
.craft-option:focus { background: var(--bg2); }

.craft-option-emoji {
  font-size: 1.05rem;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}

/* "Add custom" option — styled differently */
.craft-option-custom {
  color: var(--orange);
  border-top: 1px solid var(--bg3);
  margin-top: 2px;
  padding-top: 10px;
}

.craft-option-custom:hover { background: var(--orange-pale); }

.craft-dropdown-empty {
  padding: 10px 14px;
  color: var(--ink3);
  font-family: var(--font-ui);
  font-size: 0.875rem;
  font-style: italic;
}

/* ════════════════════════════════════════════════════════════════
   OPTION PILLS  — shared by subtags, aesthetic, materials
   ════════════════════════════════════════════════════════════════ */

.option-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.45rem;
  margin-top: 0.35rem;
}

.option-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  border: 1.5px solid var(--bg3);
  background: var(--bg);
  color: var(--ink2);
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  white-space: nowrap;
  line-height: 1.3;
}

.option-pill:hover {
  border-color: var(--orange);
  color: var(--orange-dark);
  background: var(--orange-pale);
}

.option-pill.active {
  background: var(--brown);
  border-color: var(--brown);
  color: var(--cream);
}

.option-pill.active:hover {
  background: var(--orange-dark);
  border-color: var(--orange-dark);
  color: #fff;
}

.option-pill:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

/* ── Sub-tags section ── */

.subtags-section {
  animation: subtag-fadein 0.2s ease;
}

@keyframes subtag-fadein {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.subtags-groups {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.subtag-group-label {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

/* ── More Options disclosure ── */

.more-options-section {
  border: 1.5px solid var(--bg3);
  border-radius: var(--r-lg);
  background: var(--bg);
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.more-options-toggle {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-ui);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink2);
  user-select: none;
  transition: background 0.15s;
}

.more-options-section[open] .more-options-toggle {
  background: var(--bg2);
  border-bottom: 1px solid var(--bg3);
}

.more-options-toggle::-webkit-details-marker { display: none; }
.more-options-toggle::marker { display: none; }

.more-options-toggle:hover {
  background: var(--orange-pale);
  color: var(--orange-dark);
}

.more-options-chevron {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.more-options-section[open] .more-options-chevron {
  transform: rotate(180deg);
}

.more-options-hint {
  font-weight: 400;
  color: var(--ink3);
  font-size: 0.8rem;
}

.more-options-body {
  padding: 0.85rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.more-options-body .form-group {
  margin-bottom: 0;
}

.more-options-body .form-group label {
  margin-bottom: 0.35rem;
}

/* ════════════════════════════════════════════════════════════════
   EXPLORE PAGE
   ════════════════════════════════════════════════════════════════ */

/* ── Hero search block ── */

.explore-hero {
  padding: 2.5rem 0 1.75rem;
  text-align: center;
}

.explore-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  margin-bottom: 0.4rem;
}

.explore-flourish {
  height: auto;
  max-height: 2.2rem;   /* scales with the title's clamp font-size */
  width: auto;
  flex-shrink: 0;
}

.explore-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  color: var(--ink);
  margin: 0;
}

.explore-subtitle {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink2);
  margin: 0 0 1.5rem;
}

.explore-search-bar {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
}

.explore-search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink3);
  pointer-events: none;
}

.explore-search-input {
  width: 100%;
  padding: 0.85rem 2.75rem 0.85rem 2.75rem;
  border: 2px solid var(--bg3);
  border-radius: 99px;
  background: #fff;
  font-family: var(--font-ui);
  font-size: 1rem;
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(45,26,12,0.07);
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}

.explore-search-input:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px var(--orange-pale), 0 2px 8px rgba(45,26,12,0.07);
}

.explore-search-input::placeholder { color: var(--ink3); }

.explore-search-clear {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--ink3);
  cursor: pointer;
  padding: 0.15rem 0.3rem;
  border-radius: 50%;
  transition: color 0.15s, background 0.15s;
}

.explore-search-clear:hover {
  color: var(--brown);
  background: var(--bg2);
}

/* ── Filter chips + trade toggle ── */

.explore-filters {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0 1.25rem;
  border-bottom: 1px solid var(--bg3);
  flex-wrap: nowrap;
  position: sticky;
  top: 56px;
  z-index: 50;
  background: var(--bg);
}

/* Trade toggle inline inside explore-filters */
.explore-trade-toggle-inline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  border-left: 1px solid var(--bg3);
  padding-left: 0.75rem;
}

.explore-filters-label {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
  flex-shrink: 0;
}

.explore-filter-chips {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  flex: 1;
  min-width: 0;
}
.explore-filter-chips::-webkit-scrollbar { display: none; }

.explore-chips-row {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.explore-chips-arrow {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--bg3);
  background: var(--bg);
  color: var(--ink2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  padding: 0;
}
.explore-chips-arrow:hover {
  border-color: var(--orange);
  color: var(--orange);
}

.explore-chip {
  padding: 0.3rem 0.85rem;
  border-radius: 99px;
  border: 1.5px solid var(--bg3);
  background: var(--bg);
  color: var(--ink2);
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  white-space: nowrap;
}

.explore-chip:hover {
  border-color: var(--orange);
  color: var(--orange-dark);
  background: var(--orange-pale);
}

.explore-chip.active {
  background: var(--brown);
  border-color: var(--brown);
  color: var(--cream);
}

.explore-chip.active:hover {
  background: var(--orange-dark);
  border-color: var(--orange-dark);
}

/* ── Results header ── */

.explore-results-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 0 0.25rem;
}

.explore-section-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--ink);
  margin: 0 0 0.2rem;
}

.explore-section-sub {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--ink3);
  margin: 0;
  font-style: italic;
}

.explore-result-count {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  color: var(--ink3);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Empty state ── */

.explore-empty {
  text-align: center;
  padding: 4rem 1rem;
}

.explore-empty-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.explore-empty-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--ink);
  margin: 0 0 0.4rem;
}

.explore-empty-sub {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--ink3);
  margin: 0 0 1.5rem;
}

/* ════════════════════════════════════════════════════════════════
   TRADE AVAILABILITY
   ════════════════════════════════════════════════════════════════ */

/* ── Subtle trade indicator (always visible, top-left so it doesn't clash with count badge at top-right) ── */
.card-trade-indicator {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(90,138,60,0.85);
  backdrop-filter: blur(4px);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.18);
  pointer-events: none;
  z-index: 2;
}

/* ── Trade offer button — hidden by default, shows on card hover ── */
.card-trade-hover-btn {
  position: absolute;
  bottom: 0.6rem;
  right: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.7rem;
  border-radius: 20px;
  background: rgba(90,138,60,0.92);
  backdrop-filter: blur(6px);
  color: #fff;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.18s, transform 0.18s;
  z-index: 3;
}

.feed-card:hover .card-trade-hover-btn,
.explore-card:hover .card-trade-hover-btn {
  opacity: 1;
  transform: translateY(0);
}

.card-trade-hover-btn:hover {
  background: var(--green);
}

/* ── Item detail meta row ── */
.item-detail-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.25rem;
}

.item-detail-hours {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--ink2);
}

.item-detail-trade-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.65rem;
  border-radius: 20px;
  background: rgba(90,138,60,0.1);
  color: var(--green);
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid rgba(90,138,60,0.3);
}

/* ── Item detail "Offer a Trade" CTA ── */
.btn-trade-offer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  padding: 0.65rem 1.25rem;
  border-radius: var(--r-lg);
  background: var(--green);
  color: #fff;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.btn-trade-offer:hover { background: #4a7a32; transform: translateY(-1px); }

/* ── Create modal trade toggle ── */
.trade-toggle-group { margin-bottom: 1.25rem; }

.trade-toggle-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border: 1.5px solid var(--bg3);
  border-radius: var(--r-lg);
  background: var(--bg);
}

.trade-toggle-text { display: flex; flex-direction: column; gap: 0.2rem; }

.trade-toggle-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
}

.trade-toggle-hint {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--ink3);
  line-height: 1.4;
}

/* iOS-style toggle */
.toggle-switch {
  flex-shrink: 0;
  position: relative;
  width: 44px;
  height: 26px;
  border-radius: 13px;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  padding: 0;
  margin-top: 0.1rem;
}

.toggle-switch[aria-checked="true"]  { background: var(--green); }
.toggle-switch[aria-checked="false"] { background: var(--bg3); }

.toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
  transition: transform 0.2s;
  pointer-events: none;
}

.toggle-switch[aria-checked="true"] .toggle-thumb { transform: translateX(18px); }

/* ── Trade offer modal ── */
.trade-modal-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--ink);
  margin: 0;
}

.trade-target-summary { border-bottom: 1px solid var(--bg3); padding-bottom: 1rem; margin-bottom: 1rem; }

.trade-target-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.6rem 0.75rem;
  background: var(--bg2);
  border-radius: var(--r-lg);
  border: 1.5px solid var(--bg3);
}

.trade-target-img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.trade-target-name { font-family: var(--font-ui); font-weight: 600; font-size: 0.95rem; color: var(--ink); }
.trade-target-maker { font-family: var(--font-ui); font-size: 0.8rem; color: var(--ink3); margin: 0.1rem 0; }

.trade-target-hours {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--ink2);
}

.trade-step-label { font-family: var(--font-ui); font-weight: 600; font-size: 0.9rem; color: var(--ink); margin: 0 0 0.3rem; }
.trade-hours-note { font-family: var(--font-ui); font-size: 0.78rem; color: var(--ink3); margin: 0 0 0.85rem; font-style: italic; }

.trade-group-label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--green);
  margin: 0.75rem 0 0.4rem;
}

.trade-group-label--secondary { color: var(--ink3); margin-top: 1rem; }

.trade-my-row {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: thin;
}

.trade-my-card {
  flex-shrink: 0;
  width: 110px;
  border-radius: 10px;
  border: 2px solid var(--bg3);
  background: var(--bg);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.trade-my-card:hover { border-color: var(--green); }
.trade-my-card.trade-my-card--similar { border-color: rgba(90,138,60,0.35); }
.trade-my-card.selected { border-color: var(--green); box-shadow: 0 0 0 3px rgba(90,138,60,0.18); }

.trade-my-img { width: 100%; height: 72px; object-fit: cover; display: block; }

.trade-my-info { padding: 0.35rem 0.45rem 0.5rem; }

.trade-my-title {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trade-my-hours {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-family: var(--font-ui);
  font-size: 0.68rem;
  color: var(--ink3);
  margin-top: 0.1rem;
}

.trade-my-check {
  position: absolute;
  top: 0.3rem;
  right: 0.3rem;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s;
}

.trade-my-card.selected .trade-my-check { opacity: 1; }

.trade-or-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.1rem 0 0.85rem;
  color: var(--ink3);
  font-family: var(--font-ui);
  font-size: 0.78rem;
}

.trade-or-divider::before,
.trade-or-divider::after { content: ''; flex: 1; height: 1px; background: var(--bg3); }

.trade-custom-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink2);
  margin-bottom: 0.45rem;
}

.trade-custom-textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1.5px solid var(--bg3);
  border-radius: var(--r-lg);
  font-family: var(--font-ui);
  font-size: 0.875rem;
  color: var(--ink);
  background: var(--bg);
  resize: vertical;
  box-sizing: border-box;
  transition: border-color 0.15s;
}

.trade-custom-textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(90,138,60,0.12);
}

/* ── Trade message section (always-available note field) ── */
.trade-message-section {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--bg3);
}

.trade-message-textarea {
  background: var(--bg2) !important;
}

.trade-label-optional {
  font-weight: 400;
  font-size: 0.76rem;
  opacity: 0.6;
  margin-left: 0.15rem;
}

.trade-modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--bg3);
}

.trade-confirm-body { text-align: center; padding: 2rem 1rem; }
.trade-confirm-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }

.trade-confirm-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--ink);
  margin: 0 0 0.75rem;
}

.trade-confirm-text {
  font-family: var(--font-ui);
  font-size: 0.95rem;
  color: var(--ink);
  margin: 0 0 0.5rem;
  font-weight: 500;
}

.trade-confirm-sub {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--ink3);
  margin: 0;
  font-style: italic;
}

/* ════════════════════════════════════════════════════════════════
   NAV BADGES
   ════════════════════════════════════════════════════════════════ */

.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 99px;
  background: var(--brown);
  color: var(--cream);
  font-family: var(--font-ui);
  font-size: 0.65rem;
  font-weight: 700;
  margin-left: 4px;
  vertical-align: middle;
  line-height: 1;
}

.nav-badge--trade { background: var(--green); }

/* ════════════════════════════════════════════════════════════════
   ACTIVITY PAGE SHARED WRAPPER  (Notifications + Offers)
   ════════════════════════════════════════════════════════════════ */

.activity-page-wrap {
  max-width: 680px;
  margin: 2rem auto;
}

.activity-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--bg3);
}

.activity-page-title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  color: var(--ink);
  margin: 0;
}

/* ════════════════════════════════════════════════════════════════
   NOTIFICATIONS
   ════════════════════════════════════════════════════════════════ */

.activity-see-offers {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--green);
  text-decoration: none;
  padding: 0.3rem 0.75rem;
  border-radius: 99px;
  border: 1.5px solid rgba(90,138,60,0.35);
  background: rgba(90,138,60,0.07);
  transition: background 0.15s, border-color 0.15s;
}

.activity-see-offers:hover {
  background: rgba(90,138,60,0.14);
  border-color: var(--green);
}

.activity-see-offers-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 3px;
  border-radius: 99px;
  background: var(--green);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
}

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--bg3);
  position: relative;
}

.notif-item--new { background: transparent; }

.notif-item--trade { background: rgba(90,138,60,0.04); border-radius: var(--r-lg); }

.notif-icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg2);
  border: 1.5px solid var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink3);
  margin-top: 0.1rem;
}

.notif-icon--trade   { background: rgba(90,138,60,0.1);  border-color: rgba(90,138,60,0.3); color: var(--green); }
.notif-icon--spark   { background: rgba(224,120,40,0.1); border-color: rgba(224,120,40,0.3); color: var(--orange); }
.notif-icon--comment { background: rgba(45,26,12,0.07);  border-color: var(--bg3); color: var(--ink2); }

.notif-body { flex: 1; min-width: 0; }

.notif-text {
  font-family: var(--font-ui);
  font-size: 0.875rem;
  color: var(--ink);
  line-height: 1.4;
  margin-bottom: 0.3rem;
}

.notif-footer {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.notif-time {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--ink3);
}

.notif-trade-btn {
  background: none;
  border: none;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--green);
  cursor: pointer;
  padding: 0;
  transition: color 0.15s;
}

.notif-trade-btn:hover { color: #4a7a32; text-decoration: underline; }

.notif-dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange);
  margin-top: 0.45rem;
}

/* ════════════════════════════════════════════════════════════════
   OFFERS PAGE
   ════════════════════════════════════════════════════════════════ */

/* Filter tabs */
.offers-filter-tabs {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.offers-tab {
  padding: 0.3rem 0.85rem;
  border-radius: 99px;
  border: 1.5px solid var(--bg3);
  background: var(--bg);
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink2);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.offers-tab:hover  { border-color: var(--orange); color: var(--orange-dark); background: var(--orange-pale); }
.offers-tab.active { background: var(--brown); border-color: var(--brown); color: var(--cream); }

/* Offer card */
.offer-card {
  border: 1.5px solid var(--bg3);
  border-radius: var(--r-lg);
  background: #fff;
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
  transition: box-shadow 0.15s;
}

.offer-card:hover { box-shadow: 0 3px 12px rgba(45,26,12,0.08); }

.offer-card-header {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1rem;
}

.offer-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  flex-shrink: 0;
}

.offer-from-info {
  flex: 1;
  min-width: 0;
}

.offer-from-name {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink);
  display: block;
}

.offer-from-handle {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--ink3);
}

.offer-meta-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
  flex-shrink: 0;
}

.offer-status {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.55rem;
  border-radius: 99px;
}

.offer-status--pending  { background: rgba(224,120,40,0.12); color: var(--orange-dark); border: 1px solid rgba(224,120,40,0.3); }
.offer-status--accepted { background: rgba(90,138,60,0.1);   color: var(--green);       border: 1px solid rgba(90,138,60,0.3); }
.offer-status--declined { background: var(--bg2);            color: var(--ink3);        border: 1px solid var(--bg3); }

.offer-time {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  color: var(--ink3);
}

/* Exchange row */
.offer-exchange-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.75rem;
  align-items: start;
  background: var(--bg);
  border-radius: 10px;
  padding: 0.85rem;
  border: 1px solid var(--bg3);
}

.offer-side-label {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink3);
  margin-bottom: 0.5rem;
}

.offer-target-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.offer-target-thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.offer-target-name {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}

.offer-target-hours {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-family: var(--font-ui);
  font-size: 0.74rem;
  color: var(--ink3);
  margin-top: 0.15rem;
}

.offer-exchange-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink3);
  padding-top: 1.4rem;
}

.offer-creations-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.offer-creation-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.offer-creation-thumb {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

.offer-creation-name {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
}

.offer-creation-hours {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  color: var(--ink3);
}

.offer-creation-none {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--ink3);
  font-style: italic;
}

.offer-custom-note {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--ink2);
  font-style: italic;
  line-height: 1.45;
  margin-top: 0.25rem;
}

.offer-custom-note svg { flex-shrink: 0; margin-top: 0.15rem; color: var(--ink3); }

/* Accept / Decline actions */
.offer-actions {
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--bg3);
}

.offer-btn-accept  { min-width: 120px; }
.offer-btn-decline { min-width: 90px; }

/* ── Offer expand toggle ── */
.offer-expand-btn {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  background: none;
  border: none;
  border-top: 1px solid var(--bg3);
  padding: 0.6rem 0 0;
  margin-top: 0.85rem;
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--orange);
  text-align: left;
  transition: color 0.15s;
}

.offer-expand-btn:hover { color: var(--ink); }

.offer-expand-chevron {
  flex-shrink: 0;
  transition: transform 0.22s ease;
}
.offer-expand-btn.open .offer-expand-chevron {
  transform: rotate(180deg);
}

/* ── Offer detail panel (expanded) ── */
.offer-detail-panel {
  display: none;
  flex-direction: column;
  gap: 1.1rem;
  padding: 1rem 0 0.25rem;
  border-top: 1px dashed var(--bg3);
  margin-top: 0.6rem;
  animation: fadeIn 0.18s ease;
}

.offer-detail-panel.open {
  display: flex;
}

.offer-detail-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.offer-detail-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-ui);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink3);
}

.offer-detail-message {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-style: italic;
  color: var(--ink);
  line-height: 1.55;
  background: var(--bg2);
  padding: 0.75rem 1rem;
  border-radius: var(--r-lg);
  border-left: 3px solid var(--orange);
}

/* Larger linked creation cards */
.offer-detail-creations {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.offer-detail-card {
  display: flex;
  flex-direction: column;
  width: 200px;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1.5px solid var(--bg3);
  cursor: pointer;
  transition: box-shadow 0.15s, border-color 0.15s;
  background: var(--cream);
  flex-shrink: 0;
}

.offer-detail-card:hover {
  box-shadow: 0 4px 16px rgba(45,26,12,0.12);
  border-color: var(--orange);
}

.offer-detail-card-img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  display: block;
}

.offer-detail-card-info {
  padding: 0.65rem 0.75rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.offer-detail-card-title {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}

.offer-detail-card-hours {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--ink3);
}

.offer-view-creation-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.35rem;
  background: none;
  border: 1px solid var(--orange);
  border-radius: 20px;
  padding: 0.28rem 0.7rem;
  font-family: var(--font-ui);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--orange);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.offer-view-creation-btn:hover {
  background: var(--orange);
  color: #fff;
}

/* Profile link button for custom offers */
.offer-profile-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: var(--bg);
  border: 1.5px solid var(--bg3);
  border-radius: var(--r-lg);
  padding: 0.7rem 0.85rem;
  cursor: pointer;
  width: 100%;
  text-align: left;
  font-family: var(--font-ui);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
  margin-top: 0.4rem;
}

.offer-profile-link:hover {
  border-color: var(--orange);
  box-shadow: 0 2px 8px rgba(224,120,40,0.1);
}

.offer-profile-link svg { margin-left: auto; flex-shrink: 0; color: var(--ink3); }
.offer-profile-link span { flex: 1; min-width: 0; }

.offer-profile-link-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 0.78rem;
  flex-shrink: 0;
}

/* Empty state */
.offers-empty {
  text-align: center;
  padding: 4rem 1rem;
}

.offers-empty-icon  { font-size: 2.5rem; margin-bottom: 1rem; }
.offers-empty-title { font-family: var(--font-display); font-size: 1.2rem; color: var(--ink); margin: 0 0 0.4rem; }
.offers-empty-sub   { font-family: var(--font-body); font-size: 0.875rem; color: var(--ink3); margin: 0; }

/* (explore-trade-toggle-row replaced by explore-trade-toggle-inline inside explore-filters) */

.explore-trade-toggle-label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink2);
  cursor: pointer;
  user-select: none;
}

.explore-trade-ios-toggle {
  position: relative;
  width: 44px;
  height: 26px;
  border-radius: 13px;
  border: none;
  background: var(--bg3);
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
  padding: 0;
}

.explore-trade-ios-toggle[aria-checked="true"] {
  background: var(--green);
}

.ios-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.22);
  transition: left 0.2s;
  pointer-events: none;
}

.explore-trade-ios-toggle[aria-checked="true"] .ios-toggle-thumb {
  left: 21px;
}

/* Responsive: collapse label on narrow screens */
@media (max-width: 560px) {
  .activity-page-header { flex-direction: column; align-items: flex-start; }
  .offer-exchange-row { grid-template-columns: 1fr; }
  .offer-exchange-arrow { display: none; }
  .offer-side--offers { border-top: 1px solid var(--bg3); padding-top: 0.75rem; }
}

/* ════════════════════════════════════════════════════════════════
   NOTIFICATION FLYOUT
   ════════════════════════════════════════════════════════════════ */

.nav-notif-wrap {
  position: relative;
}

.nav-bell-btn {
  background: none;
  border: none;
  padding: 0.35rem;
  border-radius: 8px;
  cursor: pointer;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: color 0.15s, background 0.15s;
  font-family: var(--font-ui);
}

.nav-bell-btn:hover {
  color: var(--orange);
  background: rgba(224,120,40,0.08);
}

.nav-badge--bell {
  position: absolute;
  top: -3px;
  right: -4px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 99px;
  background: var(--orange);
  color: #fff;
  font-family: var(--font-ui);
  font-size: 0.62rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  border: 2px solid var(--bg);
}

/* Flyout panel */
.notif-flyout {
  position: absolute;
  top: calc(100% + 10px);
  right: -8px;
  width: 340px;
  max-height: 480px;
  background: #fff;
  border: 1.5px solid var(--bg3);
  border-radius: 14px;
  box-shadow: 0 8px 40px rgba(45,26,12,0.18);
  z-index: 500;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-6px) scale(0.97);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.notif-flyout.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.notif-flyout-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem 0.6rem;
  border-bottom: 1px solid var(--bg3);
  flex-shrink: 0;
}

.notif-flyout-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}

.notif-flyout-close {
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--ink3);
  padding: 0 0.2rem;
  line-height: 1;
  transition: color 0.15s;
}
.notif-flyout-close:hover { color: var(--ink); }

.notif-flyout-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.4rem 0.75rem;
}

.notif-flyout-list .notif-item {
  padding: 0.65rem 0.5rem;
}

.notif-flyout-footer {
  padding: 0.7rem 1rem;
  border-top: 1px solid var(--bg3);
  flex-shrink: 0;
}

/* ════════════════════════════════════════════════════════════════
   CHALLENGES PAGE
   ════════════════════════════════════════════════════════════════ */

.challenges-hero {
  background: linear-gradient(135deg, var(--brown) 0%, #5A3B1A 100%);
  border-radius: 16px;
  padding: 3rem 2rem;
  margin-bottom: 2rem;
  text-align: center;
  margin-top: 1.5rem;
}

.challenges-hero-inner { max-width: 600px; margin: 0 auto; }

.challenges-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.22);
  color: var(--cream);
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.3rem 0.85rem;
  border-radius: 99px;
  margin-bottom: 1rem;
  letter-spacing: 0.03em;
}

.challenges-hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  color: var(--cream);
  margin: 0;
  line-height: 1.2;
}

/* Row wrapping the title + flourishes on challenges page */
.challenges-hero-inner .explore-title-row {
  margin-bottom: 0.75rem;
}

.challenges-hero-sub {
  font-family: var(--font-body);
  font-size: 1rem;
  color: rgba(245,237,224,0.75);
  margin-bottom: 1.75rem;
}

.challenges-stats-strip {
  display: flex;
  gap: 0;
  border: 1.5px solid var(--bg3);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  margin-bottom: 2rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.challenges-stat {
  flex: 1;
  text-align: center;
  padding: 1rem;
  border-right: 1px solid var(--bg3);
}
.challenges-stat:last-child { border-right: none; }

.challenges-stat-value {
  display: block;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--brown);
}

.challenges-stat-label {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--ink3);
  margin-top: 0.2rem;
}

.challenges-filter-row {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

.challenges-tab {
  padding: 0.35rem 1rem;
  border-radius: 99px;
  border: 1.5px solid var(--bg3);
  background: var(--bg);
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink2);
  cursor: pointer;
  transition: all 0.15s;
}
.challenges-tab:hover  { border-color: var(--orange); color: var(--orange-dark); }
.challenges-tab.active { background: var(--brown); border-color: var(--brown); color: var(--cream); }

.challenges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.challenges-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--ink3);
  font-family: var(--font-body);
}

/* Rich challenge card */
.challenge-card-v2 {
  background: #fff;
  border: 1.5px solid var(--bg3);
  border-radius: 14px;
  padding: 1.1rem;
  transition: box-shadow 0.15s, transform 0.15s;
}

.challenge-card-v2:hover {
  box-shadow: 0 6px 24px rgba(45,26,12,0.1);
  transform: translateY(-2px);
}

.challenge-card-top {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.challenge-card-emoji {
  font-size: 2rem;
  flex-shrink: 0;
  line-height: 1;
}

.challenge-card-info { flex: 1; min-width: 0; }

.challenge-card-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.challenge-card-desc {
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--ink3);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.challenge-card-joined-badge {
  flex-shrink: 0;
  background: rgba(90,138,60,0.1);
  border: 1px solid rgba(90,138,60,0.3);
  color: var(--green);
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 99px;
  margin-top: 0.1rem;
}

.challenge-card-progress-wrap { margin-bottom: 0.9rem; }

.challenge-card-progress-bar {
  height: 5px;
  background: var(--bg2);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 0.4rem;
}

.challenge-card-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--orange), var(--gold));
  border-radius: 99px;
  transition: width 0.6s ease;
}

.challenge-card-stats {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-ui);
  font-size: 0.74rem;
  color: var(--ink3);
}

.challenge-card-stats span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.challenge-card-actions {
  display: flex;
  gap: 0.5rem;
}

/* Sponsored challenge card */
.challenge-card--sponsored {
  border-color: var(--orange);
  background: linear-gradient(180deg, rgba(255,100,0,0.03) 0%, #fff 60px);
}

.challenge-card--sponsored:hover {
  box-shadow: 0 6px 24px rgba(255,100,0,0.13);
}

.challenge-card-sponsor-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.challenge-sponsor-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--orange);
  background: rgba(255,100,0,0.08);
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
}

.challenge-sponsor-prize {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink2);
}

.challenge-card-gift-prompt--sponsored {
  color: var(--orange);
}

.challenge-card-progress-bar--sponsored {
  background: rgba(255,100,0,0.12);
}

.challenge-card-progress-fill--sponsored {
  background: linear-gradient(90deg, var(--orange), #ff8c42);
}

.challenge-btn--sponsored {
  background: var(--orange);
}

.challenge-btn--sponsored:hover {
  background: #e05500;
}

/* ════════════════════════════════════════════════════════════════
   CHALLENGE CARDS v3 — new design
   ════════════════════════════════════════════════════════════════ */

.challenge-card-v3 {
  background: var(--bg1);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0;
  transition: box-shadow 0.18s, transform 0.18s;
  /* Prevent children from busting out */
  overflow: hidden;
  min-width: 0;
  height: 100%;
}
.challenge-card-v3:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}
/* chv3-header: emoji + title-row in a flex row */
.chv3-header {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 0.55rem;
}
.chv3-emoji {
  font-size: 2.25rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 0.05rem;
}
.chv3-title-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding-top: 0.25rem;
}
.chv3-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
}
.chv3-type-badge {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.15rem 0.55rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.chv3-type--exchange   { background: #E8F4FF; color: #1565C0; }
.chv3-type--collab     { background: #FFF0F6; color: #C2185B; }
.chv3-type--creation   { background: #F0FFF4; color: #1B5E20; }
.chv3-type--parallel   { background: #FFF8E1; color: #E65100; }
.chv3-subhead {
  font-size: 0.88rem;
  color: var(--ink2);
  line-height: 1.45;
  margin-bottom: 0.6rem;
}
.chv3-sponsor-line { font-size: 0.72rem; color: var(--ink3); font-style: italic; padding: 0.5rem 1rem 0; text-align: right; }
.chv3-reward-inline { font-size: 0.82rem; color: var(--ink2); }
.chv3-maker-pair {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}
.chv3-pair-avatars {
  display: flex;
  align-items: center;
}
.chv3-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  border: 2px solid var(--bg1);
  flex-shrink: 0;
}
.chv3-avatar--b {
  margin-left: -8px;
}
.chv3-pair-label {
  font-size: 0.8rem;
  color: var(--ink3);
}
.chv3-pair-count {
  font-weight: 600;
  color: var(--accent);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-size: inherit;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 2px;
}
.chv3-pair-count:hover { color: var(--accent-dark, #7B3F1A); }
.chv3-meta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.chv3-meta-item {
  font-size: 0.78rem;
  /* Improved contrast — ink2 on bg1 passes AA */
  color: var(--ink2);
  font-weight: 500;
  background: rgba(0,0,0,0.05);
  padding: 0.2rem 0.55rem;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.chv3-actions {
  display: flex;
  gap: 0.65rem;
  /* Constrain to card width — prevent overflow */
  width: 100%;
  box-sizing: border-box;
  flex-shrink: 0;
  margin-top: auto;
  padding-top: 0.75rem;
}
.chv3-btn-preview {
  flex: 1;
  min-width: 0;
  white-space: normal;  /* allow wrapping */
  line-height: 1.3;
}
.chv3-btn-join {
  flex: 1;
  min-width: 0;
  white-space: normal;
  line-height: 1.3;
}

/* Sponsored v3 card */
.challenge-card-v3.challenge-card--sponsored {
  border-color: var(--orange);
  background: linear-gradient(160deg, #FFFAF5 0%, var(--bg1) 100%);
}
.chv3-sponsor-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.35rem 0.6rem;
  background: rgba(176,101,34,0.08);
  border-radius: 6px;
  margin-bottom: 0.25rem;
  font-size: 0.75rem;
}
.chv3-sponsor-label {
  font-weight: 600;
  color: var(--orange, #C25B2D);
}
.chv3-sponsor-prize {
  font-weight: 600;
  color: var(--ink);
}

/* Upcoming + Completed + Past card variants */
.challenge-card-v3.challenge-card--upcoming {
  border-color: #C2A86A;
  background: linear-gradient(160deg, #FFFBF4 0%, var(--bg1) 100%);
}
.challenge-card-v3.challenge-card--past {
  opacity: 0.9;
}
.chv3-type--upcoming {
  background: #FFF3C4;
  color: #7B5800;
}
.chv3-type--past {
  background: #EEF0EE;
  color: #4A5448;
}

/* Notify Me button state */
.chv3-btn-notify.chv3-btn-notified {
  background: #3DB87B !important;
  border-color: #3DB87B !important;
}

/* ════════════════════════════════════════════════════════════════
   CHALLENGE PARTICIPANTS OVERLAY
   ════════════════════════════════════════════════════════════════ */

.chal-part-modal {
  max-width: 440px;
  width: 94%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}
.chal-part-modal .modal-header {
  padding: 1.25rem 1.5rem 0.75rem;
  flex-shrink: 0;
}
.chal-part-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 1.25rem 0.75rem;
  flex-shrink: 0;
}
.chal-part-search svg { color: var(--ink3); flex-shrink: 0; }
.chal-part-search-input {
  flex: 1;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 0.4rem 0.7rem;
  font-size: 0.88rem;
  background: var(--bg2);
  color: var(--ink);
  outline: none;
}
.chal-part-search-input:focus { border-color: var(--accent); }
.chal-part-list {
  flex: 1;
  overflow-y: auto;
  padding: 0 0 1rem;
}
.chal-part-section-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink3);
  padding: 0.6rem 1.25rem 0.3rem;
}
.chal-part-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 1.25rem;
  transition: background 0.15s;
}
.chal-part-row:hover { background: var(--bg2); }
.chal-part-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem;
  color: #fff;
  flex-shrink: 0;
}
.chal-part-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}
.chal-part-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chal-part-craft {
  font-size: 0.78rem;
  color: var(--ink3);
}
.chal-part-follow-btn {
  flex-shrink: 0;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1.5px solid var(--accent);
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  transition: all 0.15s;
}
.chal-part-follow-btn:hover { background: var(--accent); color: #fff; }
.chal-part-follow-btn--following {
  background: var(--bg2);
  border-color: var(--border);
  color: var(--ink3);
}
.chal-part-follow-btn--following:hover {
  border-color: #D44; color: #D44; background: #FFF5F5;
}
.chal-part-empty {
  text-align: center;
  color: var(--ink3);
  font-size: 0.88rem;
  padding: 2rem 1.25rem;
}

/* ════════════════════════════════════════════════════════════════
   CHALLENGE PROJECTS MODAL
   ════════════════════════════════════════════════════════════════ */

.chal-proj-modal {
  max-width: 680px;
  width: 96%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}
.chal-proj-modal .modal-header {
  padding: 1.25rem 1.5rem 0.75rem;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
}
.chal-proj-header-emoji {
  font-size: 1.6rem;
  line-height: 1;
  margin-bottom: 0.25rem;
}
.chal-proj-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  overflow-y: auto;
  flex: 1;
}
.chal-proj-card {
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg2);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.chal-proj-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.12); }
.chal-proj-thumb {
  aspect-ratio: 1;
  display: flex;
  align-items: flex-end;
  padding: 0.5rem;
  position: relative;
}
.chal-proj-craft-tag {
  font-size: 0.68rem;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  background: rgba(0,0,0,0.28);
  padding: 0.15rem 0.45rem;
  border-radius: 20px;
}
.chal-proj-meta {
  padding: 0.45rem 0.6rem;
}
.chal-proj-maker {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink2);
}

/* ════════════════════════════════════════════════════════════════
   CHALLENGE DETAIL MODAL
   ════════════════════════════════════════════════════════════════ */

.chal-modal {
  max-width: 540px;
  width: 94%;
}
.chal-step {
  padding: 0;
}
.chal-modal-title-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.chal-modal-emoji {
  font-size: 1.6rem;
  line-height: 1;
}
.chal-modal-h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 0;
  color: var(--ink);
}

/* 3-step flow bar */
/* ── "How it works" numbered list — replaces the horizontal pill steps ── */
.chal-how-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0.5rem 0 1rem;
  /* Subtle left rule connecting the numbers */
  border-left: none;
}
.chal-how-item {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding: 0.6rem 0;
  position: relative;
}
/* Vertical connector between items */
.chal-how-item:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 15px;
  top: 38px;
  bottom: -6px;
  width: 2px;
  background: var(--border);
}
.chal-how-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 0 3px var(--bg1), 0 0 0 4px rgba(88,20,200,0.15);
}
.chal-how-body {
  padding-top: 0.2rem;
  flex: 1;
  min-width: 0;
}
.chal-how-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--ink);
  margin-bottom: 0.15rem;
}
.chal-how-desc {
  font-size: 0.82rem;
  color: var(--ink3);
  line-height: 1.45;
}

/* Keep old classes inert (used nowhere else) */
.chal-flow-steps,
.chal-flow-step,
.chal-flow-step--active,
.chal-flow-connector { display: none; }

/* Theme block */
.chal-theme-block {
  padding: 0;
  margin-bottom: 1rem;
}
.chal-theme-text {
  font-size: 0.92rem;
  color: var(--ink2);
  line-height: 1.65;
  margin-bottom: 0.75rem;
}
.chal-theme-meta {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}
.chal-meta-chip {
  font-size: 0.8rem;
  /* Darker text + darker pill for legible contrast */
  color: #3D2410;
  background: #D9C4A4;
  padding: 0.28rem 0.72rem;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
}

/* Type selector */
.chal-type-selector {
  padding: 0;
  margin-bottom: 0.75rem;
}
.chal-type-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink3);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.chal-type-options {
  display: flex;
  gap: 0.65rem;
}
.chal-type-opt {
  flex: 1;
  cursor: pointer;
}
.chal-type-opt input { display: none; }
.chal-type-opt-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 0.65rem 0.5rem;
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
}
.chal-type-opt--active .chal-type-opt-inner,
.chal-type-opt:has(input:checked) .chal-type-opt-inner {
  border-color: var(--primary);
  background: rgba(88,20,200,0.04);
}
.chal-type-opt-icon { font-size: 1.3rem; }
.chal-type-opt-title { font-size: 0.85rem; font-weight: 600; color: var(--ink); }
.chal-type-opt-desc  { font-size: 0.75rem; color: var(--ink3); line-height: 1.3; }

/* Hours picker */
.chal-hours-row {
  padding: 0;
  margin-bottom: 1rem;
}
.chal-hours-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: block;
  margin-bottom: 0.45rem;
}
.chal-hours-chips {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.chal-hours-chip {
  font-size: 0.82rem;
  padding: 0.35rem 0.85rem;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  background: transparent;
  color: var(--ink2);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.chal-hours-chip:hover,
.chal-hours-chip--sel {
  border-color: var(--primary);
  background: rgba(88,20,200,0.06);
  color: var(--primary);
  font-weight: 600;
}

.chal-modal-actions {
  display: flex;
  gap: 0.75rem;
  padding: 0.5rem 0 0;
}

/* ── Matching animation step ── */
.chal-matching-anim {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  gap: 1.5rem;
  min-height: 280px;
}
.chal-matching-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: chalSpin 0.9s linear infinite;
}
@keyframes chalSpin { to { transform: rotate(360deg); } }
.chal-matching-steps {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  max-width: 300px;
}
.chal-mstep {
  font-size: 0.88rem;
  color: var(--ink4, #9A8A7A);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.2s;
}
.chal-mstep::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
  transition: background 0.2s;
}
.chal-mstep--active {
  color: var(--primary);
  font-weight: 600;
}
.chal-mstep--active::before {
  background: var(--primary);
  box-shadow: 0 0 0 3px rgba(88,20,200,0.15);
}
.chal-mstep--done {
  color: var(--ink3);
}
.chal-mstep--done::before {
  background: #3DB87B;
}

/* ── Match result step ── */
.chal-match-banner {
  padding: 0.75rem 1rem;
  background: linear-gradient(90deg, rgba(61,184,123,0.08), rgba(61,184,123,0.03));
  border-left: 3px solid #3DB87B;
  margin: 0.5rem 0 1rem;
  border-radius: 0 8px 8px 0;
}
.chal-match-banner-text {
  font-size: 0.85rem;
  color: var(--ink2);
  line-height: 1.5;
  margin: 0;
}
.chal-match-pair {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 0 1rem;
}
.chal-result-maker {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  text-align: center;
}
.chal-result-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.2rem;
}
.chal-result-name { font-size: 0.9rem; font-weight: 600; color: var(--ink); }
.chal-result-craft { font-size: 0.78rem; color: var(--ink3); }
.chal-result-making {
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 600;
  margin-top: 0.25rem;
  padding: 0.15rem 0.5rem;
  background: rgba(88,20,200,0.06);
  border-radius: 20px;
}
.chal-result-connector {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  color: var(--ink3);
}
.chal-result-connector-label {
  font-size: 0.72rem;
  color: var(--ink4);
  white-space: nowrap;
}
.chal-match-theme-recap {
  margin: 0 0 1rem;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.75rem;
  background: var(--bg2);
  border-radius: 10px;
}
.chal-recap-emoji {
  font-size: 1.5rem;
  flex-shrink: 0;
}
.chal-recap-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.2rem;
}
.chal-recap-desc {
  font-size: 0.82rem;
  color: var(--ink2);
  line-height: 1.45;
}
.chal-recap-reveal {
  font-size: 0.75rem;
  color: var(--ink4);
  margin-top: 0.3rem;
}
.chal-match-next-step {
  margin: 0 0 1.25rem;
  padding: 0.75rem;
  border: 1.5px dashed var(--border);
  border-radius: 10px;
}
.chal-next-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink4);
  margin-bottom: 0.35rem;
}
.chal-next-text {
  font-size: 0.85rem;
  color: var(--ink2);
  line-height: 1.5;
}

/* ════════════════════════════════════════════════════════════════
   CHALLENGE MATCHES INBOX TAB
   ════════════════════════════════════════════════════════════════ */

.nav-badge--challenge {
  background: var(--primary);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: 20px;
  margin-left: 0.35rem;
}
.chal-match-inbox-card {
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 1.15rem;
  margin: 0.75rem 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  background: var(--bg1);
  position: relative;
}
.chal-match-inbox-card--new {
  border-color: var(--primary);
  background: linear-gradient(160deg, rgba(88,20,200,0.02), var(--bg1) 60%);
}
.chal-match-inbox-card--done {
  opacity: 0.72;
}
.chal-match-inbox-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
  background: rgba(88,20,200,0.08);
  padding: 0.15rem 0.55rem;
  border-radius: 20px;
  display: inline-block;
  align-self: flex-start;
}
.chal-match-inbox-badge--done {
  color: var(--ink3);
  background: var(--bg2);
}

/* Challenge name row — emoji + title */
.chal-mi-challenge-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.9rem;
  line-height: 1.2;
}

/* Horizontal pair row: partner → arrow → you */
.chal-mi-pair-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: flex-start;
  margin-bottom: 0.9rem;
}
.chal-mi-pair-person {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
}
.chal-mi-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}
.chal-mi-name-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink2);
  text-align: center;
  font-family: var(--font-ui);
  white-space: nowrap;
}
.chal-mi-arrow {
  display: flex;
  align-items: center;
  color: var(--ink3);
}

/* Status block — craft + deadline */
.chal-mi-status {
  margin-bottom: 0.75rem;
}
.chal-mi-partner {
  font-size: 0.84rem;
  color: var(--ink2);
  margin-bottom: 0.3rem;
}
.chal-mi-deadline {
  font-size: 0.78rem;
  color: var(--orange, #C25B2D);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.chal-mi-quest-prompt {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  padding: 0.65rem 0.75rem;
  background: rgba(61,184,123,0.07);
  border-radius: 8px;
  font-size: 0.83rem;
  color: var(--ink2);
  line-height: 1.45;
  border-left: 3px solid #3DB87B;
}
.chal-mi-actions {
  display: flex;
  gap: 0.65rem;
}

/* ════════════════════════════════════════════════════════════════
   PARTNER QUESTIONNAIRE MODAL
   ════════════════════════════════════════════════════════════════ */

.quest-modal {
  max-width: 500px;
  width: 94%;
}
.quest-modal-h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin: 0 0 0.2rem;
  color: var(--ink);
}
.quest-modal-sub {
  font-size: 0.83rem;
  color: var(--ink3);
  margin: 0;
}
.quest-progress-bar {
  height: 3px;
  background: var(--border);
  border-radius: 0;
  margin: 0 -1.5rem;
  overflow: hidden;
}
.quest-progress-fill {
  height: 100%;
  background: var(--primary);
  transition: width 0.35s ease;
  border-radius: 0 2px 2px 0;
}
.quest-body {
  padding: 1.25rem 0 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.quest-q-num {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink4);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.quest-q-text {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.4;
}
.quest-q-hint {
  font-size: 0.82rem;
  color: var(--ink3);
  font-style: italic;
  line-height: 1.45;
}
.quest-answer {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  color: var(--ink);
  background: var(--bg1);
  resize: vertical;
  min-height: 90px;
  transition: border-color 0.15s;
  box-sizing: border-box;
}
.quest-answer:focus {
  outline: none;
  border-color: var(--primary);
}
.quest-ai-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--primary);
  background: transparent;
  border: 1px solid rgba(88,20,200,0.25);
  border-radius: 20px;
  padding: 0.3rem 0.75rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  font-weight: 500;
  align-self: flex-start;
}
.quest-ai-btn:hover {
  background: rgba(88,20,200,0.06);
  border-color: var(--primary);
}
.quest-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

/* ════════════════════════════════════════════════════════════════
   DETAIL MODAL — CAROUSEL
   ════════════════════════════════════════════════════════════════ */

.item-detail-modal {
  max-width: 720px;
}

.detail-carousel {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg2);
  aspect-ratio: 4/3;
  margin-bottom: 0;
}

.detail-carousel-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.2s;
}

.detail-carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.88);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  transition: background 0.15s, transform 0.15s;
  z-index: 2;
}

.detail-carousel-btn:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.06);
}

.detail-carousel-prev { left: 10px; }
.detail-carousel-next { right: 10px; }

.detail-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
  z-index: 2;
}

.detail-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.55);
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}

.detail-dot.active {
  background: #fff;
  transform: scale(1.2);
}

.detail-carousel-count {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  padding: 0.2rem 0.5rem;
  border-radius: 99px;
  z-index: 2;
}

/* ════════════════════════════════════════════════════════════════
   COMMENTS — CARD INLINE COMPOSER
   ════════════════════════════════════════════════════════════════ */

.card-comment-composer {
  border-top: 1px solid var(--bg3);
  padding: 0.75rem 0 0.5rem;
}

.card-comment-prompt {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--ink3);
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-bottom: 0.6rem;
}

.card-comment-input-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.card-comment-textarea {
  flex: 1;
  border: 1.5px solid var(--bg3);
  border-radius: 10px;
  padding: 0.5rem 0.65rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--ink);
  background: var(--bg2);
  resize: none;
  line-height: 1.5;
  transition: border-color 0.15s;
  outline: none;
}

.card-comment-textarea:focus {
  border-color: var(--orange);
  background: #fff;
}

.card-comment-send {
  background: var(--brown);
  border: none;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--cream);
  transition: background 0.15s, transform 0.15s;
  margin-top: 1px;
}

.card-comment-send:hover { background: #3D2A1A; transform: scale(1.06); }

/* Comment button active state when composer is open */
.action-btn.commenting {
  color: var(--orange);
  background: rgba(224,120,40,0.1);
}

/* ════════════════════════════════════════════════════════════════
   COMMENTS — DETAIL MODAL SECTION
   ════════════════════════════════════════════════════════════════ */

.item-comments-section {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--bg3);
}

.item-comments-header {
  margin-bottom: 1rem;
}

.item-comments-header h4 {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--ink);
  margin: 0;
}

/* Comment composer (detail) */
.comment-composer {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  margin-bottom: 1.25rem;
  padding: 0.75rem;
  border-radius: 12px;
  border: 1.5px solid var(--bg3);
  background: var(--bg2);
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.comment-composer--active {
  border-color: var(--orange);
  background: rgba(255,255,255,0.9);
  box-shadow: 0 0 0 3px rgba(224,120,40,0.12);
}

.comment-input-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.comment-textarea {
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--ink);
  resize: none;
  outline: none;
  line-height: 1.5;
  width: 100%;
}

.comment-textarea::placeholder { color: var(--ink3); }

.comment-submit-btn {
  align-self: flex-end;
  background: var(--brown);
  border: none;
  border-radius: 8px;
  color: var(--cream);
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: background 0.15s;
}
.comment-submit-btn:hover { background: #3D2A1A; }

/* Individual comments */
.comment-item {
  display: flex;
  gap: 0.65rem;
  margin-bottom: 0.9rem;
  align-items: flex-start;
}

.comment-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.85rem;
  color: #fff;
  flex-shrink: 0;
}

.comment-bubble {
  flex: 1;
  background: var(--bg2);
  border-radius: 10px;
  padding: 0.55rem 0.75rem;
}

.comment-author {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--ink);
  margin-bottom: 0.2rem;
}

.comment-text {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--ink2);
  line-height: 1.45;
}

/* ════════════════════════════════════════════════════════════════
   ADVERTISING
   ════════════════════════════════════════════════════════════════ */

.ad-label {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink3);
  border: 1px solid var(--bg3);
  border-radius: 4px;
  padding: 0.1rem 0.35rem;
  margin-bottom: 0.55rem;
}

.ad-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.ad-content--compact { gap: 0.6rem; }

.ad-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.ad-headline {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.2rem;
}

.ad-body {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--ink3);
  line-height: 1.45;
  margin-bottom: 0.4rem;
}

.ad-cta {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--orange);
  text-decoration: none;
}
.ad-cta:hover { text-decoration: underline; }

/* Feed inline ad card — styled to blend with post cards */
.ad-feed-card {
  background: var(--cream);
  border: 1px solid var(--bg3);
  border-radius: var(--r-lg);
  overflow: hidden;
  cursor: default;
  padding: 0;
  /* Don't stretch to the tallest card in the row */
  align-self: start;
}

.ad-post-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 1rem;
}

.ad-post-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.ad-post-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ad-post-brand {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--ink);
}

.ad-post-hero {
  width: 100%;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ad-post-hero-icon {
  font-size: 3.5rem;
  filter: drop-shadow(0 2px 10px rgba(0,0,0,0.18));
}

.ad-post-content {
  padding: 0.8rem 1rem 1rem;
}

.ad-post-body {
  font-size: 0.86rem;
  color: var(--ink2);
  margin: 0 0 0.7rem;
  line-height: 1.5;
}

.ad-cta-btn {
  font-size: 0.82rem;
}

/* Explore banner ad */
.ad-card--explore {
  border: 1.5px solid var(--bg3);
  border-radius: 12px;
  padding: 0.85rem 1.1rem;
  background: #fff;
  margin-bottom: 1.5rem;
}

/* Challenges banner ad */
.ad-card--challenges {
  border: 1.5px solid var(--bg3);
  border-radius: 12px;
  padding: 0.85rem 1.1rem;
  background: #fff;
  margin-top: 1rem;
}

/* Sidebar ad */
.ad-card--sidebar {
  border: 1.5px dashed var(--bg3);
  border-radius: 12px;
  padding: 0.85rem;
  background: var(--bg2);
}

.ad-card--sidebar-wrap {
  position: relative;
}

.sidebar-ad-dismiss {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: var(--bg3);
  color: var(--ink3);
  font-size: 0.9rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.14s, color 0.14s;
  z-index: 2;
  padding: 0;
}
.sidebar-ad-dismiss:hover {
  background: var(--brown);
  color: var(--cream);
}


/* ════════════════════════════════════════════════════════════════
   NAV ICONS + ICON-LABEL LINKS
   ════════════════════════════════════════════════════════════════ */

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--ink);
  font-weight: 500;
  font-size: 0.9rem;
  font-family: var(--font-ui);
  text-decoration: none;
  transition: color 0.15s;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--orange);
  text-decoration: none;
}

.nav-icon {
  flex-shrink: 0;
  opacity: 0.7;
  transition: opacity 0.15s;
}

.nav-link:hover .nav-icon {
  opacity: 1;
}

.nav-link--logout {
  color: var(--ink3);
  font-size: 0.85rem;
}

/* ── "Add a project" primary CTA button in nav ── */
.nav-add-project-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--brown);
  color: var(--cream);
  border: none;
  border-radius: 99px;
  padding: 0.4rem 1rem 0.4rem 0.75rem;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 2px 6px rgba(45,26,12,0.18);
  letter-spacing: 0.01em;
}

.nav-add-project-btn:hover {
  background: #3D2A1A;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(45,26,12,0.25);
}

/* ════════════════════════════════════════════════════════════════
   RESPONSIVE NAV — icon-only at tablet / mobile
   ════════════════════════════════════════════════════════════════ */

@media (max-width: 900px) {
  .nav-links-auth {
    gap: 0.25rem;
  }

  /* Hide text labels — icons only */
  .nav-label {
    display: none;
  }

  /* Give icons slightly more breathing room and a touch target */
  .nav-link {
    padding: 0.35rem 0.4rem;
    border-radius: 8px;
  }

  .nav-icon {
    width: 18px;
    height: 18px;
    opacity: 0.75;
  }

  /* Collapse "Add a project" pill to icon-only circle */
  .nav-add-project-btn {
    padding: 0.45rem 0.55rem;
    gap: 0;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(45,26,12,0.22);
  }

  .nav-add-project-btn svg {
    width: 16px;
    height: 16px;
  }
}

/* ════════════════════════════════════════════════════════════════
   AI WRITING ASSIST
   ════════════════════════════════════════════════════════════════ */

.ai-field-wrap {
  position: relative;
}

.ai-field-wrap input,
.ai-field-wrap textarea {
  padding-right: 7.5rem; /* leave room for the button */
  width: 100%;
}

/* For textarea, button floats below-right */
.ai-field-wrap--textarea {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ai-field-wrap--textarea textarea {
  padding-right: 1rem; /* reset right padding for textarea */
}

.ai-assist-btn {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: linear-gradient(135deg, #8820C8, #E07828);
  color: #fff;
  border: none;
  border-radius: 99px;
  padding: 0.28rem 0.7rem;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s, transform 0.15s;
  box-shadow: 0 1px 6px rgba(136,32,200,0.25);
  letter-spacing: 0.01em;
}

.ai-assist-btn:hover { opacity: 0.9; transform: translateY(-50%) scale(1.04); }
.ai-assist-btn:disabled { opacity: 0.6; cursor: default; }

/* Textarea variant — aligned to bottom-right corner below the textarea */
.ai-assist-btn--desc {
  position: static;
  transform: none;
  align-self: flex-end;
}

.ai-assist-btn--desc:hover { transform: scale(1.04); }
.ai-assist-btn--desc:disabled { opacity: 0.6; transform: none; cursor: default; }

/* Suggestion panel */
.ai-suggest-panel {
  margin-top: 0.5rem;
  border: 1.5px solid rgba(136,32,200,0.25);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(136,32,200,0.04), rgba(224,120,40,0.04));
  padding: 0.8rem 0.9rem;
}

.ai-suggest-header {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8820C8;
  margin-bottom: 0.55rem;
}

.ai-suggest-text {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--ink);
  line-height: 1.5;
  margin-bottom: 0.65rem;
  font-style: italic;
}

.ai-suggest-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

/* ════════════════════════════════════════════════════════════════
   CHALLENGE EXCHANGE MODAL
   ════════════════════════════════════════════════════════════════ */

.challenge-modal-header-inner {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
}

/* How it works steps */
.exchange-how-it-works {
  border: 1.5px solid var(--bg3);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  background: var(--bg2);
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.exchange-step-row {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
}

.exchange-step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--brown);
  color: var(--cream);
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 0.05rem;
}

.exchange-step-text {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--ink2);
  line-height: 1.45;
}

.exchange-theme-label {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.6rem;
}

/* Gift prompt inside challenge pick card */
.challenge-pick-gift-prompt {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--ink2);
  font-style: italic;
  line-height: 1.45;
  margin: 0.5rem 0;
  padding: 0.5rem 0.65rem;
  background: rgba(90,138,60,0.06);
  border-radius: 8px;
  border-left: 2px solid rgba(90,138,60,0.4);
}

/* Gift prompt inside challenge grid card */
.challenge-card-gift-prompt {
  display: flex;
  align-items: flex-start;
  gap: 0.3rem;
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: var(--ink3);
  font-style: italic;
  line-height: 1.4;
  margin-bottom: 0.75rem;
  padding: 0.4rem 0.55rem;
  background: rgba(90,138,60,0.05);
  border-radius: 6px;
  border-left: 2px solid rgba(90,138,60,0.3);
}

/* Match banner */
.exchange-match-banner {
  text-align: center;
  margin-bottom: 1.5rem;
}

.exchange-match-icon { font-size: 2.5rem; margin-bottom: 0.4rem; }

.exchange-match-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--ink);
  margin-bottom: 0.35rem;
}

.exchange-match-sub {
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--ink3);
  max-width: 380px;
  margin: 0 auto;
}

/* Pair layout */
.exchange-match-pair {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  border: 1.5px solid var(--bg3);
  border-radius: 14px;
  padding: 1.1rem 1rem;
  background: var(--bg2);
}

.exchange-match-maker {
  text-align: center;
  flex: 1;
}

.exchange-match-maker .match-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 1.2rem;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.4rem;
}

.match-maker-name {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--ink);
  margin-bottom: 0.15rem;
}

.match-maker-craft {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--ink3);
  margin-bottom: 0.4rem;
}

.exchange-match-making-label {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--green);
  background: rgba(90,138,60,0.08);
  border: 1px solid rgba(90,138,60,0.25);
  border-radius: 99px;
  padding: 0.15rem 0.5rem;
}

.exchange-match-arrows {
  color: var(--ink3);
  flex-shrink: 0;
  padding: 0 0.25rem;
}

/* Theme row below pair */
.exchange-theme-row {
  border: 1.5px solid var(--bg3);
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  background: #fff;
}

.exchange-theme-chip {
  display: block;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.25rem;
}

.exchange-theme-hint {
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--ink3);
  font-style: italic;
  line-height: 1.45;
}

/* Deadline note */
.exchange-deadline-note {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--ink2);
  background: rgba(224,120,40,0.07);
  border: 1px solid rgba(224,120,40,0.2);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  margin-top: 1rem;
}



/* ════════════════════════════════════════════════════════════════
   FEED SPLIT-SCROLL — independent scrollbars for left + right
   ════════════════════════════════════════════════════════════════ */

#page-feed.active {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 66px);   /* viewport minus sticky nav */
  overflow: hidden;
  padding: 0;
}

#page-feed .feed-layout {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  align-items: stretch;
  margin: 0;
}

.feed-col-left {
  overflow-y: auto;
  height: 100%;
  padding: 1.5rem 0 3rem;
  scrollbar-width: thin;
  scrollbar-color: var(--bg3) transparent;
}

.feed-col-left::-webkit-scrollbar { width: 5px; }
.feed-col-left::-webkit-scrollbar-track { background: transparent; }
.feed-col-left::-webkit-scrollbar-thumb { background: var(--bg3); border-radius: 99px; }

/* Sidebar gets its own scroll */
#page-feed .feed-sidebar {
  overflow-y: auto;
  height: 100%;
  padding: 1.5rem 0 2rem 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--bg3) transparent;
}

#page-feed .feed-sidebar::-webkit-scrollbar { width: 5px; }
#page-feed .feed-sidebar::-webkit-scrollbar-track { background: transparent; }
#page-feed .feed-sidebar::-webkit-scrollbar-thumb { background: var(--bg3); border-radius: 99px; }

/* Tablet: revert to normal block flow */
@media (max-width: 960px) {
  #page-feed.active {
    height: auto;
    overflow: visible;
  }
  .feed-col-left {
    overflow-y: visible;
    height: auto;
  }
}


/* ════════════════════════════════════════════════════════════════
   AD THREE-DOT MENU
   ════════════════════════════════════════════════════════════════ */

.ad-post-header {
  position: relative;   /* anchor for dropdown */
}

.ad-menu-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.3rem 0.45rem;
  color: var(--ink3);
  border-radius: 6px;
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.12s, color 0.12s;
}

.ad-menu-btn:hover {
  background: var(--bg3);
  color: var(--ink);
}

.ad-menu-dropdown {
  display: none;
  position: absolute;
  right: 0.5rem;
  top: calc(100% + 4px);
  background: var(--cream);
  border: 1px solid var(--bg3);
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(45,26,12,0.14);
  z-index: 200;
  min-width: 186px;
  overflow: hidden;
}

.ad-menu-dropdown.open {
  display: block;
}

.ad-menu-item {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-radius: 0;
  padding: 0.65rem 1rem;
  font-size: 0.86rem;
  color: var(--ink);
  cursor: pointer;
  font-family: var(--font-ui);
  transition: background 0.1s;
}

.ad-menu-item:hover {
  background: var(--bg2);
}

/* Taller ad hero */
.ad-post-hero {
  height: 280px;
}


/* ════════════════════════════════════════════════════════════════
   COMMENT SIDE MODAL — carousel left + comments right
   ════════════════════════════════════════════════════════════════ */

.comment-side-modal {
  max-width: 960px;
  width: 94vw;
  padding: 0;
  border-radius: var(--r-lg);
  overflow: hidden;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

.comment-modal-close {
  position: absolute;
  top: 0.65rem;
  right: 0.75rem;
  z-index: 10;
  background: rgba(0,0,0,0.45);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.comment-modal-close:hover {
  background: rgba(0,0,0,0.7);
}

.comment-modal-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* ── Left: dark media pane ── */
.cm-media-pane {
  background: #1a1208;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cm-carousel {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: stretch;
  justify-content: center;
  position: relative;
  /* overflow: visible so absolutely-positioned nav buttons are never clipped */
  overflow: visible;
}

/* Stable slot that holds the current media element (img or video).
   Nav buttons are siblings of this slot inside .cm-carousel, so they
   are never affected by slot content swaps. */
.cm-media-slot {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cm-carousel-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

/* Video in the comment/detail modal — fills the dark media pane, plays with sound */
.cm-carousel-video {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  background: #111;
}

/* Reuse existing detail-carousel-btn for CM nav — high z-index ensures
   they render above the media slot in all browsers */
.cm-nav-btn {
  background: rgba(0,0,0,0.45) !important;
  z-index: 10 !important;
  pointer-events: all;
}

/* Comment modal dots — normal flow (not absolute) so they stay inside the dark media pane */
.cm-dots {
  display: flex;
  justify-content: center;
  gap: 5px;
  padding: 0.45rem 0;
  background: rgba(0,0,0,0.35);
  flex-shrink: 0;
  position: static;        /* override any inherited absolute positioning */
  transform: none;
  left: auto;
  bottom: auto;
}

.cm-item-meta {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 1rem;
  background: rgba(0,0,0,0.35);
  flex-shrink: 0;
}

.cm-item-title {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.65);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Right: comments pane ── */
.cm-comments-pane {
  display: flex;
  flex-direction: column;
  background: var(--cream);
  overflow: hidden;
  border-left: 1px solid var(--bg3);
}

.cm-pane-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--bg3);
  flex-shrink: 0;
}

.cm-comment-list {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1rem 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--bg3) transparent;
}

.cm-comment-list::-webkit-scrollbar { width: 4px; }
.cm-comment-list::-webkit-scrollbar-track { background: transparent; }
.cm-comment-list::-webkit-scrollbar-thumb { background: var(--bg3); border-radius: 99px; }

.cm-composer {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--bg3);
  flex-shrink: 0;
  background: var(--cream);
}

.cm-composer-input {
  flex: 1;
  border: 1.5px solid var(--bg3);
  border-radius: 20px;
  padding: 0.45rem 0.85rem;
  font-family: var(--font-body);
  font-size: 0.88rem;
  background: var(--bg2);
  resize: none;
  min-height: 38px;
  max-height: 90px;
  color: var(--ink);
  line-height: 1.5;
}

.cm-composer-input:focus {
  outline: none;
  border-color: var(--orange);
}

.cm-composer-send {
  background: var(--brown);
  color: var(--cream);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  min-width: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 1px;
  transition: background 0.15s;
}

.cm-composer-send:hover {
  background: #3D2A1A;
}

/* Mobile: stack vertically */
@media (max-width: 680px) {
  .comment-modal-layout {
    grid-template-columns: 1fr;
    grid-template-rows: 45vh 1fr;
  }
  .cm-media-pane {
    max-height: 45vh;
  }
  .comment-side-modal {
    max-height: 95vh;
  }
}


/* ════════════════════════════════════════════════════════════════
   ACTIVE NAV INDICATOR
   ════════════════════════════════════════════════════════════════ */

.nav-link--active {
  color: var(--orange) !important;
  position: relative;
}

.nav-link--active .nav-icon {
  opacity: 1 !important;
}

/* Pill underline on the active link */
.nav-link--active::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 50%;
  transform: translateX(-50%);
  width: 70%;
  height: 2px;
  background: var(--orange);
  border-radius: 99px;
}

/* At mobile (icon-only) the label is hidden — show a filled dot instead */
@media (max-width: 900px) {
  .nav-link--active::after {
    bottom: -4px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
  }
}


/* ════════════════════════════════════════════════════════════════
   NAV SECONDARY GROUP + HAMBURGER BUTTON
   ════════════════════════════════════════════════════════════════ */

.nav-secondary-item {
  display: flex;  /* visible on desktop */
}

@media (max-width: 900px) {
  .nav-secondary-item {
    display: none !important;
  }
}

.nav-hamburger {
  display: none;   /* hidden on desktop */
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem 0.3rem;
  border-radius: 8px;
  transition: background 0.12s;
}

.nav-hamburger:hover { background: var(--bg3); }

.hamburger-line {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.22s, opacity 0.22s;
  transform-origin: center;
}

/* Morph to × when open */
.nav-hamburger.open .hamburger-line:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-hamburger.open .hamburger-line:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open .hamburger-line:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav-hamburger { display: flex; }
}


/* ════════════════════════════════════════════════════════════════
   MOBILE NAV DRAWER — left-sliding panel
   ════════════════════════════════════════════════════════════════ */

/* Backdrop */
.nav-drawer-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(45, 26, 12, 0.45);
  z-index: 148;
  opacity: 0;
  transition: opacity 0.28s ease;
  pointer-events: none;
}
.nav-drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}
@media (max-width: 900px) {
  .nav-drawer-backdrop { display: block; }
}

/* Drawer panel */
.nav-drawer {
  display: none; /* hidden on desktop */
  position: fixed;
  top: 0;
  right: 0;
  width: 280px;
  height: 100%;
  z-index: 149;
  background: #FAF6EE;
  box-shadow: -4px 0 28px rgba(45, 26, 12, 0.2);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  flex-direction: column;
  overscroll-behavior: contain;
}

@media (max-width: 900px) {
  .nav-drawer { display: flex; }
}

.nav-drawer.open {
  transform: translateX(0);
}

/* Drawer header — branding + close */
.nav-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem 0.9rem;
  border-bottom: 1px solid var(--bg3);
  background: #FAF6EE;
  position: sticky;
  top: 0;
  z-index: 2;
  flex-shrink: 0;
}

.nav-drawer-brand {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  font-style: italic;
  color: var(--ink);
  letter-spacing: 0.01em;
}

.nav-drawer-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.3rem;
  color: var(--ink3);
  font-size: 1.4rem;
  line-height: 1;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s, color 0.12s;
}
.nav-drawer-close:hover {
  background: var(--bg3);
  color: var(--ink);
}

/* Drawer items */
.nav-drawer-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.95rem 1.5rem;
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  border-bottom: 1px solid var(--bg3);
  transition: background 0.12s, color 0.12s;
}

.nav-drawer-item:last-child { border-bottom: none; }
.nav-drawer-item:hover { background: var(--bg2); }
.nav-drawer-item svg { opacity: 0.65; flex-shrink: 0; }
.nav-drawer-item--danger { color: #C0392B; }
.nav-drawer-item--danger svg { opacity: 0.8; }

/* Active state in drawer */
.nav-drawer-item.nav-link--active {
  color: var(--orange);
  background: var(--bg2);
}
.nav-drawer-item.nav-link--active::after { display: none; }


/* ════════════════════════════════════════════════════════════════
   FAB SPEED-DIAL
   ════════════════════════════════════════════════════════════════ */

.fab-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
}

.fab-container.hidden { display: none; }

/* The main FAB button */
.fab-container .feed-fab {
  position: static;  /* override old fixed */
}

/* Icon states */
.fab-icon-plus  { transition: opacity 0.18s, transform 0.22s; }
.fab-icon-close { position: absolute; opacity: 0; transition: opacity 0.18s, transform 0.22s; transform: rotate(-45deg); }

.fab-container.fab-open .fab-icon-plus  { opacity: 0; transform: rotate(45deg); }
.fab-container.fab-open .fab-icon-close { opacity: 1; transform: rotate(0deg); }

/* Options list */
.fab-options {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-items: flex-end;
  pointer-events: none;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.2s, transform 0.22s;
}

.fab-container.fab-open .fab-options {
  pointer-events: auto;
  opacity: 1;
  transform: translateY(0);
}

.fab-option {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.fab-option-label {
  background: var(--brown);
  color: var(--cream);
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.3rem 0.7rem;
  border-radius: 99px;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(45,26,12,0.22);
  letter-spacing: 0.01em;
}

.fab-option-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--cream);
  border: 2px solid var(--bg3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 12px rgba(45,26,12,0.18);
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
  color: var(--ink);
  flex-shrink: 0;
}

.fab-option-btn:hover {
  background: var(--brown);
  color: var(--cream);
  transform: scale(1.08);
  box-shadow: 0 5px 16px rgba(45,26,12,0.28);
}


/* ════════════════════════════════════════════════════════════════
   PULL TO REFRESH INDICATOR
   ════════════════════════════════════════════════════════════════ */

.pull-refresh-ind {
  height: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: height 0.22s ease, opacity 0.22s ease;
  opacity: 0;
}

.pull-refresh-inner {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 1.2rem;
  background: var(--bg);
  border: 1px solid var(--bg3);
  border-radius: 99px;
  box-shadow: 0 2px 10px rgba(45,26,12,0.1);
}

.pull-refresh-ring {
  width: 20px;
  height: 20px;
  border: 2px solid var(--bg3);
  border-top-color: var(--orange);
  border-radius: 50%;
  flex-shrink: 0;
  transition: border-top-color 0.2s;
}

.pull-refresh-ind.loading .pull-refresh-ring {
  animation: pull-spin 0.75s linear infinite;
  border-top-color: var(--orange);
}

.pull-refresh-label {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink2);
  white-space: nowrap;
}

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


/* ════════════════════════════════════════════════════════════════
   PUBLIC HERO (invite-only landing)
   ════════════════════════════════════════════════════════════════ */

.public-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(45, 26, 12, 0.22);
  color: var(--ink2);
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.85rem;
  border-radius: 99px;
  margin-bottom: 1.25rem;
  backdrop-filter: blur(4px);
}


/* ════════════════════════════════════════════════════════════════
   PUBLIC GALLERY (landing page)
   ════════════════════════════════════════════════════════════════ */

.hero-divider {
  width: 600px;
  max-width: 90%;
  border: none;
  border-top: 1px solid rgba(45,26,12,0.15);
  margin: 0 auto 2rem;
}

.public-gallery-section {
  padding: 0 0 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.public-gallery-header {
  text-align: center;
  margin-bottom: 2rem;
}

.public-gallery-header h2 { margin-bottom: 0.4rem; }
.public-gallery-header p  { color: var(--ink2); margin: 0; }

.public-feed-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  max-width: 1600px;
  margin: 0 auto;
}

@media (max-width: 1400px) {
  .public-feed-grid {
    grid-template-columns: repeat(3, 1fr);
    max-width: 1200px;
  }
}

@media (max-width: 900px) {
  .public-feed-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 540px) {
  .public-feed-grid {
    grid-template-columns: 1fr;
  }
}

.public-gallery-card {
  cursor: default;
}

/* Lock overlay — appears on hover */
.public-card-lock-overlay {
  position: absolute;
  inset: 0;
  background: rgba(45,26,12,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
  cursor: pointer;
}

.public-gallery-card:hover .public-card-lock-overlay { opacity: 1; }

.public-card-lock-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  color: #fff;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* Public gallery cards have no card-actions row, so add explicit bottom breathing room */
.public-gallery-card .card-body {
  padding-bottom: 1.25rem;
}

.public-card-cta {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--orange);
  margin-top: 0.6rem;
  font-weight: 500;
}

/* ── Request access section — warm studio atmosphere ── */
.request-access-section {
  background: #664F3F;   /* warm mid-brown — lighter than CTA #2D1A0C, clearly distinct */
  border-top: none;
  padding: 4rem 1.5rem 5rem;
  /* Full-bleed: break out of .container max-width */
  position: relative;
  left: 50%;
  margin-left: -50vw;
  width: 100vw;
}
/* Subtle warm noise texture on the dark bg */
.request-access-section::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
}

/* Two-column split layout */
.request-access-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem 4rem;
  max-width: 900px;
  margin: 0 auto;
  align-items: center;
}

/* Left: context panel */
.request-access-context {
  padding-top: 0.5rem;
}

.rac-eyebrow {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #E8C080;   /* warm amber — legible on #664F3F (~5.1:1), echoes brand accent */
  margin-bottom: 0.6rem;
}

.rac-headline {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1.22;
  color: #F5EDE0;   /* warm cream on dark */
  margin-bottom: 1rem;
}

.rac-body {
  font-size: 0.95rem;
  color: rgba(245, 237, 224, 0.87);   /* bumped from 0.68 — passes 4.5:1 on #664F3F */
  line-height: 1.65;
  margin-bottom: 1.75rem;
}

.rac-stats {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2rem;
  border-top: 1px solid rgba(245, 237, 224, 0.15);
  border-bottom: 1px solid rgba(245, 237, 224, 0.15);
  padding: 1rem 0;
}

.rac-stat {
  flex: 1;
}

.rac-stat-value {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.55rem;
  font-weight: 700;
  color: #F0C030;   /* gold on dark — warm and rich */
  line-height: 1.1;
  margin-bottom: 0.2rem;
}

.rac-stat-label {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: rgba(245, 237, 224, 0.75);   /* bumped from 0.5 — passes 4.5:1 on #664F3F */
  font-weight: 500;
}

.rac-testimonials {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.rac-testimonial {
  background: rgba(255, 255, 255, 0.07);
  border-radius: var(--r-lg);
  padding: 1rem 1.15rem;
  border: 1px solid rgba(245, 237, 224, 0.12);
}

.rac-quote {
  font-size: 0.88rem;
  color: rgba(245, 237, 224, 0.8);
  line-height: 1.6;
  font-style: italic;
  margin-bottom: 0.75rem;
}

.rac-attribution {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.rac-attr-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  font-family: var(--font-ui);
  flex-shrink: 0;
}

.rac-attr-name {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  color: #F5EDE0;
  line-height: 1.2;
}

.rac-attr-craft {
  font-family: var(--font-ui);
  font-size: 0.73rem;
  color: rgba(245, 237, 224, 0.75);   /* bumped from 0.5 — passes 4.5:1 on #664F3F */
}

/* Right: the form — stays white/light so it pops on the dark section */
.request-access-inner {
  background: #FDFAF7;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--r-lg);
  padding: 2rem 1.75rem;
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
}

.request-access-inner h3 {
  margin-bottom: 0.4rem;
  font-size: 1.25rem;
  color: #2D1A0C;
}

.rac-fine-print {
  text-align: center;
  font-size: 0.78rem;
  color: var(--ink3);
  margin-top: 0.85rem;
  line-height: 1.5;
}

/* Responsive: stack on smaller screens */
@media (max-width: 780px) {
  .request-access-split {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

/* ── Profile invite button ── */
.profile-actions-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 0.5rem;
}

.profile-invite-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* ── Invite modal ── */
.invite-modal-inner {
  max-width: 460px;
}

.invite-link-row {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.invite-link-input {
  flex: 1;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--ink2);
  cursor: text;
  min-width: 0;
}

.invite-or-divider {
  text-align: center;
  color: var(--ink3);
  font-size: 0.85rem;
  margin: 0.5rem 0 1rem;
  position: relative;
}

.invite-or-divider::before,
.invite-or-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 38%;
  height: 1px;
  background: var(--bg3);
}
.invite-or-divider::before { left: 0; }
.invite-or-divider::after  { right: 0; }

/* ── Hide FAB on desktop ── */
@media (min-width: 1025px) {
  .fab-container {
    display: none !important;
  }
}

/* ══════════════════════════════════════════════════════════
   ACTION BUTTON TOOLTIPS
   ══════════════════════════════════════════════════════════ */
.action-btn[data-tooltip] {
  position: relative;
}
.action-btn[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(30,18,8,0.88);
  color: #fff;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 20;
}
.action-btn[data-tooltip]:hover::after {
  opacity: 1;
}

/* ══════════════════════════════════════════════════════════
   INVITE QUOTA BANNER
   ══════════════════════════════════════════════════════════ */
.invite-quota-banner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  background: var(--bg2);
  border: 1px solid var(--bg3);
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  color: var(--ink2);
  margin-bottom: 1.2rem;
}
.invite-quota-banner svg {
  flex-shrink: 0;
  color: var(--primary);
}
.invite-quota-banner > span {
  flex: 1;
  min-width: 0;
}
.invite-quota-bar-track {
  width: 100%;
  height: 4px;
  background: var(--bg3);
  border-radius: 2px;
  overflow: hidden;
}
.invite-quota-bar-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
  width: 0%;
  transition: width 0.3s ease, background 0.3s ease;
}
.invite-quota-banner.invite-quota-warn {
  border-color: #C47A2A;
  background: #FFF8EE;
}
.invite-quota-banner.invite-quota-warn svg {
  color: #C47A2A;
}
.invite-quota-banner.invite-quota-empty {
  border-color: var(--accent);
  background: #FFF0F4;
}
.invite-quota-banner.invite-quota-empty svg {
  color: var(--accent);
}

/* ══════════════════════════════════════════════════════════
   PROFILE SOCIAL LINKS
   ══════════════════════════════════════════════════════════ */
.profile-social-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 0.5rem 0 0.25rem;
}
.profile-social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.65rem;
  border: 1px solid var(--bg3);
  border-radius: 20px;
  background: var(--cream);
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--ink2);
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.profile-social-link:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--bg2);
}

/* Social links edit grid */
.social-links-edit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}
@media (max-width: 480px) {
  .social-links-edit-grid { grid-template-columns: 1fr; }

  .home-hero {
    padding: 1.25rem 4%;
  }

  .hero-wordmark {
    max-width: 100px;   /* 125 × 0.8 */
    width: 32%;
    margin-bottom: 0.85rem;
  }

  .home-hero p {
    font-size: 0.875rem !important;   /* overrides inline style */
    margin-bottom: 1rem !important;
  }

  .hero-desc {
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
  }

  .public-hero-badge {
    font-size: 0.67rem;
    padding: 0.25rem 0.65rem;
    margin-bottom: 0.85rem;
  }

  .home-hero .btn {
    font-size: 0.88rem;
    padding: 0.55rem 1.1rem;
  }
}

@media (max-width: 375px) {
  .hero-wordmark {
    max-width: 84px;   /* 100 × 0.84 — final step to smallest phones */
    width: 30%;
  }
}
.social-link-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.social-link-icon-label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink2);
}
.social-link-input {
  font-size: 0.82rem;
  padding: 0.45rem 0.6rem;
}

/* ══════════════════════════════════════════════════════════
   SHARE MODAL
   ══════════════════════════════════════════════════════════ */
.share-modal-inner {
  max-width: 420px;
}
.share-modal-item-title {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  color: var(--ink2);
  font-style: italic;
  margin-bottom: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.share-copy-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}
.share-link-input {
  flex: 1;
  min-width: 0;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  color: var(--ink2);
  cursor: text;
}
.share-copy-btn {
  flex-shrink: 0;
  min-width: 60px;
}
.share-copy-btn.copied {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.share-platforms-label {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
}
.share-platforms-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
}
@media (max-width: 440px) {
  .share-platforms-grid { grid-template-columns: repeat(3, 1fr); }
}
.share-platform-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.65rem 0.4rem;
  border: 1px solid var(--bg3);
  border-radius: 10px;
  background: var(--cream);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
  font-family: var(--font-ui);
  font-size: 0.68rem;
  color: var(--ink2);
  font-weight: 500;
}
.share-platform-btn:hover {
  border-color: var(--primary);
  background: var(--bg2);
  transform: translateY(-2px);
}
.share-platform-btn:active {
  transform: translateY(0);
}
.share-platform-btn svg {
  flex-shrink: 0;
}

/* ============================================================================
   MESSAGES PAGE
   ============================================================================ */

.messages-main-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--bg3);
  margin-bottom: 1.5rem;
}

.messages-main-tab {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.25rem;
  border: none;
  border-radius: 0;
  background: none;
  font-family: var(--font-ui);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink3);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s;
  position: relative;
}

.messages-main-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.messages-main-tab:hover:not(.active) {
  color: var(--ink);
}

.messages-panel {
  min-height: 200px;
}

/* ── DM Thread List ── */
.dm-threads-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.dm-thread-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 0.5rem;
  border-bottom: 1px solid var(--bg3);
  cursor: pointer;
  transition: background 0.12s;
  border-radius: 8px;
}

.dm-thread-item:hover {
  background: var(--bg2);
}

.dm-thread-item--unread {
  background: #FDFAF7;
  border-left: 3px solid #3DB87B;
}

.dm-thread-item--unread .dm-thread-name {
  font-weight: 700;
  color: var(--ink);
}

.dm-thread-item--unread .dm-thread-preview {
  color: var(--ink2);
}

.dm-thread-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: white;
  flex-shrink: 0;
}

.dm-thread-body {
  flex: 1;
  min-width: 0;
}

.dm-thread-name {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink);
  margin-bottom: 0.2rem;
}

.dm-thread-preview {
  font-size: 0.83rem;
  color: var(--ink3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dm-thread-time {
  font-size: 0.75rem;
  color: var(--ink4, #9A8A7A);
  white-space: nowrap;
  flex-shrink: 0;
}

.dm-thread-unread-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #3DB87B;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(61,184,123,0.2);
}

.dm-empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--ink3);
}

.dm-empty-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  opacity: 0.6;
}

.dm-empty-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--ink);
  margin-bottom: 0.4rem;
}

.dm-empty-sub {
  font-size: 0.87rem;
  max-width: 340px;
  margin: 0 auto;
}

/* ============================================================================
   MAKER PROFILE PAGE
   ============================================================================ */

.maker-profile-page-wrap {
  padding: 1.25rem 0 2rem;
}

.maker-profile-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 0.75rem 0.4rem 0.5rem;
  border: 1px solid var(--bg3);
  background: var(--cream);
  border-radius: 20px;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink2);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  margin-bottom: 1.5rem;
}

.maker-profile-back-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Maker profile has same structure as own profile but different action btns */
.maker-profile-actions-row {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.btn-message {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* Maker inspiration profile (read-only pills on maker profile page) */
.maker-insp-profile {
  padding: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.insp-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.insp-section-label {
  font-family: var(--font-ui);
  font-size: 0.73rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink3);
}

.insp-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* Read-only: suppress hover/click affordances */
.insp-pill--readonly {
  cursor: default;
  pointer-events: none;
}

/* ============================================================================
   DM COMPOSE MODAL
   ============================================================================ */

.dm-compose-modal-inner {
  max-width: 520px;
  display: flex;
  flex-direction: column;
  max-height: 80vh;
}

.dm-compose-recipient {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.dm-compose-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: white;
  flex-shrink: 0;
}

.dm-compose-name {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink);
  line-height: 1.2;
}

.dm-compose-handle {
  font-size: 0.78rem;
  color: var(--ink3);
}

.dm-thread-area {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 0 0.5rem;
  min-height: 200px;
  max-height: 340px;
}

.dm-thread-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem;
  color: var(--ink3);
  text-align: center;
  font-size: 0.87rem;
}

.dm-messages-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0 0.25rem;
}

.dm-message-bubble {
  max-width: 76%;
  padding: 0.6rem 0.85rem;
  border-radius: 16px;
  font-size: 0.87rem;
  line-height: 1.5;
}

.dm-message-bubble--sent {
  align-self: flex-end;
  background: var(--primary);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.dm-message-bubble--received {
  align-self: flex-start;
  background: var(--bg2);
  color: var(--ink);
  border-bottom-left-radius: 4px;
}

.dm-compose-bar {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
  padding: 0.75rem 0 0;
  border-top: 1px solid var(--bg3);
  margin-top: 0.5rem;
}

.dm-compose-input {
  flex: 1;
  resize: none;
  border: 1.5px solid var(--bg3);
  border-radius: 12px;
  padding: 0.55rem 0.85rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.5;
  transition: border-color 0.15s;
  max-height: 120px;
  overflow-y: auto;
}

.dm-compose-input:focus {
  outline: none;
  border-color: var(--primary);
}

.dm-send-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, transform 0.1s;
}

.dm-send-btn:hover {
  background: var(--primary-dark, #5A1A0A);
  transform: scale(1.05);
}

.dm-send-btn:active {
  transform: scale(0.95);
}

/* Card maker section: pointer cursor when clickable */
.card-maker--clickable {
  cursor: pointer;
  border-radius: 8px;
  padding: 0.25rem 0.4rem 0.25rem 0.25rem;
  margin: -0.25rem -0.4rem -0.25rem -0.25rem;
  transition: background 0.12s;
}

.card-maker--clickable:hover {
  background: var(--bg2);
}

/* ════════════════════════════════════════════════════════════════
   SITE FOOTER
   ════════════════════════════════════════════════════════════════ */
.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  padding: 1.5rem 1rem 2rem;
  border-top: 1px solid var(--bg3);
  background: var(--cream);
  margin-top: 2rem;
}

.site-footer-copy {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--ink3);
  font-weight: 500;
}

.site-footer-dot {
  font-size: 0.78rem;
  color: var(--bg3);
}

.site-footer-link {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--ink3);
  text-decoration: none;
  transition: color 0.12s;
}
.site-footer-link:hover { color: var(--primary); }

/* ════════════════════════════════════════════════════════════════
   SIGN-UP LEGAL NOTICE
   ════════════════════════════════════════════════════════════════ */
.signup-legal-notice {
  font-size: 0.74rem;
  color: var(--ink3);
  line-height: 1.55;
  text-align: center;
  margin-top: 0.9rem;
  padding: 0.75rem 0.5rem;
  border-top: 1px solid var(--bg3);
}

.signup-legal-notice a {
  color: var(--ink2);
  text-decoration: underline;
  text-decoration-color: var(--bg3);
  text-underline-offset: 2px;
}
.signup-legal-notice a:hover { color: var(--primary); }

/* ==========================================================================
   INSPIRATION WIZARD OVERLAY
   ========================================================================== */

.wizard-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(18, 10, 5, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: wiz-fade-in 0.3s ease;
}

@keyframes wiz-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.wizard-inner {
  background: var(--bg1);
  border-radius: 18px;
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 32px 80px rgba(0,0,0,0.45);
  animation: wiz-slide-up 0.35s cubic-bezier(0.22,1,0.36,1);
}

@keyframes wiz-slide-up {
  from { transform: translateY(28px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* Modal header row — brand name left, close button right */
.wizard-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem 0 2rem;
  border-bottom: 1px solid var(--bg3);
  padding-bottom: 0.85rem;
}

.wizard-brand {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.05rem;
  color: var(--primary);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.wizard-body {
  padding: 0 2rem 2rem;
}

/* Close button now lives inside wizard-inner, uses the same modal-close style */
.wizard-close-btn {
  /* inherits .modal-close sizing/hover from the global rule */
  position: static;  /* no longer absolutely positioned outside the modal */
}

.wizard-skip-btn {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  background: none;
  border: 1px solid rgba(255,255,255,0.3);
  color: rgba(255,255,255,0.75);
  font-size: 0.78rem;
  border-radius: 20px;
  padding: 0.35rem 1.1rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
  z-index: 10001;
}
.wizard-skip-btn:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

.wizard-step-header {
  text-align: center;
  padding: 1.5rem 0 0.25rem;
}

.wizard-step-eyebrow {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink3);
  margin-bottom: 0.4rem;
}

.wizard-step-title {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.65rem;
  color: var(--ink1);
  line-height: 1.2;
  margin-bottom: 0.35rem;
}

.wizard-step-subtitle {
  font-size: 0.875rem;
  color: var(--ink3);
  line-height: 1.4;
}

/* Progress bar */
.wizard-progress {
  display: flex;
  gap: 5px;
  justify-content: center;
  padding: 0.9rem 0 0.25rem;
}

.wizard-progress-dot {
  width: 28px;
  height: 3px;
  border-radius: 2px;
  background: var(--bg3);
  transition: background 0.25s;
}
.wizard-progress-dot.active {
  background: var(--primary);
}
.wizard-progress-dot.done {
  background: var(--primary);
  opacity: 0.45;
}

/* Step image grid */
.wizard-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 1.1rem 0;
}

.wizard-option {
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s;
  border: 2.5px solid transparent;
}
.wizard-option:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 18px rgba(0,0,0,0.2);
}
.wizard-option.selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb, 136, 32, 200), 0.22);
}
.wizard-option.selected::after {
  content: '✓';
  position: absolute;
  top: 5px;
  right: 6px;
  background: var(--primary);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 18px;
  text-align: center;
}

.wizard-option img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.2s;
}

.wizard-option-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.6));
  color: #fff;
  font-size: 0.65rem;
  font-weight: 500;
  padding: 12px 6px 5px;
  text-align: center;
}

/* Color swatch step */
.wizard-swatch-option {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  border: 2.5px solid transparent;
  transition: transform 0.18s;
}
.wizard-swatch-option:hover { transform: scale(1.03); }
.wizard-swatch-option.selected { border-color: var(--primary); }
.wizard-swatch-option.selected::after {
  content: '✓';
  position: absolute;
  top: 5px;
  right: 6px;
  background: var(--primary);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 18px;
  text-align: center;
}

.wizard-swatch-bar {
  height: 52px;
  border-radius: 6px 6px 0 0;
}

.wizard-swatch-chips {
  display: flex;
  gap: 3px;
  padding: 5px 6px;
  background: var(--bg2);
  border-radius: 0 0 6px 6px;
  flex-wrap: wrap;
}

.wizard-chip {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Nav row */
.wizard-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.5rem;
  gap: 0.75rem;
}

.wizard-nav-back {
  background: none;
  border: 1px solid var(--bg3);
  color: var(--ink2);
  border-radius: 8px;
  padding: 0.55rem 1.1rem;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.15s;
}
.wizard-nav-back:hover { border-color: var(--ink2); color: var(--ink1); }

.wizard-nav-next {
  flex: 1;
  background: var(--primary);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.65rem 1.5rem;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.15s;
}
.wizard-nav-next:hover { opacity: 0.88; transform: translateY(-1px); }
.wizard-nav-next:active { transform: translateY(0); }

.wizard-counter {
  font-size: 0.75rem;
  color: var(--ink3);
  white-space: nowrap;
}

/* Generating screen */
.wizard-generating {
  text-align: center;
  padding: 3rem 1rem;
}

.wiz-gen-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--bg3);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: wiz-spin 0.8s linear infinite;
  margin: 0 auto 1.25rem;
}

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

.wiz-gen-title {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.4rem;
  color: var(--ink1);
  margin-bottom: 0.4rem;
}

.wiz-gen-sub {
  font-size: 0.875rem;
  color: var(--ink3);
}

/* ==========================================================================
   MOOD BOARD
   ========================================================================== */

.insp-board-wrap {
  padding: 0.5rem 0 2rem;
}

.insp-board-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0 0.85rem;
  gap: 0.75rem;
}

.insp-board-title {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.1rem;
  color: var(--ink1);
}

.insp-board-sub {
  font-size: 0.75rem;
  color: var(--ink3);
  margin-top: 1px;
}

.insp-board-edit-btn {
  flex-shrink: 0;
  background: none;
  border: 1px solid var(--bg3);
  color: var(--ink2);
  font-size: 0.78rem;
  border-radius: 20px;
  padding: 0.3rem 0.85rem;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.insp-board-edit-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Grid */
.mood-board-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 80px;
  gap: 5px;
  border-radius: 12px;
  overflow: hidden;
}

.mb-tile {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
}

.mb-tile--img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.mb-tile--img:hover img { transform: scale(1.05); }

.mb-tile--word {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg2);
  font-family: 'DM Serif Display', Georgia, serif;
  font-style: italic;
  color: var(--ink2);
  text-align: center;
  padding: 0.4rem;
  line-height: 1.2;
}

.mb-tile--palette {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.mb-palette-swatch {
  flex: 1;
  min-height: 0;
}

.mb-tile--work {
  background: var(--bg2);
  cursor: pointer;
}
.mb-tile--work img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.mb-tile--work:hover img { transform: scale(1.05); }

/* Work tile overlay */
.mb-work-overlay {
  position: absolute;
  inset: 0;
  background: rgba(18,10,5,0);
  transition: background 0.2s;
  display: flex;
  align-items: flex-end;
  padding: 6px;
}
.mb-tile--work:hover .mb-work-overlay {
  background: rgba(18,10,5,0.45);
}

.mb-work-name {
  color: #fff;
  font-size: 0.6rem;
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.2s;
  line-height: 1.2;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}
.mb-tile--work:hover .mb-work-name { opacity: 1; }

/* Refresh pulse on tiles that just changed */
@keyframes mb-pop-in {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}
.mb-tile--new {
  animation: mb-pop-in 0.4s cubic-bezier(0.22,1,0.36,1);
}

/* Live activity badge */
.insp-board-live {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.7rem;
  color: var(--ink3);
  padding: 0.35rem 0 0.65rem;
}

.insp-board-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4CAF7D;
  flex-shrink: 0;
  animation: live-pulse 2.4s ease-in-out infinite;
}

@keyframes live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}

/* ==========================================================================
   INSPIRATION SETUP CTA
   ========================================================================== */

.insp-cta-wrap {
  padding: 2rem 0 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0;
}

.insp-cta-preview {
  width: 100%;
  max-width: 340px;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 1.5rem;
  box-shadow: 0 12px 32px rgba(0,0,0,0.14);
}

.insp-cta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  background: var(--bg2);
  padding: 4px;
  border-radius: 12px;
}

.insp-cta-grid-img {
  aspect-ratio: 1;
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg3);
}
.insp-cta-grid-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.insp-cta-eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.insp-cta-title {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.5rem;
  color: var(--ink1);
  line-height: 1.25;
  margin-bottom: 0.5rem;
}

.insp-cta-body {
  font-size: 0.875rem;
  color: var(--ink3);
  line-height: 1.55;
  max-width: 300px;
  margin-bottom: 1.4rem;
}

.insp-cta-btn {
  background: var(--primary);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.75rem 2rem;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.15s;
  margin-bottom: 0.75rem;
}
.insp-cta-btn:hover { opacity: 0.88; transform: translateY(-1px); }

.insp-cta-skip {
  font-size: 0.78rem;
  color: var(--ink3);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s;
}
.insp-cta-skip:hover { color: var(--ink2); }

/* Other maker's board — no edit button, show "Curated by AI" note */
.insp-board-ai-note {
  font-size: 0.7rem;
  color: var(--ink3);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0.5rem 0 0.3rem;
}
.insp-board-ai-note svg { opacity: 0.55; flex-shrink: 0; }

/* ==========================================================================
   MOOD BOARD — tile internals & class-name reconciliation
   ========================================================================== */

/* All image/work/swatch tiles use background-image */
.mb-tile--img,
.mb-tile--work,
.mb-tile--swatch {
  background-size: cover;
  background-position: center;
}

/* Palette row of colour strips */
.mb-swatch-cell {
  flex: 1;
  min-height: 0;
}

/* Word tiles */
.mb-word-inner {
  font-family: 'DM Serif Display', Georgia, serif;
  font-style: italic;
  font-size: clamp(0.75rem, 1.1vw, 1.1rem);
  line-height: 1.25;
  text-align: center;
  padding: 0.5rem;
  letter-spacing: 0.01em;
}

/* Swatch overlay word */
.mb-swatch-word {
  font-family: 'DM Serif Display', Georgia, serif;
  font-style: italic;
  font-size: clamp(0.7rem, 1vw, 1rem);
  text-align: center;
  padding: 0.4rem;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
}
.mb-tile--swatch {
  position: relative;
}

/* Overlay + label on work tiles */
.mb-tile-overlay {
  position: absolute;
  inset: 0;
  background: rgba(18,10,5,0);
  transition: background 0.22s;
}
.mb-tile--work:hover .mb-tile-overlay {
  background: rgba(18,10,5,0.42);
}

.mb-tile-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.55));
  color: #fff;
  font-size: 0.6rem;
  font-weight: 500;
  padding: 10px 5px 4px;
  opacity: 0;
  transition: opacity 0.22s;
  text-align: center;
}
.mb-tile--img .mb-tile-label,
.mb-tile--work:hover .mb-tile-label { opacity: 1; }

/* Board header button row */
.insp-board-btns {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* Regenerate button */
.mb-regen-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: 1px solid var(--bg3);
  color: var(--ink2);
  font-size: 0.78rem;
  border-radius: 20px;
  padding: 0.3rem 0.85rem;
  cursor: pointer;
  transition: all 0.18s;
  white-space: nowrap;
  flex-shrink: 0;
}
.mb-regen-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(136,32,200,0.05);
}
.mb-regen-btn:hover svg {
  animation: mb-regen-spin 0.5s linear;
}
@keyframes mb-regen-spin {
  to { transform: rotate(360deg); }
}
.mb-regen-btn svg { flex-shrink: 0; }

/* Alias — old class names kept for safety */
.profile-moodboard    { /* same as .insp-board-wrap  */ }
.profile-moodboard-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; padding: 0.75rem 0 0.6rem; }
.moodboard-grid       { display: grid; grid-template-columns: repeat(6,1fr); grid-auto-rows: 80px; gap: 5px; border-radius: 12px; overflow: hidden; }
.mb-edit-btn          { display: inline-flex; align-items: center; gap: 5px; background: none; border: 1px solid var(--bg3); color: var(--ink2); font-size: 0.78rem; border-radius: 20px; padding: 0.3rem 0.85rem; cursor: pointer; transition: all 0.18s; white-space: nowrap; }
.mb-edit-btn:hover    { border-color: var(--primary); color: var(--primary); }

/* Wizard generating screen (wgen-* classes used inside feed.js) */
.wgen-spinner {
  width: 44px;
  height: 44px;
  border: 3px solid var(--bg3);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: wiz-spin 0.8s linear infinite;
  margin: 0 auto 1.1rem;
}
.wgen-title {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.35rem;
  color: var(--ink1);
  margin-bottom: 0.35rem;
}
.wgen-sub {
  font-size: 0.875rem;
  color: var(--ink3);
}

/* Insp-cta skip link */
.insp-cta-skip {
  margin-top: 0.3rem;
  background: none;
  border: none;
  font-size: 0.78rem;
  color: var(--ink3);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 0.2rem 0;
  transition: color 0.15s;
  display: block;
  text-align: center;
}
.insp-cta-skip:hover { color: var(--ink2); }

/* ==========================================================================
   WIZARD — class names matching JS-generated HTML
   (JS uses different names than the initial CSS draft above)
   ========================================================================== */

/* Progress dots row */
.wizard-dots {
  display: flex;
  gap: 5px;
  justify-content: center;
  padding: 1.1rem 0 0;
}
.wizard-dot {
  width: 28px;
  height: 3px;
  border-radius: 2px;
  background: var(--bg3);
  transition: background 0.25s;
  flex-shrink: 0;
}
.wizard-dot--done  { background: var(--primary); opacity: 0.45; }
.wizard-dot--active { background: var(--primary); }

/* Step header */
.wizard-step-hd {
  text-align: center;
  padding: 1rem 0 0.5rem;
}
.wizard-step-num {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink3);
  margin-bottom: 0.35rem;
}
.wizard-title {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.6rem;
  color: var(--ink1, #2D1A0C);
  line-height: 1.2;
  margin: 0 0 0.3rem;
}
.wizard-sub {
  font-size: 0.875rem;
  color: var(--ink3);
  line-height: 1.45;
  margin: 0;
}

/* 4×2 image option grid */
.wizard-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 1rem 0;
}

/* Individual option button */
.wizard-opt {
  position: relative;
  border: 2.5px solid transparent;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  background: none;
  padding: 0;
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
}
.wizard-opt:hover {
  transform: scale(1.04);
  box-shadow: 0 6px 18px rgba(0,0,0,0.18);
}
.wizard-opt--sel {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(136,32,200,0.18);
}

/* Image area — uses background-image */
.wizard-opt-img {
  width: 100%;
  aspect-ratio: 4/3;
  background-size: cover;
  background-position: center;
  background-color: var(--bg3);
  position: relative;
  display: block;
}

/* Checkmark overlay */
.wizard-opt-check {
  position: absolute;
  top: 5px;
  right: 6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Colour-step swatches strip at bottom of image */
.wizard-opt-swatches {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 14px;
  display: flex;
  gap: 0;
  overflow: hidden;
}

/* Text label below image */
.wizard-opt-label {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--ink2);
  text-align: center;
  padding: 4px 4px 5px;
  background: var(--bg1, #fff);
  line-height: 1.2;
}

/* Footer nav row */
.wizard-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.25rem;
}
.wizard-btn-back {
  background: none;
  border: 1px solid var(--bg3);
  color: var(--ink2);
  border-radius: 8px;
  padding: 0.55rem 1.1rem;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}
.wizard-btn-back:hover { border-color: var(--ink2); color: var(--ink1); }

.wizard-btn-next {
  flex: 1;
  background: var(--primary);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.65rem 1.5rem;
  cursor: pointer;
  /* Animate background + opacity together so the "unlock" is visible */
  transition: background 0.25s ease, color 0.25s ease, opacity 0.15s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(88,20,200,0.25);
}
.wizard-btn-next:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(88,20,200,0.32);
}

/* Disabled — clearly a grey "waiting" state, not just a dim purple */
.wizard-btn-next--off {
  background: var(--bg3, #D4C8B8);
  color: var(--ink3);
  cursor: not-allowed;
  box-shadow: none;
  opacity: 1;
}
.wizard-btn-next--off:hover {
  transform: none;
  background: var(--bg3, #D4C8B8);
  box-shadow: none;
  opacity: 1;
}

/* Generating animation screen */
.wizard-generating {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: 3rem 1rem;
}
.wgen-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  width: 220px;
}
.wgen-cell {
  aspect-ratio: 1;
  border-radius: 6px;
  background: var(--bg3);
  animation: wgen-pulse 1.2s ease-in-out infinite alternate;
}
@keyframes wgen-pulse {
  from { background: var(--bg3); transform: scale(0.9); }
  to   { background: var(--primary); transform: scale(1); opacity: 0.7; }
}
.wgen-label { text-align: center; }

/* ==========================================================================
   MOOD BOARD — flat collage (replaces CSS grid layout)
   ========================================================================== */

/* Collage outer wrapper — bleeds 40px beyond the content column on each side.
   overflow:visible so item drop-shadows aren't clipped at the edges. */
.mb-collage-wrap {
  margin-top: 0.75rem;
  margin-left:  -40px;
  margin-right: -40px;
  padding: 12px 12px 20px; /* breathing room for shadows */
  overflow: visible;
  border-radius: 14px;
}

/* The flat collage canvas */
.mb-collage {
  position: relative;
  width: 100%;
  aspect-ratio: 5 / 8;
  background: var(--bg);
  border-radius: 12px;
  overflow: visible;
  /* No box-shadow on the canvas itself — shadows belong to individual tiles */
}

/* Every collage item */
.mb-ci {
  position: absolute;
  overflow: hidden;
  border-radius: 4px;
  box-shadow:
    0 4px 14px rgba(0,0,0,0.16),
    0 1px 4px rgba(0,0,0,0.08);
  transition: box-shadow 0.3s ease;
  will-change: transform;
}
.mb-ci:hover {
  box-shadow:
    0 14px 36px rgba(0,0,0,0.2),
    0 4px  10px rgba(0,0,0,0.1);
  z-index: 99 !important;
  transition: box-shadow 0.25s ease;
}

/* ── Shape variants ── */

/* Circle: perfect crop */
.mb-ci--circle {
  border-radius: 50% !important;
}

/* Arch: portrait with arched top — cathedral/doorway feel */
.mb-ci--arch {
  border-radius: 50% 50% 4px 4px / 55% 55% 4px 4px !important;
}

/* Hexagon: clip-path polygon */
.mb-ci--hex {
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  border-radius: 0 !important;
  box-shadow: none !important;
}
.mb-ci--hex:hover {
  box-shadow: none !important;
  filter: brightness(1.06);
}

/* Wide panoramic with rounded pill ends */
.mb-ci--wide {
  border-radius: 100px !important;
}

/* Polaroid: white frame, thicker at bottom */
.mb-ci--polaroid {
  border-radius: 3px !important;
  background: #fff !important;
  padding: 5% 5% 18% !important;
  box-shadow:
    0 8px 24px rgba(0,0,0,0.18),
    0 2px 6px rgba(0,0,0,0.10) !important;
}
.mb-ci--polaroid img {
  object-fit: cover !important;
  border-radius: 1px !important;
}

/* Cutout: isolated object on cream — drop-shadow instead of box-shadow */
.mb-ci--cutout {
  background: #FAF6F0 !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.14)) drop-shadow(0 1px 3px rgba(0,0,0,0.08));
}
.mb-ci--cutout:hover {
  box-shadow: none !important;
  filter: drop-shadow(0 8px 20px rgba(0,0,0,0.18)) drop-shadow(0 2px 5px rgba(0,0,0,0.1));
}
.mb-ci--cutout img {
  object-fit: contain !important;
  padding: 12% !important;
  background: transparent !important;
}

/* Photo tile */
.mb-ci--photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.mb-ci-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.5));
  color: #fff;
  font-size: 0.58rem;
  font-weight: 500;
  padding: 10px 5px 4px;
  opacity: 0;
  transition: opacity 0.2s;
  text-align: center;
}
.mb-ci--photo:hover .mb-ci-caption { opacity: 1; }

/* Swatch tile — vertical colour strips */
.mb-ci--swatch {
  display: flex;
  flex-direction: column;
}

/* Word / typography tile */
.mb-ci--word {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8%;
}
.mb-ci-word-text {
  font-family: 'DM Serif Display', Georgia, serif;
  font-style: italic;
  font-size: clamp(0.65rem, 2.2cqw, 1.3rem);
  text-align: center;
  line-height: 1.2;
  word-break: break-word;
}

/* Palette dots scattered over the collage canvas */
.mb-swatch-dot {
  /* Absolutely positioned by inline style; sized relative to canvas */
  width: 6.5%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,0.85);
  box-shadow: 0 3px 10px rgba(0,0,0,0.25), 0 0 0 1px rgba(0,0,0,0.06);
  transition: transform 0.2s;
}
.mb-swatch-dot:hover { transform: scale(1.18); }

/* ════════════════════════════════════════════════════════════════
   HELP & SUPPORT MODAL
   ════════════════════════════════════════════════════════════════ */

.help-support-modal-inner {
  max-width: 460px;
}

.form-label {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.6rem;
  margin-top: 0.75rem;
}

.form-label:first-child {
  margin-top: 0;
}

.help-screenshot-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 2rem 1.5rem;
  border: 2px dashed var(--bg3);
  border-radius: var(--r-lg);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  color: var(--ink3);
  font-size: 0.9rem;
  margin-bottom: 0;
}

.help-screenshot-drop:hover {
  border-color: var(--accent);
  background: var(--orange-pale);
  color: var(--accent-dark);
}

/* ════════════════════════════════════════════════════════════════
   ACCESSIBILITY — reduced motion
   ════════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ════════════════════════════════════════════════════════════════
   CRAFT TYPEAHEAD — signup multi-select discipline picker
   ════════════════════════════════════════════════════════════════ */

.craft-typeahead {
  position: relative;
  width: 100%;
}

/* The pill+input row — looks like a standard form input */
.craft-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  min-height: 44px;
  width: 100%;
  box-sizing: border-box;
  padding: 0.4rem 0.6rem;
  border: 1.5px solid rgba(45, 26, 12, 0.18);
  border-radius: 8px;
  background: #fff;
  cursor: text;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.craft-pills:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(224, 120, 40, 0.1);
}

/* Text input inside pill row */
.craft-search-input {
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--primary);
  min-width: 160px;
  flex: 1;
  padding: 0.1rem 0;
  line-height: 1.4;
}

.craft-search-input::placeholder {
  color: var(--ink3);
}

/* Selected craft pill */
.craft-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: rgba(224, 120, 40, 0.1);
  border: 1px solid rgba(224, 120, 40, 0.3);
  color: var(--primary);
  border-radius: 5px;
  padding: 0.18rem 0.45rem 0.18rem 0.55rem;
  font-size: 0.82rem;
  font-family: var(--font-ui);
  font-weight: 500;
  animation: pillIn 0.15s ease;
}

@keyframes pillIn {
  from { opacity: 0; transform: scale(0.88); }
  to   { opacity: 1; transform: scale(1); }
}

.craft-pill-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}

.craft-pill-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(45, 26, 12, 0.4);
  font-size: 0.95rem;
  line-height: 1;
  padding: 0;
  flex-shrink: 0;
  transition: color 0.1s;
}

.craft-pill-remove:hover {
  color: var(--accent);
}

/* Dropdown panel */
.craft-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1.5px solid rgba(45, 26, 12, 0.14);
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(45, 26, 12, 0.12);
  z-index: 9999;
  max-height: 240px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.craft-dropdown.open {
  display: block;
}

/* Flat option rows — all at the same level, no group headers */
.craft-option {
  padding: 0.52rem 0.85rem;
  cursor: pointer;
  font-size: 0.875rem;
  font-family: var(--font-body);
  color: var(--primary);
  transition: background 0.08s;
}

.craft-option:hover,
.craft-option.focused {
  background: rgba(224, 120, 40, 0.08);
}

.craft-no-results {
  padding: 1rem 0.85rem;
  text-align: center;
  color: var(--ink3);
  font-size: 0.875rem;
  font-family: var(--font-body);
}

/* Hint text below the typeahead */
.craft-typeahead-hint {
  margin-top: 0.35rem;
  font-size: 0.76rem;
  color: var(--ink3);
  font-family: var(--font-ui);
}
