/* ===== RESET & BASE ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #f7f5f2;
  --bg-card: #ffffff;
  --text: #1a1a1a;
  --text-secondary: #7a7a7a;
  --accent: #c9a96e;
  --accent-hover: #b8924f;
  --accent-gradient: linear-gradient(135deg, #c9a96e, #e8c990, #c9a96e);
  --border: #e5e2de;
  --like-red: #c0392b;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.1);
  --radius: 4px;
  --radius-sm: 2px;
  --nav-height: 62px;
  --topbar-height: 58px;
  --side-nav-width: 200px;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  color: inherit;
}

input, select, textarea { font-family: inherit; font-size: inherit; }

/* ===== TOP BAR ===== */
.top-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--topbar-height);
  background: rgba(247,245,242,0.94);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  backdrop-filter: blur(20px);
}

.top-bar-inner {
  max-width: 960px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 20px;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 4px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  flex-shrink: 0;
}

.search-bar {
  flex: 1;
  max-width: 320px;
  position: relative;
  display: flex;
  align-items: center;
}

.search-bar .icon {
  width: 15px; height: 15px;
  position: absolute; left: 12px;
  color: var(--text-secondary);
}

.search-bar input {
  width: 100%;
  padding: 7px 12px 7px 34px;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: var(--bg-card);
  font-size: 0.8rem;
  letter-spacing: 0.3px;
  outline: none;
  transition: border 0.2s, box-shadow 0.2s;
}

.search-bar input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(201,169,110,0.12);
}

.top-actions { display: flex; gap: 2px; flex-shrink: 0; }

.icon-btn {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 2px;
  transition: background 0.2s;
  position: relative;
}

.icon-btn:hover { background: var(--border); }
.icon-btn svg { width: 20px; height: 20px; }

.badge {
  position: absolute; top: 5px; right: 5px;
  background: var(--like-red); color: white;
  font-size: 0.6rem; font-weight: 700;
  width: 14px; height: 14px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

/* ===== SIDE NAV (Desktop) ===== */
.side-nav { display: none; }

@media (min-width: 769px) {
  .side-nav {
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: var(--topbar-height);
    bottom: 0;
    width: var(--side-nav-width);
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    padding: 28px 16px;
    gap: 2px;
    z-index: 90;
  }

  .side-nav-logo {
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 5px;
    color: var(--text-secondary);
    padding: 0 12px;
    margin-bottom: 24px;
  }

  .side-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--text-secondary);
    transition: color 0.2s, background 0.2s;
    letter-spacing: 0.2px;
  }

  .side-nav-item:hover { color: var(--text); background: var(--bg); }
  .side-nav-item.active { color: var(--text); font-weight: 600; }
  .side-nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }

  .main-content { margin-left: var(--side-nav-width); }
  .bottom-nav { display: none !important; }
}

/* ===== BOTTOM NAV (Mobile) ===== */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 10px;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.nav-item svg { width: 22px; height: 22px; }
.nav-item span { font-size: 0.6rem; font-weight: 500; letter-spacing: 0.5px; text-transform: uppercase; }
.nav-item.active { color: var(--text); }

.nav-item.upload-nav {
  background: var(--text);
  color: white;
  border-radius: 4px;
  padding: 8px 14px;
}

.nav-item.upload-nav svg { stroke: white; }

/* ===== MAIN CONTENT ===== */
.main-content {
  padding-top: var(--topbar-height);
  padding-bottom: calc(var(--nav-height) + 10px);
  min-height: 100vh;
}

@media (min-width: 769px) { .main-content { padding-bottom: 20px; } }

.view { display: none; animation: fadeIn 0.25s ease; }
.view.active { display: block; }

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

/* ===== TODAY'S LOOKS (not stories) ===== */
.today-looks-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 20px 20px 10px;
  max-width: 640px;
  margin: 0 auto;
}

.today-looks-label {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-style: italic;
}

.today-looks-date {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-secondary);
}

.today-looks-row {
  display: flex;
  gap: 10px;
  padding: 0 20px 20px;
  overflow-x: auto;
  scrollbar-width: none;
  max-width: 640px;
  margin: 0 auto;
}

.today-looks-row::-webkit-scrollbar { display: none; }

