/* =========================================================
   FitCheck App Components
   All values reference design_system.css tokens.
   ========================================================= */

/* =========================================================
   APP SHELL
   ========================================================= */

.fc-app-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

.fc-main-content {
  min-width: 0;
  padding: var(--space-8);
  background: var(--paper-0);
}

/* =========================================================
   SIDEBAR
   ========================================================= */

.fc-sidebar {
  width: 240px;
  height: 100vh;
  position: sticky;
  top: 0;
  background: var(--paper-1);
  border-right: var(--border-hair);
  display: flex;
  flex-direction: column;
  padding: var(--space-6) var(--space-4);
  gap: var(--space-1);
  overflow-y: auto;
}

.fc-sidebar-brand {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--ink-0);
  padding: 0 var(--space-2);
  margin-bottom: var(--space-6);
  text-decoration: none;
  display: block;
}

.fc-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  flex: 1;
}

.fc-nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: var(--weight-regular);
  color: var(--ink-2);
  text-decoration: none;
  transition: background var(--duration-base) var(--ease-standard),
              color var(--duration-base) var(--ease-standard);
}

.fc-nav-item:hover {
  background: var(--paper-2);
  color: var(--ink-1);
  text-decoration: none;
}

.fc-nav-item--active,
.fc-nav-item.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: var(--weight-medium);
}

.fc-nav-item--active:hover,
.fc-nav-item.active:hover {
  background: var(--accent-soft);
  color: var(--accent-hover);
}

.fc-nav-secondary {
  font-size: var(--text-xs);
  color: var(--ink-3);
}

.fc-nav-divider {
  border: none;
  border-top: 1px solid var(--paper-3);
  margin: var(--space-2) 0;
}

.fc-sidebar-footer {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin-top: auto;
  padding-top: var(--space-4);
}

.fc-sidebar-profile {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: background var(--duration-base) var(--ease-standard);
}

.fc-sidebar-profile:hover {
  background: var(--paper-2);
}

.fc-sidebar-profile-name {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--ink-1);
}

.fc-sidebar-profile-role {
  font-size: var(--text-xs);
  color: var(--ink-3);
}

/* =========================================================
   AVATAR
   ========================================================= */

.fc-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-decoration: none;
}

.fc-avatar--sm {
  width: 28px;
  height: 28px;
  font-size: var(--text-xs);
}

.fc-avatar--lg {
  width: 56px;
  height: 56px;
  font-size: var(--text-md);
}

/* =========================================================
   MOBILE BOTTOM TAB BAR
   ========================================================= */

.fc-tab-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--overlay-light);
  border-top: var(--border-hair);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: var(--space-2) 0;
  padding-bottom: calc(var(--space-2) + env(safe-area-inset-bottom, 0px));
}

.fc-tab-bar-inner {
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.fc-tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  color: var(--ink-3);
  min-width: 44px;
  transition: color var(--duration-base) var(--ease-standard);
}

.fc-tab-item:hover { color: var(--ink-1); text-decoration: none; }

.fc-tab-item--active,
.fc-tab-item.active {
  color: var(--accent);
  font-weight: var(--weight-medium);
}

.fc-tab-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* =========================================================
   PUBLIC LAYOUT (unauthenticated pages)
   ========================================================= */

.fc-public-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-6);
  background: var(--paper-0);
  border-bottom: var(--border-hair);
}

.fc-public-main {
  max-width: var(--container-base);
  margin: 0 auto;
  padding: var(--space-8) var(--space-6);
}

/* =========================================================
   PAGE HEADER
   ========================================================= */

.fc-page-eyebrow {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: var(--space-2);
}

.fc-page-title {
  font-family: var(--font-sans);
  font-size: var(--text-2xl);
  font-weight: var(--weight-semibold);
  color: var(--ink-0);
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-tight);
}

.fc-page-subtitle {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--text-md);
  color: var(--ink-2);
  line-height: var(--leading-snug);
  margin-top: var(--space-2);
}

/* =========================================================
   RESPONSIVE — MOBILE
   ========================================================= */

