/* NameByMeaning — Premium Design System (Light Theme) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&display=swap');

/* ─── Variables ─── */
:root {
  --bg-primary:    #faf9f6; /* warm off-white */
  --bg-secondary:  #ffffff;
  --bg-card:       #ffffff;
  --bg-card-hover: #ffffff;
  --border:        rgba(0,0,0,0.08);
  --border-hover:  rgba(138,99,255,0.4);

  --accent-1:      #7c52ff; /* richer violet */
  --accent-2:      #ff5a92; /* vibrant rose */
  --accent-3:      #00bfa5; /* softer teal */
  --accent-gold:   #f5b700;
  --accent-glow:   rgba(138,99,255,0.12);

  --text-primary:  #1e1f29;
  --text-secondary:#4f526b;
  --text-muted:    #82859c;

  --radius-sm:     8px;
  --radius-md:     14px;
  --radius-lg:     20px;
  --radius-xl:     28px;
  --radius-pill:   999px;

  --shadow-card:   0 8px 24px rgba(0,0,0,0.04);
  --shadow-glow:   0 0 30px rgba(138,99,255,0.1);
  --transition:    all 0.25s cubic-bezier(0.4,0,0.2,1);
}

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ─── Animated Background ─── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% -10%, rgba(138,99,255,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 110%, rgba(255,90,146,0.04) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 50% 50%, rgba(0,191,165,0.03) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ─── Layout ─── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }

/* ─── Ad Zones ─── */
.ad-zone {
  background: rgba(0,0,0,0.02);
  border: 1px dashed rgba(0,0,0,0.1);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: 12px; letter-spacing: 0.08em;
  text-transform: uppercase; font-weight: 500;
}
.ad-zone--leaderboard { width: 100%; height: 90px; margin: 0 auto 24px; max-width: 728px; }
.ad-zone--banner      { width: 100%; height: 60px; margin: 24px auto 0; }
.ad-zone--sidebar     { width: 100%; height: 250px; }
.ad-zone--in-results  { grid-column: 1 / -1; height: 90px; }

/* ─── Header ─── */
header {
  padding: 18px 0 16px;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 100;
  background: rgba(250,249,246,0.85);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.logo {
  display: flex; align-items: center; gap: 12px; text-decoration: none;
}
.logo-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; box-shadow: 0 4px 16px rgba(138,99,255,0.3);
  transition: var(--transition); flex-shrink: 0; color: #fff;
}
.logo:hover .logo-icon { transform: scale(1.08) rotate(-5deg); }
.logo-text { line-height: 1.1; }
.logo-title {
  font-family: 'Playfair Display', serif;
  font-size: 22px; font-weight: 700;
  color: var(--text-primary);
}
.logo-tagline { font-size: 11px; color: var(--text-muted); letter-spacing: 0.04em; }
nav { display: flex; gap: 8px; align-items: center; }
.nav-link {
  font-size: 13px; color: var(--text-secondary); text-decoration: none;
  padding: 7px 14px; border-radius: var(--radius-pill);
  transition: var(--transition); font-weight: 500;
}
.nav-link:hover { color: var(--accent-1); background: rgba(138,99,255,0.08); }

/* ─── Hero ─── */
.hero {
  text-align: center; padding: 56px 0 48px;
  position: relative;
}
.deco-left, .deco-right, .deco-bear {
  position: fixed;
  background-size: contain; background-repeat: no-repeat;
  opacity: 0.6; pointer-events: none; mix-blend-mode: multiply;
  z-index: 0;
}
.deco-left {
  left: 2%; top: 5%; width: 280px; height: 280px;
  background-image: url('assets/deco_left.png');
  animation: float 6s ease-in-out infinite;
}
.deco-right {
  right: 4%; top: 30%; width: 220px; height: 220px;
  background-image: url('assets/deco_right.png');
  animation: float 7s ease-in-out infinite reverse;
}
.deco-bear {
  left: 6%; bottom: 5%; width: 250px; height: 250px;
  background-image: url('assets/deco_bear.png');
  animation: float 8s ease-in-out infinite 1s;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(138,99,255,0.08); border: 1px solid rgba(138,99,255,0.2);
  color: var(--accent-1); padding: 6px 16px; border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  margin-bottom: 24px; animation: fadeInDown 0.6s ease;
}
.hero-badge::before { content: '✨'; }
.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(36px, 6vw, 60px); font-weight: 700;
  line-height: 1.15; margin-bottom: 16px; color: var(--text-primary);
  animation: fadeInUp 0.7s ease 0.1s both;
}
.hero-title .highlight {
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-sub {
  font-size: 18px; color: var(--text-secondary); max-width: 580px;
  margin: 0 auto 36px; font-weight: 400; line-height: 1.7;
  animation: fadeInUp 0.7s ease 0.2s both;
}

/* ─── Search Card ─── */
.search-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 36px;
  box-shadow: var(--shadow-card);
  animation: fadeInUp 0.7s ease 0.3s both;
  position: relative; overflow: hidden;
}
.search-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2), var(--accent-3));
}
.search-row { display: flex; flex-direction: column; gap: 20px; }

