/* =============================================================================
   FISHBOOK — Design System
   Aesthetic: Refined outdoor / field journal
   Dark olive + deep slate + warm amber. Playfair Display + Source Sans Pro.
   ============================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Source+Sans+3:wght@300;400;500;600&family=DM+Mono:wght@400;500&family=Oswald:wght@700&family=Dancing+Script:wght@700&display=swap');

@font-face {
  font-family: 'Squealer';
  src: url('../images/squealer.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

/* ── Design tokens ─────────────────────────────────────────────────────────── */
:root {
  /* Core palette */
  --ink:        #1a1f1a;       /* Near-black with green undertone */
  --slate:      #2c3330;       /* Deep forest slate */
  --moss:       #3d4f43;       /* Mid olive */
  --sage:       #5a7a62;       /* Sage green */
  --fog:        #8fa496;       /* Muted sage */
  --mist:       #c8d5cb;       /* Light sage */
  --parchment:  #f2ede4;       /* Warm off-white */
  --cream:      #faf8f3;       /* Near-white cream */

  /* Accent */
  --amber:      #c97d2e;       /* Warm amber — primary accent */
  --amber-light:#e8a24a;       /* Lighter amber for hover */
  --amber-dim:  #7a4d1c;       /* Muted amber for subtle use */
  --gold:       #d4a843;       /* Gold — PB badges, records */

  /* Functional */
  --surface:    #242b25;       /* Card / surface background */
  --surface-2:  #2f3830;       /* Elevated surface */
  --border:     rgba(255,255,255,0.08);
  --border-amber: rgba(201,125,46,0.3);

  /* Text */
  --text-primary:   #f0ece4;
  --text-secondary: #a8b8ae;
  --text-muted:     #6a7d72;
  --text-amber:     #c97d2e;

  /* Typography */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Source Sans 3', system-ui, sans-serif;
  --font-mono:    'DM Mono', monospace;

  /* Spacing */
  --space-xs:   4px;
  --space-sm:   8px;
  --space-md:   16px;
  --space-lg:   24px;
  --space-xl:   40px;

  /* Radii */
  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-pill: 100px;

  /* Transitions */
  --ease:       cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Max width (phone-sized PWA) */
  --max-w: 430px;
}

/* ── Reset ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--ink);
  color: var(--text-primary);
  min-height: 100dvh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }

/* ── App shell ─────────────────────────────────────────────────────────────── */
.app {
  max-width: var(--max-w);
  margin: 0 auto;
  height: 100dvh;
  height: 100dvh;
  min-height: 100dvh;
  background: var(--ink);
  position: relative;
  overflow-x: hidden;
}

/* ── Screens ────────────────────────────────────────────────────────────────── */
.screen {
  display: none;
  flex-direction: column;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  animation: screenIn 0.28s var(--ease) both;
}
.screen.active { display: flex; }

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

/* ── Top bar ────────────────────────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(26,31,26,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0 var(--space-md);
  height: 56px;
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.topbar-logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  flex: 1;
}

.topbar-logo span {
  color: var(--amber);
}

.topbar-back {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  padding: 8px 0;
  transition: color 0.15s;
}
.topbar-back:hover { color: var(--text-primary); }
.topbar-back svg { flex-shrink: 0; }

.topbar-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  flex: 1;
  text-align: center;
  letter-spacing: -0.01em;
}

.topbar-action {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--amber);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 0;
}

/* ── Bottom nav ─────────────────────────────────────────────────────────────── */
.bottom-nav {
  position: sticky;
  bottom: 0;
  background: rgba(26,31,26,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  display: flex;
  padding: 8px 0 max(8px, env(safe-area-inset-bottom));
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 4px 0;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: color 0.15s;
  position: relative;
}

.nav-item.active { color: var(--amber); }
.nav-item:hover  { color: var(--text-secondary); }

.nav-item svg { width: 22px; height: 22px; }

.nav-badge {
  position: absolute;
  top: 2px;
  right: calc(50% - 18px);
  background: var(--amber);
  color: var(--ink);
  font-size: 0.6rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* ── Content scroll area ────────────────────────────────────────────────────── */
.scroll-content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  min-height: 0;
}

/* ── Section headers ────────────────────────────────────────────────────────── */
.section-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: var(--space-lg) var(--space-md) var(--space-sm);
}

/* ── HOME SCREEN — Group list ──────────────────────────────────────────────── */
.home-header {
  padding: var(--space-lg) var(--space-md) var(--space-md);
  border-bottom: 1px solid var(--border);
}

.home-greeting {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 4px;
}

.home-greeting em {
  font-style: italic;
  color: var(--amber);
}

.greeting-name {
  font-style: italic;
  color: var(--amber);
}