@media (max-width: 768px) {
  .fc-app-shell {
    grid-template-columns: 1fr;
  }

  .fc-sidebar {
    display: none;
  }

  .fc-main-content {
    padding: var(--space-5) var(--space-4);
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  }

  .fc-tab-bar {
    display: block;
  }

  .fc-page-title {
    font-size: var(--text-xl);
  }
}

/* =========================================================
   OUTFIT CAROUSEL (home page Layer 1)
   ========================================================= */

.fc-carousel {
  display: flex;
  gap: var(--space-4);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: var(--space-2);
}

.fc-carousel::-webkit-scrollbar { display: none; }

.fc-carousel-card {
  flex-shrink: 0;
  width: 300px;
  scroll-snap-align: start;
  background: var(--paper-1);
  border: none;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
  display: block;
  color: inherit;
  transition: box-shadow var(--duration-base) var(--ease-standard),
              background var(--duration-base) var(--ease-standard);
}

.fc-carousel-card:hover {
  box-shadow: var(--shadow-sm);
  background: var(--paper-2);
  text-decoration: none;
  color: inherit;
}

.fc-carousel-card-body {
  padding: var(--space-4) var(--space-4) var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

@media (max-width: 768px) {
  .fc-carousel-card { width: 260px; }
}

/* Carousel dots */
.fc-carousel-dots {
  display: flex;
  gap: var(--space-2);
  justify-content: center;
  padding: var(--space-3) 0 var(--space-2);
}

.fc-carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--ink-4);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: width var(--duration-base) var(--ease-standard),
              background var(--duration-base) var(--ease-standard);
}

.fc-carousel-dot--active {
  background: var(--accent);
  width: 16px;
}

/* =========================================================
   OUTFIT PHOTO GRID
   ========================================================= */

.fc-photo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 140px 90px;
  gap: var(--space-1);
  background: var(--ink-4);
}

.fc-photo-grid--detail {
  grid-template-rows: 200px 130px;
}

.fc-photo-grid__hero {
  grid-column: 1;
  grid-row: 1 / 3;
  overflow: hidden;
}

.fc-photo-grid__cell { overflow: hidden; }

.fc-photo-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.fc-photo-placeholder {
  width: 100%;
  height: 100%;
  background: var(--paper-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
  color: var(--ink-3);
}

/* =========================================================
   SCORE BADGE
   ========================================================= */

.fc-score-badge {
  display: inline-flex;
  align-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-pill);
}

.fc-score-badge--lg {
  font-size: var(--text-base);
  padding: var(--space-2) var(--space-4);
}

/* =========================================================
   MINI CARDS (home page snapshot cards)
   ========================================================= */

.fc-mini-cards {
  display: flex;
  gap: var(--space-4);
  overflow-x: auto;
  scrollbar-width: none;
}

.fc-mini-cards::-webkit-scrollbar { display: none; }

.fc-mini-card {
  flex-shrink: 0;
  min-width: 200px;
  background: var(--paper-1);
  border: var(--border-hair);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}

/* =========================================================
   GAP RECOMMENDATION CARD
   ========================================================= */

.fc-gap-card {
  background: var(--paper-1);
  border: 1px solid var(--accent-soft);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
}

.fc-gap-card__label {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-1);
}

.fc-gap-card__name {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--ink-0);
}

.fc-gap-card__sub {
  font-size: var(--text-xs);
  color: var(--ink-2);
  margin-top: var(--space-1);
  display: block;
}

/* =========================================================
   ITEM ROW (outfit detail — garment list)
   ========================================================= */

.fc-item-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: var(--paper-1);
  border: var(--border-hair);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
}

.fc-item-swatch {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--paper-2);
}

.fc-item-swatch img { width: 100%; height: 100%; object-fit: cover; }

.fc-item-name {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--ink-0);
}

.fc-item-meta {
  font-size: var(--text-xs);
  color: var(--ink-3);
  font-family: var(--font-mono);
}

/* =========================================================
   PALETTE DOTS
   ========================================================= */

.fc-palette {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.fc-palette-dot {
  width: 14px;
  height: 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--ink-4);
}

/* =========================================================
   RETAINED fc-* COMPONENTS (backward compat — remove after full migration)
   ========================================================= */

