/* =========================================================
   ChicTemp — premium minimal UI
   ========================================================= */

:root {
  --bg: #f7f5f2;
  --bg-2: #efece6;
  --surface: #ffffff;
  --text: #15151a;
  --text-2: #4a4a52;
  /* Was #8a8a93 — 3.55:1 on white, WCAG AA fail. Darkened to #6c6c75 (~4.6:1). */
  --muted: #6c6c75;
  --line: #ececec;
  --brand: #1f1f24;          /* refined near-black */
  --brand-on: #ffffff;
  --accent: #c98474;         /* warm terracotta */
  --accent-2: #e9c9b9;
  --ok: #5a8f7b;
  --ok-light: #e3efeb;
  --danger: #c25d55;
  --danger-light: #f7e1e0;
  --warn: #d49b4a;
  --warn-light: #fbeed5;
  --info: #5a7faf;
  --info-light: #e0e8f3;
  --brand-light: #ececec;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  --shadow-1: 0 1px 2px rgba(16,16,24,.04), 0 4px 14px rgba(16,16,24,.05);
  --shadow-2: 0 10px 30px rgba(16,16,24,.10);
}

/* ---------- Dark mode ---------- */
[data-theme="dark"] {
  --bg: #0f0f14;
  --bg-2: #1a1a24;
  --surface: #1e1e2a;
  --text: #e8e8ec;
  --text-2: #a8a8b4;
  --muted: #6a6a78;
  --line: #2a2a38;
  --brand: #e8e8ec;
  --brand-on: #0f0f14;
  --accent: #d4957e;
  --accent-2: #4a3530;
  --ok: #4ade80;
  --ok-light: #14351f;
  --danger: #f87171;
  --danger-light: #3b1515;
  --warn: #fbbf24;
  --warn-light: #3b2e0a;
  --info: #60a5fa;
  --info-light: #152040;
  --brand-light: #2e2020;
  --shadow-1: 0 1px 4px rgba(0,0,0,.3), 0 4px 14px rgba(0,0,0,.2);
  --shadow-2: 0 10px 30px rgba(0,0,0,.4);
}
[data-theme="dark"] input, [data-theme="dark"] textarea, [data-theme="dark"] select {
  background: var(--bg-2); color: var(--text); border-color: var(--line);
}
[data-theme="dark"] .hero { background: linear-gradient(135deg, #1a1a2e, #2a2a3e, #8b5e4e) !important; }
[data-theme="dark"] .tabbar { background: rgba(20,20,30,.95); border-color: var(--line); backdrop-filter: blur(16px); }
[data-theme="dark"] .card { border: 1px solid var(--line); }
[data-theme="dark"] .avatar { background: linear-gradient(135deg, var(--accent-2), #3a2a25); }
[data-theme="dark"] .chip { background: var(--bg-2); border-color: var(--line); color: var(--text-2); }
[data-theme="dark"] .chip.active { background: var(--accent); color: #fff; border-color: var(--accent); }
[data-theme="dark"] .btn-ghost { border-color: var(--line); color: var(--text-2); }
[data-theme="dark"] .quote { background: var(--surface); border-color: var(--line); }
[data-theme="dark"] .modal { background: var(--surface); }
[data-theme="dark"] .modal-overlay { background: rgba(0,0,0,.6); }
[data-theme="dark"] .icon-btn { background: var(--surface); }
[data-theme="dark"] .hourly-row { background: var(--surface); }
[data-theme="dark"] .cover-photo { background: linear-gradient(135deg, #2a2020, #3a2a25); }
[data-theme="dark"] .engage-btn:hover { background: var(--bg-2); }
[data-theme="dark"] .comment-input { background: var(--bg); }
[data-theme="dark"] .explore-user-card { background: var(--surface); }
[data-theme="dark"] .share-btn { background: var(--bg-2); }
[data-theme="dark"] .crop-overlay { background: rgba(0,0,0,.95); }
[data-theme="dark"] .skel { background: var(--line); }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* ---------- Typography ---------- */
h1, h2, h3 { margin: 0 0 10px; letter-spacing: -.02em; line-height: 1.15; font-weight: 650; }
h1 { font-size: 28px; }
h2 { font-size: 20px; }
h3 { font-size: 16px; font-weight: 600; }
p  { margin: 0 0 8px; color: var(--text-2); line-height: 1.5; }
.muted { color: var(--muted); font-size: 13px; }
.eyebrow { text-transform: uppercase; font-size: 11px; letter-spacing: .14em; color: var(--muted); font-weight: 600; }

/* ---------- Layout ---------- */
#app {
  max-width: 480px;
  margin: 0 auto;
  padding: 20px 16px 110px;
  min-height: 100vh;
}
.page { animation: fade .28s cubic-bezier(.2,.8,.2,1); }
@keyframes fade {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Inputs ---------- */
input, textarea, select {
  font: inherit;
  padding: 14px 16px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  width: 100%;
  transition: border-color .2s, box-shadow .2s, background .2s;
  font-size: 15px;
}
input:hover, textarea:hover, select:hover {
  border-color: var(--muted);
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(201,132,116,.12);
  background: #fff;
}
textarea { resize: vertical; min-height: 80px; }
input[type="file"] {
  padding: 14px; background: var(--bg-2); border-style: dashed;
  cursor: pointer;
}
input[type="file"]:hover { background: var(--bg); }
select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238a8a93' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
input[type="range"] {
  padding: 0; border: none; background: transparent;
  -webkit-appearance: none; appearance: none;
  height: 28px;
}
input[type="range"]::-webkit-slider-track {
  height: 6px; background: var(--bg-2); border-radius: 3px;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); border: 3px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.15);
  margin-top: -8px; cursor: pointer;
}
input[type="checkbox"] {
  width: 20px; height: 20px;
  accent-color: var(--accent);
  cursor: pointer;
}

.field { margin-bottom: 14px; }
.label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; }
.field-hint { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px;
  padding: 13px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  background: var(--brand);
  color: var(--brand-on);
  transition: transform .1s, opacity .15s, background .15s, box-shadow .15s;
  letter-spacing: .01em;
}
.btn:hover { box-shadow: 0 4px 12px rgba(0,0,0,.1); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: default; }
.btn-primary:hover { box-shadow: 0 4px 16px rgba(201,132,116,.35); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff; box-shadow: var(--shadow-1);
  font-size: 18px;
  -webkit-tap-highlight-color: transparent;
}

/* ---------- Card ---------- */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-1);
  margin-bottom: 14px;
}
.card-tight { padding: 14px; }
.card-lift:hover { box-shadow: var(--shadow-2); }

/* ---------- Header / top bar ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
}
.topbar h1 { font-size: 22px; margin: 0; }
.topbar .subtitle { color: var(--muted); font-size: 13px; margin-top: 2px; }

/* ---------- Tabbar ---------- */
.tabbar {
  position: fixed; left: 50%; bottom: 12px; transform: translateX(-50%);
  display: flex; gap: 4px;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-2);
  border-radius: 999px;
  padding: 6px;
  z-index: 50;
}
.tab {
  min-width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 20px; color: var(--text-2);
  border-radius: 999px;
  transition: background .18s, color .18s, transform .18s;
}
.tab.active {
  background: var(--brand);
  color: var(--brand-on);
  transform: scale(1.02);
}

/* ---------- Weather hero card ---------- */
.hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  color: #fff;
  background:
    radial-gradient(120% 80% at 80% 10%, rgba(255,255,255,.22), transparent 55%),
    linear-gradient(135deg, #2a2a32 0%, #3d3d48 60%, #c98474 140%);
  box-shadow: var(--shadow-2);
  margin-bottom: 18px;
}
.hero h2, .hero p, .hero .muted { color: #fff; }
.hero .temp { font-size: 54px; font-weight: 700; letter-spacing: -.04em; line-height: 1; }
.hero .cond { opacity: .9; margin-top: 4px; }
.hero .meta { display: flex; gap: 14px; margin-top: 12px; font-size: 13px; opacity: .85; flex-wrap: wrap; }

/* Hourly forecast strip */
.hourly-row {
  display: flex; gap: 0; overflow-x: auto; margin-bottom: 14px;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-1);
  scrollbar-width: none;
}
.hourly-row::-webkit-scrollbar { display: none; }
.hourly-item {
  flex: 0 0 auto; padding: 12px 14px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  border-right: 1px solid var(--line);
  min-width: 60px;
}
.hourly-item:last-child { border-right: none; }
.hourly-time { font-size: 11px; color: var(--muted); font-weight: 600; }
.hourly-temp { font-size: 16px; font-weight: 700; }
.hourly-rain { font-size: 10px; color: #3b82f6; }

/* Collapsible hourly forecast (Home: closed by default) */
.hourly-row.collapsed {
  display: none;
}
.hourly-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 14px;
  margin: -6px 0 14px;
  background: transparent;
  border: 1px dashed var(--line);
  border-radius: 10px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.hourly-toggle:hover {
  background: var(--bg-2);
  border-color: var(--accent);
  color: var(--text);
}
.hourly-toggle-chev { font-size: 14px; transition: transform .15s; }

/* Primary CTA: "Bana kombin öner" — the page's visual focus. */
.btn-suggest {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 64px;
  padding: 16px 22px;
  margin: 14px 0 18px;
  border: none;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .01em;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(201,132,116,.35), 0 2px 6px rgba(0,0,0,.05);
  transition: transform .15s ease, box-shadow .2s ease, opacity .15s;
  -webkit-tap-highlight-color: transparent;
}
.btn-suggest:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(201,132,116,.45), 0 3px 8px rgba(0,0,0,.06);
}
.btn-suggest:active { transform: translateY(0) scale(.98); }
.btn-suggest:disabled { opacity: .6; cursor: wait; transform: none; box-shadow: 0 4px 12px rgba(201,132,116,.2); }
.btn-suggest-icon { font-size: 22px; line-height: 1; }
.btn-suggest-text { line-height: 1.2; }
[data-theme="dark"] .btn-suggest {
  background: linear-gradient(135deg, var(--accent) 0%, #8b5e4e 100%);
  box-shadow: 0 10px 28px rgba(0,0,0,.5), 0 2px 6px rgba(0,0,0,.3);
}

/* ---------- City picker (Profile location autocomplete) ---------- */
.city-picker-wrap input { width: 100%; }
.city-picker-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  max-height: 240px;
  overflow-y: auto;
  z-index: 50;
}
.city-picker-item {
  padding: 10px 14px;
  cursor: pointer;
  font-size: 14px;
  display: flex; align-items: baseline; gap: 4px;
  border-bottom: 1px solid var(--line);
}
.city-picker-item:last-child { border-bottom: none; }
.city-picker-item:hover { background: var(--bg-2); }
.city-picker-item .muted { font-size: 12px; }
.city-picker-empty {
  padding: 12px 14px; font-size: 13px; color: var(--muted); text-align: center;
}

/* ---------- In-app toast (replaces window.alert) ---------- */
.ui-toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translate(-50%, 24px);
  background: var(--brand);
  color: var(--brand-on);
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  max-width: 90vw;
  text-align: center;
  opacity: 0;
  transition: transform .22s cubic-bezier(.22,.9,.32,1), opacity .2s;
  z-index: 999;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  pointer-events: none;
}
.ui-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.ui-toast-ok    { background: var(--ok);     color: #fff; }
.ui-toast-error { background: var(--danger); color: #fff; }

/* ---------- Onboarding (first-run 3-screen tour) ---------- */
.onboarding-wrap {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 20px 18px 28px;
  background: linear-gradient(160deg, var(--accent-2) 0%, #f6e6dc 45%, var(--accent) 120%);
  z-index: 90;
  overflow: hidden;
}
[data-theme="dark"] .onboarding-wrap {
  background: linear-gradient(160deg, #2a1e1a 0%, #3a2a25 50%, var(--accent) 140%);
}
.onboarding-skip {
  position: absolute;
  top: 18px; right: 18px;
  background: transparent;
  border: none;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 8px;
  z-index: 2;
}
.onboarding-skip:hover { background: rgba(255,255,255,.3); color: var(--text); }

.onboarding-viewport {
  flex: 1;
  overflow: hidden;
  width: 100%;
  display: flex;
  align-items: center;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  margin-top: 40px;
}
.onboarding-track {
  display: flex;
  width: 300%;
  height: 100%;
  transition: transform .35s cubic-bezier(.22,.9,.32,1);
}
.onboarding-slide {
  flex: 0 0 33.3333%;
  width: 33.3333%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 10px;
  text-align: center;
}
.onboarding-icon {
  font-size: 96px;
  line-height: 1;
  margin-bottom: 28px;
  filter: drop-shadow(0 8px 20px rgba(201,132,116,.35));
  animation: onboardingFloat 3.5s ease-in-out infinite;
}
@keyframes onboardingFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.onboarding-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.15;
  color: var(--text);
  margin: 0 0 12px;
  max-width: 320px;
}
.onboarding-subtitle {
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-2);
  margin: 0;
  max-width: 340px;
  opacity: .85;
}
.onboarding-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 18px 0 14px;
}
.onboarding-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.55);
  border: 1px solid rgba(201,132,116,.25);
  cursor: pointer;
  transition: all .2s ease;
}
.onboarding-dot.active {
  width: 26px;
  border-radius: 999px;
  background: var(--accent);
  border-color: var(--accent);
}
.onboarding-cta {
  margin: 0;
  max-width: 420px;
  align-self: center;
  width: 100%;
}