/* ─── Main Input ─── */
.meaning-input-wrap {
  position: relative;
}
.input-label {
  display: block; font-size: 12px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 10px;
}
.meaning-input {
  width: 100%; padding: 18px 56px 18px 52px;
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary); font-size: 16px;
  font-family: 'Inter', sans-serif;
  transition: var(--transition);
  outline: none; box-shadow: 0 2px 8px rgba(0,0,0,0.02) inset;
}
.meaning-input::placeholder { color: #a0a3ba; }
.meaning-input:focus {
  border-color: var(--accent-1);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(138,99,255,0.1);
}
.input-icon {
  position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
  font-size: 20px; pointer-events: none; user-select: none; opacity: 0.8;
}
.clear-btn {
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  background: #f0f0f5; border: none; color: var(--text-muted);
  cursor: pointer; padding: 4px; border-radius: 50%; display: none;
  transition: var(--transition); font-size: 16px; width: 28px; height: 28px;
}
.clear-btn:hover { color: var(--text-primary); background: #e2e2ea; }
.clear-btn.visible { display: flex; align-items: center; justify-content: center; }

/* Tag suggestions */
.tag-suggestions {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px;
}
.tag-btn {
  padding: 5px 14px; border-radius: var(--radius-pill);
  background: #ffffff; border: 1px solid var(--border);
  color: var(--text-secondary); font-size: 13px; cursor: pointer;
  transition: var(--transition); font-family: 'Inter', sans-serif;
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}
.tag-btn:hover {
  background: rgba(138,99,255,0.06); border-color: rgba(138,99,255,0.3);
  color: var(--accent-1);
}

/* ─── Controls Row ─── */
.controls-row {
  display: grid; grid-template-columns: 1fr 1fr auto; gap: 16px; align-items: end;
}

/* Gender Toggle */
.gender-toggle {
  display: flex; border-radius: var(--radius-md);
  background: #ffffff;
  border: 1.5px solid var(--border);
  overflow: hidden; height: 52px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.02) inset;
}
.gender-toggle input[type="radio"] { display: none; }
.gender-toggle label {
  flex: 1; display: flex; align-items: center; justify-content: center;
  gap: 7px; font-size: 14px; font-weight: 600; cursor: pointer;
  color: var(--text-secondary); transition: var(--transition);
  padding: 0 12px; user-select: none;
}
.gender-toggle input[type="radio"]:checked + label {
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  color: #ffffff;
  box-shadow: none;
}
.gender-toggle label:hover:not(:has(~ input:checked)) { color: var(--text-primary); background: #f8f8fc; }

/* Origin Input */
.origin-wrap { position: relative; }
.origin-input {
  width: 100%; height: 52px; padding: 0 40px 0 44px;
  border: 1px solid var(--border-light); border-radius: var(--radius-md);
  font-size: 15px; font-weight: 500;
  transition: var(--transition);
  background-color: var(--bg-card);
  appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg fill="none" stroke="%238a63ff" stroke-width="2" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" d="M19 9l-7 7-7-7"></path></svg>');
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px;
  cursor: pointer;
  outline: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.02) inset;
}
.origin-input::placeholder { color: #a0a3ba; }
.origin-input:focus {
  border-color: var(--accent-3);
  box-shadow: 0 0 0 4px rgba(0,191,165,0.1);
}
.origin-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  font-size: 18px; pointer-events: none; user-select: none; opacity: 0.8;
}

/* Search Button */
.search-btn {
  height: 52px; padding: 0 28px;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  border: none; border-radius: var(--radius-md);
  color: #fff; font-size: 15px; font-weight: 600;
  cursor: pointer; transition: var(--transition);
  white-space: nowrap; display: flex; align-items: center; gap: 8px;
  font-family: 'Inter', sans-serif;
  box-shadow: 0 4px 16px rgba(138,99,255,0.3);
}
.search-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(138,99,255,0.4);
}
.search-btn:active { transform: translateY(0); }
.search-btn .btn-icon { font-size: 18px; transition: transform 0.3s ease; }
.search-btn:hover .btn-icon { transform: scale(1.2); }