.fc-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  border: none;
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-5);
  cursor: pointer;
  text-decoration: none;
  transition: background var(--duration-fast) var(--ease-standard);
}
.fc-btn-primary:hover { background: var(--accent-hover); color: var(--accent-ink); text-decoration: none; }
.fc-btn-primary:active { background: var(--accent-press); transform: scale(0.97); transition: transform var(--duration-instant) var(--ease-standard); }

.fc-btn-secondary,
.fc-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  background: transparent;
  color: var(--ink-1);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  border: var(--border-hair);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-5);
  cursor: pointer;
  text-decoration: none;
  transition: background var(--duration-fast) var(--ease-standard),
              border-color var(--duration-fast) var(--ease-standard);
}
.fc-btn-secondary:hover,
.fc-btn-ghost:hover {
  background: var(--paper-1);
  border-color: var(--ink-2);
  color: var(--ink-0);
  text-decoration: none;
}

.fc-btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--danger);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  border: none;
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-5);
  cursor: pointer;
  text-decoration: none;
}

.fc-card {
  background: var(--paper-0);
  border: var(--border-hair);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}
.fc-card--clickable { cursor: pointer; }
.fc-card--clickable:hover { background: var(--paper-1); border-color: var(--ink-2); }

.fc-form-group { display: flex; flex-direction: column; gap: var(--space-2); margin-bottom: var(--space-5); }
.fc-form-group label { font-size: var(--text-sm); font-weight: var(--weight-medium); color: var(--ink-1); }
.fc-form-group input,
.fc-form-group select,
.fc-form-group textarea {
  background: var(--paper-1);
  border: var(--border-hair);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  color: var(--ink-0);
  transition: border-color var(--duration-fast) var(--ease-standard);
  width: 100%;
}
.fc-form-group input:focus,
.fc-form-group select:focus,
.fc-form-group textarea:focus { outline: none; border-color: var(--accent); }

.fc-badge { display: inline-flex; align-items: center; padding: 2px var(--space-3); border-radius: var(--radius-pill); font-size: var(--text-xs); font-weight: var(--weight-medium); }
.fc-badge--success { background: var(--success-soft); color: var(--success); }
.fc-badge--score { background: var(--accent-soft); color: var(--accent); font-family: var(--font-mono); }

.fc-section { margin-bottom: var(--space-7); }
.fc-section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-4); }
.fc-page-header { margin-bottom: var(--space-6); }
.fc-detail-row { display: flex; justify-content: space-between; padding: var(--space-3) 0; border-bottom: 1px solid var(--paper-2); }
.fc-detail-label { font-size: var(--text-sm); color: var(--ink-2); }
.fc-detail-value { font-size: var(--text-sm); font-weight: var(--weight-medium); color: var(--ink-0); }

.fc-gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: var(--space-4); }
.fc-gallery-grid--compact { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: var(--space-3); }
.fc-gallery-item { position: relative; border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 1; background: var(--paper-1); }
.fc-gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fc-gallery-item-info { position: absolute; bottom: 0; left: 0; right: 0; padding: var(--space-2); background: linear-gradient(transparent, var(--overlay-dark)); }

.fc-empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: var(--space-10) var(--space-6); }
.fc-empty-state-icon { font-size: var(--text-3xl); margin-bottom: var(--space-4); color: var(--ink-4); }

.fc-filter-bar { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-bottom: var(--space-5); }
.fc-filter-btn { background: var(--paper-1); border: var(--border-hair); border-radius: var(--radius-pill); padding: var(--space-2) var(--space-4); font-size: var(--text-sm); color: var(--ink-2); cursor: pointer; font-family: var(--font-sans); }
.fc-filter-btn.active, .fc-filter-btn--active { background: var(--accent-soft); border-color: var(--accent-soft); color: var(--accent); font-weight: var(--weight-medium); }

.fc-delete-btn { position: absolute; top: var(--space-2); right: var(--space-2); width: 28px; height: 28px; border-radius: var(--radius-pill); background: var(--overlay-heavy); border: none; color: var(--white); cursor: pointer; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity var(--duration-fast) var(--ease-standard); }
.fc-gallery-item:hover .fc-delete-btn { opacity: 1; }

.fc-color-swatch { width: 12px; height: 12px; border-radius: var(--radius-pill); border: 1px solid var(--ink-4); display: inline-block; }