/* ---------- Post composer (2-step: type picker → content form) ---------- */
.post-composer { max-height: 86vh; }
.post-composer-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.post-composer-header h2 { margin: 0; flex: 1; font-size: 18px; }
.post-composer-header .btn { padding: 6px 10px; font-size: 12px; }

.post-type-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}
.post-type-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  cursor: pointer;
  text-align: left;
  transition: transform .12s ease, box-shadow .15s, border-color .15s;
  -webkit-tap-highlight-color: transparent;
}
.post-type-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
  border-color: var(--accent);
}
.post-type-card:active { transform: translateY(0) scale(.99); }
.post-type-card.variant-A {
  background: linear-gradient(135deg, var(--accent-2) 0%, rgba(201,132,116,.15) 100%);
  border-color: var(--accent);
}
.post-type-card.variant-B {
  background: linear-gradient(135deg, #e8ddd4 0%, #f5ede5 100%);
}
.post-type-card.variant-C {
  background: var(--surface);
}
.post-type-icon {
  font-size: 38px;
  line-height: 1;
  flex: 0 0 auto;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.08));
}
.post-type-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.post-type-text strong { font-size: 15px; color: var(--text); }
.post-type-text span { font-size: 12px; line-height: 1.4; }
.post-type-chev {
  font-size: 22px; color: var(--muted); flex: 0 0 auto;
}
[data-theme="dark"] .post-type-card { background: var(--surface); }
[data-theme="dark"] .post-type-card.variant-A {
  background: linear-gradient(135deg, rgba(201,132,116,.25) 0%, rgba(201,132,116,.1) 100%);
}
[data-theme="dark"] .post-type-card.variant-B {
  background: linear-gradient(135deg, #2a2520 0%, #352b25 100%);
}

/* Outfit picker grid for Card A */
.outfit-pick-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  max-height: 320px;
  overflow-y: auto;
  margin: 10px 0 14px;
  padding: 4px;
}
.outfit-pick-grid.loading { min-height: 120px; }
.outfit-pick-tile {
  border: 2px solid transparent;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  background: var(--surface);
  transition: transform .12s, border-color .12s, box-shadow .15s;
}
.outfit-pick-tile:hover { transform: translateY(-1px); }
.outfit-pick-tile.selected {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(201,132,116,.3);
}
.outfit-pick-tile .img-wrap {
  height: 120px;
  background: linear-gradient(135deg, var(--bg-2), var(--bg));
  display: grid; place-items: center;
  font-size: 36px;
}
.outfit-pick-tile .img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.outfit-pick-tile .meta {
  padding: 6px 8px 8px;
  display: flex; flex-direction: column; gap: 2px;
}
.outfit-pick-tile .meta strong {
  font-size: 12px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.outfit-pick-tile .meta span { font-size: 10px; }

/* Plain photo picker (Card B / C) */
.compose-picker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 26px 18px;
  border: 2px dashed var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-2);
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  margin-bottom: 10px;
  transition: border-color .15s, background .15s;
}
.compose-picker:hover { border-color: var(--accent); background: var(--surface); }
.compose-picker input[type=file] { display: none; }
.compose-picker-icon { font-size: 24px; }
.compose-preview {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin: 0 0 10px;
}
.compose-caption, .compose-question {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 14px;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
  outline: none;
  resize: vertical;
}
.compose-caption:focus, .compose-question:focus { border-color: var(--accent); }