.look-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.look-card span {
  font-size: 0.65rem;
  color: var(--text-secondary);
  letter-spacing: 0.3px;
  max-width: 64px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Rectangular, portrait cards — not circular */
.look-card-img {
  width: 64px;
  height: 88px;
  border-radius: 3px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
}

.your-look .look-card-img {
  border: 1.5px dashed var(--border);
  background: var(--bg) !important;
}

/* ===== FEED ===== */
.feed {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--border);
}

/* Editorial post card — not Instagram's card */
.post-card {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 0;
}

.post-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 8px;
}

.post-meta-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.post-avatar {
  width: 30px;
  height: 30px;
  border-radius: 2px;
  flex-shrink: 0;
  object-fit: cover;
}

.post-username {
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.3px;
}

.post-location {
  font-size: 0.7rem;
  color: var(--text-secondary);
  letter-spacing: 0.2px;
}

.post-aesthetic {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 2px 8px;
  border-radius: 2px;
}

/* Full-width image, no border-radius */
.post-image {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  cursor: pointer;
  display: block;
}

/* Outfit breakdown — fashion-specific, no Instagram equivalent */
.post-breakdown {
  padding: 12px 16px;
  background: #faf9f7;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
}

.breakdown-item {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.breakdown-item strong {
  color: var(--text);
  font-weight: 500;
}

/* Action row — different from Instagram's */
.post-reaction-row {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  gap: 20px;
  border-top: 1px solid var(--border);
}

.post-react {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.post-react:hover { color: var(--text); }
.post-react svg { width: 18px; height: 18px; }
.post-react.loved { color: var(--like-red); }
.post-react.loved svg { fill: var(--like-red); stroke: var(--like-red); }
.post-react.collected svg { fill: var(--text); }
.post-react:active { transform: scale(0.92); }

.post-react-spacer { flex: 1; }

.post-caption-area {
  padding: 8px 16px 4px;
}

.post-caption {
  font-size: 0.85rem;
  line-height: 1.5;
  font-style: italic;
  font-family: var(--font-display);
  color: var(--text);
}

.post-tags {
  padding: 4px 16px 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.post-tag {
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 500;
}

.post-time {
  padding: 0 16px 12px;
  font-size: 0.68rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

/* Double-tap heart */
.heart-animation {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0);
  pointer-events: none;
  z-index: 10;
}

.heart-animation svg {
  width: 72px; height: 72px;
  fill: white; stroke: white;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.25));
}

.heart-animation.pop {
  animation: heartPop 0.8s ease forwards;
}

@keyframes heartPop {
  0%   { transform: translate(-50%, -50%) scale(0); opacity: 1; }
  20%  { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
  40%  { transform: translate(-50%, -50%) scale(0.95); opacity: 1; }
  60%  { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  85%  { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}

/* ===== LOOKBOOK (not "Explore") ===== */
.lookbook-header {
  padding: 24px 20px 0;
  max-width: 960px;
  margin: 0 auto;
}

.lookbook-header h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 400;
  margin-bottom: 4px;
}

.lookbook-subtitle {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 16px;
  letter-spacing: 0.2px;
}

.aesthetic-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 16px;
  scrollbar-width: none;
}

.aesthetic-filters::-webkit-scrollbar { display: none; }

.aesthetic {
  padding: 5px 14px;
  border-radius: 2px;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.3px;
  white-space: nowrap;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  transition: all 0.2s;
}

.aesthetic:hover, .aesthetic.active {
  background: var(--text);
  color: var(--bg-card);
  border-color: var(--text);
}

/* Masonry-style lookbook — not a uniform 3-col grid */
.lookbook-masonry {
  max-width: 960px;
  margin: 0 auto;
  columns: 3;
  column-gap: 6px;
  padding: 0 6px 20px;
}

@media (max-width: 600px) {
  .lookbook-masonry { columns: 2; column-gap: 4px; padding: 0 4px 20px; }
}

.lookbook-item {
  break-inside: avoid;
  margin-bottom: 6px;
  position: relative;
  cursor: pointer;
  overflow: hidden;
  border-radius: 2px;
}

.lookbook-item img {
  width: 100%;
  display: block;
  transition: transform 0.35s ease;
}

.lookbook-item:hover img { transform: scale(1.04); }

.lookbook-item-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.28);
  display: flex;
  align-items: flex-end;
  padding: 12px;
  opacity: 0;
  transition: opacity 0.3s;
}