.fc-category-header { font-size: var(--text-xs); font-weight: var(--weight-medium); letter-spacing: var(--tracking-widest); text-transform: uppercase; color: var(--ink-3); margin: var(--space-6) 0 var(--space-3); }

.fc-suggestion-card { background: var(--paper-1); border: var(--border-hair); border-radius: var(--radius-lg); overflow: hidden; margin-bottom: var(--space-5); }
.fc-suggestion-header { display: flex; align-items: center; justify-content: space-between; padding: var(--space-4) var(--space-5); border-bottom: 1px solid var(--paper-2); }
.fc-suggestion-desc { padding: var(--space-3) var(--space-5); font-family: var(--font-serif); font-style: italic; font-size: var(--text-sm); color: var(--ink-2); }
.fc-suggestion-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: var(--space-2); padding: var(--space-4) var(--space-5); }
.fc-suggestion-gap { padding: var(--space-3) var(--space-5); border-top: 1px solid var(--paper-2); font-size: var(--text-xs); color: var(--ink-3); }

/* =========================================================
   FLASH MESSAGES
   ========================================================= */

.flash-messages {
  position: fixed;
  top: var(--space-5);
  right: var(--space-5);
  z-index: 9999;
  max-width: 400px;
  min-width: 300px;
}

.flash-messages .alert {
  background: var(--paper-0);
  color: var(--ink-0);
  padding: var(--space-4) var(--space-5);
  margin-bottom: var(--space-2);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--accent);
  opacity: 1;
  transition: var(--duration-base) var(--ease-standard);
  box-shadow: var(--shadow-sm);
  font-weight: var(--weight-medium);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
}

.flash-messages .alert.error   { border-left-color: var(--danger);  background: var(--danger-soft); }
.flash-messages .alert.success { border-left-color: var(--success); background: var(--success-soft); }
.flash-messages .alert.warning { border-left-color: var(--warning); background: var(--warning-soft); }
.flash-messages .alert.info    { border-left-color: var(--info);    background: var(--info-soft); }

/* Flash banners (full-width) */
.flash-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  padding: var(--space-4) var(--space-7) var(--space-4) var(--space-4);
  text-align: center;
  font-weight: var(--weight-medium);
  font-size: var(--text-base);
  border-bottom: 2px solid;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60px;
}

.flash-banner .close-btn {
  position: absolute;
  right: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: inherit;
  font-size: 20px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity var(--duration-fast) var(--ease-standard);
}

.flash-banner .close-btn:hover { opacity: 1; }

.flash-banner.success { background: var(--success);      color: var(--white);  border-bottom-color: var(--success); }
.flash-banner.error   { background: var(--danger);       color: var(--white);  border-bottom-color: var(--danger); }
.flash-banner.warning { background: var(--warning-soft); color: var(--ink-0);  border-bottom-color: var(--warning); }
.flash-banner.info    { background: var(--info);         color: var(--white);  border-bottom-color: var(--info); }

/* =========================================================
   IMAGE ACTION BUTTONS (delete, settings overlays)
   ========================================================= */

.image-item {
  position: relative;
  overflow: visible;
}

.delete-btn,
.settings-btn {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  width: 32px;
  height: 32px;
  border: none !important;
  border-radius: var(--radius-pill);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  z-index: 2;
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: transform var(--duration-fast) var(--ease-standard),
              box-shadow var(--duration-fast) var(--ease-standard);
}

.delete-btn              { background: var(--danger); }
.delete-btn:hover        { transform: scale(1.05); box-shadow: var(--shadow-sm); }
.settings-btn            { background: var(--ink-2); font-weight: var(--weight-bold); font-size: 18px; }
.settings-btn:hover      { transform: scale(1.05); box-shadow: var(--shadow-sm); background: var(--ink-1); }

/* =========================================================
   TAGS DISPLAY
   ========================================================= */

.tags-display {
  min-height: 40px;
  padding: var(--space-2);
  border: var(--border-soft);
  border-radius: var(--radius-sm);
  background: var(--paper-1);
}

.tags-display .badge {
  font-size: var(--text-sm);
  padding: var(--space-1) var(--space-3);
}

.bg-accent { background-color: var(--accent) !important; }

/* =========================================================
   GALLERY ITEM INFO (below-image metadata)
   ========================================================= */