/* Twitter-style character counter */
.char-counter {
  position: absolute;
  right: 10px;
  bottom: 8px;
  font-size: 11px;
  color: var(--muted);
  pointer-events: none;
}
.char-counter.near-max { color: var(--danger, #ef4444); font-weight: 600; }

/* Hashtag / auto-tag chip input */
.auto-tag-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.auto-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 28px;
}
.auto-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 4px 4px 10px;
  border-radius: 999px;
  background: var(--accent-2);
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  border: 1px solid rgba(201,132,116,.3);
}
.auto-tag-rm {
  background: rgba(0,0,0,.1);
  border: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  display: grid; place-items: center;
  color: var(--text-2);
}
.auto-tag-rm:hover { background: rgba(0,0,0,.2); color: var(--text); }
.auto-tag-input {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 13px;
  background: var(--surface);
  color: var(--text);
  outline: none;
}
.auto-tag-input:focus { border-color: var(--accent); }

/* Wardrobe "+ Detay ekle" accordion (item composer Stage 2) */
.detail-toggle {
  display: block;
  width: 100%;
  margin: 6px 0 14px;
  padding: 10px 14px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: transparent;
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, border-color .15s;
  text-align: center;
}
.detail-toggle:hover { background: var(--bg-2); border-color: var(--accent); }
.detail-toggle[aria-expanded="true"] { color: var(--text-2); }
.detail-accordion[hidden] { display: none; }
.detail-accordion {
  animation: detailFadeIn .2s ease;
  padding-top: 4px;
  border-top: 1px solid var(--line);
  margin-top: 4px;
}
@keyframes detailFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Mood chips — secondary element below the CTA */
.mood-card-compact { padding: 12px 14px; }
.mood-card-compact .eyebrow { font-size: 11px; opacity: .7; }
.mood-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.mood-card-compact .chip {
  padding: 6px 12px;
  font-size: 12px;
  min-height: 32px;
}

/* Weather alerts in hero */
.weather-alert {
  margin-top: 6px; padding: 8px 14px;
  background: rgba(255,255,255,.15);
  border-radius: 10px; font-size: 13px; color: #fff;
}
.rain-alert {
  background: rgba(59,130,246,.35);
  font-weight: 600;
  animation: alertPulse 2s infinite;
}
@keyframes alertPulse {
  0%,100% { opacity: 1; }
  50% { opacity: .7; }
}

/* Hue slider */
.se-hue-slider {
  width: 90%; max-width: 360px;
  height: 28px; -webkit-appearance: none; appearance: none;
  background: linear-gradient(to right,
    #fff, hsl(30,80%,55%), hsl(60,80%,55%), hsl(120,80%,55%),
    hsl(180,80%,55%), hsl(240,80%,55%), hsl(300,80%,55%), hsl(360,80%,55%));
  border-radius: 14px; outline: none; border: none;
  margin: 4px 0;
}
.se-hue-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--thumb-color, #fff);
  border: 3px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.3);
  cursor: pointer;
}
.se-hue-slider::-moz-range-thumb {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--thumb-color, #fff);
  border: 3px solid #fff; cursor: pointer;
}

/* ---------- Grid (Pinterest-ish) ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.grid .cell {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-1);
  display: flex; flex-direction: column;
  transition: transform .2s ease;
}
.grid .cell:hover { transform: translateY(-2px); }
.grid .cell .img-wrap {
  height: 180px;
  background: linear-gradient(135deg, var(--bg-2), var(--bg));
  display: grid; place-items: center;
  color: var(--muted);
  font-size: 44px;
  overflow: hidden;
  opacity: .85;
}
.grid .cell .img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.grid .cell .meta { padding: 10px 12px 14px; }
.grid .cell .meta h3 { font-size: 13px; margin: 0 0 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grid .cell .cell-actions {
  margin-top: 8px;
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
}
.chip.chip-sm {
  padding: 6px 8px;
  min-height: 32px;
  font-size: 14px;
  min-width: 0;
  line-height: 1;
}

/* ---------- Chips / filters ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 8px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  padding: 10px 16px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--text-2);
  transition: background .15s, color .15s, border-color .15s;
  -webkit-tap-highlight-color: transparent;
  min-height: 40px;
}
.chip.active { background: var(--brand); color: var(--brand-on); border-color: var(--brand); }

/* ---------- Modal (scoped) ---------- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15,15,20,.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 100;
  display: grid; place-items: center;
  padding: 16px;
  animation: fade .2s ease;
}
.modal {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 22px;
  width: 100%; max-width: 420px;
  max-height: 86vh; overflow: auto;
  box-shadow: var(--shadow-2);
}
.modal h2 { margin-bottom: 14px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }

/* ---------- Swipe ---------- */
.swipe-area { position: relative; }

.deck {
  position: relative;
  height: 460px;
  margin: 0 auto 6px;
  max-width: 380px;
}

.swipe-card {
  position: absolute; inset: 0;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 8px 30px rgba(0,0,0,.12);
  overflow: hidden;
  touch-action: pan-y;
  will-change: transform;
  transition: transform .3s cubic-bezier(.2,.8,.2,1), opacity .25s;
  user-select: none;
}
.swipe-card-img {
  position: absolute; inset: 0;
  background: var(--bg-2);
  display: grid; place-items: center;
}
.swipe-card-img img { width: 100%; height: 100%; object-fit: cover; }
.swipe-card-placeholder { font-size: 80px; color: var(--muted); opacity: .4; }

