/* ============================================
   NOWHAE — Growth Feed Stylesheet
   nowhae.co.kr
   ============================================ */

:root {
  --primary: #4F46E5;
  --primary-light: #818CF8;
  --primary-dark: #3730A3;
  --accent: #10B981;
  --accent-light: #34D399;
  --warn: #F59E0B;
  --danger: #EF4444;
  --bg: #F8F7FF;
  --bg-card: #FFFFFF;
  --bg-dark: #0F0E1A;
  --text-primary: #1E1B4B;
  --text-secondary: #6B7280;
  --text-muted: #9CA3AF;
  --border: #E5E7EB;
  --border-focus: #A5B4FC;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(79,70,229,0.10);
  --shadow-lg: 0 8px 32px rgba(79,70,229,0.15);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-pill: 50px;
  --font-sans: 'Noto Sans KR', sans-serif;
  --font-display: 'Space Grotesk', sans-serif;
  --transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── RESET ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, textarea { font-family: inherit; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; border-radius: var(--radius-sm); }

/* ─── UTILITY ─── */
.hidden { display: none !important; }
.flex { display: flex; }
.items-center { align-items: center; }

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-light); }

/* ============================================
   HEADER
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.logo-main {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.5px;
}
.logo-sub {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 400;
}
.btn-write-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  transition: var(--transition);
  box-shadow: 0 4px 14px rgba(79,70,229,0.35);
  white-space: nowrap;
}
.btn-write-top:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(79,70,229,0.45);
}
.btn-write-top:active { transform: translateY(0); }

/* ============================================
   HERO
   ============================================ */
.hero {
  background: linear-gradient(135deg, #1E1B4B 0%, #312E81 50%, #1E3A5F 100%);
  color: #fff;
  padding: 72px 24px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Ccircle cx='30' cy='30' r='20'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0; right: 0;
  height: 48px;
  background: var(--bg);
  clip-path: ellipse(60% 100% at 50% 100%);
}
.hero-inner { position: relative; z-index: 1; max-width: 680px; margin: 0 auto; }
.hero-label {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--primary-light);
  background: rgba(129,140,248,0.15);
  border: 1px solid rgba(129,140,248,0.3);
  border-radius: var(--radius-pill);
  padding: 5px 16px;
  margin-bottom: 20px;
}
.hero-title {
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: -1px;
  margin-bottom: 16px;
}
.hero-title em {
  font-style: normal;
  color: var(--accent-light);
}
.hero-desc {
  font-size: 16px;
  color: rgba(255,255,255,0.7);
  line-height: 1.8;
  margin-bottom: 40px;
}
.hero-stats {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  padding: 20px 32px;
  backdrop-filter: blur(8px);
  max-width: 420px;
  margin: 0 auto;
}
.stat-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.stat-num {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: #fff;
}
.stat-label {
  font-size: 11px;
  color: rgba(255,255,255,0.55);
  font-weight: 400;
}
.stat-divider {
  width: 1px;
  height: 40px;
  background: rgba(255,255,255,0.15);
  margin: 0 16px;
}

/* ============================================
   FILTER BAR
   ============================================ */
.filter-bar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 64px;
  z-index: 90;
}
.filter-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.filter-inner::-webkit-scrollbar { display: none; }
.filter-btn {
  flex-shrink: 0;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
  background: #fff;
  transition: var(--transition);
  white-space: nowrap;
}
.filter-btn:hover {
  border-color: var(--primary-light);
  color: var(--primary);
  background: #F5F3FF;
}
.filter-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(79,70,229,0.3);
}

/* ============================================
   SORT BAR
   ============================================ */
.sort-bar {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.sort-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-right: 4px;
}
.sort-btn {
  padding: 5px 14px;
  font-size: 13px;
  color: var(--text-secondary);
  border-radius: var(--radius-pill);
  border: 1.5px solid transparent;
  transition: var(--transition);
}
.sort-btn:hover { color: var(--primary); }
.sort-btn.active {
  color: var(--primary);
  border-color: var(--border-focus);
  background: #F5F3FF;
  font-weight: 600;
}
.search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 7px 16px;
  transition: var(--transition);
}
.search-wrap:focus-within {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(79,70,229,0.08);
}
.search-wrap i { color: var(--text-muted); font-size: 13px; }
.search-wrap input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 13px;
  color: var(--text-primary);
  width: 180px;
}
.search-wrap input::placeholder { color: var(--text-muted); }

/* ============================================
   FEED GRID
   ============================================ */
.feed-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 80px;
}
.feed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  padding-bottom: 8px;
}