.gallery-item-info {
  margin-top: var(--space-4) !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 0 !important;
  background: transparent !important;
}

.gallery-item-info .reaction-count {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--ink-2);
  font-size: var(--text-sm);
}

.gallery-item-info .reaction-count i {
  color: var(--danger);
  font-size: var(--text-base);
}

.gallery-item-info small {
  color: var(--ink-2) !important;
  font-size: var(--text-xs);
}

/* =========================================================
   UTILITY: NO-SCROLL (for JS to toggle instead of element.style)
   ========================================================= */

body.no-scroll { overflow: hidden; }

/* =========================================================
   EVENT CARD COMPONENTS (fc-event-*)
   Extracted from events.html inline styles.
   ========================================================= */

/* Base event card */
.fc-event-card {
  cursor: pointer;
  transition: transform var(--duration-base) var(--ease-standard),
              box-shadow var(--duration-base) var(--ease-standard);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  min-height: 160px;
  margin-bottom: var(--space-1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

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

.fc-event-card .btn {
  pointer-events: none;
}

.fc-event-card a[onclick*="stopPropagation"] {
  pointer-events: auto;
}

.fc-event-card:active {
  transform: translateY(0);
  transition: transform var(--duration-instant) var(--ease-standard);
}

.fc-event-card.loading {
  opacity: 0.7;
  pointer-events: none;
}

.fc-event-card:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.fc-event-card[tabindex="0"] {
  cursor: pointer;
}

/* Event title */
.fc-event-title {
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-1);
  line-height: var(--leading-snug);
  word-wrap: break-word;
}

/* Event description */
.fc-event-desc {
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  margin-bottom: var(--space-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Event details block */
.fc-event-details {
  flex-grow: 1;
  margin-bottom: var(--space-1);
}

.fc-event-detail-label {
  font-size: var(--text-xs);
  color: var(--ink-2);
  font-weight: var(--weight-medium);
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.fc-event-detail-value {
  font-size: var(--text-xs);
  color: var(--ink-1);
  font-weight: var(--weight-medium);
  text-align: right;
  word-break: break-word;
}

/* Pending invite card */
.fc-invite-card {
  border-left: 4px solid var(--accent);
  background: linear-gradient(135deg, var(--accent-soft) 0%, var(--white) 100%);
}

/* =========================================================
   EXTRACTION STATUS OVERLAY (gallery — analysis in progress)
   Extracted from index.html inline <style>.
   ========================================================= */

.extraction-status-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--overlay-heavy);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.4rem 0.6rem;
  font-size: 0.75rem;
  pointer-events: none;
}

.extraction-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--white);
  border-radius: var(--radius-pill);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* =========================================================
   SCRAPBOOK IMAGE (Fits modal canvas elements)
   Extracted from index.html inline <style>.
   ========================================================= */

.scrapbook-image {
  position: absolute;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.scrapbook-image .image-controls {
  position: absolute;
  top: 6px;
  right: 6px;
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 4px;
  cursor: pointer;
  display: none;
}

.scrapbook-image:hover .image-controls {
  display: block;
}

/* Accept invite button */
.fc-accept-btn {
  font-size: var(--text-sm);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  font-weight: var(--weight-semibold);
}

/* Create event button */
.fc-create-event-btn {
  box-shadow: var(--shadow-accent);
  transition: all var(--duration-base) var(--ease-standard);
}

.fc-create-event-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-accent-hover);
}

/* Empty state (events-specific extension) */
.fc-empty-state--events {
  padding: var(--space-9) var(--space-6);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--accent-soft) 0%, var(--white) 100%);
  border: 2px dashed var(--ink-4);
}

.fc-empty-state-icon {
  opacity: 0.6;
}

.fc-empty-state-title {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  color: var(--ink-1);
  margin-bottom: var(--space-4);
}

.fc-empty-state-description {
  font-size: var(--text-base);
  color: var(--ink-2);
  margin-bottom: var(--space-6);
  line-height: var(--leading-normal);
}

.fc-create-first-btn {
  box-shadow: var(--shadow-accent);
  transition: all var(--duration-base) var(--ease-standard);
}