.home-subtext {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.group-card {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.group-card:hover, .group-card:active { background: var(--surface); }

.group-avatar {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--moss);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.group-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.group-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.group-preview {
  font-size: 0.825rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.group-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.group-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.group-badge {
  background: var(--amber);
  color: var(--ink);
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

/* ── FEED SCREEN ────────────────────────────────────────────────────────────── */
.feed-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  padding: 0 var(--space-md);
  gap: var(--space-xl);
}

.feed-tab {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 14px 0;
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
  letter-spacing: 0.02em;
}

.feed-tab.active {
  color: var(--text-primary);
  border-bottom-color: var(--amber);
}

/* ── Post card ──────────────────────────────────────────────────────────────── */
.post-card {
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.post-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-md) var(--space-sm);
}

.post-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--moss);
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  color: var(--mist);
}

.post-avatar img { width: 100%; height: 100%; object-fit: cover; }

.post-user { flex: 1; min-width: 0; }

.post-username {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.post-time {
  font-size: 0.775rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.post-photo {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  background: var(--slate);
  position: relative;
}

.post-photo-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--slate) 0%, var(--moss) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.post-body {
  padding: var(--space-sm) var(--space-md);
}

.post-species-line {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.post-species {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.post-size {
  font-size: 0.875rem;
  color: var(--amber);
  font-weight: 600;
  font-family: var(--font-mono);
}

.post-type-pill {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(90,122,98,0.25);
  color: var(--sage);
  border: 1px solid rgba(90,122,98,0.3);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.post-type-pill.harvest {
  background: rgba(201,125,46,0.15);
  color: var(--amber-light);
  border-color: rgba(201,125,46,0.3);
}

.post-location {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.post-notes {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: var(--space-sm);
}

.post-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-sm) var(--space-md) var(--space-md);
}

.post-reactions {
  display: flex;
  gap: 6px;
  flex: 1;
}

.reaction-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-secondary);
  transition: all 0.15s;
}

.reaction-btn:hover, .reaction-btn.active {
  background: rgba(201,125,46,0.12);
  border-color: var(--border-amber);
  color: var(--amber-light);
}

.comment-btn {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  transition: color 0.15s;
}
.comment-btn:hover { color: var(--text-secondary); }

.pb-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: rgba(212,168,67,0.12);
  border: 1px solid rgba(212,168,67,0.3);
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: all 0.2s var(--ease-spring);
}
.pb-btn:hover {
  background: rgba(212,168,67,0.2);
  transform: scale(1.03);
}

/* ── POST FULL VIEW ─────────────────────────────────────────────────────────── */
.full-photo {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  background: var(--slate);
}

.full-photo-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  background: linear-gradient(160deg, var(--slate) 0%, var(--moss) 60%, var(--ink) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
}

.post-detail {
  padding: var(--space-lg) var(--space-md);
  border-bottom: 1px solid var(--border);
}

.detail-headline {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 6px;
}

.detail-headline em {
  font-style: italic;
  color: var(--amber);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: var(--space-md);
}

.detail-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-family: var(--font-mono);
}

.detail-chip.highlight {
  background: rgba(201,125,46,0.1);
  border-color: var(--border-amber);
  color: var(--amber-light);
}

.detail-notes {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ── PB Panel ───────────────────────────────────────────────────────────────── */
.pb-panel {
  margin: var(--space-md);
  padding: var(--space-md);
  background: linear-gradient(135deg, rgba(212,168,67,0.08) 0%, rgba(201,125,46,0.05) 100%);
  border: 1px solid rgba(212,168,67,0.25);
  border-radius: var(--radius-md);
}

.pb-panel-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: var(--space-sm);
  display: flex;
  align-items: center;
  gap: 6px;
}

.pb-comparison {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
}

.pb-side {
  flex: 1;
  text-align: center;
}

.pb-side-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.pb-side-value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.pb-side-value.new { color: var(--gold); }

.pb-divider {
  font-size: 1.2rem;
  color: var(--text-muted);
}

.pb-message {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-align: center;
  margin-top: var(--space-sm);
  font-style: italic;
}

/* Fly section */
.fly-section {
  padding: var(--space-md);
  border-bottom: 1px solid var(--border);
}

.fly-section-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

.fly-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.fly-swatch {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #8B7355, #5a4a2e);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  border: 1px solid var(--border);
}

.fly-info { flex: 1; }

