:root {
  --navy: #284888;
  --navy-dark: #082060;
  --navy-mid: #2e4880;
  --navy-light: #eef2f9;
  --navy-muted: rgba(40, 72, 136, 0.1);
  --gold: #c09539;
  --gold-dark: #9a7020;
  --gold-mid: #b88828;
  --gold-light: #fff8ec;
  --gold-muted: rgba(192, 149, 57, 0.14);
  --cream: #fff5eb;
  --text: #3d4a5c;
  --slate-900: #082060;
  --slate-700: #334155;
  --slate-500: #64748b;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --white: #ffffff;
  --shadow: 0 20px 50px rgba(8, 32, 96, 0.12);
  --shadow-sm: 0 8px 24px rgba(8, 32, 96, 0.08);
  --radius: 16px;
  --icon-radius: 12px;
  --max-width: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
}

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

a {
  color: var(--navy);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--slate-200);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--navy-dark);
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: var(--icon-radius);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--slate-700);
  font-weight: 500;
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--gold-dark);
}

.nav-auth {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-auth .btn {
  padding: 0.55rem 1.1rem;
  font-size: 0.9rem;
}

.nav-greeting {
  font-weight: 600;
  color: var(--navy-dark);
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  border: 0;
  background: transparent;
  padding: 0.25rem;
  cursor: pointer;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-mid));
  color: var(--navy-dark);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--gold-mid), var(--gold-dark));
  color: var(--white);
}

.btn-secondary {
  background: var(--white);
  color: var(--navy-dark);
  border: 1px solid var(--slate-200);
}

.btn-secondary:hover {
  background: var(--slate-100);
}

.hero {
  padding: 4.5rem 0 3rem;
  background:
    radial-gradient(circle at top right, var(--gold-muted), transparent 40%),
    radial-gradient(circle at bottom left, var(--navy-muted), transparent 35%),
    linear-gradient(180deg, var(--cream), var(--white) 72%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--gold-muted);
  color: var(--gold-dark);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--navy-dark);
}

.hero p {
  margin: 0 0 1.75rem;
  font-size: 1.125rem;
  max-width: 34rem;
  color: var(--slate-500);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 0.5rem;
}

.hero-stat {
  padding: 1rem 1.1rem;
  border-radius: var(--icon-radius);
  background: var(--white);
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-sm);
}

.hero-stat strong {
  display: block;
  color: var(--navy-dark);
  margin-bottom: 0.25rem;
}

.hero-stat span {
  font-size: 0.875rem;
  color: var(--slate-500);
}

.hero-panel {
  display: grid;
  gap: 1rem;
}

.hero-panel-card {
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-sm);
}

.hero-panel-card-accent {
  background: linear-gradient(135deg, var(--navy), var(--navy-dark));
  border-color: transparent;
  color: var(--white);
}

.hero-panel-label {
  display: inline-block;
  margin-bottom: 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.8;
}

.hero-panel-card strong {
  display: block;
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.hero-panel-card p {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  opacity: 0.9;
}

.hero-panel-list {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--slate-700);
}

.hero-panel-list li + li {
  margin-top: 0.35rem;
}

.hero-panel-link {
  color: var(--gold);
  font-weight: 600;
  text-decoration: none;
}

.hero-panel-link:hover {
  color: var(--white);
  text-decoration: underline;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.about-card {
  padding: 1.5rem;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.about-card h3 {
  margin: 0 0 0.75rem;
  color: var(--navy-dark);
}

.about-card p {
  margin: 0;
  color: var(--slate-500);
}

.product-section {
  background: var(--navy-light);
}

.product-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 3rem;
  align-items: center;
}

.product-lead {
  margin: 0 0 1.5rem;
  font-size: 1.05rem;
  color: var(--slate-500);
  max-width: 34rem;
}

.section-heading .eyebrow {
  margin-bottom: 0.75rem;
}

.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 180px;
  padding: 0.75rem 1rem;
  border-radius: var(--icon-radius);
  background: linear-gradient(135deg, var(--navy), var(--navy-dark));
  color: var(--white);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}