.fc-create-first-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-accent-hover);
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  .fc-event-detail-label {
    color: var(--ink-3);
  }

  .fc-event-detail-value {
    color: var(--ink-4);
  }

  .fc-invite-card {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%); /* TODO: token pending dark-mode system */
  }
}

/* Mobile optimizations — ≤768px */
@media screen and (max-width: 768px) {
  .fc-event-card {
    padding: var(--space-3);
    min-height: 100px;
    margin-bottom: var(--space-1);
  }

  .fc-event-title {
    font-size: var(--text-base);
    margin-bottom: var(--space-1);
    line-height: var(--leading-snug);
  }

  .fc-event-desc {
    font-size: 0.8rem;
    margin-bottom: var(--space-2);
    -webkit-line-clamp: 1;
  }

  .fc-event-detail-label,
  .fc-event-detail-value {
    font-size: var(--text-xs);
  }

  .fc-event-details .d-flex {
    margin-bottom: var(--space-1);
  }

  .fc-accept-btn {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }

  .fc-create-event-btn {
    margin-bottom: var(--space-3);
    width: 100%;
    max-width: 300px;
  }

  .col-12.mb-2 {
    margin-bottom: var(--space-1) !important;
  }

  .fc-empty-state--events {
    padding: var(--space-6) var(--space-5);
    margin: 0 var(--space-4);
  }

  .fc-empty-state-title {
    font-size: var(--text-md);
  }

  .fc-empty-state-description {
    font-size: var(--text-sm);
    margin-bottom: var(--space-5);
  }

  .fc-create-first-btn {
    width: 100%;
    max-width: 280px;
  }
}

/* Mobile optimizations — ≤480px */
@media screen and (max-width: 480px) {
  .fc-event-card {
    padding: 0.6rem;
    min-height: 80px;
    margin-bottom: var(--space-1);
  }

  .fc-event-title {
    font-size: var(--text-sm);
    line-height: var(--leading-snug);
    margin-bottom: var(--space-1);
  }

  .fc-event-desc {
    font-size: 0.75rem;
    -webkit-line-clamp: 1;
    margin-bottom: var(--space-1);
  }

  .fc-event-detail-label,
  .fc-event-detail-value {
    font-size: 0.7rem;
  }

  .fc-event-details .d-flex {
    flex-direction: row;
    align-items: center !important;
    margin-bottom: var(--space-1);
  }

  .fc-event-detail-value {
    text-align: right;
    margin-top: 0;
    margin-left: 0;
  }

  .fc-accept-btn {
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem;
    width: 100%;
  }

  .col-12 {
    padding-left: var(--space-2);
    padding-right: var(--space-2);
  }

  .container {
    padding-left: var(--space-3);
    padding-right: var(--space-3);
  }

  .fc-empty-state--events {
    padding: var(--space-5) var(--space-4);
    margin: 0 var(--space-2);
  }

  .fc-empty-state-icon i {
    font-size: 2.5rem !important;
  }

  .fc-empty-state-title {
    font-size: var(--text-base);
  }

  .fc-empty-state-description {
    font-size: 0.85rem;
  }
}

/* iPhone-specific optimizations — ≤414px & ≤896px height */
@media screen and (max-width: 414px) and (max-height: 896px) {
  .fc-event-card {
    padding: var(--space-2);
    min-height: 70px;
    margin-bottom: var(--space-1);
  }

  .fc-event-title {
    font-size: 0.85rem;
    margin-bottom: 0.15rem;
  }

  .fc-event-desc {
    font-size: 0.7rem;
    margin-bottom: var(--space-1);
  }

  .fc-event-detail-label,
  .fc-event-detail-value {
    font-size: 0.65rem;
  }

  .fc-event-details .d-flex {
    margin-bottom: 0.15rem;
  }

  .fc-accept-btn {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
  }

  .fc-create-event-btn {
    margin-bottom: var(--space-2);
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
  }

  .col-12.mb-2 {
    margin-bottom: var(--space-1) !important;
  }
}

/* Tablet optimizations — 769px–1024px */
@media screen and (min-width: 769px) and (max-width: 1024px) {
  .fc-event-card {
    padding: 1.2rem;
    min-height: 150px;
    margin-bottom: var(--space-1);
  }

  .fc-event-title {
    font-size: var(--text-md);
  }

  .fc-event-desc {
    font-size: var(--text-sm);
  }
}