/* ─── CARD ─── */
.feed-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: var(--transition);
  animation: cardIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  position: relative;
  overflow: hidden;
}
.feed-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  opacity: 0;
  transition: opacity 0.3s;
}
.feed-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.feed-card:hover::before { opacity: 1; }

@keyframes cardIn {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.card-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  font-family: var(--font-display);
}
.card-meta {
  flex: 1;
}
.card-nickname {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}
.card-date {
  font-size: 11px;
  color: var(--text-muted);
}
.card-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  background: #EEF2FF;
  white-space: nowrap;
  font-family: var(--font-display);
}
.card-badge i { font-size: 10px; }

.card-category {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg);
  border-radius: var(--radius-pill);
  padding: 3px 10px;
}
.card-content {
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-primary);
  word-break: keep-all;
  white-space: pre-wrap;
}
.card-image {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}
.card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.card-streak {
  font-size: 12px;
  color: var(--text-muted);
}
.card-streak strong {
  color: var(--accent);
  font-weight: 700;
}
.btn-like {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
  background: #fff;
  transition: var(--transition);
}
.btn-like:hover {
  color: #EF4444;
  border-color: #FCA5A5;
  background: #FFF5F5;
}
.btn-like.liked {
  color: #EF4444;
  border-color: #FCA5A5;
  background: #FFF5F5;
}
.btn-like.liked .like-icon { animation: heartPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1); }
.btn-like i { font-size: 14px; }
@keyframes heartPop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.5); }
  100% { transform: scale(1); }
}

/* 아바타 컬러 팔레트 */
.av-0 { background: linear-gradient(135deg, #667eea, #764ba2); }
.av-1 { background: linear-gradient(135deg, #f093fb, #f5576c); }
.av-2 { background: linear-gradient(135deg, #4facfe, #00f2fe); }
.av-3 { background: linear-gradient(135deg, #43e97b, #38f9d7); }
.av-4 { background: linear-gradient(135deg, #fa709a, #fee140); }
.av-5 { background: linear-gradient(135deg, #a18cd1, #fbc2eb); }
.av-6 { background: linear-gradient(135deg, #ffecd2, #fcb69f); }
.av-7 { background: linear-gradient(135deg, #a1c4fd, #c2e9fb); }

/* ─── EMPTY STATE ─── */
.empty-state {
  text-align: center;
  padding: 80px 24px;
  color: var(--text-muted);
}
.empty-state i {
  font-size: 48px;
  margin-bottom: 16px;
  display: block;
  opacity: 0.5;
}
.empty-state p { font-size: 15px; line-height: 1.8; }

/* ─── LOAD MORE ─── */
.load-more-wrap { text-align: center; padding-top: 24px; }
.btn-load-more {
  padding: 12px 32px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  border: 1.5px solid var(--border-focus);
  background: #fff;
  transition: var(--transition);
}
.btn-load-more:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 4px 14px rgba(79,70,229,0.3);
}

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,14,26,0.65);
  backdrop-filter: blur(6px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: overlayIn 0.2s ease;
}
@keyframes overlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.modal {
  background: #fff;
  border-radius: 20px;
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0,0,0,0.25);
  animation: modalIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.92) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px 0;
  margin-bottom: 4px;
}
.modal-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.modal-header h2 i { color: var(--accent); }
.modal-close {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 16px;
  transition: var(--transition);
}
.modal-close:hover { background: #F5F3FF; color: var(--text-primary); }

.modal-form {
  padding: 20px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.form-row.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}
.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}
.required { color: var(--primary); }
.optional { color: var(--text-muted); font-weight: 400; font-size: 12px; }

.form-group input[type="text"],
.form-group input[type="url"],
.form-group textarea {
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-primary);
  background: #FAFAFA;
  outline: none;
  transition: var(--transition);
  resize: none;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary-light);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(79,70,229,0.08);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-muted); }

.day-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.day-input-wrap input {
  flex: 1;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-primary);
  background: #FAFAFA;
  outline: none;
  transition: var(--transition);
}
.day-input-wrap input:focus {
  border-color: var(--primary-light);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(79,70,229,0.08);
}
.day-input-wrap span {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
  white-space: nowrap;
}

.cat-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cat-opt {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
  background: #fff;
  transition: var(--transition);
}
.cat-opt:hover { border-color: var(--primary-light); color: var(--primary); }
.cat-opt.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.char-count {
  position: absolute;
  bottom: 8px;
  right: 12px;
  font-size: 11px;
  color: var(--text-muted);
}

.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 4px;
}
.btn-cancel {
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
  background: #fff;
  transition: var(--transition);
}
.btn-cancel:hover { background: var(--bg); }
.btn-submit {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  transition: var(--transition);
  box-shadow: 0 4px 14px rgba(79,70,229,0.35);
}
.btn-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(79,70,229,0.45);
}
.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ============================================
   TOAST
   ============================================ */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  background: var(--bg-dark);
  color: #fff;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
  z-index: 999;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  animation: toastIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  white-space: nowrap;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--bg-dark);
  color: rgba(255,255,255,0.5);
  text-align: center;
  padding: 36px 24px;
}
.footer-logo {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-light);
  margin-bottom: 8px;
  letter-spacing: 1px;
}
.footer-copy { font-size: 12px; margin-bottom: 4px; }
.footer-tagline { font-size: 12px; font-style: italic; color: rgba(255,255,255,0.3); }

/* ============================================
   SKELETON LOADER
   ============================================ */
.skeleton-card {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 6px;
}
@keyframes shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}
.sk-row { display: flex; gap: 10px; align-items: center; }
.sk-avatar { width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; }
.sk-line { height: 12px; border-radius: 6px; }
.sk-short { width: 40%; }
.sk-mid   { width: 60%; }
.sk-long  { width: 90%; }
.sk-full  { width: 100%; }
.sk-block { height: 14px; }

/* ============================================
   IMAGE UPLOAD ZONE
   ============================================ */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  background: #FAFAFA;
  transition: var(--transition);
  cursor: pointer;
  overflow: hidden;
  min-height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--primary-light);
  background: #F5F3FF;
}
.upload-zone.dragover {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79,70,229,0.10);
}
.upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 24px 16px;
  text-align: center;
  pointer-events: none;
}
.upload-placeholder i {
  font-size: 28px;
  color: var(--primary-light);
  margin-bottom: 2px;
}
.upload-main {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}
.upload-sub {
  font-size: 11px;
  color: var(--text-muted);
}

