/* Glass card */
.section-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.9), rgba(255,255,255,0.86));
  border-radius: 1.25rem;
  box-shadow: 0 20px 40px rgba(0,0,0,0.15), 0 2px 8px rgba(0,0,0,0.07);
  padding: 1.25rem;
}



/* Tabs */
.tab {
  display: inline-flex; align-items: center; justify-content: center;
  height: 3rem; border-radius: 1rem; color: #eef2ff;
  background: linear-gradient(135deg, rgba(255,255,255,0.14), rgba(0,0,0,0.06));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25);
}
.tab:hover { filter: brightness(1.06); }
.tab-active {
  background: linear-gradient(135deg, #5b7cf7, #8b5cf6);
  box-shadow: 0 10px 30px rgba(109, 40, 217, 0.35);
  color: white;
}

/* Small cards inside feed */
.card {
  background: #fff;
  border-radius: 1rem;
  border: 1px solid rgba(226,232,240,.9);
  padding: 1rem;
}

.section-title { font-weight: 700; font-size: 1.25rem; }

/* Controls */
.field {
  width: 100%; border: 1px solid rgb(226 232 240);
  border-radius: 0.75rem; padding: 0.6rem 0.8rem; outline: none; background: #fff;
}
.field:focus { box-shadow: 0 0 0 4px rgba(99, 102, 241, .18); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .35rem; padding: .6rem 1rem; border-radius: .75rem;
  border: 1px solid rgb(99 102 241);
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white; font-weight: 600; box-shadow: 0 8px 24px rgba(79,70,229,.28);
}
.btn:hover { filter: brightness(1.04); }

.btn-secondary {
  border: 1px solid rgb(226 232 240); background: white; color: rgb(71 85 105);
  border-radius: .75rem; padding: .6rem .9rem;
}

/* Platform badges */
.badge {
  display: inline-flex; align-items: center; gap: .5rem;
  font-weight: 600; font-size: .9rem; padding: .35rem .6rem; border-radius: .75rem;
  background: #eef2ff; color: #1f2937;
}
.badge-ig { background: #fde7ff; color: #8b5cf6; }
.badge-fb { background: #e8f0ff; color: #2563eb; }

/* iOS safe area and tap targets */
@supports (padding: env(safe-area-inset-bottom)) {
  body { padding-bottom: env(safe-area-inset-bottom); }
}
button, .btn, .btn-secondary { min-height: 44px; }

.cf-turnstile { z-index: 0; }
button[type="submit"] { position: relative; z-index: 1; }

html, body { overflow-x: hidden; }
.card { overflow: hidden; }              /* keep corners clean */
.prose p { overflow-wrap: anywhere; }    /* hard-wrap very long strings */

/* Cloudflare Turnstile container never overflows */
.cf-turnstile { max-width: 100%; }

/* Allow the card to render fully; only guard horizontal overflow on the form */
#post.section-card,
#post .card { overflow: visible; }

#post form { overflow-x: hidden; }

/* Turnstile should never force the card wider than the screen */
#post .cf-turnstile,
#post .cf-turnstile iframe { max-width: 100% !important; }

/* Extra safety for tiny screens: long words/handles wrap instead of stretching */
#post .field,
#post textarea { word-break: break-word; min-width: 0; }

/* Keep the post card visible; prevent sideways scroll inside the form */
#post.section-card,
#post .card { overflow: visible; }
#post form { overflow-x: hidden; }

/* Make Turnstile fit the card width on mobile */
#post .cf-turnstile { width: 100% !important; display: block; }
#post .cf-turnstile iframe { width: 100% !important; max-width: 100% !important; }

/* If a very-narrow phone still overflows, gently scale the widget */
@media (max-width: 360px) {
  #post .cf-turnstile iframe {
    transform: scale(0.92);
    transform-origin: left top;
    height: 70px; /* keep visible after scaling */
  }
}

/* Optional: add safe-area padding for iOS edges */
@supports (padding: env(safe-area-inset-right)) {
  #post.section-card {
    padding-left: max(1.25rem, env(safe-area-inset-left));
    padding-right: max(1.25rem, env(safe-area-inset-right));
  }
}
/* --- Post form: prevent any min-content overflow --- */
#post .actions, #post .actions * { min-width: 0; }

/* Make Turnstile fully fluid */
#post .cf-turnstile { width: 100% !important; display: block; }
#post .cf-turnstile iframe {
  width: 100% !important;
  max-width: 100% !important;
  height: 70px;            /* keeps the success state visible */
}

/* If a very-narrow device still overflows, gently scale the iframe */
@media (max-width: 360px) {
  #post .cf-turnstile iframe {
    transform: scale(0.92);
    transform-origin: left top;
    height: 64px;
  }
}

/* No horizontal clipping inside the card; only guard sideways scroll in the form */
#post.section-card, #post .card { overflow: visible; }
#post form { overflow-x: hidden; }

/* Extra wrap safety for long handles/words */
#post .field, #post textarea { word-break: break-word; }