.swipe-card-gradient {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 55%;
  background: linear-gradient(to top, rgba(0,0,0,.65), transparent);
  pointer-events: none;
}
.swipe-card-info {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 20px;
  color: #fff;
  z-index: 2;
}
.swipe-card-info h3 {
  font-size: 22px; font-weight: 700;
  margin: 0 0 8px; color: #fff;
  text-shadow: 0 1px 6px rgba(0,0,0,.3);
}
.swipe-card-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.swipe-tag {
  padding: 4px 10px;
  background: rgba(255,255,255,.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
}
.warmth-tag { background: rgba(201,132,116,.5); }

/* Directional labels */
.swipe-label {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  padding: 14px 28px;
  border-radius: 14px;
  font-size: 24px; font-weight: 800;
  letter-spacing: .06em;
  z-index: 20;
  opacity: 0;
  transition: opacity .1s;
  pointer-events: none;
}
.swipe-like {
  right: 20px;
  border: 4px solid #22c55e;
  color: #22c55e;
  transform: translateY(-50%) rotate(12deg);
}
.swipe-nope {
  left: 20px;
  border: 4px solid #ef4444;
  color: #ef4444;
  transform: translateY(-50%) rotate(-12deg);
}

/* Counter */
.swipe-counter { font-size: 13px; }

/* Action buttons */
.swipe-actions {
  display: flex; gap: 14px; justify-content: center;
  margin: 14px 0 4px;
}
.round-btn {
  width: 56px; height: 56px; border-radius: 50%;
  font-size: 22px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
  display: grid; place-items: center;
  transition: transform .1s, box-shadow .15s;
  border: none; cursor: pointer;
}
.round-btn:hover { box-shadow: 0 6px 24px rgba(0,0,0,.14); }
.round-btn:active { transform: scale(.92); }
.nope-btn { color: #ef4444; font-size: 24px; width: 62px; height: 62px; }
.like-btn { color: #22c55e; font-size: 26px; width: 62px; height: 62px; }
.star-btn { color: #f59e0b; font-size: 18px; }
.undo-btn { color: var(--muted); font-size: 18px; }

/* Empty state */
.swipe-empty {
  text-align: center; padding: 50px 20px;
  background: var(--surface); border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.swipe-empty-icon { font-size: 56px; margin-bottom: 12px; opacity: .6; }
.swipe-empty p { margin: 0; }

/* ---------- Blog / post ---------- */
.post {
  display: flex; gap: 12px; align-items: flex-start;
}
.avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  object-fit: cover;
  flex: 0 0 44px;
  display: grid; place-items: center;
  color: #fff; font-weight: 600;
}
.post .body { flex: 1; min-width: 0; overflow-wrap: break-word; word-break: break-word; }
.post .body h3 { margin: 2px 0 4px; }
.post .actions { display: flex; gap: 16px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.post .actions a { cursor: pointer; }
.post .actions a:hover { color: var(--text); }
.post img.cover { width: 100%; border-radius: var(--radius); margin: 8px 0; aspect-ratio: 16/10; object-fit: cover; }

/* ---------- Profile ---------- */
.profile-header {
  text-align: center;
  padding: 20px 0 8px;
}
.profile-header .avatar-lg {
  width: 96px; height: 96px; border-radius: 50%;
  margin: 0 auto 10px;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  display: grid; place-items: center;
  color: #fff; font-size: 34px; font-weight: 600;
  box-shadow: var(--shadow-1);
  overflow: hidden;
  position: relative;
}
.profile-header .avatar-lg img { width: 100%; height: 100%; object-fit: cover; }
.profile-header .name { font-size: 20px; font-weight: 650; letter-spacing: -.01em; }
.profile-header .handle { color: var(--muted); font-size: 14px; }
.profile-header .bio { margin-top: 8px; color: var(--text-2); font-size: 14px; }

.stats {
  display: flex; justify-content: center; gap: 28px;
  margin: 14px 0 18px;
}
.stats .stat { text-align: center; }
.stats .stat b { font-size: 18px; display: block; }
.stats .stat[data-stat="followers"],
.stats .stat[data-stat="following"] { cursor: pointer; }
.stats .stat[data-stat="followers"]:hover b,
.stats .stat[data-stat="following"]:hover b { color: var(--accent); }
.stats .stat span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

.tabs {
  display: flex; border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
}
.tabs .tab-link {
  flex: 1; text-align: center;
  padding: 12px 0;
  font-size: 14px; font-weight: 600;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
  cursor: pointer;
}
.tabs .tab-link.active { color: var(--text); border-bottom-color: var(--brand); }

/* Avatar upload label */
.avatar-edit {
  position: absolute;
  right: -2px; bottom: -2px;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--brand); color: #fff;
  display: grid; place-items: center;
  font-size: 14px; cursor: pointer;
  box-shadow: var(--shadow-2);
}
.avatar-edit input { display: none; }

/* ---------- Auth ---------- */
.auth-page {
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  position: relative; overflow: hidden;
  padding: 20px 16px !important;
}
.auth-bg {
  position: fixed; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(201,132,116,.12) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(59,130,246,.08) 0%, transparent 50%),
    var(--bg);
}
.auth-bg::before, .auth-bg::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  animation: authFloat 8s ease-in-out infinite;
}
.auth-bg::before {
  width: 300px; height: 300px;
  top: -80px; right: -80px;
  background: radial-gradient(circle, var(--accent), transparent 70%);
  opacity: .06;
}
.auth-bg::after {
  width: 200px; height: 200px;
  bottom: 10%; left: -60px;
  background: radial-gradient(circle, var(--info, #3b82f6), transparent 70%);
  opacity: .05;
  animation-delay: -4s;
}
@keyframes authFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(12px, -18px) scale(1.05); }
}
.auth-content {
  position: relative; z-index: 1;
  width: 100%; max-width: 400px;
}
.auth-logo {
  text-align: center;
  font-size: 36px; font-weight: 700;
  letter-spacing: -.04em;
  margin-bottom: 4px;
}
.auth-logo span { color: var(--accent); font-weight: 400; font-style: italic; }
.auth-tagline {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 24px;
}
.auth-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px 24px;
  box-shadow: 0 8px 32px rgba(0,0,0,.06);
}
[data-theme="dark"] .auth-card {
  background: rgba(30,30,42,.8);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-color: rgba(255,255,255,.06);
}
.auth-icon {
  text-align: center;
  font-size: 36px;
  margin-bottom: 8px;
}
.auth-title {
  text-align: center;
  font-size: 20px; font-weight: 700;
  margin: 0 0 20px;
}
.auth-field {
  display: flex; align-items: center;
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 0 14px;
  margin-bottom: 10px;
  transition: border-color .2s, box-shadow .2s;
}
.auth-field:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(201,132,116,.1);
}
[data-theme="dark"] .auth-field { background: var(--bg-2); }
.auth-field-icon {
  font-size: 16px;
  margin-right: 10px;
  flex-shrink: 0;
  opacity: .5;
}
.auth-field input,
.auth-field input[type="text"],
.auth-field input[type="email"],
.auth-field input[type="password"],
.auth-field input[type="date"] {
  border: none !important;
  background: transparent !important;
  border-radius: 0 !important;
  padding: 14px 0 !important;
  width: 100%;
  font-size: 15px;
  outline: none;
  box-shadow: none !important;
}
.auth-field input:focus,
.auth-field input:hover {
  box-shadow: none !important;
  border: none !important;
}
.auth-row {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
}
.auth-check {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text-2); cursor: pointer;
}
.auth-link { font-size: 13px; color: var(--accent); font-weight: 600; }
.auth-submit {
  margin-top: 4px;
  padding: 15px 20px;
  font-size: 15px;
}
.auth-switch {
  text-align: center; margin-top: 18px;
  color: var(--muted); font-size: 14px;
}
.auth-switch a { color: var(--accent); font-weight: 600; }
.auth-wrap .logo {
  text-align: center; margin-bottom: 18px;
  font-size: 22px; font-weight: 700; letter-spacing: -.02em;
}
.auth-wrap .logo span { color: var(--accent); }
/* auth-switch replaces switch-auth */

/* Auth language row */
.auth-lang-row {
  display: flex; justify-content: center; gap: 6px;
  margin-top: 16px;
}
.auth-lang-btn {
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  font-size: 12px; font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all .15s;
  min-height: 32px;
}
.auth-lang-btn.active {
  background: var(--brand);
  color: var(--brand-on);
  border-color: var(--brand);
}
.auth-lang-btn:hover { border-color: var(--brand); }

/* Remember me checkbox */
#remember { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }

/* ---------- Toast/alert inline ---------- */
.inline-error { color: var(--danger); font-size: 13px; margin-top: 8px; text-align: center; }