.store-badge:hover {
  text-decoration: none;
  background: linear-gradient(135deg, var(--navy-mid), var(--navy-dark));
}

.store-badge small {
  display: block;
  font-size: 0.7rem;
  opacity: 0.8;
}

.store-badge strong {
  font-size: 1rem;
}

.nav-play-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  flex-shrink: 0;
}

.nav-play-badge:hover {
  background: var(--navy-mid);
}

.phone-mockup {
  position: relative;
  width: min(100%, 320px);
  margin-inline: auto;
  padding: 1rem;
  border-radius: 2rem;
  background: linear-gradient(145deg, var(--navy), var(--navy-dark));
  box-shadow: var(--shadow);
}

.phone-screen {
  border-radius: 1.5rem;
  overflow: hidden;
  background: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.phone-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  background: var(--gold-light);
  border-bottom: 1px solid var(--slate-200);
}

.phone-topbar strong {
  color: var(--navy-dark);
}

.feed-card {
  padding: 1rem;
  border-bottom: 1px solid var(--slate-200);
}

.feed-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy), var(--navy-mid));
}

.avatar-alt {
  background: linear-gradient(135deg, var(--gold), var(--gold-mid));
}

.feed-image {
  height: 180px;
  border-radius: var(--icon-radius);
  background: linear-gradient(135deg, var(--navy-muted), var(--gold-light));
  margin-bottom: 0.75rem;
}

.feed-actions {
  display: flex;
  gap: 1rem;
  color: var(--slate-500);
  font-size: 0.875rem;
}

section {
  padding: 4.5rem 0;
}

.section-heading {
  text-align: center;
  max-width: 42rem;
  margin: 0 auto 3rem;
}

.section-heading h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  color: var(--navy-dark);
  letter-spacing: -0.02em;
}

.section-heading p {
  margin: 0;
  color: var(--slate-500);
  font-size: 1.05rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.feature-card {
  padding: 1.5rem;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.feature-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: var(--icon-radius);
  background: linear-gradient(135deg, var(--navy), var(--navy-dark));
  color: var(--gold);
  margin-bottom: 1rem;
}

.feature-icon svg {
  width: 24px;
  height: 24px;
}

.feature-card h3 {
  margin: 0 0 0.5rem;
  color: var(--navy-dark);
}

.feature-card p {
  margin: 0;
  color: var(--slate-500);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.step {
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--gold-light);
  border: 1px solid rgba(192, 149, 57, 0.2);
}

.step-number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--gold), var(--gold-mid));
  color: var(--navy-dark);
  font-weight: 700;
  margin-bottom: 1rem;
}

.step h3 {
  margin: 0 0 0.5rem;
  color: var(--navy-dark);
}

.step p {
  margin: 0;
  color: var(--slate-500);
}

.cta {
  background: linear-gradient(135deg, var(--navy), var(--navy-dark));
  color: var(--white);
  border-radius: calc(var(--radius) + 8px);
  padding: 3rem 2rem;
  text-align: center;
  box-shadow: var(--shadow);
}

.cta .btn-secondary {
  background: var(--gold);
  color: var(--navy-dark);
  border-color: var(--gold-mid);
}

.cta .btn-secondary:hover {
  background: var(--gold-mid);
  color: var(--white);
}

.cta h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
}

.cta p {
  margin: 0 auto 1.5rem;
  max-width: 36rem;
  opacity: 0.92;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 2rem;
  align-items: start;
  max-width: 56rem;
  margin-inline: auto;
}

.contact-info {
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--gold-light);
  border: 1px solid rgba(192, 149, 57, 0.2);
}

.contact-info h3 {
  margin: 0 0 0.75rem;
  color: var(--navy-dark);
}