/* 미리보기 */
.upload-preview {
  position: relative;
  width: 100%;
}
.upload-preview img {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  display: block;
  border-radius: 0;
}
.upload-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0,0,0,0.55);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}
.upload-remove:hover { background: var(--danger); }
.upload-filename {
  display: block;
  padding: 6px 10px;
  font-size: 11px;
  color: var(--text-muted);
  background: rgba(0,0,0,0.04);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 업로드 프로그레스 */
.upload-progress {
  height: 4px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 6px;
}
.upload-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 4px;
  width: 0%;
  transition: width 0.3s ease;
}

/* 카드 이미지 개선 */
.card-image {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}
.card-image:hover { opacity: 0.92; }

/* 이미지 라이트박스 */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.90);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: overlayIn 0.2s ease;
  cursor: zoom-out;
}
.lightbox-overlay img {
  max-width: 92vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
  animation: modalIn 0.25s cubic-bezier(0.34,1.56,0.64,1);
}
.lightbox-close {
  position: fixed;
  top: 20px;
  right: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}
.lightbox-close:hover { background: rgba(255,255,255,0.3); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .logo-sub { display: none; }
  .hero { padding: 52px 20px 64px; }
  .hero-title { font-size: 26px; }
  .hero-stats { padding: 16px 20px; }
  .stat-num { font-size: 22px; }
  .feed-grid { grid-template-columns: 1fr; }
  .form-row.two-col { grid-template-columns: 1fr; }
  .modal { border-radius: 20px 20px 0 0; align-self: flex-end; }
  .modal-overlay { align-items: flex-end; padding: 0; }
  .sort-bar { padding: 12px 16px; }
  .search-wrap input { width: 120px; }
  .header-inner { padding: 0 16px; }
  .filter-inner { padding: 10px 16px; }
  .feed-section { padding: 0 16px 60px; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 22px; }
  .btn-write-top span { display: none; }
  .hero-desc { font-size: 14px; }
}

/* ===== 로고 이미지 ===== */
.logo-img {
  height: 48px;
  width: auto;
  object-fit: contain;
}
.footer-logo-img {
  height: 40px;
  width: auto;
  object-fit: contain;
  opacity: 0.8;
}