/* =========================================================
   LANDING PAGE — scroll image + animated text
   Extracted from landing.html inline <style>.
   @keyframes loading stays in landing.html (page-specific).
   ========================================================= */

/* Smooth loading transition for carousel images */
.fc-landing-scroll-image {
  opacity: 0;
  transition: opacity var(--duration-base) var(--ease-standard);
}

.fc-landing-scroll-image.loaded {
  opacity: 1;
}

/* Skeleton shimmer while image loads */
.fc-landing-scroll-image:not(.loaded) {
  background: linear-gradient(
    90deg,
    var(--paper-2) 25%,
    var(--paper-3) 50%,
    var(--paper-2) 75%
  );
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

/* Billboard animated-text roller */
.fc-landing-animated-text {
  font-size: 2em;
  font-family: var(--font-sans);
  display: inline;
}

.fc-landing-animation {
  vertical-align: sub;
  height: 1em;
  overflow: hidden;
  display: inline-block;
  line-height: 2em;
  border: 1px solid var(--paper-3);
  margin: 0;
  padding: 0;
}

.fc-landing-animation ul {
  padding: 0;
  margin-top: -0.55em;
  list-style: none;
}

/* =========================================================
   EVENT DETAIL — Inspiration Tab + Scrapbook Canvas
   Extracted from event_detail.html inline <style>.
   ========================================================= */

/* Event detail section positioning */
#event-detail-section {
  position: relative;
}

/* --- Inspiration Tab --- */
/* Note: The inline #ff0000 background was a placeholder/bug —
   the active gradient is applied via hover/active states and
   the Jinja inline style= attribute (removed below). The
   animation runs on background-position, so background must
   be a gradient for the animation to have effect. */
ul#fitTabs .inspiration-tab {
  background: linear-gradient(135deg, var(--ink-0) 0%, var(--ink-1) 35%, var(--ink-2) 70%, var(--ink-3) 100%) !important;
  background-size: 200% 200% !important;
  animation: fc-luxury-gradient 6s ease-in-out infinite !important;
  color: var(--white) !important;
  font-family: inherit;
  font-weight: var(--weight-regular);
  letter-spacing: 0.5px;
  border: none !important;
  border-radius: var(--radius-md) !important;
  box-shadow: 0 8px 32px rgba(79, 70, 229, 0.25), var(--shadow-sm) !important;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

ul#fitTabs .inspiration-tab::before {
  content: '';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: var(--text-xs);
  opacity: 0.8;
  animation: fc-sparkle 4s ease-in-out infinite alternate !important;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.3));
}

ul#fitTabs .inspiration-tab:hover {
  background: linear-gradient(135deg, #2C2C2C 0%, #4A4540 35%, #8C857E 70%, #B8A99A 100%) !important;
  box-shadow: 0 12px 48px rgba(44, 44, 44, 0.3), 0 4px 16px rgba(0, 0, 0, 0.15) !important;
  transform: translateY(-2px) scale(1.02) !important;
}

ul#fitTabs .inspiration-tab.active {
  background: linear-gradient(135deg, #1A1A1A 0%, #3A3530 35%, #6B6560 70%, #A3968A 100%) !important;
  box-shadow: 0 16px 64px rgba(44, 44, 44, 0.4), 0 6px 24px rgba(0, 0, 0, 0.2) !important;
  border-bottom: 3px solid rgba(255, 255, 255, 0.3) !important;
  transform: translateY(-1px) !important;
}

@keyframes fc-luxury-gradient {
  0%, 100% { background-position: 0% 50%; }
  25%       { background-position: 50% 0%; }
  50%       { background-position: 100% 50%; }
  75%       { background-position: 50% 100%; }
}

@keyframes fc-sparkle {
  0%   { opacity: 0.5; transform: translateY(-50%) scale(0.8) rotate(0deg); }
  50%  { opacity: 1;   transform: translateY(-50%) scale(1) rotate(180deg); }
  100% { opacity: 0.8; transform: translateY(-50%) scale(1.1) rotate(360deg); }
}