/* ─── Stats Bar ─── */
.stats-bar {
  display: flex; gap: 32px; padding: 20px 0;
  border-bottom: 1px solid var(--border);
  animation: fadeIn 0.5s ease;
}
.stat-item { text-align: center; }
.stat-num { font-size: 22px; font-weight: 700; color: var(--accent-1); }
.stat-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }

/* ─── Main Content Layout ─── */
.main-content {
  display: grid; grid-template-columns: 1fr 280px; gap: 32px;
  padding: 40px 0 60px; align-items: start;
}

/* ─── Results Section ─── */
.results-section {}
.results-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; min-height: 36px;
}
.results-title { font-size: 14px; color: var(--text-muted); }
.results-title strong { color: var(--text-primary); font-weight: 600; }
.sort-select {
  background: #ffffff; border: 1px solid var(--border);
  color: var(--text-secondary); padding: 6px 12px; border-radius: var(--radius-sm);
  font-size: 13px; outline: none; cursor: pointer; font-family: 'Inter', sans-serif;
}
.sort-select:focus { border-color: var(--accent-1); }

/* ─── Cards Grid ─── */
.cards-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px;
}

/* ─── Name Card ─── */
.name-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  cursor: pointer;
  transition: var(--transition);
  position: relative; overflow: hidden;
  animation: cardAppear 0.4s ease both;
  box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}