.contact-info p {
  margin: 0 0 1.25rem;
  color: var(--slate-500);
}

.contact-email {
  display: inline-block;
  font-weight: 600;
  color: var(--navy);
  word-break: break-all;
}

.contact-email:hover {
  color: var(--gold-dark);
}

.contact-form {
  padding: 1.5rem;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.form-field {
  margin-bottom: 1rem;
}

.form-field label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 600;
  color: var(--navy-dark);
  font-size: 0.9rem;
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--slate-200);
  border-radius: 10px;
  font: inherit;
  color: var(--text);
  background: var(--white);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px var(--navy-muted);
}

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

.contact-form .btn-primary {
  width: 100%;
}

.site-footer {
  padding: 3rem 0 2rem;
  background: linear-gradient(180deg, var(--navy-dark), #041840);
  color: rgba(255, 255, 255, 0.85);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-grid h3,
.footer-grid h4 {
  color: var(--white);
  margin-top: 0;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li + li {
  margin-top: 0.5rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--gold);
  text-decoration: underline;
  text-decoration-color: rgba(192, 149, 57, 0.5);
}

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  font-size: 0.9rem;
}

.legal-page {
  padding: 3rem 0 4rem;
}

.legal-page h1 {
  margin-top: 0;
  color: var(--navy-dark);
}

.legal-page h2 {
  margin-top: 2rem;
  color: var(--navy-dark);
}

.legal-page p,
.legal-page li {
  color: var(--slate-700);
}

.legal-page ul {
  padding-left: 1.25rem;
}

@media (max-width: 900px) {
  .hero-grid,
  .features-grid,
  .steps,
  .footer-grid,
  .contact-grid,
  .about-grid,
  .product-grid {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 3rem;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    background: var(--white);
    border-bottom: 1px solid var(--slate-200);
    display: none;
  }

  .nav-links.open {
    display: flex;
  }

  .site-header .container {
    position: relative;
  }
}

/* Auth pages (login/signup) */
.auth-section {
  padding: 3.5rem 0 5rem;
  min-height: 60vh;
}

.auth-card {
  max-width: 480px;
  margin: 0 auto;
  padding: 2rem;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.auth-card h1 {
  margin: 0 0 0.4rem;
  font-size: 1.75rem;
  color: var(--navy-dark);
}

.auth-card .auth-subtitle {
  margin: 0 0 1.75rem;
  color: var(--slate-500);
}

.auth-card .btn-primary {
  width: 100%;
  margin-top: 0.25rem;
}

.auth-switch {
  margin-top: 1.5rem;
  text-align: center;
  color: var(--slate-500);
  font-size: 0.9rem;
}

.phone-field {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.phone-field .phone-prefix {
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--slate-200);
  border-radius: 10px;
  background: var(--slate-100);
  color: var(--slate-700);
  font-weight: 600;
}

.phone-field input {
  flex: 1;
}

.field-error {
  margin-top: 0.35rem;
  color: #c0392b;
  font-size: 0.85rem;
}

.field-hint {
  margin-top: 0.35rem;
  color: var(--slate-500);
  font-size: 0.85rem;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip {
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--slate-200);
  background: var(--white);
  color: var(--text);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.chip.chip-selected {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

.chip-row-error {
  outline: 1px solid #c0392b;
  border-radius: 999px;
}

.form-field select {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--slate-200);
  border-radius: 10px;
  font: inherit;
  color: var(--text);
  background: var(--white);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 640px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.call-notice {
  background: #e8f1fd;
  border-radius: 10px;
  padding: 0.65rem 0.9rem;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
  line-height: 1.4;
  color: #2461c9;
  font-weight: 500;
}

.otp-boxes {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.otp-boxes input {
  width: 3rem;
  height: 3.25rem;
  text-align: center;
  font-size: 1.4rem;
  font-weight: 700;
  border: 1px solid var(--slate-200);
  border-radius: 10px;
  color: var(--navy-dark);
}

.otp-boxes input:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px var(--navy-muted);
}

.auth-resend {
  margin: 0.5rem 0 1.25rem;
  font-size: 0.9rem;
  color: var(--slate-500);
}

.auth-resend button {
  background: none;
  border: 0;
  padding: 0;
  color: var(--navy);
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

.auth-resend button:disabled {
  color: var(--slate-500);
  cursor: default;
  text-decoration: none;
}

.hidden {
  display: none !important;
}

.auth-links-row {
  display: flex;
  justify-content: flex-end;
  margin: -0.5rem 0 1.25rem;
}

.auth-link-btn {
  background: none;
  border: 0;
  padding: 0;
  color: var(--navy);
  font: inherit;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
}

.auth-back-link {
  display: inline-block;
  margin-bottom: 1rem;
  color: var(--slate-500);
  font-size: 0.9rem;
  text-decoration: none;
}

/* ============ App shell (home / profile / search) ============ */

.muted {
  color: var(--slate-500);
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--slate-200);
}

.app-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
}

.app-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.app-nav-link {
  color: var(--slate-700);
  font-weight: 600;
  text-decoration: none;
  padding: 0.4rem 0;
  border-bottom: 2px solid transparent;
}

.app-nav-link:hover {
  text-decoration: none;
  color: var(--gold-dark);
}

.app-nav-link.active {
  color: var(--navy-dark);
  border-bottom-color: var(--gold);
}

.app-main {
  padding: 2rem 0 4rem;
  min-height: 70vh;
  background: var(--slate-100);
}

/* Notifications */

.app-notif {
  position: relative;
}

.app-notif-bell {
  position: relative;
  background: none;
  border: 0;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.25rem;
}

.app-notif-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: #c0392b;
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 999px;
  min-width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}

.app-notif-panel {
  position: absolute;
  right: 0;
  top: 130%;
  width: 320px;
  max-height: 400px;
  overflow-y: auto;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 200;
}

.app-notif-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--slate-200);
}