.lookbook-item:hover .lookbook-item-overlay { opacity: 1; }

.lookbook-stat {
  color: white;
  font-size: 0.78rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.lookbook-stat svg { width: 14px; height: 14px; }
.lookbook-stat + .lookbook-stat { margin-left: 12px; }

/* ===== STYLE / UPLOAD ===== */
.upload-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 28px 20px;
}

.upload-container h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 400;
  margin-bottom: 4px;
}

.upload-subtitle {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 20px;
}

.upload-area {
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  padding: 44px 24px;
  text-align: center;
  transition: border-color 0.3s, background 0.3s;
  margin-bottom: 20px;
}

.upload-area.dragover {
  border-color: var(--accent);
  background: rgba(201,169,110,0.04);
}

.upload-placeholder svg { color: var(--text-secondary); margin-bottom: 14px; }

.upload-placeholder p {
  font-size: 1rem;
  margin-bottom: 8px;
  color: var(--text);
}

.upload-placeholder span {
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: block;
  margin-bottom: 12px;
}

.upload-btn {
  display: inline-block;
  padding: 9px 22px;
  background: var(--text);
  color: white;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  border-radius: 2px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.upload-btn:hover { opacity: 0.8; }

.upload-preview {
  max-height: 400px;
  margin: 0 auto;
  border-radius: 2px;
  object-fit: contain;
}

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

.form-input {
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 2px;
  font-size: 0.875rem;
  outline: none;
  background: var(--bg-card);
  transition: border 0.2s, box-shadow 0.2s;
}

.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(201,169,110,0.12);
}

.form-row { display: flex; gap: 10px; }
.form-row .form-input { flex: 1; }

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

/* Outfit breakdown section */
.outfit-breakdown {
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 14px;
  background: #faf9f7;
}

.breakdown-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.breakdown-items { display: flex; flex-direction: column; gap: 8px; }

.breakdown-row { display: flex; gap: 8px; }
.breakdown-row .form-input { flex: 1; font-size: 0.825rem; padding: 8px 12px; }
.breakdown-row select { max-width: 130px; flex-shrink: 0; }

.add-item-btn {
  margin-top: 8px;
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.3px;
  padding: 4px 0;
  text-align: left;
}

.add-item-btn:hover { color: var(--accent-hover); }

.post-btn {
  padding: 13px;
  background: var(--text);
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: 2px;
  transition: opacity 0.2s, transform 0.2s;
}

.post-btn:hover { opacity: 0.85; }
.post-btn:active { transform: scale(0.99); }

/* ===== RUNWAY (not "Reels") ===== */
.runway-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 28px 20px;
}

.runway-header { margin-bottom: 24px; }

.runway-header h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 400;
  margin-bottom: 4px;
}

.runway-header p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

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

@media (max-width: 480px) {
  .runway-feed { grid-template-columns: repeat(2, 1fr); gap: 8px; }
}

.runway-card {
  position: relative;
  border-radius: 2px;
  overflow: hidden;
  aspect-ratio: 3/4;
  cursor: pointer;
  background: #eee;
}

.runway-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.runway-card:hover img { transform: scale(1.04); }

.runway-card-info {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 40px 12px 12px;
  background: linear-gradient(transparent, rgba(0,0,0,0.65));
}

.runway-card-user {
  display: flex;
  align-items: center;
  gap: 7px;
  color: white;
  margin-bottom: 5px;
}

.runway-card-avatar {
  width: 24px; height: 24px;
  border-radius: 2px;
  object-fit: cover;
}

.runway-card-user strong { font-size: 0.75rem; }