/* --- Share Invite Modal layout overrides --- */
/* ID selectors kept because they target a specific modal instance */
#shareInviteModal .fitcheck-modal-body {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#shareInviteModal .input-group {
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
}

#shareInviteModal .form-label {
  width: 100%;
  text-align: center;
}

/* --- Scrapbook Canvas --- */
/* .scrapbook-drop-zone, .scrapbook-image, .scrapbook-image img
   base rules live in premium.css — only additive rules go here */

.scrapbook-canvas {
  height: 60vh;
  background: linear-gradient(135deg, var(--paper-1) 0%, var(--paper-2) 100%);
  border: 2px dashed var(--ink-4);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  touch-action: none; /* prevent default touch behaviors */
}

.scrapbook-background {
  width: 100%;
  height: 100%;
  position: relative;
  background-image:
    radial-gradient(circle at 20px 20px, rgba(0, 0, 0, 0.05) 1px, transparent 1px),
    radial-gradient(circle at 40px 40px, rgba(0, 0, 0, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* Drop zone layout (premium.css adds border/background) */
.scrapbook-drop-zone {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration-base) var(--ease-standard);
}

/* drag-over state — premium.css sets background/border-color;
   keep only the accent color override here */
.scrapbook-drop-zone.drag-over {
  background-color: var(--accent-soft);
}

.drop-zone-text {
  text-align: center;
  color: var(--ink-2);
}

.scrapbook-palette {
  background: var(--white);
  border-top: var(--border-hair);
  padding: var(--space-4);
  max-height: 30vh;
  overflow-y: auto;
}

.scrapbook-image-palette {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.scrapbook-palette-item {
  position: relative;
  transition: transform var(--duration-fast) var(--ease-standard);
}

.scrapbook-palette-item:hover {
  transform: scale(1.05);
}

.scrapbook-palette-item:active {
  cursor: grabbing;
}

.palette-item-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--overlay-heavy);
  color: var(--white);
  padding: var(--space-1);
  font-size: var(--text-xs);
  text-align: center;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

/* .scrapbook-image base (box-shadow, border-radius) is in premium.css */
.scrapbook-image {
  position: absolute;
  cursor: move;
  transition: transform var(--duration-fast) var(--ease-standard), box-shadow var(--duration-fast) var(--ease-standard);
  user-select: none;
}

.scrapbook-image:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.scrapbook-image.dragging {
  opacity: 0.7;
  transform: rotate(5deg);
  z-index: 1000;
}

.scrapbook-image.selected {
  border: 3px solid var(--ink-0);
}

.scrapbook-image .image-controls {
  position: absolute;
  top: -10px;
  right: -10px;
  background: var(--white);
  border-radius: var(--radius-pill);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--duration-fast) var(--ease-standard);
}

.scrapbook-image:hover .image-controls {
  opacity: 1;
}

/* --- Scrapbook + modal mobile overrides (max-width: 768px) --- */
@media (max-width: 768px) {
  .scrapbook-canvas {
    height: 50vh;
    min-height: 300px;
  }

  .scrapbook-modal-content {
    max-width: 95vw !important;
    max-height: 95vh !important;
    margin: 2.5vh auto !important;
  }

  .scrapbook-palette {
    max-height: 25vh;
    padding: var(--space-2);
  }

  .scrapbook-image-palette {
    gap: 0.25rem;
  }

  .scrapbook-palette-item img {
    width: 60px !important;
    height: 60px !important;
  }

  .scrapbook-image {
    min-width: 80px;
    min-height: 80px;
  }

  .fitcheck-modal-header {
    flex-wrap: wrap;
    gap: var(--space-2);
  }

  .fitcheck-modal-header .d-flex {
    flex-wrap: wrap;
  }

  .fitcheck-modal-header .btn-small {
    font-size: var(--text-xs);
    padding: var(--space-1) var(--space-2);
  }

  /* Improve touch targets */
  .scrapbook-palette-item {
    min-width: 60px;
    min-height: 60px;
  }

  .scrapbook-image .image-controls {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }

  /* Prevent text selection during touch */
  .scrapbook-canvas,
  .scrapbook-palette-item,
  .scrapbook-image {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
  }

  /* Improve touch feedback */
  .scrapbook-palette-item:active {
    transform: scale(0.95);
  }
}