.app-notif-panel-header button {
  background: none;
  border: 0;
  color: var(--navy);
  font-weight: 600;
  cursor: pointer;
  font-size: 0.8rem;
}

.app-notif-list {
  padding: 0.5rem;
}

.notif-item {
  padding: 0.6rem 0.5rem;
  border-radius: 8px;
  font-size: 0.9rem;
}

.notif-item.notif-unread {
  background: var(--gold-muted);
}

/* Feed layout */

.feed-layout {
  display: grid;
  grid-template-columns: minmax(0, 600px) 280px;
  gap: 2rem;
  align-items: start;
  justify-content: center;
}

@media (max-width: 900px) {
  .feed-layout {
    grid-template-columns: 1fr;
  }
  .suggest-col {
    display: none;
  }
}

.feed-col {
  min-width: 0;
}

.feed-sentinel {
  height: 1px;
}

/* Stories */

.stories-row {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding: 0.25rem 0 1.25rem;
}

.story-tile {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  width: 72px;
}

.story-ring {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  padding: 3px;
  background: var(--slate-200);
  position: relative;
}

.story-ring .story-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.story-ring-unviewed {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
}

.story-ring-add {
  background: var(--slate-200);
}

.story-add-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  background: var(--navy);
  color: white;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  border: 2px solid var(--white);
}

.story-tile-label {
  font-size: 0.75rem;
  color: var(--slate-700);
  text-align: center;
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Story viewer */

.story-viewer {
  position: fixed;
  inset: 0;
  background: black;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.story-viewer-image {
  max-width: 90vw;
  max-height: 78vh;
  border-radius: 10px;
  object-fit: contain;
}

.story-viewer-caption {
  color: white;
  margin-top: 1rem;
  max-width: 480px;
  text-align: center;
}

.story-viewer-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: 0;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
}

.story-viewer-header {
  position: absolute;
  top: 2.5rem;
  left: 2rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: white;
  font-weight: 600;
}

.story-viewer-avatar-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.story-viewer-progress {
  position: absolute;
  top: 1rem;
  left: 2rem;
  right: 2rem;
  display: flex;
  gap: 4px;
}

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

.story-progress-bar.filled {
  background: white;
}

.story-viewer-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.15);
  border: 0;
  color: white;
  font-size: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
}