.fly-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.fly-origin {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.fly-link {
  font-size: 0.8rem;
  color: var(--amber);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  transition: color 0.15s;
}
.fly-link:hover { color: var(--amber-light); }

/* ── CONDITIONS STRIP ───────────────────────────────────────────────────────── */
.conditions-strip {
  display: flex;
  gap: 0;
  padding: var(--space-md);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}
.conditions-strip::-webkit-scrollbar { display: none; }

.condition-item {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0 var(--space-md);
  border-right: 1px solid var(--border);
}
.condition-item:first-child { padding-left: 0; }
.condition-item:last-child  { border-right: none; }

.condition-icon { font-size: 1.2rem; }
.condition-value {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
}
.condition-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

/* ── PATTERN PAGE ───────────────────────────────────────────────────────────── */
.pattern-hero {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(160deg, var(--slate) 0%, #4a3820 60%, var(--ink) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  position: relative;
  overflow: hidden;
}

.pattern-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, var(--ink) 100%);
}

.pattern-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pattern-info {
  padding: var(--space-lg) var(--space-md);
  border-bottom: 1px solid var(--border);
}

.pattern-name {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
  margin-bottom: 6px;
}

.pattern-name em { font-style: italic; color: var(--amber); }

.pattern-tagline {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: var(--space-md);
}

.pattern-attrs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pattern-attr {
  display: flex;
  gap: var(--space-md);
  font-size: 0.875rem;
}

.pattern-attr-label {
  color: var(--text-muted);
  font-weight: 500;
  min-width: 80px;
  flex-shrink: 0;
}

.pattern-attr-value {
  color: var(--text-primary);
}

.pattern-attr-value a {
  color: var(--amber);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.15s;
}
.pattern-attr-value a:hover { color: var(--amber-light); }

/* Library badge */
.library-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(90,122,98,0.2);
  border: 1px solid rgba(90,122,98,0.4);
  color: var(--sage);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  margin-bottom: var(--space-md);
}

.shop-card {
  margin: var(--space-md);
  padding: var(--space-md);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.shop-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--moss);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

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

.shop-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.shop-detail {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.shop-cta {
  padding: 8px 16px;
  background: var(--amber);
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  letter-spacing: 0.02em;
  transition: background 0.15s;
  white-space: nowrap;
}
.shop-cta:hover { background: var(--amber-light); }

/* Catch history */
.catch-history {
  padding: var(--space-md);
  border-bottom: 1px solid var(--border);
}

.catch-history-title {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.catch-history-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}
.catch-history-row:last-child { border-bottom: none; }

.catch-history-species { flex: 1; color: var(--text-primary); font-weight: 500; }
.catch-history-size { font-family: var(--font-mono); color: var(--amber); font-size: 0.8rem; }
.catch-history-river { color: var(--text-muted); font-size: 0.8rem; }
.catch-history-icon { font-size: 0.9rem; }

/* ── SUGGESTION TOOL ────────────────────────────────────────────────────────── */
.suggest-hero {
  padding: var(--space-lg) var(--space-md);
  background: linear-gradient(160deg, var(--slate) 0%, var(--ink) 100%);
  border-bottom: 1px solid var(--border);
}

.suggest-context {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.suggest-context-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.suggest-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 4px;
}

.suggest-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Suggestion result card */
.suggest-result {
  margin: var(--space-md);
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
}

.suggest-result.featured {
  border-color: var(--border-amber);
  background: linear-gradient(160deg, rgba(201,125,46,0.06) 0%, var(--surface) 100%);
}

.suggest-result-header {
  padding: var(--space-md);
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  border-bottom: 1px solid var(--border);
}

.suggest-rank {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-muted);
  line-height: 1;
  flex-shrink: 0;
  width: 28px;
}

.suggest-rank.top { color: var(--amber); }

.suggest-fly-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 3px;
}

.suggest-fly-name em { font-style: italic; }

.suggest-shop-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--amber);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.suggest-why {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.suggest-result-footer {
  display: flex;
  padding: var(--space-sm) var(--space-md);
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.suggest-stat {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.suggest-stat span { color: var(--text-secondary); }

/* Confidence bar */
.confidence-bar {
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  margin: var(--space-sm) var(--space-md) 0;
  overflow: hidden;
}

.confidence-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--sage), var(--amber));
  border-radius: 2px;
  transition: width 0.8s var(--ease);
}

/* Conditions summary */
.conditions-card {
  margin: var(--space-md);
  padding: var(--space-md);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.conditions-card-title {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

.conditions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.condition-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.condition-cell-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.condition-cell-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Hatch stage indicator */
.hatch-stage {
  margin: var(--space-md);
  padding: var(--space-md);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.hatch-stage-title {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

.hatch-stages {
  display: flex;
  gap: 4px;
}

.hatch-stage-item {
  flex: 1;
  text-align: center;
  padding: 8px 4px;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  color: var(--text-muted);
  background: var(--surface-2);
  transition: all 0.15s;
}

.hatch-stage-item.active {
  background: rgba(90,122,98,0.25);
  color: var(--sage);
  border: 1px solid rgba(90,122,98,0.3);
  font-weight: 600;
}

.hatch-stage-icon { font-size: 1rem; margin-bottom: 2px; }

/* ── Utility ────────────────────────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 0;
}

.spacer-lg { height: var(--space-xl); }

/* Verification dot */
.verify-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sage);
  flex-shrink: 0;
  box-shadow: 0 0 6px rgba(90,122,98,0.5);
}

/* ── Scrollbar (thin, subtle) ───────────────────────────────────────────────── */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--moss); border-radius: 2px; }