/* ---------- Quote card ---------- */
.quote {
  background: linear-gradient(135deg, #fff, #faf6f2);
  border: 1px solid var(--line);
}
.quote p { font-style: italic; color: var(--text); font-size: 15px; line-height: 1.6; margin: 4px 0 0; }
.quote .eyebrow { color: var(--accent); }

/* ---------- FAB (floating action button) ---------- */
.fab {
  position: fixed;
  right: 18px; bottom: 86px;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 28px;
  display: grid; place-items: center;
  box-shadow: 0 10px 28px rgba(201,132,116,.45);
  z-index: 40;
  transition: transform .1s;
}
.fab:active { transform: scale(.94); }

/* ---------- Cover photo ---------- */
.cover-photo {
  height: 150px;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  background-size: cover;
  background-position: center;
  border-radius: var(--radius);
  margin-bottom: -50px;
  position: relative;
}
.cover-edit {
  position: absolute;
  right: 10px; bottom: 10px;
  background: rgba(255,255,255,.92);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12px; font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-1);
  border: none;
  z-index: 3;
  display: inline-block;
  color: var(--text);
}

/* Avatar sits on top of cover */
.profile-header { position: relative; padding-top: 10px; }
.profile-header .avatar-lg {
  border: 4px solid var(--bg);
  position: relative;
  z-index: 2;
}

/* ---------- Rich text editor ---------- */
.rt-toolbar {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 8px;
  border: 1px solid var(--line);
  border-bottom: none;
  border-radius: 12px 12px 0 0;
  background: var(--bg-2);
}
.rt-btn {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: grid; place-items: center;
  font-size: 14px;
  background: #fff;
  border: 1px solid var(--line);
  font-family: Georgia, serif;
}
.rt-btn[data-s="bold"]      { font-weight: 800; }
.rt-btn[data-s="italic"]    { font-style: italic; }
.rt-btn[data-s="underline"] { text-decoration: underline; }
.rt-btn:hover { background: var(--bg-2); }
.rt-toolbar select {
  width: auto; padding: 6px 8px; font-size: 13px; background: #fff;
}
.rt-color {
  width: 32px; height: 32px; padding: 0; border: 1px solid var(--line);
  border-radius: 8px; cursor: pointer; background: #fff;
}
.rich-editor {
  border-radius: 0 0 12px 12px !important;
  border-top: none !important;
  line-height: 1.6;
}
.rich-editor:empty::before {
  content: attr(data-placeholder);
  color: var(--muted);
  pointer-events: none;
}
.rich-editor:focus { box-shadow: 0 0 0 4px rgba(31,31,36,.07); }

/* ---------- Rendered post body ---------- */
.post-body {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-2);
  margin: 4px 0 0;
  cursor: pointer;
}
.post .body h3:hover { color: var(--accent); }
.post .body h3 { overflow-wrap: break-word; word-break: break-word; }
.post-body, .detail-body, .comment-text { overflow-wrap: break-word; word-break: break-word; }
.card { overflow-wrap: break-word; word-break: break-word; }

/* ---------- Post Detail page ---------- */
.detail-card { padding: 22px; }
.detail-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.2;
  margin: 8px 0 16px;
}
.detail-cover {
  width: 100%;
  border-radius: var(--radius);
  margin-bottom: 16px;
  aspect-ratio: 16/10;
  object-fit: cover;
}
.detail-body {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  word-wrap: break-word;
}
.detail-body p { margin-bottom: 12px; color: var(--text); }
.detail-body b, .detail-body strong { font-weight: 700; }
.detail-body i, .detail-body em { font-style: italic; }

/* Engage bar */
.engage-bar {
  display: flex;
  justify-content: space-around;
  padding: 6px 0;
}
.engage-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 16px;
  border-radius: 12px;
  background: none;
  border: none;
  cursor: pointer;
  transition: background .15s, color .15s;
  color: var(--muted);
  font-size: 13px;
}
.engage-btn:hover { background: var(--bg-2); }
.engage-btn.active { color: var(--accent); }
.engage-icon { font-size: 20px; }
.engage-count { font-weight: 600; }

/* Comment section */
.comment-composer {
  display: flex;
  gap: 10px;
  padding-bottom: 16px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
}
.comment-input {
  resize: none;
  min-height: 48px;
  border-radius: 14px;
  padding: 10px 14px;
  font-size: 14px;
  background: var(--bg-2);
  border-color: transparent;
}
.comment-input:focus {
  background: #fff;
  border-color: var(--brand);
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 0 10px;
}
.comment-count {
  background: var(--bg-2);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.empty-comments {
  text-align: center;
  padding: 24px 0;
}

.comment-row {
  display: flex;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.comment-row:first-of-type { border-top: none; }
.comment-text {
  margin: 4px 0 6px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}
.comment-actions {
  display: flex;
  gap: 14px;
  font-size: 13px;
  color: var(--muted);
}
.comment-actions a { cursor: pointer; transition: color .15s; }
.comment-actions a:hover { color: var(--text); }
.comment-actions a.active { color: var(--accent); font-weight: 600; }

/* ---------- @mention links ---------- */
.mention {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.mention:hover { text-decoration: underline; }

/* ---------- Favorites ---------- */
.fav-action-bar {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px;
  padding: 12px 16px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
}
.fav-cell { position: relative; cursor: pointer; transition: transform .15s; }
.fav-cell:hover { transform: translateY(-2px); }
.fav-check {
  position: absolute; top: 8px; right: 8px;
  width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.8);
  background: rgba(255,255,255,.3);
  backdrop-filter: blur(4px);
  z-index: 2; pointer-events: none;
  display: grid; place-items: center;
  transition: all .2s;
}
.fav-cell.selected .fav-check {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(201,132,116,.4);
}
.fav-cell.selected .fav-check::after {
  content: '✓'; color: #fff; font-size: 14px; font-weight: 800;
}
.fav-cell.selected { box-shadow: 0 0 0 3px var(--accent), var(--shadow-1); }

.fav-remove {
  width: 30px; height: 30px;
  border-radius: 50%; border: none;
  background: var(--danger-light, #fee2e2);
  color: #ef4444;
  font-size: 14px; cursor: pointer;
  display: grid; place-items: center;
  transition: transform .1s;
}
.fav-remove:hover { transform: scale(1.1); }

/* ---------- Outfits ---------- */
.outfit-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  margin-bottom: 14px;
  overflow: hidden;
}
.outfit-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 16px 16px 10px;
}
.outfit-name { font-size: 15px; }
.outfit-meta { font-size: 12px; margin-top: 2px; }
.outfit-delete {
  width: 34px; height: 34px; border-radius: 8px;
  border: 1px solid var(--line); background: none;
  cursor: pointer; font-size: 14px;
  display: grid; place-items: center;
  transition: background .12s;
}
.outfit-delete:hover { background: var(--bg-2); }

/* Outfit share-card trigger (shares the delete chip's footprint) */
.outfit-share {
  width: 34px; height: 34px; border-radius: 8px;
  border: 1px solid var(--line); background: none;
  cursor: pointer; font-size: 14px;
  display: grid; place-items: center;
  transition: background .12s, border-color .12s;
}
.outfit-share:hover { background: var(--accent-2); border-color: var(--accent); }

/* Share card preview modal */
.share-card-btn { margin: 6px 0 2px; font-size: 13px; }
.share-card-preview {
  display: block;
  width: 100%;
  max-width: 340px;
  margin: 0 auto 14px;
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 34px rgba(0,0,0,.18);
  background: var(--bg-2);
}
.share-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.share-card-actions .chip {
  flex: 1 1 auto;
  min-width: 0;
  justify-content: center;
  text-align: center;
}

/* ---------- Paywall (ChicTemp Pro) ---------- */
.paywall-page { padding-bottom: 40px; }
.paywall-hero {
  text-align: center;
  padding: 30px 16px 20px;
  background: linear-gradient(160deg, var(--accent-2) 0%, rgba(201,132,116,.18) 100%);
  border-radius: var(--radius-lg);
  margin: 10px 0 18px;
}
.paywall-hero-icon { font-size: 56px; margin-bottom: 6px; }
.paywall-hero-title {
  font-size: 24px; font-weight: 800; letter-spacing: -.02em;
  margin: 0 0 6px;
}
.paywall-hero-sub { color: var(--text-2); margin: 0; font-size: 14px; max-width: 320px; margin: 0 auto; }

.paywall-benefits {
  list-style: none; padding: 0; margin: 0 0 20px;
  display: flex; flex-direction: column; gap: 10px;
}
.paywall-benefit {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.paywall-benefit-check { font-size: 22px; flex: 0 0 auto; }
.paywall-benefit strong { display: block; font-size: 14px; }
.paywall-benefit span   { display: block; font-size: 12px; line-height: 1.4; margin-top: 2px; }

.paywall-plans {
  display: flex; gap: 10px; margin-bottom: 14px;
}
.paywall-plan {
  flex: 1 1 0;
  position: relative;
  padding: 16px 14px;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--radius-lg);
  cursor: pointer;
  text-align: center;
  transition: border-color .15s, box-shadow .15s, transform .12s;
}
.paywall-plan.active {
  border-color: var(--accent);
  box-shadow: 0 6px 18px rgba(201,132,116,.22);
}
.paywall-plan:active { transform: scale(.98); }
.paywall-plan-name { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.paywall-plan-price { font-size: 24px; font-weight: 800; margin-top: 4px; }
.paywall-plan-period { font-size: 13px; color: var(--muted); font-weight: 500; }
.paywall-plan-equivalent { font-size: 11px; margin-top: 4px; }
.paywall-plan-badge {
  position: absolute; top: -10px; right: 10px;
  background: var(--accent); color: #fff;
  font-size: 10px; font-weight: 700; letter-spacing: .04em;
  padding: 3px 8px; border-radius: 999px;
  text-transform: uppercase;
}

.paywall-cta { margin: 6px 0 14px; }
.paywall-reassure { text-align: center; font-size: 13px; margin: 0 0 16px; }
.paywall-legal { text-align: center; font-size: 11px; line-height: 1.5; margin: 0; }
.paywall-legal a { color: var(--accent); text-decoration: none; }
.paywall-legal a:hover { text-decoration: underline; }

.paywall-active {
  background: linear-gradient(160deg, var(--accent-2) 0%, rgba(201,132,116,.18) 100%);
  border-radius: var(--radius-lg);
  padding: 40px 20px;
  text-align: center;
  margin-top: 20px;
}

/* Wardrobe Wrapped share button on stats page */
.wrap-share-btn {
  margin: 4px 0 14px;
  font-weight: 700;
  letter-spacing: .02em;
}

/* Monthly Wrapped reminder banner on Home */
.wrap-reminder-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 14px;
  background: linear-gradient(135deg, var(--accent-2) 0%, rgba(201,132,116,.28) 100%);
  border: 1px solid rgba(201,132,116,.3);
  border-radius: var(--radius-lg);
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(201,132,116,.18);
  transition: transform .12s, box-shadow .15s;
}
.wrap-reminder-banner:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(201,132,116,.25);
}
.wrap-reminder-icon {
  font-size: 32px;
  line-height: 1;
  flex: 0 0 auto;
}
.wrap-reminder-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.wrap-reminder-text strong { font-size: 14px; color: var(--text); }
.wrap-reminder-text span   { font-size: 12px; color: var(--text-2); }
.wrap-reminder-close {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.5);
  color: var(--text-2);
  font-size: 18px;
  cursor: pointer;
  display: grid; place-items: center;
  flex: 0 0 auto;
}
.wrap-reminder-close:hover { background: rgba(255,255,255,.85); color: var(--text); }