.name-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  opacity: 0; transition: var(--transition);
}
.name-card.boy-card::before  { background: linear-gradient(90deg, #4facfe, #00f2fe); }
.name-card.girl-card::before { background: linear-gradient(90deg, #f093fb, #f5576c); }
.name-card.unisex-card::before { background: linear-gradient(90deg, var(--accent-1), var(--accent-3)); }
.name-card:hover {
  border-color: rgba(138,99,255,0.25);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.06), 0 0 20px rgba(138,99,255,0.06);
}
.name-card:hover::before { opacity: 1; }

.card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.card-name {
  font-family: 'Playfair Display', serif;
  font-size: 24px; font-weight: 700;
  color: var(--text-primary); line-height: 1.2;
}
.card-gender-badge {
  padding: 3px 10px; border-radius: var(--radius-pill);
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; flex-shrink: 0;
}
.card-gender-badge.boy    { background: rgba(79,172,254,0.12); color: #0076dc; border: 1px solid rgba(79,172,254,0.2); }
.card-gender-badge.girl   { background: rgba(240,147,251,0.12); color: #d63384; border: 1px solid rgba(240,147,251,0.2); }
.card-gender-badge.unisex { background: rgba(138,99,255,0.12); color: var(--accent-1); border: 1px solid rgba(138,99,255,0.2); }

.card-pronunciation { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; font-style: italic; }
.card-meaning {
  font-size: 14px; color: var(--text-secondary); line-height: 1.5; margin-bottom: 12px;
}
.card-footer { display: flex; align-items: center; justify-content: space-between; }
.card-origin {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text-muted); font-weight: 600;
}
.origin-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-3), var(--accent-1));
  flex-shrink: 0;
}
.popularity-badge {
  font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 2px 8px; border-radius: var(--radius-pill);
}
.popularity-badge.common  { background: rgba(0,191,165,0.1); color: #009682; }
.popularity-badge.rare    { background: rgba(245,183,0,0.15); color: #c08e00; }
.popularity-badge.unique  { background: rgba(255,90,146,0.1); color: #d63384; }

/* Score bar */
.score-bar { margin-top: 12px; height: 4px; background: rgba(0,0,0,0.04); border-radius: 2px; }
.score-fill {
  height: 100%; border-radius: 2px;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-3));
  transition: width 0.8s cubic-bezier(0.4,0,0.2,1) 0.2s;
}

/* ─── Empty / Loading States ─── */
.empty-state {
  grid-column: 1 / -1; text-align: center; padding: 60px 20px;
}
.empty-icon { font-size: 56px; margin-bottom: 16px; display: block; animation: float 3s ease-in-out infinite; }
.empty-title { font-size: 20px; font-weight: 600; margin-bottom: 8px; color: var(--text-primary); }
.empty-sub { color: var(--text-muted); font-size: 15px; }

.loading-grid { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.skeleton {
  background: linear-gradient(90deg, rgba(0,0,0,0.03) 25%, rgba(0,0,0,0.06) 50%, rgba(0,0,0,0.03) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite; border-radius: var(--radius-lg); height: 180px;
}

/* ─── Sidebar ─── */
.sidebar {}
.sidebar-section {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 22px; margin-bottom: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}
.sidebar-title {
  font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 16px; display: flex; align-items: center; gap: 8px;
}
.sidebar-title::before {
  content: ''; width: 16px; height: 3px;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  border-radius: 2px; display: block;
}

/* Origin Pills */
.origin-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.origin-pill {
  padding: 6px 13px; border-radius: var(--radius-pill);
  background: #ffffff; border: 1px solid var(--border);
  font-size: 12px; color: var(--text-secondary); cursor: pointer;
  transition: var(--transition); font-family: 'Inter', sans-serif;
  box-shadow: 0 2px 4px rgba(0,0,0,0.02); font-weight: 500;
}
.origin-pill:hover, .origin-pill.active {
  background: rgba(138,99,255,0.08); border-color: rgba(138,99,255,0.3);
  color: var(--accent-1); font-weight: 600;
}

/* Popular searches */
.popular-list { list-style: none; }
.popular-list li {
  padding: 10px 0; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; color: var(--text-secondary); cursor: pointer;
  transition: var(--transition); font-weight: 500;
}
.popular-list li:last-child { border-bottom: none; }
.popular-list li:hover { color: var(--accent-1); padding-left: 4px; }
.popular-num {
  font-size: 11px; font-weight: 700; color: #a0a3ba;
  min-width: 18px; text-align: right;
}

/* ─── Name Detail Modal ─── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(30,31,41,0.6); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px; opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--bg-card); padding: 40px; border-radius: var(--radius-xl);
  max-width: 500px; width: 90%; max-height: 85vh; overflow-y: auto;
  position: relative; box-shadow: 0 24px 48px rgba(0,0,0,0.1);
  transform: scale(0.95) translateY(20px); transition: var(--transition);
}
.modal-overlay.open .modal { transform: scale(1) translateY(0); }
.modal-close {
  position: absolute; top: 16px; right: 16px;
  background: #f0f0f5; border: none;
  color: var(--text-muted); width: 32px; height: 32px; border-radius: 50%;
  cursor: pointer; font-size: 16px; display: flex; align-items: center; justify-content: center;
  transition: var(--transition); font-family: 'Inter', sans-serif;
}
.modal-close:hover { background: #e2e2ea; color: var(--text-primary); }
.modal-name {
  font-family: 'Playfair Display', serif; font-size: 44px; font-weight: 700;
  background: linear-gradient(135deg, var(--text-primary), var(--accent-1));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  margin-bottom: 6px; line-height: 1.1;
}
.modal-pronunciation { font-size: 16px; color: var(--text-muted); margin-bottom: 24px; font-style: italic; }
.modal-badges { display: flex; gap: 8px; margin-bottom: 28px; flex-wrap: wrap; }
.modal-section-title {
  font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 8px; margin-top: 24px;
}
.modal-meaning { font-size: 16px; color: var(--text-secondary); line-height: 1.7; font-weight: 500; }
.modal-keywords { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.modal-keyword {
  padding: 6px 14px; background: rgba(138,99,255,0.06); border: 1px solid rgba(138,99,255,0.15);
  border-radius: var(--radius-pill); font-size: 13px; color: var(--accent-1); font-weight: 600;
}

/* ─── Footer ─── */
footer {
  border-top: 1px solid var(--border);
  padding: 40px 0; background: rgba(0,0,0,0.01);
  color: var(--text-muted); font-size: 14px;
}
.footer-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.footer-links { display: flex; gap: 20px; }
.footer-link { color: var(--text-muted); text-decoration: none; transition: var(--transition); font-weight: 500; }
.footer-link:hover { color: var(--accent-1); }

/* ─── Animations ─── */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; } to { opacity: 1; }
}
@keyframes cardAppear {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}
@keyframes shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}
@keyframes pulse-ring {
  0%   { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.5); opacity: 0; }
}

/* ─── Responsive ─── */
@media (max-width: 900px) {
  .main-content { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .controls-row { grid-template-columns: 1fr 1fr; }
  .search-btn { grid-column: 1 / -1; justify-content: center; height: 52px; }
}
@media (max-width: 600px) {
  .search-card { padding: 24px 20px; }
  .cards-grid { grid-template-columns: 1fr; }
  .controls-row { grid-template-columns: 1fr; gap: 16px; }
  .search-btn { grid-column: 1; width: 100%; }
  .hero-title { font-size: 32px; }
  .deco-left, .deco-right, .deco-bear { display: none; }
  .stats-bar { gap: 20px; flex-wrap: wrap; justify-content: center; }
  
  .header-inner { flex-direction: column; gap: 16px; }
  nav { display: flex; gap: 16px; }

  .tag-suggestions { 
    flex-wrap: nowrap; overflow-x: auto; 
    padding-bottom: 8px; -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
  }
  .tag-btn { scroll-snap-align: start; white-space: nowrap; flex-shrink: 0; }
  
  .modal { padding: 24px; max-height: 80vh; }
}