/* ===== 헤더 우측 ===== */
.header-right { display: flex; align-items: center; gap: 10px; }
.btn-login {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 20px;
  background: #fff; color: #333; border: 1px solid #ddd;
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: all 0.2s;
}
.btn-login:hover { background: #f5f5f5; }
.user-menu { display: flex; align-items: center; gap: 8px; }
.btn-mypage {
  display: flex; align-items: center; gap: 8px;
  background: none; border: none; cursor: pointer;
  font-size: 14px; font-weight: 600; color: inherit;
}
.user-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  object-fit: cover; border: 2px solid #e8632a;
}
.btn-logout {
  padding: 6px 12px; border-radius: 12px;
  background: none; border: 1px solid #ddd;
  font-size: 12px; cursor: pointer; color: #888;
}
.btn-logout:hover { background: #f5f5f5; }

/* ===== 탭 ===== */
.tab-bar {
  display: flex; gap: 0;
  border-bottom: 2px solid #eee;
  max-width: 1200px; margin: 0 auto;
  padding: 0 24px;
}
.tab-btn {
  padding: 12px 24px; background: none; border: none;
  font-size: 15px; font-weight: 600; cursor: pointer;
  color: #999; border-bottom: 2px solid transparent;
  margin-bottom: -2px; transition: all 0.2s;
}
.tab-btn.active { color: #e8632a; border-bottom-color: #e8632a; }

/* ===== 마이페이지 ===== */
.mypage-section {
  max-width: 1200px; margin: 24px auto; padding: 0 24px;
}
.mypage-inner {
  background: #fff; border-radius: 16px;
  padding: 24px; box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.mypage-profile {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 24px;
}
.mypage-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  object-fit: cover; border: 3px solid #e8632a;
}
.mypage-name { font-size: 18px; font-weight: 700; }
.mypage-email { font-size: 13px; color: #888; margin-top: 4px; }
.mypage-stats {
  display: flex; gap: 16px; flex-wrap: wrap;
  margin-bottom: 24px;
}
.my-stat {
  flex: 1; min-width: 80px;
  background: #fef6f2; border-radius: 12px;
  padding: 16px; text-align: center;
}
.my-stat-num { display: block; font-size: 24px; font-weight: 800; color: #e8632a; }
.my-stat-label { font-size: 12px; color: #888; margin-top: 4px; display: block; }

/* ===== 잔디 달력 ===== */
.streak-section { margin-top: 8px; }
.streak-title { font-size: 15px; font-weight: 700; margin-bottom: 12px; }
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal-day-label {
  font-size: 11px; color: #aaa; text-align: center;
  padding: 2px 0;
}
.cal-cell {
  width: 100%; aspect-ratio: 1;
  border-radius: 3px;
  cursor: default;
}
.cal-cell.level-0 { background: #f0f0f0; }
.cal-cell.level-1 { background: #fddbb4; }
.cal-cell.level-2 { background: #f5a05a; }
.cal-cell.level-3 { background: #e8632a; }
.cal-cell.today { outline: 2px solid #e8632a; }
.streak-legend {
  display: flex; align-items: center; gap: 8px;
  margin-top: 8px; font-size: 12px; color: #888;
}
.legend-box {
  display: inline-block; width: 14px; height: 14px;
  border-radius: 3px;
}
.legend-0 { background: #f0f0f0; }
.legend-1 { background: #fddbb4; }
.legend-2 { background: #f5a05a; }
.legend-3 { background: #e8632a; }

/* ===== 내 카드 배지 ===== */
.my-badge {
  display: inline-block; padding: 1px 6px;
  background: #e8632a; color: white;
  border-radius: 8px; font-size: 10px; font-weight: 700;
  margin-left: 4px;
}
.card-avatar-img {
  width: 40px; height: 40px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
}
.hidden { display: none !important; }

/* ===== 달력 날짜 표기 ===== */
.cal-month-title {
  font-size: 15px; font-weight: 700;
  margin-bottom: 10px; color: #e8632a;
}
.cal-cell-wrap {
  display: flex; flex-direction: column;
  align-items: center; gap: 2px;
}
.cal-date-num {
  font-size: 10px; color: #aaa; line-height: 1;
}
.cal-date-num.today {
  color: #e8632a; font-weight: 700;
}
.cal-cell.empty { background: transparent; }

/* ===== 로고 텍스트 ===== */
.logo {
  display: flex; align-items: center; gap: 8px;
}
.logo-text-wrap {
  display: flex; flex-direction: column; justify-content: center; gap: 0px;
}
.logo-main {
  font-size: 18px; font-weight: 900;
  color: #e8632a; letter-spacing: 1px;
  font-family: 'Space Grotesk', sans-serif;
  line-height: 1.2;
}
.logo-sub {
  font-size: 11px; color: #aaa; line-height: 1.2;
}
.logo-img {
  height: 44px; width: 44px;
  object-fit: contain;
}

/* ===== 달력 셀 호버 ===== */
.cal-cell:not(.empty) {
  cursor: pointer;
  transition: transform 0.1s;
}
.cal-cell:not(.empty):hover {
  transform: scale(1.15);
  z-index: 1;
}

/* ===== 달력 셀 내용 텍스트 ===== */
.cal-cell {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 4px;
}
.cal-cell-inner {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
}
.cal-cell-row {
  font-size: 9px;
  line-height: 1.3;
  color: #7a3a10;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  width: 100%;
}
.cal-cell.level-0 .cal-cell-inner { display: none; }