.outfit-pieces {
  display: flex; gap: 0; overflow-x: auto;
  padding: 0 16px 16px;
  scrollbar-width: none;
}
.outfit-pieces::-webkit-scrollbar { display: none; }
.outfit-piece {
  flex: 0 0 auto; width: 90px; text-align: center;
  padding: 6px;
}
.outfit-piece img {
  width: 78px; height: 100px; object-fit: cover;
  border-radius: 12px; background: var(--bg-2);
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.outfit-piece-empty {
  width: 78px; height: 100px;
  border-radius: 12px; background: var(--bg-2);
  display: grid; place-items: center; font-size: 28px;
}
.outfit-piece-name {
  display: block; font-size: 11px; font-weight: 600;
  color: var(--text); margin-top: 6px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.outfit-piece-type {
  display: block; font-size: 10px; color: var(--muted);
}

/* ---------- Stories row ---------- */
.stories-row {
  display: flex; gap: 14px; overflow-x: auto; padding: 4px 0 14px;
  scrollbar-width: none;
}
.stories-row::-webkit-scrollbar { display: none; }
.story-circle { flex: 0 0 auto; text-align: center; cursor: pointer; width: 68px; }
.story-avatar {
  width: 62px; height: 62px; border-radius: 50%;
  background: var(--bg-2); color: var(--muted);
  display: grid; place-items: center;
  font-size: 24px; font-weight: 600;
  border: 3px solid var(--line);
  overflow: hidden;
}
.story-avatar img { width: 100%; height: 100%; object-fit: cover; }
.story-circle.unviewed .story-avatar {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent);
}
.story-circle.add-story .story-avatar {
  border-style: dashed; border-color: var(--muted);
  font-size: 28px; color: var(--accent);
}
.story-name {
  display: block; font-size: 11px; margin-top: 4px;
  color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Story viewer (fullscreen) */
.story-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.95);
  display: grid; place-items: center;
}
.story-viewer {
  width: 100%; max-width: 420px; height: 100vh; max-height: 750px;
  background-size: cover; background-position: center;
  background-color: #111;
  border-radius: 16px; overflow: hidden;
  position: relative;
}
.story-progress {
  display: flex; gap: 3px; padding: 10px 12px 0; position: absolute; top: 0; left: 0; right: 0; z-index: 3;
}
.story-bar {
  flex: 1; height: 3px; border-radius: 2px; background: rgba(255,255,255,.3);
}
.story-bar.done { background: #fff; }
.story-bar.active { background: #fff; animation: storyProgress 5s linear; }
@keyframes storyProgress { from { transform: scaleX(0); transform-origin: left; } to { transform: scaleX(1); } }
.story-header {
  position: absolute; top: 20px; left: 12px; right: 12px; z-index: 3;
  display: flex; justify-content: space-between; align-items: center;
}
.story-close {
  width: 44px; height: 44px; border-radius: 50%; border: none;
  background: rgba(255,255,255,.25); color: #fff; font-size: 20px;
  cursor: pointer; display: grid; place-items: center;
  -webkit-tap-highlight-color: transparent;
}
.story-caption {
  position: absolute; bottom: 20px; left: 12px; right: 12px; z-index: 3;
  color: #fff; font-size: 15px; text-shadow: 0 1px 4px rgba(0,0,0,.5);
}
.story-tap { position: absolute; top: 0; bottom: 0; width: 40%; z-index: 2; }
.story-tap.left { left: 0; }
.story-tap.right { right: 0; }
.story-view-count {
  position: absolute; bottom: 50px; left: 12px;
  color: rgba(255,255,255,.8); font-size: 12px;
  z-index: 3;
}
.story-header { display: flex; justify-content: space-between; align-items: center; }

/* ---------- DM / Chat ---------- */
.dm-row {
  display: flex; align-items: center; gap: 12px; cursor: pointer;
  transition: background .12s;
}
.dm-row:hover { background: var(--bg-2); }
.dm-preview { margin: 2px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-bell { position: relative; }

/* Chat header */
.chat-header {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 6px;
}
.chat-header strong { font-size: 15px; }

/* Date separator */
.chat-date-sep {
  text-align: center; font-size: 11px; color: var(--muted);
  padding: 10px 0 6px;
  font-weight: 500;
}
.chat-messages {
  height: calc(100vh - 260px); overflow-y: auto;
  padding: 10px 0; display: flex; flex-direction: column; gap: 6px;
}
.chat-bubble {
  max-width: 80%; padding: 10px 14px; border-radius: 18px;
  font-size: 14px; line-height: 1.5; word-wrap: break-word;
}
.chat-bubble.mine {
  align-self: flex-end;
  background: var(--accent); color: #fff;
  border-bottom-right-radius: 4px;
}
.chat-bubble.theirs {
  align-self: flex-start;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
}
.chat-time { display: block; font-size: 10px; opacity: .6; margin-top: 4px; }
.chat-ticks { margin-left: 6px; font-size: 11px; letter-spacing: -1px; }
.chat-ticks.read { color: #4fc3f7; opacity: 1; font-weight: 700; }

/* ---------- DM presence (online dot + last seen) ---------- */
.dm-avatar-wrap {
  position: relative;
  flex: 0 0 auto;
}
.dm-avatar-wrap.online::after {
  content: '';
  position: absolute;
  right: 0; bottom: 0;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #22c55e;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,.05);
}
[data-theme="dark"] .dm-avatar-wrap.online::after { border-color: var(--surface); }
.dm-online-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #22c55e;
  margin-right: 2px;
  vertical-align: middle;
}
.dm-presence { margin-top: 2px; }
.chat-composer {
  display: flex; gap: 8px; padding: 10px 0;
  position: sticky; bottom: 0; background: var(--bg);
}
.chat-input { flex: 1; border-radius: 999px; padding: 10px 16px; }

/* ---------- Story editor ---------- */
.story-editor-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: #000;
  display: flex; flex-direction: column;
  align-items: center;
  padding: 8px;
}
.se-canvas-wrap {
  flex: 1;
  position: relative;
  width: 100%;
  max-width: 380px;
  border-radius: 18px;
  overflow: hidden;
  background: #111;
}
.se-preview-img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: filter .2s;
}
.se-draw-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  touch-action: none;
  z-index: 2;
}
.se-text-layer {
  position: absolute; inset: 0;
  z-index: 3;
  pointer-events: none;
}
.se-text-item {
  position: absolute;
  transform: translate(-50%, -50%);
  padding: 8px 18px;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 12px;
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  white-space: nowrap;
  cursor: grab;
  pointer-events: auto;
  user-select: none;
  -webkit-user-select: none;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
  z-index: 4;
}
.se-text-item:active { cursor: grabbing; opacity: .85; }