.runway-card-caption {
  color: rgba(255,255,255,0.85);
  font-size: 0.72rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.runway-card-loves {
  position: absolute;
  top: 10px; right: 10px;
  background: rgba(0,0,0,0.4);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 2px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.runway-card-loves svg { width: 12px; height: 12px; }

/* ===== CLOSET / PROFILE ===== */
.closet-banner {
  max-width: 640px;
  margin: 0 auto;
  padding: 28px 20px 20px;
  display: flex;
  gap: 28px;
  align-items: flex-start;
}

.closet-avatar {
  width: 88px; height: 88px;
  border-radius: 3px;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

@media (min-width: 769px) {
  .closet-avatar { width: 120px; height: 120px; }
}

.profile-name-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.profile-name-row h2 {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.edit-profile-btn {
  padding: 5px 16px;
  border: 1px solid var(--border);
  border-radius: 2px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: background 0.2s;
}

.edit-profile-btn:hover { background: var(--bg); }

.profile-bio {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 14px;
  line-height: 1.5;
}

.profile-stats { display: flex; gap: 24px; }

.stat { display: flex; flex-direction: column; gap: 1px; }
.stat strong { font-size: 1rem; font-weight: 700; }
.stat span { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-secondary); }

.closet-tabs {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.closet-tab {
  flex: 1;
  padding: 12px 8px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.2s, border-color 0.2s;
}

.closet-tab.active {
  color: var(--text);
  border-bottom-color: var(--text);
}

.profile-grid {
  max-width: 640px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  padding: 2px;
}

.profile-grid-item {
  aspect-ratio: 1;
  overflow: hidden;
  cursor: pointer;
}

.profile-grid-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: opacity 0.2s;
}

.profile-grid-item:hover img { opacity: 0.88; }

/* ===== ACTIVITY PANEL ===== */
.notif-panel {
  position: fixed;
  top: var(--topbar-height);
  right: -360px;
  width: 320px;
  max-height: calc(100vh - var(--topbar-height));
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  z-index: 95;
  overflow-y: auto;
  transition: right 0.3s ease;
  padding: 20px;
}

.notif-panel.open { right: 0; }

.notif-panel h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.1rem;
  margin-bottom: 16px;
}

.notif-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.notif-avatar {
  width: 36px; height: 36px;
  border-radius: 2px;
  flex-shrink: 0;
}

.notif-item p { font-size: 0.82rem; line-height: 1.35; }
.notif-time { color: var(--text-secondary); font-size: 0.72rem; }

/* ===== LOOK DETAIL MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  backdrop-filter: blur(6px);
}

.modal-overlay.open { display: flex; }

.modal-content {
  background: var(--bg-card);
  border-radius: 3px;
  max-width: 880px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  position: relative;
}

@media (max-width: 768px) {
  .modal-content {
    flex-direction: column;
    max-height: 95vh;
    overflow-y: auto;
  }
}

.modal-close {
  position: absolute;
  top: 10px; right: 10px;
  font-size: 1.3rem;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 2px;
  background: rgba(255,255,255,0.9);
  color: var(--text);
  z-index: 10;
  transition: background 0.2s;
}

.modal-close:hover { background: white; }

.modal-image {
  flex: 1.2;
  background: #111;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-image img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
}

.modal-details {
  flex: 1;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
}

.modal-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-user-avatar {
  width: 32px; height: 32px;
  border-radius: 2px;
}

.modal-location {
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.modal-caption {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text);
}

.modal-outfit-breakdown {
  background: #faf9f7;
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.modal-outfit-breakdown .breakdown-item {
  font-size: 0.78rem;
}

.modal-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.modal-tags .post-tag { font-size: 0.78rem; }

.modal-actions {
  display: flex;
  gap: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.modal-action-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.modal-action-btn:hover { color: var(--text); }
.modal-action-btn svg { width: 18px; height: 18px; }

.modal-action-btn.liked svg { fill: var(--like-red); stroke: var(--like-red); }
.modal-action-btn.liked { color: var(--like-red); }
.modal-action-btn.bookmarked svg { fill: var(--text); stroke: var(--text); }

.modal-comments {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.comment-input-row { display: flex; gap: 8px; }

.comment-input {
  flex: 1;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 2px;
  font-size: 0.825rem;
  outline: none;
}

.comment-input:focus { border-color: var(--accent); }

.comment-post-btn {
  padding: 0 14px;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.3px;
}

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: calc(var(--nav-height) + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(14px);
  background: var(--text);
  color: white;
  padding: 10px 20px;
  border-radius: 2px;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.3px;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 300;
  pointer-events: none;
  white-space: nowrap;
}

.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (min-width: 769px) { .toast { bottom: 32px; } }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .search-bar { display: none; }
  .top-bar-inner { justify-content: space-between; }
}

@media (max-width: 480px) {
  .logo { font-size: 1.3rem; }
  .closet-avatar { width: 72px; height: 72px; }
  .profile-name-row h2 { font-size: 1rem; }
}

/* ===== LOOK CARD INTERACTIVE ===== */
.look-card[data-story] {
  cursor: pointer;
}

.look-card[data-story] .look-card-img {
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 0 0 2px transparent;
}

.look-card[data-story]:hover .look-card-img {
  transform: scale(1.04);
  box-shadow: 0 0 0 2px var(--accent);
}

.look-card[data-story].seen .look-card-img {
  opacity: 0.55;
}

/* ===== STORY VIEWER ===== */
.story-viewer {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
}

.story-viewer.open { display: flex; }

.story-viewer-inner {
  position: relative;
  width: 100%;
  max-width: 420px;
  height: 100%;
  max-height: 100dvh;
  overflow: hidden;
}

@media (min-width: 500px) {
  .story-viewer-inner {
    height: 90dvh;
    border-radius: 6px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.6);
  }
}

/* Progress bars */
.story-progress-bars {
  position: absolute;
  top: 12px;
  left: 10px;
  right: 10px;
  display: flex;
  gap: 4px;
  z-index: 10;
}

.story-progress-bar {
  flex: 1;
  height: 2px;
  background: rgba(255,255,255,0.35);
  border-radius: 2px;
  overflow: hidden;
}

.story-progress-fill {
  height: 100%;
  background: white;
  width: 0%;
  transition: none;
}

.story-progress-fill.done { width: 100%; }
.story-progress-fill.animating {
  width: 100%;
  transition: width var(--story-duration, 5s) linear;
}

/* Header overlay */
.story-viewer-header {
  position: absolute;
  top: 22px;
  left: 0; right: 0;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
}

.story-viewer-user {
  display: flex;
  align-items: center;
  gap: 9px;
}

.story-viewer-avatar {
  width: 34px;
  height: 34px;
  border-radius: 3px;
  border: 1.5px solid rgba(255,255,255,0.7);
  object-fit: cover;
}

.story-viewer-username {
  color: white;
  font-weight: 600;
  font-size: 0.85rem;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

.story-viewer-time {
  color: rgba(255,255,255,0.7);
  font-size: 0.7rem;
}

.story-viewer-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.story-pause-btn, .story-close-btn {
  color: white;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0,0,0,0.2);
  backdrop-filter: blur(4px);
  transition: background 0.2s;
  flex-shrink: 0;
}

.story-pause-btn:hover, .story-close-btn:hover {
  background: rgba(0,0,0,0.4);
}

.story-close-btn { font-size: 1.4rem; line-height: 1; }

/* Main image */
.story-viewer-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.2s;
}