/* ── NEW: Tap to expand label on feed photos ────────────────────────────────── */
.post-photo-wrap {
  position: relative;
  overflow: hidden;
}

.tap-to-expand {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(26,31,26,0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--text-secondary);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  pointer-events: none;
}

/* ── NEW: Group card chevron ────────────────────────────────────────────────── */
.group-chevron {
  font-size: 1.4rem;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-left: 4px;
}

/* ── NEW: No-take pill variant ──────────────────────────────────────────────── */
.post-type-pill.no-take {
  background: rgba(212,168,67,0.12);
  color: var(--gold);
  border-color: rgba(212,168,67,0.3);
}

/* ── NEW: Unified expand buttons (My Best + Fly Pattern) ───────────────────── */
.action-btn-wrap {
  padding: var(--space-sm) var(--space-md) 0;
}

.expand-btn {
  width: 100%;
  padding: 13px var(--space-md);
  background: rgba(212,168,67,0.1);
  border: 1px solid rgba(212,168,67,0.3);
  border-radius: var(--radius-md);
  color: var(--gold);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s var(--ease-spring);
  cursor: pointer;
}

.expand-btn:hover, .expand-btn.active {
  background: rgba(212,168,67,0.18);
  border-color: rgba(212,168,67,0.5);
  transform: scale(1.01);
}

.expand-btn.fly {
  background: rgba(90,122,98,0.12);
  border-color: rgba(90,122,98,0.3);
  color: var(--sage);
  margin-top: var(--space-sm);
}

.expand-btn.fly:hover, .expand-btn.fly.active {
  background: rgba(90,122,98,0.2);
  border-color: rgba(90,122,98,0.5);
}

/* ── NEW: Expand panels (My Best + Fly Pattern) ─────────────────────────────── */
.expand-panel {
  margin: var(--space-sm) var(--space-md) 0;
  padding: var(--space-md);
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  animation: screenIn 0.22s var(--ease) both;
}

.expand-panel-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: var(--space-sm);
}

.expand-panel-note {
  font-size: 0.82rem;
  color: var(--text-secondary);
  text-align: center;
  margin-top: var(--space-sm);
  font-style: italic;
}

/* ── NEW: Fly panel details ─────────────────────────────────────────────────── */
.fly-panel-attrs {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: var(--space-md);
}

.fly-panel-row {
  display: flex;
  gap: var(--space-sm);
  font-size: 0.85rem;
  color: var(--text-primary);
}

.fly-panel-label {
  color: var(--text-muted);
  min-width: 90px;
  flex-shrink: 0;
}

/* ── NEW: Search Similar Patterns button ────────────────────────────────────── */
.similar-btn {
  width: 100%;
  padding: 13px var(--space-md);
  background: var(--amber);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  letter-spacing: 0.02em;
  transition: background 0.15s, transform 0.15s var(--ease-spring);
  cursor: pointer;
  text-align: center;
}

.similar-btn:hover {
  background: var(--amber-light);
  transform: scale(1.01);
}

/* ── NEW: Similar pattern results ───────────────────────────────────────────── */
.similar-result {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--space-md);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.similar-result:hover, .similar-result:active {
  background: var(--surface);
}

.similar-rank {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-muted);
  line-height: 1;
  flex-shrink: 0;
  width: 24px;
  padding-top: 2px;
}

.similar-rank.top { color: var(--amber); }

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

.similar-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 3px;
  line-height: 1.2;
}

.similar-name em { font-style: italic; }

.similar-shop {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--amber);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.similar-why {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.similar-chevron {
  font-size: 1.4rem;
  color: var(--text-muted);
  flex-shrink: 0;
  padding-top: 2px;
}

/* ── NEW: Run full search button ────────────────────────────────────────────── */
.similar-search-btn {
  width: 100%;
  padding: 14px var(--space-md);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  letter-spacing: 0.02em;
  transition: all 0.15s;
  cursor: pointer;
  text-align: center;
}

.similar-search-btn:hover {
  background: var(--surface-2);
  border-color: var(--border-amber);
  color: var(--amber-light);
}