/* Trash zone */
.se-trash {
  position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%);
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(239,68,68,.3);
  display: grid; place-items: center;
  font-size: 24px;
  opacity: 0; transition: opacity .2s, transform .2s, background .15s;
  pointer-events: none;
  z-index: 10;
}
.se-trash.visible { opacity: 1; }
.se-trash.hot { background: rgba(239,68,68,.8); transform: translateX(-50%) scale(1.2); }

/* Text input overlay */
.se-text-input-overlay {
  position: absolute; inset: 0; z-index: 20;
  background: rgba(0,0,0,.75);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 14px; padding: 20px;
}
.se-text-field {
  width: 100%; max-width: 340px;
  background: rgba(255,255,255,.08);
  border: 1.5px solid rgba(255,255,255,.2);
  border-radius: 16px;
  color: #fff; font-size: 22px; font-weight: 600;
  text-align: center; padding: 16px 20px;
  outline: none;
  caret-color: var(--accent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: border-color .2s, background .2s;
}
.se-text-field::placeholder { color: rgba(255,255,255,.25); }
.se-text-field:focus {
  border-color: var(--accent);
  background: rgba(255,255,255,.12);
}

/* Font row */
.se-font-row {
  display: flex; gap: 8px; flex-wrap: wrap; justify-content: center;
}
.se-font-btn {
  padding: 8px 14px; border-radius: 10px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2);
  color: #fff; font-size: 14px; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  min-height: 40px;
}
.se-font-btn.active { background: var(--accent); border-color: var(--accent); }

/* Color dots */
.se-color-row {
  display: flex; gap: 8px; justify-content: center;
}
.se-color-dot {
  width: 32px; height: 32px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.3);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform .1s;
}
.se-color-dot.active { border-color: #fff; transform: scale(1.2); box-shadow: 0 0 8px rgba(255,255,255,.4); }
.se-color-dot:hover { transform: scale(1.1); }
.se-toolbar {
  display: flex; gap: 8px; align-items: center;
  padding: 8px 0;
}
.se-btn {
  width: 48px; height: 48px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.3);
  background: rgba(255,255,255,.15);
  color: #fff; font-size: 20px;
  cursor: pointer; display: grid; place-items: center;
  transition: background .12s;
  -webkit-tap-highlight-color: transparent;
}
.se-btn.active, .se-btn:hover { background: rgba(255,255,255,.4); }
.se-color {
  width: 44px; height: 44px; padding: 0;
  border: 2px solid rgba(255,255,255,.3);
  border-radius: 50%; cursor: pointer;
  background: none;
}
.se-filters {
  display: flex; gap: 8px; padding: 8px 0;
  overflow-x: auto; scrollbar-width: none;
  max-width: 100%;
}
.se-filters::-webkit-scrollbar { display: none; }
.se-filter-chip {
  flex: 0 0 auto;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  color: #fff;
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.se-filter-chip.active { background: var(--accent); border-color: var(--accent); }
.se-actions {
  display: flex; gap: 10px; padding: 8px 0;
}

/* ---------- Image crop modal ---------- */
.crop-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.9);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 16px; padding: 20px;
}
.crop-box {
  position: relative; overflow: hidden;
  border: 2px solid rgba(255,255,255,.3);
  background: #111;
  border-radius: 14px;
}
.crop-img {
  position: absolute; top: 0; left: 0;
  cursor: grab;
  user-select: none; -webkit-user-select: none;
  pointer-events: none;
}
.crop-img:active { cursor: grabbing; }
.crop-slider {
  width: 260px; accent-color: var(--accent);
}
.crop-actions { display: flex; gap: 10px; }

/* ---------- Avatar builder ---------- */
.avatar-preview {
  width: 96px; height: 96px; border-radius: 50%;
  margin: 0 auto 10px;
  display: grid; place-items: center;
  font-size: 42px;
  box-shadow: var(--shadow-2);
}
.emoji-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px;
}
.emoji-btn {
  width: 100%; aspect-ratio: 1; border-radius: 12px;
  border: 2px solid var(--line); background: var(--bg);
  font-size: 24px; cursor: pointer; display: grid; place-items: center;
  transition: border-color .15s, transform .1s;
}
.emoji-btn.active { border-color: var(--accent); transform: scale(1.1); }
.emoji-btn:hover { border-color: var(--muted); }
.color-grid {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.avatar-color-dot {
  width: 32px; height: 32px; border-radius: 50%;
  border: 2px solid transparent; cursor: pointer;
  transition: transform .1s, border-color .15s;
}
.avatar-color-dot.active { border-color: var(--text); transform: scale(1.15); }
.avatar-color-dot:hover { transform: scale(1.1); }

/* ---------- Settings modal compact ---------- */
.settings-modal h2 { font-size: 18px; }
.settings-group {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 4px 0;
  margin-bottom: 12px;
  overflow: hidden;
}
.settings-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px;
  font-size: 14px;
  border-bottom: 1px solid var(--line);
}
.settings-row:last-child { border-bottom: none; }
.settings-row input[type="text"],
.settings-row input[type="search"] {
  padding: 8px 10px; font-size: 13px; border-radius: 10px;
}
.settings-row .btn { font-size: 12px; padding: 6px 12px; white-space: nowrap; }
.settings-group .btn-block { font-size: 13px; }