.story-viewer-img.transitioning { opacity: 0; }

/* Bottom overlay */
.story-viewer-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 60px 16px 28px;
  background: linear-gradient(transparent, rgba(0,0,0,0.75));
  z-index: 10;
}

.story-viewer-caption {
  color: white;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1rem;
  line-height: 1.4;
  margin-bottom: 10px;
  text-shadow: 0 1px 6px rgba(0,0,0,0.4);
}

.story-viewer-items {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 14px;
}

.story-viewer-item-tag {
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(6px);
  color: white;
  font-size: 0.7rem;
  padding: 3px 10px;
  border-radius: 2px;
  border: 1px solid rgba(255,255,255,0.25);
}

.story-viewer-reactions {
  display: flex;
  gap: 10px;
}

.story-react-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  color: white;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 2px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.25);
  transition: background 0.2s;
}

.story-react-btn:hover, .story-react-btn.active {
  background: rgba(255,255,255,0.28);
}

.story-react-btn.loved svg { fill: #ff6b6b; stroke: #ff6b6b; }

/* Tap zones */
.story-tap-zone {
  position: absolute;
  top: 0; bottom: 0;
  width: 40%;
  z-index: 5;
  background: transparent;
}

.story-tap-left { left: 0; }
.story-tap-right { right: 0; }