.story-viewer-prev {
  left: 1.5rem;
}

.story-viewer-next {
  right: 1.5rem;
}

/* Create post */

.create-post-card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.create-post-trigger {
  width: 100%;
  text-align: left;
  background: var(--slate-100);
  border: 0;
  border-radius: 999px;
  padding: 0.75rem 1.25rem;
  color: var(--slate-500);
  font: inherit;
  cursor: pointer;
}

.post-image-preview {
  margin-top: 0.75rem;
  max-width: 100%;
  max-height: 260px;
  border-radius: 10px;
  object-fit: cover;
}

/* Post card */

.feed-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.post-card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.post-card-header {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.9rem 1rem;
  position: relative;
}

.post-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--slate-200);
}

.post-header-text {
  flex: 1;
}

.post-menu-wrap {
  position: relative;
}

.post-menu-btn {
  background: none;
  border: 0;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--slate-500);
  padding: 0.25rem 0.5rem;
}

.post-menu {
  position: absolute;
  right: 0;
  top: 130%;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: 10px;
  box-shadow: var(--shadow);
  z-index: 50;
  display: flex;
  flex-direction: column;
  min-width: 160px;
  overflow: hidden;
}

.post-menu button {
  background: none;
  border: 0;
  text-align: left;
  padding: 0.65rem 1rem;
  cursor: pointer;
  font: inherit;
  color: var(--text);
}

.post-menu button:hover {
  background: var(--slate-100);
}

.post-image {
  width: 100%;
  max-height: 560px;
  object-fit: cover;
  display: block;
}

.post-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem 0.25rem;
  position: relative;
}

.reaction-toggle {
  background: none;
  border: 0;
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
}

.reaction-toggle.reaction-active {
  transform: scale(1.1);
}

.reaction-picker {
  position: absolute;
  left: 1rem;
  bottom: 100%;
  margin-bottom: 0.5rem;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: 999px;
  box-shadow: var(--shadow);
  padding: 0.4rem 0.6rem;
  display: flex;
  gap: 0.4rem;
  z-index: 50;
}

.reaction-option {
  background: none;
  border: 0;
  font-size: 1.25rem;
  cursor: pointer;
  transition: transform 0.1s ease;
}

.reaction-option:hover {
  transform: scale(1.3);
}

.comment-toggle {
  background: none;
  border: 0;
  font-size: 0.95rem;
  cursor: pointer;
  color: var(--slate-700);
  font-weight: 600;
}

.post-reaction-summary {
  padding: 0 1rem;
  font-size: 0.85rem;
  color: var(--slate-500);
  min-height: 1.1rem;
}

.post-caption {
  padding: 0.35rem 1rem 0.9rem;
  font-size: 0.92rem;
}

.post-comments {
  border-top: 1px solid var(--slate-200);
  padding: 0.75rem 1rem 1rem;
}

.post-comment {
  font-size: 0.88rem;
  margin: 0 0 0.5rem;
}

.post-comment-form {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.post-comment-input {
  flex: 1;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--slate-200);
  border-radius: 999px;
  font: inherit;
}

.post-comment-form button {
  background: none;
  border: 0;
  color: var(--navy);
  font-weight: 700;
  cursor: pointer;
}

/* Suggested people */

.suggest-col h3 {
  font-size: 0.95rem;
  color: var(--navy-dark);
  margin-bottom: 0.9rem;
}

.suggest-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.suggest-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  padding: 0.6rem 0.8rem;
}