/* ---------- Comment reply indicator ---------- */
.reply-indicator {
  padding: 8px 12px;
  background: var(--bg-2);
  border-radius: 8px;
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 8px;
  display: flex; align-items: center; gap: 6px;
}
.reply-indicator.hidden { display: none; }

/* ---------- Skeleton loading ---------- */
.skeleton-card { padding: 18px; }
.skel { background: var(--bg-2); border-radius: 8px; animation: shimmer 1.2s infinite; }
.skel-circle { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; }
.skel-line { height: 14px; margin-bottom: 6px; }
.skel-block { height: 120px; margin: 10px 0; border-radius: 12px; }
.skel-row { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
@keyframes shimmer {
  0% { opacity: .6; } 50% { opacity: .3; } 100% { opacity: .6; }
}

/* ---------- Explore ---------- */
.explore-users {
  display: flex; gap: 12px; overflow-x: auto; padding: 4px 0 14px;
  scrollbar-width: none;
}
.explore-users::-webkit-scrollbar { display: none; }
.explore-user-card {
  flex: 0 0 auto; width: 130px;
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  padding: 14px 10px; text-align: center;
  cursor: pointer; transition: transform .15s;
}
.explore-user-card:hover { transform: translateY(-2px); }

/* ---------- Share sheet ---------- */
.share-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px;
}
.share-btn {
  display: flex; flex-direction: column; align-items: center;
  padding: 12px 6px; border-radius: 12px;
  background: var(--bg-2); border: none; cursor: pointer;
  transition: background .12s;
  min-height: 60px;
}
.share-btn:hover { background: var(--line); }

/* ---------- Pull to refresh ---------- */
.ptr-indicator {
  position: fixed; top: 0; left: 50%; transform: translateX(-50%) translateY(-40px);
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--surface); box-shadow: var(--shadow-2);
  display: grid; place-items: center;
  font-size: 18px; opacity: 0; z-index: 60;
  transition: opacity .15s;
}

/* ---------- Chatbot ---------- */
.chatbot-fab {
  position: fixed;
  bottom: calc(150px + env(safe-area-inset-bottom, 0px));
  right: 16px;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 24px;
  border: none; cursor: pointer;
  box-shadow: 0 6px 20px rgba(201,132,116,.4);
  z-index: 55;
  transition: transform .12s;
  display: grid; place-items: center;
}
.chatbot-fab:active { transform: scale(.93); }

.chatbot-panel {
  position: fixed;
  bottom: calc(86px + env(safe-area-inset-bottom, 0px));
  right: 16px;
  width: 340px; max-width: calc(100vw - 32px);
  height: 480px; max-height: 70vh;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 12px 40px rgba(0,0,0,.15);
  z-index: 56;
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: chatSlideUp .25s ease;
}

/* Mobile: narrower viewport needs repositioning + full-width panel */
@media (max-width: 600px) {
  .chatbot-fab {
    bottom: calc(140px + env(safe-area-inset-bottom, 0px));
    right: 12px;
    width: 48px; height: 48px;
    font-size: 22px;
  }
  .chatbot-panel {
    right: 12px; left: 12px;
    width: auto; max-width: none;
    bottom: calc(78px + env(safe-area-inset-bottom, 0px));
    max-height: 75vh;
  }
}
@keyframes chatSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: none; }
}
.chatbot-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.chatbot-close {
  width: 32px; height: 32px; border-radius: 50%;
  border: none; background: var(--line); cursor: pointer;
  font-size: 18px; display: grid; place-items: center;
  color: var(--muted);
}
.chatbot-messages {
  flex: 1; overflow-y: auto;
  padding: 14px;
  display: flex; flex-direction: column; gap: 8px;
}
.chatbot-msg {
  max-width: 85%; padding: 10px 14px;
  border-radius: 16px;
  font-size: 14px; line-height: 1.5;
  word-wrap: break-word;
}
.chatbot-msg.user {
  align-self: flex-end;
  background: var(--accent); color: #fff;
  border-bottom-right-radius: 4px;
}
.chatbot-msg.bot {
  align-self: flex-start;
  background: var(--bg-2); color: var(--text);
  border-bottom-left-radius: 4px;
}
.chatbot-typing span {
  display: inline-block;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--muted);
  margin: 0 2px;
  animation: typingDot .8s infinite;
}
.chatbot-typing span:nth-child(2) { animation-delay: .15s; }
.chatbot-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes typingDot {
  0%, 100% { opacity: .3; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-3px); }
}
.chatbot-quick {
  display: flex; gap: 6px; padding: 6px 14px;
  overflow-x: auto; scrollbar-width: none;
}
.chatbot-quick::-webkit-scrollbar { display: none; }
.chatbot-quick-btn {
  flex: 0 0 auto;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg-2); border: 1px solid var(--line);
  font-size: 12px; color: var(--text-2);
  cursor: pointer; white-space: nowrap;
}
.chatbot-quick-btn:hover { border-color: var(--accent); color: var(--accent); }
.chatbot-input-row {
  display: flex; gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
}
.chatbot-input-row input {
  flex: 1; border-radius: 999px; padding: 10px 16px;
  font-size: 14px;
}
.chatbot-send {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--accent); color: #fff;
  border: none; cursor: pointer;
  font-size: 16px; display: grid; place-items: center;
}

/* ---------- Accessibility focus ---------- */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
[role="button"] { cursor: pointer; }

/* ---------- Hashtag ---------- */
.hashtag {
  color: var(--accent); font-weight: 600;
  text-decoration: none; cursor: pointer;
}
.hashtag:hover { text-decoration: underline; }

/* Action states */
.post .actions a { cursor: pointer; transition: color .15s; }
.post .actions a.active { color: var(--accent); font-weight: 600; }
.post .actions a:hover { color: var(--text); }

/* ---------- Notification badge ---------- */
.tab, .notif-bell { position: relative; }
.badge {
  position: absolute;
  top: -4px; right: -6px;
  min-width: 18px; height: 18px;
  padding: 0 5px;
  background: #e53935;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  border-radius: 999px;
  box-shadow: 0 1px 4px rgba(229,57,53,.4);
  pointer-events: none;
}

/* ---------- Logo ---------- */
/* (old auth-wrap styles removed — replaced by auth-page) */

/* ---------- Verified & Admin badges ---------- */
.verified-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px;
  background: #3b82f6;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  border-radius: 50%;
  flex-shrink: 0;
}
.admin-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ---------- Role badge ---------- */
.role-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* ---------- Post menu ⋯ ---------- */
.post-menu { float: right; position: relative; }

/* ---------- Notif bell in topbar ---------- */
.notif-bell { position: relative; }

/* ---------- danger color ---------- */
[style*="color:var(--danger)"] { color: var(--danger) !important; }

/* ---------- Polish: smoother cards, better hover states ---------- */
.card { transition: box-shadow .2s; }
.card:has(h3:hover) { box-shadow: var(--shadow-2); }
.post .body strong:hover { color: var(--accent); }
.avatar:hover { opacity: .85; }
input:hover, textarea:hover, select:hover { border-color: var(--muted); }

/* Better action bar */
.post .actions { font-size: 14px; gap: 18px; }
.post .actions a { display: inline-flex; align-items: center; gap: 4px; }

/* Smoother page transitions */
.page { animation: fade .3s cubic-bezier(.2,.8,.2,1); }

/* Better empty states */
.card [style*="font-size:42px"], .card [style*="font-size:44px"], .card [style*="font-size:48px"] {
  opacity: .7;
}

/* Topbar spacing */
.topbar { margin-bottom: 16px; }
.topbar h1 { font-size: 24px; }