.suggest-info {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 600;
  min-width: 0;
}

.suggest-avatar-img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
}

.suggest-follow-btn {
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
  flex: 0 0 auto;
}

.edit-photo-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin-bottom: 0.5rem;
  font-size: 1.4rem;
  align-items: center;
  justify-content: center;
}

/* Modals (create post / edit profile / password / followers list) */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 32, 96, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  padding: 1rem;
}

.modal-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  width: 100%;
  max-width: 440px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.25rem;
  color: var(--navy-dark);
}

.modal-close {
  background: none;
  border: 0;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--slate-500);
  line-height: 1;
}

/* Profile page */

.profile-layout {
  max-width: 720px;
  margin: 0 auto;
}

.profile-header-card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  gap: 1.5rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}

.profile-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--slate-200);
  flex: 0 0 auto;
}

.profile-header-info {
  flex: 1;
  min-width: 0;
}

.profile-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: relative;
}

.profile-name-row h1 {
  margin: 0;
  font-size: 1.4rem;
  color: var(--navy-dark);
}

.profile-menu {
  position: absolute;
  right: 0;
  top: 130%;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: 10px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  min-width: 180px;
  z-index: 60;
}

.profile-menu button {
  background: none;
  border: 0;
  text-align: left;
  padding: 0.65rem 1rem;
  cursor: pointer;
  font: inherit;
}

.profile-menu button:hover {
  background: var(--slate-100);
}

.profile-stats {
  display: flex;
  gap: 1.75rem;
  margin: 0.9rem 0;
}

.profile-stats > div {
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.profile-stats strong {
  font-size: 1.1rem;
  color: var(--navy-dark);
}

.profile-stats span {
  font-size: 0.8rem;
  color: var(--slate-500);
}

.pending-requests {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

.pending-requests h3 {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
}

.pending-request-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0;
}

.pending-request-row .btn {
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.profile-grid-cell {
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--slate-200);
}

.profile-grid-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-grid-textpost {
  padding: 0.5rem;
  font-size: 0.75rem;
  color: var(--text);
}

/* Search page */

.search-layout {
  max-width: 560px;
  margin: 0 auto;
}

.search-input {
  width: 100%;
  padding: 0.85rem 1.1rem;
  border: 1px solid var(--slate-200);
  border-radius: 999px;
  font: inherit;
  margin-bottom: 1.25rem;
  background: var(--white);
}

.search-suggest-col {
  margin-top: 1.75rem;
}

.search-suggest-col h3 {
  font-size: 0.95rem;
  color: var(--navy-dark);
  margin-bottom: 0.9rem;
}

.search-results,
.user-list-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.user-list-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  background: var(--white);
  border: 1px solid var(--slate-200);
}

.user-list-row:hover {
  background: var(--slate-100);
  text-decoration: none;
}

.user-list-avatar-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
}

.user-list-row .user-list-info {
  display: flex;
  flex-direction: column;
}

.user-list-row span {
  font-size: 0.8rem;
  color: var(--slate-500);
}

/* Initials avatar — shown instead of a logo placeholder when a user has no photo */

.avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  flex-shrink: 0;
  font-size: 0.9rem;
}

.profile-avatar.avatar-fallback {
  font-size: 2.25rem;
}

.story-viewer-avatar-img.avatar-fallback {
  font-size: 0.9rem;
}

/* ============ Chat ============ */

.nav-chat-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #c0392b;
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 999px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  margin-left: 0.35rem;
  vertical-align: middle;
}

.chat-main {
  padding: 0;
}

.chat-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  height: calc(100vh - 65px);
  max-width: 1120px;
  padding: 0;
}

@media (max-width: 800px) {
  .chat-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    height: calc(100vh - 65px);
  }

  .chat-list-col {
    max-height: 40vh;
  }
}

.chat-list-col {
  border-right: 1px solid var(--slate-200);
  background: var(--white);
  padding: 1.25rem 1rem;
  overflow-y: auto;
  min-height: 0;
}

.chat-list-title {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  color: var(--navy-dark);
}

.chat-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.chat-list-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  padding: 0.6rem;
  border: 0;
  background: none;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  font: inherit;
}

.chat-list-row:hover {
  background: var(--slate-100);
}

.chat-list-row-active {
  background: var(--navy-light);
}

.chat-list-avatar-img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
}

.chat-list-row-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.chat-list-row-text strong {
  font-size: 0.9rem;
  color: var(--navy-dark);
}

.chat-list-row-text span {
  font-size: 0.8rem;
  color: var(--slate-500);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-thread-col {
  display: flex;
  flex-direction: column;
  background: var(--slate-100);
  min-height: 0;
}

.chat-thread-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-thread {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.chat-thread-header {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 1rem 1.25rem;
  background: var(--white);
  border-bottom: 1px solid var(--slate-200);
}

.chat-thread-avatar-img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
}

.chat-thread-header strong {
  display: block;
  color: var(--navy-dark);
}

.chat-view-profile {
  font-size: 0.78rem;
}

.chat-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.chat-bubble-row {
  display: flex;
  justify-content: flex-start;
}

.chat-bubble-row.chat-bubble-mine {
  justify-content: flex-end;
}

.chat-bubble {
  max-width: 70%;
  padding: 0.6rem 0.9rem;
  border-radius: 16px;
  background: var(--white);
  border: 1px solid var(--slate-200);
  font-size: 0.9rem;
  word-break: break-word;
}

.chat-bubble-mine .chat-bubble {
  background: var(--navy);
  color: white;
  border-color: var(--navy);
}

.chat-bubble-status {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.68rem;
  opacity: 0.75;
}

.chat-send-form {
  display: flex;
  gap: 0.6rem;
  padding: 1rem 1.25rem;
  background: var(--white);
  border-top: 1px solid var(--slate-200);
}

.chat-send-form input {
  flex: 1;
  padding: 0.7rem 1rem;
  border: 1px solid var(--slate-200);
  border-radius: 999px;
  font: inherit;
}

/* ============ App shell responsive fixes ============ */

@media (max-width: 700px) {
  .app-header-inner {
    flex-wrap: wrap;
    row-gap: 0.6rem;
  }

  .brand span {
    display: none;
  }

  .app-nav {
    width: 100%;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
  }

  .app-nav-link {
    font-size: 0.85rem;
  }

  .app-nav .btn {
    padding: 0.5rem 0.9rem;
    font-size: 0.82rem;
  }

  .app-notif-bell {
    font-size: 1.1rem;
  }

  .app-notif-panel {
    width: calc(100vw - 2rem);
    max-width: 320px;
  }

  .feed-layout {
    padding: 0 0.25rem;
  }

  .post-card-header {
    padding: 0.75rem 0.85rem;
  }

  .story-viewer-header,
  .story-viewer-progress {
    left: 1rem;
    right: 1rem;
  }

  .story-viewer-nav {
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
  }
}

@media (max-width: 600px) {
  .profile-header-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .profile-name-row {
    flex-direction: column;
    gap: 0.6rem;
  }

  .profile-stats {
    justify-content: center;
  }

  .chip-row {
    justify-content: center;
  }

  #profile-owner-actions,
  #profile-visitor-actions {
    display: flex;
    gap: 0.5rem;
  }

  .chat-thread-header {
    padding: 0.85rem 1rem;
  }

  .chat-send-form {
    padding: 0.85rem 1rem;
  }

  .modal-card {
    padding: 1.25rem;
  }
}

@media (max-width: 420px) {
  .app-nav-link {
    font-size: 0.78rem;
  }

  .app-nav {
    gap: 0.4rem;
  }

  .app-nav .btn {
    padding: 0.45rem 0.7rem;
    font-size: 0.75rem;
  }
}
