/* VERSIONING RULE: Use semantic versioning like 4.8.5 or 4.9.0 and keep visual/UI updates aligned with the same app version shown in index.html and app.js. */
:root {
  --bg: #0b1220;
  --panel: #121826;
  --panel-2: #182235;
  --line: rgba(255,255,255,0.08);
  --text: #f4f7fb;
  --muted: #9aa8bd;
  --accent: #f1b95e;
  --accent-2: #86d3ff;
  --danger: #ff8989;
  --good: #8ff0b8;
  --shadow: 0 12px 40px rgba(0,0,0,0.28);
  --radius: 20px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: radial-gradient(circle at top, #15213a 0%, var(--bg) 45%, #08101b 100%); color: var(--text); font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
body { min-height: 100vh; }
button, input, textarea { font: inherit; }
img { max-width: 100%; display: block; }
.app-wrap { position: relative; width: min(820px, calc(100% - 14px)); margin: 8px auto 22px; }
.card, .mini-card { background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01)); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); backdrop-filter: blur(10px); }
.hero-card { padding: 12px 14px; display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; }

h1, h2 { margin: 0; }
h1 { font-size: clamp(22px, 3.4vw, 32px); line-height: 1.1; text-align: center; letter-spacing: 0.01em; }
.app-version { margin-top: 4px; text-align: center; font-size: 10px; line-height: 1; letter-spacing: 0.22em; text-transform: uppercase; color: #d6deeb; opacity: 0.92; font-weight: 700; font-family: Inter, system-ui, sans-serif; }
h2 { font-size: 18px; margin-bottom: 2px; }
.sub, .identity-head p, .composer-head p { margin: 8px 0 0; color: var(--muted); }
.topbar-actions, .composer-row, .feed-actions, .identity-foot, .identity-head { display: flex; gap: 12px; align-items: center; }
.topbar-actions { flex-wrap: wrap; justify-content: flex-end; }
.hero-copy { justify-self: center; width: 100%; }
.identity, .composer { margin-top: 16px; padding: 18px; }
.identity-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.identity-preview { padding: 10px 14px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,0.03); font-weight: 700; }
.label { display: block; margin: 14px 0 8px; color: var(--muted); font-size: 14px; }
input, textarea { width: 100%; border: 1px solid rgba(255,255,255,0.09); background: rgba(8,14,24,0.7); color: var(--text); border-radius: 14px; padding: 12px 14px; outline: none; }
input:focus, textarea:focus { border-color: rgba(134,211,255,0.45); box-shadow: 0 0 0 4px rgba(134,211,255,0.12); }
textarea { min-height: 120px; resize: vertical; }
button { border: 0; border-radius: 14px; padding: 12px 16px; background: linear-gradient(135deg, var(--accent), #d88d2f); color: #1e1404; font-weight: 800; cursor: pointer; transition: transform .12s ease, opacity .12s ease; }
button:hover { transform: translateY(-1px); }
button:disabled { opacity: .6; cursor: wait; transform: none; }
.secondary-btn { background: rgba(255,255,255,0.05); color: var(--text); border: 1px solid var(--line); }
.file-picker { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 16px; border-radius: 14px; border: 1px dashed rgba(255,255,255,0.18); background: rgba(255,255,255,0.03); cursor: pointer; font-weight: 700; }
.file-picker input { display: none; }
.selected-file { color: var(--muted); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#preview { display: none; margin-top: 12px; max-height: 260px; border-radius: 18px; border: 1px solid var(--line); object-fit: cover; }
.composer-footer { display: flex; justify-content: space-between; gap: 12px; margin-top: 12px; align-items: center; flex-wrap: wrap; }
.helper-text, .status { color: var(--muted); font-size: 14px; }
.status.error { color: var(--danger); }
.sync-badge { padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,0.04); font-size: 13px; font-weight: 700; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 16px 0; }
.mini-card { padding: 16px; }
.mini-label { color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.mini-value { font-size: 22px; font-weight: 800; }
.feed { display: grid; gap: 14px; }
.post { padding: 16px; scroll-margin-top: 20px; }
.post.flash { animation: flashCard 1.4s ease; }
@keyframes flashCard { 0% { box-shadow: 0 0 0 0 rgba(241,185,94,0.65), var(--shadow);} 100% { box-shadow: var(--shadow);} }
.post-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.author-row { display: flex; gap: 12px; align-items: center; }
.avatar { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-size: 16px; font-weight: 800; color: white; flex: 0 0 auto; }
.author { font-size: 17px; font-weight: 800; }
.meta, .time, .tagline { color: var(--muted); font-size: 13px; }
.tagline { margin-top: 2px; }
.you-badge { display: inline-block; margin-left: 8px; font-size: 12px; font-weight: 800; color: #08101b; background: var(--good); padding: 3px 8px; border-radius: 999px; vertical-align: middle; }
.post-text { font-size: 16px; line-height: 1.55; margin: 12px 0; word-break: break-word; }
.img-wrap { position: relative; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: rgba(255,255,255,0.03); }
.img { width: 100%; height: auto; max-height: none; object-fit: contain; cursor: zoom-in; background: rgba(255,255,255,0.02); }
.img-badge { position: absolute; right: 10px; bottom: 10px; background: rgba(8,16,27,0.78); border: 1px solid rgba(255,255,255,0.12); border-radius: 999px; padding: 6px 10px; font-size: 12px; }
.post-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 12px; align-items: center; flex-wrap: wrap; }
.action-group { display: flex; gap: 8px; flex-wrap: wrap; }
.delete-btn { background: rgba(255,137,137,0.12); color: #ffd4d4; border: 1px solid rgba(255,137,137,0.25); }
.share-btn { background: rgba(134,211,255,0.12); color: #d8f4ff; border: 1px solid rgba(134,211,255,0.25); }
.hidden { display: none !important; }
.empty-state { padding: 28px; text-align: center; }
.empty-title { font-weight: 800; font-size: 20px; }
.empty-copy { color: var(--muted); margin-top: 6px; }
.feed-actions { justify-content: center; margin-top: 16px; }
@media (max-width: 760px) {
  .hero-card, .composer-row { flex-direction: column; align-items: stretch; }
  .identity-bar, .stats-grid { grid-template-columns: 1fr; }
  .app-wrap { width: calc(100% - 10px); margin: 6px auto 18px; }
  .topbar-actions { width: 100%; }
  .topbar-actions button, #postButton { width: 100%; }
  .identity-bar { flex-direction: column; align-items: stretch; }
  .post-head { flex-direction: column; }
  .post-actions, .action-group { width: 100%; }
  .action-group button { flex: 1; }
}

.hero-copy { min-width: 0; }
.compact-identity { padding: 10px 12px; }
.identity-bar { display:flex; gap:10px; align-items:center; }
.identity-bar input { flex:1; min-width:0; }
.identity { margin-top: 10px; }
.composer { margin-top: 10px; padding: 12px; }
.composer-head { margin-bottom: 8px; }
.label { margin: 8px 0 6px; font-size: 13px; }
input, textarea { padding: 10px 12px; border-radius: 12px; }
textarea { min-height: 84px; }
button { padding: 10px 14px; border-radius: 12px; }
.file-picker { min-height: 42px; padding: 0 12px; border-radius: 12px; }
.composer-row { gap: 8px; }
.selected-file { font-size: 13px; }
#preview { margin-top: 8px; max-height: 220px; border-radius: 14px; }
.composer-footer { margin-top: 8px; }
.helper-text, .status { font-size: 12px; }
.sync-badge { padding: 7px 10px; font-size: 12px; white-space: nowrap; }
.stats-grid { gap: 8px; margin: 10px 0; }
.mini-card { padding: 10px 12px; }
.mini-label { font-size: 12px; margin-bottom: 4px; }
.mini-value { font-size: 18px; }
.feed { gap: 10px; }
.post { padding: 12px; }
.post-head { margin-bottom: 8px; }
.author-row { gap: 10px; }
.avatar { width: 38px; height: 38px; font-size: 14px; }
.author { font-size: 15px; }
.meta, .time, .tagline { font-size: 12px; }
.post-text { font-size: 15px; line-height: 1.45; margin: 10px 0; }
.img { max-height: 62vh; }
.img-badge { right: 8px; bottom: 8px; padding: 4px 8px; font-size: 11px; }
.post-actions { margin-top: 10px; gap: 8px; }
.feed-actions { margin-top: 10px; }


.composer { overflow: hidden; }
.composer.collapsed { padding: 10px 12px; }
.composer-toggle { width: 100%; display: flex; align-items: center; justify-content: center; min-height: 46px; font-size: 15px; font-weight: 800; }
.composer-body { padding-top: 10px; }
.topbar-actions button { min-width: 0; }
@media (max-width: 760px) {
  .hero-card { padding: 10px 12px; }
  .topbar-actions { width: auto; }
  .topbar-actions button { width: auto; }
  .composer-toggle { min-height: 42px; }
}


.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.94);
  padding: 18px;
}

.lightbox-backdrop {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  touch-action: none;
}

#lightboxImage {
  max-width: 96vw;
  max-height: 92vh;
  width: auto;
  height: auto;
  border-radius: 14px;
  transform-origin: center center;
  transition: transform 0.12s ease;
  cursor: zoom-in;
}

.lightbox-close {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 10000;
  width: 46px;
  height: 46px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.18);
  font-size: 32px;
  line-height: 1;
}

@media (max-width: 760px) {
  .lightbox { padding: 12px; }
  #lightboxImage { max-width: 100%; max-height: 88vh; }
  .lightbox-close { top: 8px; right: 8px; width: 42px; height: 42px; }
  .lightbox-nav { width: 44px; height: 44px; font-size: 34px; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
  .lightbox-counter { bottom: 12px; font-size: 12px; }
}


.plus-icon {
  color: #ff9800;
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-shadow: 0 0 14px rgba(255, 152, 0, 0.18);
}

.stats-grid {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.stats-grid .mini-card {
  flex: 1 1 0;
  min-width: 0;
}

.stats-grid .mini-label,
.stats-grid .mini-value {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

.floating-composer-btn {
  position: fixed;
  top: calc(env(safe-area-inset-top) + 14px);
  right: calc(env(safe-area-inset-right) + 14px);
  z-index: 9500;
  width: 58px;
  height: 58px;
  padding: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 18px 42px rgba(0,0,0,0.35), 0 0 0 1px rgba(255,255,255,0.08) inset;
  background: #ff7a00;
  border: 1px solid rgba(0,0,0,0.15);
  color: #111;
}

.floating-composer-btn .plus-icon {
  font-size: 40px;
  transform: translateY(-1px);
}

.composer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.62);
  backdrop-filter: blur(3px);
  z-index: 9300;
}

.composer {
  position: fixed;
  left: 50%;
  bottom: calc(82px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(820px, calc(100% - 14px));
  max-height: min(78vh, 780px);
  overflow: auto;
  z-index: 9400;
  margin-top: 0;
}

.composer.collapsed {
  padding: 12px;
}

.composer-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.composer-sheet-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.composer-close-btn {
  flex: 0 0 auto;
  min-width: 44px;
  min-height: 44px;
  padding: 0 12px;
}

@media (max-width: 760px) {
  .stats-grid {
    gap: 6px;
  }
  .stats-grid .mini-card {
    padding: 8px 6px;
  }
  .stats-grid .mini-label {
    font-size: 10px;
    margin-bottom: 3px;
  }
  .stats-grid .mini-value {
    font-size: 13px;
  }
  .floating-composer-btn {
    right: 10px;
    left: 10px;
    width: auto;
    justify-content: center;
    bottom: calc(10px + env(safe-area-inset-bottom));
    min-height: 50px;
    padding: 10px 14px;
  }
  .floating-composer-btn .plus-icon {
    font-size: 36px;
  }
  .composer {
    width: calc(100% - 10px);
    bottom: calc(72px + env(safe-area-inset-bottom));
    max-height: min(76vh, 860px);
  }
}


@media (max-width: 760px) {
  .hero-card { grid-template-columns: 1fr; }
  .topbar-actions { justify-content: center; }
  .install-btn { min-height: 38px; padding: 8px 12px; }
  .app-version { font-size: 9px; letter-spacing: 0.2em; }
  .floating-composer-btn { width: 60px; height: 60px; }
  .floating-composer-btn .plus-icon { font-size: 38px; }
}


/* 4.8.1 requested UI updates */
.hero-card {
  position: relative;
  grid-template-columns: 1fr;
  justify-items: center;
}
.hero-copy {
  text-align: center;
}
.topbar-actions {
  position: absolute;
  top: 12px;
  right: 12px;
}
.identity.hidden {
  display: none !important;
}
.identity-bar input::placeholder {
  color: #d6deeb;
}
.floating-composer-btn {
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  bottom: auto;
  left: auto;
  width: 56px;
  height: 56px;
  background: #ff8a00;
  border: none;
  box-shadow: 0 14px 34px rgba(0,0,0,0.36);
}
.floating-composer-btn .plus-icon {
  color: #000;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  font-weight: 900;
  transform: none;
  text-shadow: none;
}
.composer-backdrop {
  background: rgba(3, 7, 18, 0.78);
  backdrop-filter: blur(4px);
}
.composer {
  top: 50%;
  left: 50%;
  bottom: auto;
  transform: translate(-50%, -50%);
  width: min(560px, calc(100% - 20px));
  max-height: min(84vh, 760px);
  background: #121826;
  box-shadow: 0 28px 62px rgba(0,0,0,0.56);
}
@media (max-width: 760px) {
  .topbar-actions {
    top: 10px;
    right: 10px;
  }
  .floating-composer-btn {
    top: max(10px, env(safe-area-inset-top));
    right: max(10px, env(safe-area-inset-right));
    width: 54px;
    height: 54px;
  }
  .floating-composer-btn .plus-icon {
    font-size: 32px;
  }
  .composer {
    width: calc(100% - 16px);
    max-height: min(82vh, 760px);
  }
}


/* 4.8.1 smart positioning */
.topbar-actions {
  position: fixed;
  top: calc(env(safe-area-inset-top) + 12px);
  right: calc(env(safe-area-inset-right) + 12px);
  z-index: 9400;
}
.floating-composer-btn {
  position: fixed;
  top: calc(env(safe-area-inset-top) + clamp(14px, 2.2vw, 20px));
  right: calc(env(safe-area-inset-right) + clamp(14px, 3.5vw, 24px));
  left: auto;
  bottom: auto;
  width: 58px;
  height: 58px;
  padding: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ff8a00;
  border: none;
  box-shadow: 0 16px 36px rgba(0,0,0,0.34);
  z-index: 9600;
  touch-action: manipulation;
}
.floating-composer-btn .plus-icon {
  width: 100%;
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #000;
  font-size: 36px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  transform: none;
}
@media (max-width: 760px) {
  .topbar-actions {
    top: calc(env(safe-area-inset-top) + 10px);
    right: calc(env(safe-area-inset-right) + 10px);
  }
  .floating-composer-btn {
    top: calc(env(safe-area-inset-top) + 12px);
    right: calc(env(safe-area-inset-right) + 16px);
    width: 56px;
    height: 56px;
  }
  .floating-composer-btn .plus-icon {
    font-size: 34px;
  }
}


/* 4.8.2 SVG FAB + polish */
.floating-composer-btn {
  display: grid;
  place-items: center;
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.floating-composer-btn:hover {
  transform: translateY(-1px) scale(1.02);
}

.floating-composer-btn:active {
  transform: scale(0.96);
}

.fab-icon {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  transition: opacity 180ms ease, transform 220ms ease;
}

.fab-plus {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.fab-close {
  opacity: 0;
  transform: rotate(-90deg) scale(0.65);
}

.floating-composer-btn.is-open .fab-plus {
  opacity: 0;
  transform: rotate(90deg) scale(0.65);
}

.floating-composer-btn.is-open .fab-close {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.fab-svg {
  width: 24px;
  height: 24px;
  display: block;
}

.fab-svg line {
  stroke: #000;
  stroke-width: 3.2;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.composer-backdrop {
  transition: opacity 180ms ease;
}

.composer-backdrop.hidden {
  opacity: 0;
  pointer-events: none;
}

.composer {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  transition: opacity 180ms ease, transform 220ms ease;
}

.composer.hidden {
  display: block !important;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -47%) scale(0.97);
}

body.composer-open .hero-card,
body.composer-open .feed {
  filter: saturate(0.92);
}

@media (max-width: 760px) {
  .fab-svg {
    width: 23px;
    height: 23px;
  }
}


/* v4.8.4 polish */
.identity { margin-top: 8px; }
#nameInput { font-weight: 700; }
.composer-backdrop {
  background: rgba(2, 6, 16, 0.72);
  backdrop-filter: blur(8px);
}
.composer {
  top: 50%;
  bottom: auto;
  transform: translate(-50%, -50%) scale(.98);
  width: min(560px, calc(100% - 22px));
  max-height: min(78vh, 760px);
  background: #101827;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 26px 70px rgba(0,0,0,0.5);
  transition: transform .2s ease, opacity .2s ease;
  opacity: 0;
}
body.composer-open .composer {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}
.floating-composer-btn {
  display: grid;
  place-items: center;
  background: #ff7a00;
  box-shadow: 0 14px 34px rgba(0,0,0,0.28);
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.floating-composer-btn:hover { transform: translateY(-1px) scale(1.02); }
.floating-composer-btn:active { transform: scale(.97); }
.fab-icon {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  transition: opacity .18s ease, transform .22s ease;
}
.fab-plus { opacity: 1; transform: rotate(0deg) scale(1); }
.fab-close { opacity: 0; transform: rotate(-90deg) scale(.7); }
.floating-composer-btn.is-open .fab-plus { opacity: 0; transform: rotate(90deg) scale(.7); }
.floating-composer-btn.is-open .fab-close { opacity: 1; transform: rotate(0deg) scale(1); }
.fab-svg { width: 28px; height: 28px; overflow: visible; }
.fab-svg line {
  stroke: #000;
  stroke-width: 3.2;
  stroke-linecap: round;
}
.floating-composer-btn.pulse { animation: fabPulse .6s ease; }
@keyframes fabPulse {
  0% { box-shadow: 0 0 0 0 rgba(255,122,0,.45), 0 14px 34px rgba(0,0,0,0.28); }
  100% { box-shadow: 0 0 0 16px rgba(255,122,0,0), 0 14px 34px rgba(0,0,0,0.28); }
}
.post { animation: postRise .24s ease both; }
@keyframes postRise {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 760px) {
  .floating-composer-btn {
    top: calc(env(safe-area-inset-top) + 10px);
    right: calc(env(safe-area-inset-right) + 10px);
    left: auto;
    bottom: auto;
    width: 54px;
    height: 54px;
    min-height: 54px;
    padding: 0;
  }
  .fab-svg { width: 26px; height: 26px; }
  .composer { width: calc(100% - 18px); }
}


/* v4.8.5 static FAB + refined UI system */
.app-wrap {
  position: relative;
}

.topbar-actions {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 20;
}

.floating-composer-btn {
  position: fixed;
  top: calc(env(safe-area-inset-top) + 12px);
  right: max(12px, calc((100vw - 820px) / 2 + 12px));
  left: auto;
  bottom: auto;
  width: 56px;
  height: 56px;
  min-height: 56px;
  padding: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #ff7a00;
  border: none;
  box-shadow: 0 14px 34px rgba(0,0,0,0.28);
  z-index: 9600;
  touch-action: manipulation;
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}

.floating-composer-btn:hover {
  transform: translateY(-1px) scale(1.02);
  filter: brightness(1.02);
}

.floating-composer-btn:active {
  transform: scale(.97);
}

.fab-icon {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.fab-svg {
  width: 26px;
  height: 26px;
  overflow: visible;
  display: block;
}

.fab-svg line {
  stroke: #000;
  stroke-width: 4.25;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.floating-composer-btn.is-open .fab-plus {
  opacity: 1;
  transform: none;
}

.floating-composer-btn .fab-close {
  display: none !important;
}

#postButton {
  min-height: 50px;
  padding: 12px 18px;
  margin-right: 4px;
  border-radius: 12px;
  box-shadow: 0 6px 14px rgba(0,0,0,0.16);
}

@media (max-width: 760px) {
  .topbar-actions {
    position: absolute;
    top: 10px;
    right: 10px;
  }

  .floating-composer-btn {
    top: calc(env(safe-area-inset-top) + 10px);
    right: calc(env(safe-area-inset-right) + 10px);
    width: 54px;
    height: 54px;
    min-height: 54px;
  }

  .fab-svg {
    width: 25px;
    height: 25px;
  }

  #postButton {
    width: calc(100% - 8px);
    margin: 4px auto 0;
  }
}


.field-error { color: #ffb1b1; font-size: 12px; margin-top: 6px; font-weight: 700; }
#nameInput[aria-invalid="true"] { border-color: rgba(255, 108, 108, 0.7); box-shadow: 0 0 0 4px rgba(255, 108, 108, 0.12); }


/* v4.8.9 viewer and fab/container fixes */
.lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10001;
  width: 58px;
  height: 58px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(0,0,0,0.64);
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
  font-size: 42px;
  line-height: 1;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.lightbox-prev { left: max(14px, env(safe-area-inset-left)); }
.lightbox-next { right: max(14px, env(safe-area-inset-right)); }
.lightbox-nav:hover { background: rgba(0,0,0,0.78); }
.lightbox-nav:active { transform: translateY(-50%) scale(0.96); }

@media (max-width: 760px) {
  .lightbox-nav {
    width: 62px;
    height: 62px;
    font-size: 46px;
  }
  .lightbox-prev { left: max(10px, env(safe-area-inset-left)); }
  .lightbox-next { right: max(10px, env(safe-area-inset-right)); }
}

@media (min-width: 761px) {
  .lightbox-nav {
    width: 64px;
    height: 64px;
    font-size: 48px;
  }
}

.app-wrap { position: relative; }
.floating-composer-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  left: auto;
  bottom: auto;
  width: 62px;
  height: 62px;
  min-height: 62px;
  padding: 0;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.floating-composer-btn .fab-svg {
  width: 28px;
  height: 28px;
  overflow: visible;
}

.floating-composer-btn .fab-svg line {
  stroke: #000;
  stroke-width: 4.4;
  stroke-linecap: round;
}

#postButton {
  width: calc(100% - 16px);
  margin: 10px auto 0;
  padding: 13px 14px;
  display: block;
}

@media (max-width: 760px) {
  .floating-composer-btn {
    position: fixed;
    top: calc(env(safe-area-inset-top) + 12px);
    right: calc(env(safe-area-inset-right) + 12px);
    left: auto;
    width: 60px;
    height: 60px;
    min-height: 60px;
  }
  #postButton { width: 100%; }
}


/* v4.8.9 fixes: keep FAB inside app on desktop, safe on mobile, and ensure nav buttons are visible */
.app-wrap {
  position: relative;
}

.floating-composer-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  left: auto;
  bottom: auto;
  width: 60px;
  height: 60px;
  min-height: 60px;
  margin: 0;
  padding: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  z-index: 120;
}

.floating-composer-btn .fab-svg {
  width: 28px;
  height: 28px;
  display: block;
  overflow: visible;
}

.floating-composer-btn .fab-svg line {
  stroke: #000;
  stroke-width: 4.6;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10020;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.lightbox-prev {
  left: max(16px, env(safe-area-inset-left));
}

.lightbox-next {
  right: max(16px, env(safe-area-inset-right));
}

@media (max-width: 760px) {
  .floating-composer-btn {
    position: fixed;
    top: calc(env(safe-area-inset-top) + 12px);
    right: calc(env(safe-area-inset-right) + 12px);
    left: auto;
    bottom: auto;
    width: 60px;
    height: 60px;
    min-height: 60px;
  }

  .lightbox-nav {
    width: 58px;
    height: 58px;
    font-size: 44px;
  }
}

@media (min-width: 761px) {
  .lightbox-nav {
    width: 66px;
    height: 66px;
    font-size: 50px;
  }
}


/* v4.8.9 interaction and layout refinements */
.identity-bar {
  align-items: flex-start;
  flex-wrap: wrap;
}
.identity-bar input {
  flex: 1 1 240px;
}
.field-error {
  width: 100%;
}
.stats-grid {
  margin-top: 8px;
}
#connectionMode.is-live { color: #9ff2bf; }
#connectionMode.is-reconnecting { color: #ffd38b; }
#connectionMode.is-offline { color: #ffb1b1; }

.floating-composer-btn {
  display: grid;
  place-items: center;
}
@media (min-width: 761px) {
  .floating-composer-btn {
    position: absolute;
    top: 10px;
    right: 10px;
  }
}
@media (max-width: 760px) {
  .floating-composer-btn {
    position: fixed;
    top: calc(env(safe-area-inset-top) + 14px);
    right: calc(env(safe-area-inset-right) + 14px);
  }
}

.lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(0,0,0,0.62);
  border: 1px solid rgba(255,255,255,0.18);
  z-index: 10001;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}
.lightbox-nav svg {
  width: 22px;
  height: 22px;
  display: block;
}
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }
.lightbox-nav:hover {
  background: rgba(0,0,0,0.78);
}
.lightbox-nav:active {
  transform: translateY(-50%) scale(0.96);
}
@media (min-width: 761px) {
  .lightbox-nav {
    width: 60px;
    height: 60px;
  }
  .lightbox-nav svg {
    width: 24px;
    height: 24px;
  }
}
@media (max-width: 760px) {
  .lightbox-nav {
    width: 56px;
    height: 56px;
  }
}

.post {
  position: relative;
}
.post-head {
  position: relative;
  padding-right: 42px;
}
.delete-btn {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 28px;
  height: 28px;
  min-width: 28px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(0,0,0,0.42);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.12);
  opacity: 0.82;
  z-index: 2;
  transition: opacity 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.delete-btn svg {
  width: 13px;
  height: 13px;
  display: block;
}
@media (min-width: 769px) {
  .delete-btn {
    opacity: 0.5;
  }
  .post:hover .delete-btn {
    opacity: 1;
  }
}
.delete-btn:hover {
  background: rgba(0,0,0,0.68);
}
.delete-btn:active {
  transform: scale(0.94);
}
.delete-btn.confirming {
  width: auto;
  min-width: 62px;
  padding: 0 10px;
  background: #b42318;
  border-color: rgba(255,255,255,0.08);
  opacity: 1;
  font-size: 11px;
  font-weight: 800;
}


/* v4.9.0 final lock: keep FAB inside app on desktop and keep viewer arrows perfectly centered on hover */
.app-wrap {
  position: relative;
}

.floating-composer-btn {
  width: 60px;
  height: 60px;
  min-height: 60px;
  padding: 0;
  margin: 0;
  display: grid;
  place-items: center;
  border-radius: 999px;
  z-index: 120;
}

@media (min-width: 761px) {
  .floating-composer-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    left: auto;
    bottom: auto;
  }
}

@media (max-width: 760px) {
  .floating-composer-btn {
    position: fixed;
    top: calc(env(safe-area-inset-top) + 14px);
    right: calc(env(safe-area-inset-right) + 14px);
    left: auto;
    bottom: auto;
  }
}

.floating-composer-btn:hover {
  transform: none;
}

.floating-composer-btn:active {
  transform: scale(0.97);
}

.lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 58px;
  height: 58px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 999px;
  z-index: 10020;
}

.lightbox-nav svg {
  width: 22px;
  height: 22px;
  display: block;
}

.lightbox-prev {
  left: max(16px, env(safe-area-inset-left));
}

.lightbox-next {
  right: max(16px, env(safe-area-inset-right));
}

.lightbox-nav:hover {
  background: rgba(0,0,0,0.78);
  transform: translateY(-50%);
}

.lightbox-nav:active {
  transform: translateY(-50%) scale(0.96);
}

@media (min-width: 761px) {
  .lightbox-nav {
    width: 62px;
    height: 62px;
  }

  .lightbox-nav svg {
    width: 24px;
    height: 24px;
  }
}

@media (max-width: 760px) {
  .lightbox-nav {
    width: 56px;
    height: 56px;
  }
}


/* v4.9.1 layout lock + visibility fixes */
.app-wrap { position: relative; }
.floating-composer-btn {
  position: absolute !important;
  top: 12px !important;
  right: 12px !important;
  left: auto !important;
  bottom: auto !important;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #ff8a00;
  border: none;
  box-shadow: 0 16px 36px rgba(0,0,0,0.34);
  z-index: 9600;
  transform: none !important;
}
.floating-composer-btn:hover { transform: none !important; }
.floating-composer-btn:active { transform: scale(0.96) !important; }
.fab-svg { width: 26px; height: 26px; display: block; }
.fab-svg line { stroke: #000; stroke-width: 4.25; stroke-linecap: round; }
@media (max-width: 760px) {
  .floating-composer-btn {
    position: fixed !important;
    top: calc(env(safe-area-inset-top) + 12px) !important;
    right: calc(env(safe-area-inset-right) + 12px) !important;
  }
}
.post { position: relative; }
.post-head { position: relative; padding-right: 42px; }
.delete-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 28px;
  height: 28px;
  min-width: 28px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(0,0,0,0.56) !important;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.14);
  opacity: 0.92 !important;
  z-index: 4;
}
.delete-btn svg { width: 13px; height: 13px; display: block; }
@media (min-width: 769px) {
  .post:hover .delete-btn { opacity: 1 !important; }
}
.lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%) !important;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
}
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }
.lightbox-nav:hover { background: rgba(0,0,0,0.78); transform: translateY(-50%) !important; }
.lightbox-nav:active { transform: translateY(-50%) scale(0.96) !important; }
.lightbox-nav svg { width: 22px; height: 22px; display: block; }
@media (max-width: 760px) { .lightbox-nav { width: 60px; height: 60px; } }


/* v4.9.2 mobile identity sizing fix */
@media (max-width: 760px) {
  .compact-identity {
    padding: 8px 10px;
  }

  .identity-bar {
    gap: 6px;
  }

  #nameInput {
    min-height: 0;
    height: 38px;
    padding: 7px 10px;
    font-size: 14px;
    line-height: 1.2;
    border-radius: 10px;
  }

  #nameError {
    margin-top: 2px;
    font-size: 11px;
  }
}


/* v4.9.4 overrides */
.app-wrap { position: relative; }

/* Desktop: keep create button inside app width */
.floating-composer-btn {
  position: absolute !important;
  top: 12px !important;
  right: 12px !important;
  left: auto !important;
  bottom: auto !important;
  width: 58px !important;
  height: 58px !important;
  min-height: 58px !important;
  padding: 0 !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 999px !important;
}

.floating-composer-btn .fab-svg { width: 28px !important; height: 28px !important; display: block; }
.floating-composer-btn .fab-svg line { stroke: #000; stroke-width: 4.5; stroke-linecap: round; }
.floating-composer-btn:hover { transform: none !important; }
.floating-composer-btn:active { transform: scale(0.96) !important; }

@media (max-width: 760px) {
  .floating-composer-btn {
    position: fixed !important;
    top: calc(env(safe-area-inset-top) + 12px) !important;
    right: calc(env(safe-area-inset-right) + 12px) !important;
    left: auto !important;
    bottom: auto !important;
    width: 58px !important;
    height: 58px !important;
    min-height: 58px !important;
    padding: 0 !important;
  }
}

/* Keep lightbox nav dead center and stable */
.lightbox-nav {
  position: fixed !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 56px !important;
  height: 56px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 50% !important;
  background: rgba(0,0,0,0.62) !important;
  border: 1px solid rgba(255,255,255,0.14) !important;
  padding: 0 !important;
}
.lightbox-prev { left: 16px !important; right: auto !important; }
.lightbox-next { right: 16px !important; left: auto !important; }
.lightbox-nav:hover { background: rgba(0,0,0,0.78) !important; transform: translateY(-50%) !important; }
.lightbox-nav:active { transform: translateY(-50%) scale(0.96) !important; }
.lightbox-nav svg { width: 22px !important; height: 22px !important; display: block !important; }
@media (max-width: 760px) {
  .lightbox-nav { width: 60px !important; height: 60px !important; }
  .lightbox-nav svg { width: 24px !important; height: 24px !important; }
}

/* Delete now lives in action row */
.post-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.action-group {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.delete-btn {
  position: static !important;
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 10px 14px !important;
  border-radius: 12px !important;
  background: rgba(255,137,137,0.12) !important;
  color: #ffd4d4 !important;
  border: 1px solid rgba(255,137,137,0.25) !important;
  opacity: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
}
.delete-btn.confirming {
  background: #b42318 !important;
  color: #fff !important;
  min-width: 74px !important;
}
.delete-btn svg { display: none !important; }
@media (max-width: 760px) {
  .post-actions, .action-group { width: 100%; }
  .action-group button { flex: 0 0 auto; }
}

/* Mobile name field compact */
@media (max-width: 600px) {
  #nameInput { height: 36px; font-size: 14px; padding: 6px 8px; }
  .identity, .compact-identity { padding: 8px 10px !important; }
  .identity-bar { gap: 6px; }
  .field-error { margin-top: 4px; font-size: 12px; }
}


/* v4.9.6 consistency and mobile compact fixes */
.post-actions .action-group > button {
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1.1 !important;
  min-height: 40px;
  padding: 10px 14px !important;
}
.post-actions .delete-btn {
  font-size: 14px !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
}
@media (max-width: 760px) {
  .compact-identity {
    padding: 6px 10px !important;
  }
  .identity-bar {
    display: block !important;
  }
  #nameInput {
    display: block;
    width: 100%;
    height: 34px !important;
    min-height: 34px !important;
    padding: 4px 8px !important;
    font-size: 14px !important;
    line-height: 1.2 !important;
    margin: 0 !important;
  }
  #nameError {
    width: 100%;
    margin-top: 4px !important;
    font-size: 11px !important;
  }
}


/* v4.9.6 final action-row consistency and compact mobile name field */
.post-actions .action-group {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
}
.post-actions .action-group > .action-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 40px !important;
  padding: 10px 14px !important;
  margin: 0 !important;
  border-radius: 12px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1.1 !important;
  letter-spacing: 0 !important;
  white-space: nowrap !important;
}
.post-actions .delete-btn,
.post-actions .share-btn,
.post-actions .copy-btn {
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1.1 !important;
  padding: 10px 14px !important;
  margin: 0 !important;
}
.post-actions .delete-btn {
  min-width: 0 !important;
}
.post-actions .delete-btn.confirming {
  min-width: 74px !important;
}

@media (max-width: 760px) {
  .identity.card.compact-identity {
    padding: 8px 10px !important;
  }
  .identity-bar {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 4px !important;
    align-items: start !important;
  }
  #nameInput {
    display: block !important;
    width: 100% !important;
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    padding: 6px 10px !important;
    margin: 0 !important;
    font-size: 14px !important;
    line-height: 1.1 !important;
    border-radius: 10px !important;
  }
  #nameError {
    width: 100% !important;
    margin: 0 !important;
    font-size: 11px !important;
    line-height: 1.2 !important;
  }
}


/* v4.9.8 rich embeds */
.post-text a {
  color: var(--accent);
  text-decoration: underline;
  word-break: break-word;
}

.video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  margin-top: 10px;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255,255,255,0.04);
}

.video-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.tweet-embed {
  margin-top: 10px;
  overflow: hidden;
  border-radius: 14px;
}

.tweet-embed .twitter-tweet {
  margin: 0 !important;
}

.home-link { color: inherit; text-decoration: none; }
.home-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.back-to-feed-btn { text-decoration: none; }


/* v5.2.0 emoji support */
.emoji-toggle-btn {
  min-width: 44px;
  min-height: 44px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
}
.identity-bar .emoji-toggle-btn {
  flex: 0 0 auto;
}
.emoji-picker {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
}
.emoji-chip {
  min-height: 40px;
  padding: 0;
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text);
  font-size: 22px;
  display: grid;
  place-items: center;
}
.emoji-chip:hover {
  transform: none;
  background: rgba(255,255,255,0.1);
}
.emoji-chip:active {
  transform: scale(0.96);
}
@media (max-width: 760px) {
  .emoji-picker {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 6px;
    padding: 10px;
  }
  .emoji-chip {
    min-height: 38px;
    font-size: 20px;
  }
}


/* v5.2.3 simplified emoji picker */
.emoji-picker {
  display: grid;
  gap: 10px;
}
.emoji-picker.hidden {
  display: none !important;
}
.emoji-picker-head {
  display: flex;
  gap: 8px;
  align-items: center;
}
.emoji-search {
  min-width: 0;
  flex: 1 1 auto;
  margin: 0;
  min-height: 42px;
}
.emoji-close {
  min-width: 42px;
  min-height: 42px;
  padding: 0 12px;
}
.emoji-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
}
.emoji-tab {
  background: rgba(255,255,255,0.05);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  padding: 8px 12px;
  min-height: 38px;
  white-space: nowrap;
  font-weight: 700;
}
.emoji-tab.active {
  background: rgba(241,185,94,0.18);
  border-color: rgba(241,185,94,0.38);
  color: #fff4df;
}
.emoji-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
}
.emoji-empty {
  grid-column: 1 / -1;
  color: var(--muted);
  text-align: center;
  padding: 12px;
}
@media (max-width: 760px) {
  .emoji-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 6px;
  }
  .emoji-tab {
    padding: 7px 10px;
    min-height: 36px;
    font-size: 13px;
  }
}


/* v5.2.3 mobile width lock + simplified emoji picker */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}

.app-wrap, .app, .feed, .post, .post-card, .post-shell, .post-content, .post-text, .post-actions {
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.tweet-embed {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  border-radius: 14px;
}

.tweet-embed .twitter-tweet,
.tweet-embed .twitter-tweet-rendered,
.tweet-embed iframe {
  max-width: 100% !important;
  min-width: 0 !important;
  width: 100% !important;
  margin: 0 !important;
}

.composer {
  overflow: visible;
}

.emoji-picker {
  position: absolute;
  left: 12px;
  bottom: 74px;
  width: min(340px, calc(100% - 24px));
  height: 260px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #182235;
  box-shadow: 0 18px 42px rgba(0,0,0,0.38);
  z-index: 9600;
}

.emoji-picker.hidden {
  display: none !important;
}

.emoji-picker-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.emoji-grid-scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  padding-right: 4px;
}

.emoji-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.emoji-chip {
  min-height: 42px;
  padding: 0;
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text);
  font-size: 22px;
  display: grid;
  place-items: center;
}

@media (max-width: 760px) {
  .emoji-picker {
    left: 10px;
    right: 10px;
    width: auto;
    bottom: 72px;
    height: 248px;
  }

  .emoji-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 6px;
  }
}


/* v5.2.5 emoji + layout patch */
.identity-bar {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex-wrap: nowrap !important;
}
.identity-bar input {
  flex: 1 1 auto !important;
  min-width: 0 !important;
}
.composer-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 6px !important;
}
.composer-row {
  display: grid !important;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center !important;
  gap: 8px !important;
  margin-top: 0 !important;
}
#postButton {
  width: auto !important;
  margin: 0 !important;
}
.selected-file {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.composer-footer {
  margin-top: 0 !important;
}
.stats-grid {
  margin-top: 10px !important;
  margin-bottom: 10px !important;
}
.feed {
  margin-top: 0 !important;
}
.emoji-picker {
  position: relative !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: min(320px, 42vh) !important;
  margin-top: 0 !important;
  padding: 10px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  overflow: hidden !important;
  z-index: auto !important;
}
.emoji-picker.hidden {
  display: none !important;
}
.emoji-picker-headbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.emoji-picker-title {
  margin: 0;
}
.emoji-done-btn {
  min-height: 38px;
  padding: 8px 12px;
  white-space: nowrap;
}
.emoji-grid-scroll {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding-right: 2px;
}
.emoji-grid {
  grid-template-columns: repeat(8, minmax(0, 1fr)) !important;
  gap: 8px !important;
}
.emoji-chip {
  min-height: 44px !important;
  min-width: 0;
  touch-action: manipulation;
}
@media (max-width: 760px) {
  .identity.card.compact-identity {
    padding: 8px 10px !important;
  }
  .identity-bar {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 6px !important;
    flex-wrap: nowrap !important;
  }
  .identity-bar .emoji-toggle-btn {
    flex: 0 0 42px !important;
    width: 42px !important;
    min-width: 42px !important;
    min-height: 42px !important;
    padding: 0 !important;
  }
  .composer {
    width: calc(100% - 16px) !important;
    max-height: min(86vh, 820px) !important;
  }
  .composer-body {
    gap: 8px;
  }
  .composer-row {
    grid-template-columns: auto 1fr !important;
    align-items: stretch !important;
  }
  #emojiButton {
    grid-column: 1;
    grid-row: 1;
    width: 42px !important;
    min-width: 42px !important;
    min-height: 42px !important;
    padding: 0 !important;
  }
  .file-picker {
    grid-column: 2;
    grid-row: 1;
    width: 100%;
  }
  .selected-file {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  #postButton {
    grid-column: 1 / -1;
    grid-row: 3;
    width: 100% !important;
    margin: 0 !important;
  }
  .emoji-picker {
    max-height: min(300px, 40vh) !important;
    padding: 8px !important;
  }
  .emoji-picker-headbar {
    gap: 8px;
  }
  .emoji-done-btn {
    min-height: 36px;
    padding: 7px 10px;
  }
  .emoji-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }
  .emoji-chip {
    min-height: 42px !important;
    font-size: 20px !important;
  }
}


/* v5.2.6 safety + icon alignment */
.floating-composer-btn {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.floating-composer-btn .fab-icon {
  inset: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding-top: 1px !important;
}
.floating-composer-btn .fab-svg {
  display: block !important;
  margin: 0 !important;
}


/* v5.2.7 regression fixes */
.floating-composer-btn { position: absolute; }
.floating-composer-btn .fab-icon { position: absolute !important; inset: 0 !important; display: flex !important; align-items: center !important; justify-content: center !important; padding: 0 !important; margin: 0 !important; }
.floating-composer-btn .fab-plus { top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important; }
.floating-composer-btn .fab-svg { width: 28px !important; height: 28px !important; display: block !important; margin: 0 !important; transform: translateY(0) !important; }
.floating-composer-btn .fab-svg line { stroke: #000 !important; stroke-width: 4.5 !important; stroke-linecap: round !important; }
@media (max-width: 760px) { .floating-composer-btn { position: fixed !important; } }


/* v5.2.8 final polish */
.img-wrap {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 10px !important;
  background: rgba(255,255,255,0.035) !important;
}
.img {
  display: block !important;
  width: auto !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: min(72vh, 980px) !important;
  margin: 0 auto !important;
  object-fit: contain !important;
}
.post .img-wrap img {
  image-rendering: auto;
}
.floating-composer-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.floating-composer-btn .fab-icon {
  position: absolute !important;
  inset: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 0 !important;
}
.floating-composer-btn .fab-svg {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  width: 28px !important;
  height: 28px !important;
  margin: 0 !important;
  transform: translate(-50%, -50%) !important;
}
.floating-composer-btn .fab-svg line {
  stroke: #000 !important;
  stroke-width: 4.5 !important;
  stroke-linecap: round !important;
}
@media (max-width: 760px) {
  .img-wrap {
    padding: 8px !important;
  }
  .img {
    max-height: 62vh !important;
  }
  .floating-composer-btn .fab-svg {
    width: 26px !important;
    height: 26px !important;
  }
}


/* v5.2.9 emoji target + android keyboard fix */
.name-emoji-picker {
  margin-top: 10px !important;
  position: relative !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  width: 100% !important;
  max-width: 100% !important;
  max-height: min(300px, 40vh) !important;
  overflow: hidden !important;
  z-index: 1 !important;
}
.name-emoji-picker.hidden {
  display: none !important;
}
.name-emoji-picker .emoji-grid-scroll,
#emojiPicker .emoji-grid-scroll {
  overflow-y: auto !important;
  overflow-x: hidden !important;
}
@media (max-width: 760px) {
  .identity-bar {
    flex-direction: row !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
  }
  .identity-bar input {
    flex: 1 1 auto !important;
    min-width: 0 !important;
  }
  .identity-bar .emoji-toggle-btn {
    flex: 0 0 44px !important;
    width: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    align-self: center !important;
  }
}
.floating-composer-btn {
  position: fixed !important;
  display: grid !important;
  place-items: center !important;
  padding: 0 !important;
  line-height: 0 !important;
}
.floating-composer-btn .fab-icon,
.floating-composer-btn .fab-plus {
  position: static !important;
  inset: auto !important;
  width: 100% !important;
  height: 100% !important;
  display: grid !important;
  place-items: center !important;
  padding: 0 !important;
  margin: 0 !important;
  transform: none !important;
  line-height: 0 !important;
}
.floating-composer-btn .fab-svg {
  position: static !important;
  display: block !important;
  width: 28px !important;
  height: 28px !important;
  margin: 0 !important;
  transform: none !important;
}
.floating-composer-btn .fab-svg line {
  stroke: #000 !important;
  stroke-width: 4.5 !important;
  stroke-linecap: round !important;
}
@media (max-width: 760px) {
  .floating-composer-btn .fab-svg {
    width: 26px !important;
    height: 26px !important;
  }
}


/* v5.3.0 header containment fix */
.app-wrap { position: relative !important; }
.topbar { position: relative !important; }
.floating-composer-btn {
  position: absolute !important;
  top: 12px !important;
  right: 12px !important;
  left: auto !important;
  bottom: auto !important;
  width: 58px !important;
  height: 58px !important;
  min-height: 58px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  line-height: 0 !important;
  border-radius: 999px !important;
  transform: none !important;
}
.floating-composer-btn .fab-icon,
.floating-composer-btn .fab-plus {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 0 !important;
}
.floating-composer-btn .fab-svg {
  position: static !important;
  width: 28px !important;
  height: 28px !important;
  display: block !important;
  margin: 0 !important;
  transform: none !important;
}
.floating-composer-btn .fab-svg line {
  stroke: #000 !important;
  stroke-width: 4.5 !important;
  stroke-linecap: round !important;
}
@media (max-width: 760px) {
  .floating-composer-btn {
    position: fixed !important;
    top: calc(env(safe-area-inset-top) + 12px) !important;
    right: calc(env(safe-area-inset-right) + 12px) !important;
  }
  .floating-composer-btn .fab-svg {
    width: 26px !important;
    height: 26px !important;
  }
}


/* v5.3.1 plus icon true center fix */
.floating-composer-btn {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
}
.floating-composer-btn .fab-icon,
.floating-composer-btn .fab-plus {
  position: absolute !important;
  inset: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  line-height: 1 !important;
}
.floating-composer-btn .fab-svg {
  width: 28px !important;
  height: 28px !important;
  display: block !important;
  margin: 0 !important;
  transform: translateY(1px) !important;
  overflow: visible !important;
}
.floating-composer-btn .fab-svg line {
  stroke: #000 !important;
  stroke-width: 4.5 !important;
  stroke-linecap: round !important;
}
@media (max-width: 760px) {
  .floating-composer-btn .fab-svg {
    width: 26px !important;
    height: 26px !important;
    transform: translateY(1px) !important;
  }
}


/* v5.3.2 button centering + contained header spacing */
:root {
  --stack-gap: 10px;
}
.app-wrap {
  width: min(820px, calc(100% - 14px)) !important;
}
.hero-card {
  margin-bottom: var(--stack-gap) !important;
  padding-right: 82px !important;
}
.identity {
  margin-top: 0 !important;
}
.stats-grid {
  margin: var(--stack-gap) 0 !important;
}
.feed {
  gap: var(--stack-gap) !important;
}
.floating-composer-btn {
  position: absolute !important;
  top: 12px !important;
  right: 12px !important;
  left: auto !important;
  bottom: auto !important;
  width: 58px !important;
  height: 58px !important;
  min-height: 58px !important;
  padding: 0 !important;
  display: grid !important;
  place-items: center !important;
  line-height: 0 !important;
  transform: none !important;
}
.floating-composer-btn .fab-icon,
.floating-composer-btn .fab-plus,
.floating-composer-btn .fab-close {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  padding: 0 !important;
  margin: 0 !important;
}
.floating-composer-btn .fab-svg {
  opacity: 0 !important;
  width: 1px !important;
  height: 1px !important;
  pointer-events: none !important;
}
.floating-composer-btn::before,
.floating-composer-btn::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 26px;
  height: 4.6px;
  background: #000;
  border-radius: 999px;
  transform: translate(-50%, -50%);
}
.floating-composer-btn::after {
  transform: translate(-50%, -50%) rotate(90deg);
}
.floating-composer-btn.is-open::before {
  transform: translate(-50%, -50%) rotate(45deg);
}
.floating-composer-btn.is-open::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}
@media (max-width: 760px) {
  .hero-card {
    padding-right: 76px !important;
  }
  .floating-composer-btn {
    position: fixed !important;
    top: calc(env(safe-area-inset-top) + 12px) !important;
    right: calc(env(safe-area-inset-right) + 12px) !important;
    width: 56px !important;
    height: 56px !important;
    min-height: 56px !important;
  }
  .floating-composer-btn::before,
  .floating-composer-btn::after {
    width: 24px;
    height: 4.2px;
  }
}

/* v5.3.3 name gate + mobile close access fix */
body.composer-open .floating-composer-btn {
  opacity: 0 !important;
  pointer-events: none !important;
}

#composerBackdrop {
  z-index: 70 !important;
}

#composerCard {
  z-index: 80 !important;
}

@media (max-width: 760px) {
  #composerCard {
    top: max(92px, env(safe-area-inset-top, 0px) + 72px) !important;
    max-height: calc(100dvh - max(110px, env(safe-area-inset-top, 0px) + 90px)) !important;
  }
}


/* v5.3.4 mobile composer visibility + name space fix */
@media (max-width: 760px) {
  #composerCard {
    top: max(92px, env(safe-area-inset-top, 0px) + 72px) !important;
    display: flex !important;
    flex-direction: column !important;
    max-height: calc(100dvh - max(112px, env(safe-area-inset-top, 0px) + 92px)) !important;
  }

  #composerCard .composer-body {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding-right: 2px !important;
    max-height: 100% !important;
  }

  #postInput {
    position: sticky !important;
    top: 0 !important;
    z-index: 2 !important;
    background: rgba(8,14,24,0.96) !important;
    min-height: 112px !important;
  }

  #emojiPicker {
    order: 4 !important;
    max-height: min(210px, 28dvh) !important;
    margin-bottom: 2px !important;
  }

  #preview {
    max-height: 22dvh !important;
    object-fit: contain !important;
  }
}

#nameInput {
  white-space: pre-wrap;
}


/* v5.3.5 mobile emoji panel above actions fix */
@media (max-width: 760px) {
  #composerCard .composer-body {
    scroll-padding-top: 8px !important;
  }

  #postInput {
    order: 1 !important;
  }

  #emojiPicker {
    order: 2 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    max-height: min(200px, 26dvh) !important;
  }

  #composerCard .composer-row {
    order: 3 !important;
  }

  #preview {
    order: 4 !important;
  }

  #composerCard .composer-footer {
    order: 5 !important;
  }
}


/* v5.3.6 mobile text visibility fix */
@media (max-width: 760px) {
  #composerCard {
    max-height: calc(100dvh - max(108px, env(safe-area-inset-top, 0px) + 88px)) !important;
  }

  #composerCard .composer-body {
    display: flex !important;
    flex-direction: column !important;
    overflow-y: auto !important;
    max-height: 100% !important;
    scroll-padding-top: 12px !important;
    scroll-padding-bottom: 12px !important;
    overscroll-behavior: contain !important;
  }

  #postInput {
    order: 1 !important;
    min-height: 118px !important;
    scroll-margin-top: 12px !important;
    scroll-margin-bottom: 12px !important;
    flex: 0 0 auto !important;
  }

  #emojiPicker {
    order: 2 !important;
    flex: 0 0 auto !important;
    max-height: min(190px, 24dvh) !important;
  }

  #composerCard .composer-row {
    order: 3 !important;
    flex: 0 0 auto !important;
  }

  #preview {
    order: 4 !important;
    flex: 0 0 auto !important;
  }

  #composerCard .composer-footer {
    order: 5 !important;
    flex: 0 0 auto !important;
  }
}


/* v5.3.7 mobile composer visibility + cursor-aware emoji insertion */
@media (max-width: 760px) {
  #composerCard {
    top: max(88px, env(safe-area-inset-top, 0px) + 68px) !important;
    max-height: calc(100dvh - max(102px, env(safe-area-inset-top, 0px) + 82px)) !important;
  }

  #composerCard .composer-body {
    padding-top: 0 !important;
    align-content: start !important;
  }

  #postInput {
    position: sticky !important;
    top: 0 !important;
    z-index: 5 !important;
    margin-top: 0 !important;
    box-shadow: 0 1px 0 rgba(255,255,255,0.05) inset;
  }

  #emojiPicker {
    max-height: min(170px, 22dvh) !important;
  }
}


/* v5.3.9 mobile emoji drawer fix */
@media (max-width: 760px) {
  body.mobile-emoji-drawer-open {
    overflow: hidden !important;
  }

  body.mobile-emoji-drawer-open .composer-body {
    padding-bottom: calc(min(46svh, 380px) + 20px) !important;
  }

  #emojiPicker {
    display: flex;
  }

  #emojiPicker.hidden {
    display: none !important;
  }

  #emojiPicker:not(.hidden) {
    position: fixed !important;
    left: 10px !important;
    right: 10px !important;
    bottom: max(10px, env(safe-area-inset-bottom)) !important;
    width: auto !important;
    max-width: none !important;
    max-height: min(46svh, 380px) !important;
    min-height: min(34svh, 280px) !important;
    margin: 0 !important;
    padding: 10px !important;
    border-radius: 18px !important;
    background: linear-gradient(180deg, rgba(20,34,63,0.98), rgba(12,22,44,0.98)) !important;
    box-shadow: 0 -12px 34px rgba(0,0,0,0.38) !important;
    border: 1px solid rgba(255,255,255,0.08) !important;
    z-index: 10040 !important;
    backdrop-filter: blur(8px);
  }

  #emojiPicker .emoji-grid-scroll {
    flex: 1 1 auto !important;
    max-height: none !important;
    min-height: 0 !important;
  }

  #emojiPicker .emoji-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  #emojiPicker .emoji-chip {
    min-height: 48px !important;
    font-size: 24px !important;
  }

  #emojiPicker .emoji-picker-headbar {
    position: sticky;
    top: 0;
    z-index: 1;
    background: transparent;
  }

  #composerBody {
    scroll-padding-top: 8px;
  }
}


/* v5.3.10 mobile emoji drawer + stable composer fix */
.composer-emoji-picker {
  position: fixed !important;
  left: 12px;
  bottom: 84px;
  width: min(340px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  max-height: min(320px, 42vh) !important;
  z-index: 10040 !important;
}

body.mobile-emoji-drawer-open {
  overflow: hidden !important;
  overscroll-behavior: contain;
}

body.mobile-emoji-drawer-open .composer-body {
  padding-bottom: 0 !important;
}

@media (max-width: 760px) {
  .composer-emoji-picker {
    left: max(10px, env(safe-area-inset-left)) !important;
    right: max(10px, env(safe-area-inset-right)) !important;
    bottom: max(10px, env(safe-area-inset-bottom)) !important;
    top: auto !important;
    width: auto !important;
    max-width: none !important;
    min-height: min(34svh, 280px) !important;
    max-height: min(46svh, 380px) !important;
    padding: 10px !important;
    border-radius: 18px !important;
    background: linear-gradient(180deg, rgba(20,34,63,0.98), rgba(12,22,44,0.98)) !important;
    box-shadow: 0 -12px 34px rgba(0,0,0,0.38) !important;
    border: 1px solid rgba(255,255,255,0.08) !important;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .composer-emoji-picker .emoji-grid-scroll {
    flex: 1 1 auto !important;
    max-height: none !important;
    min-height: 0 !important;
  }

  .composer-emoji-picker .emoji-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .composer-emoji-picker .emoji-chip {
    min-height: 48px !important;
    font-size: 24px !important;
  }

  .composer-emoji-picker .emoji-picker-headbar {
    position: sticky;
    top: 0;
    z-index: 1;
    background: transparent;
  }
}


/* v5.3.11 mobile composer viewport fit + emoji drawer spacing fix */
:root {
  --mobile-vvh: 100dvh;
  --mobile-vw: 100vw;
  --mobile-composer-top: calc(env(safe-area-inset-top, 0px) + 8px);
  --mobile-composer-bottom: calc(env(safe-area-inset-bottom, 0px) + 8px);
  --mobile-emoji-drawer-height: min(42dvh, 360px);
}

@media (max-width: 760px) {
  #composerCard {
    top: var(--mobile-composer-top) !important;
    left: 8px !important;
    right: 8px !important;
    bottom: var(--mobile-composer-bottom) !important;
    width: auto !important;
    height: calc(var(--mobile-vvh) - var(--mobile-composer-top) - var(--mobile-composer-bottom)) !important;
    max-height: calc(var(--mobile-vvh) - var(--mobile-composer-top) - var(--mobile-composer-bottom)) !important;
    min-height: 0 !important;
    margin: 0 !important;
    transform: none !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }

  body.composer-open .composer,
  .composer.hidden {
    transform: none !important;
  }

  #composerCard .composer-sheet-head {
    position: sticky !important;
    top: 0 !important;
    z-index: 6 !important;
    background: #101827 !important;
    padding-bottom: 8px !important;
    margin-bottom: 0 !important;
  }

  #composerCard .composer-body {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
    scroll-padding-top: 8px !important;
  }

  #postInput {
    position: static !important;
    top: auto !important;
    min-height: 132px !important;
    margin: 0 !important;
  }

  body.mobile-emoji-drawer-open {
    overflow: hidden !important;
  }

  body.mobile-emoji-drawer-open #composerCard {
    height: calc(var(--mobile-vvh) - var(--mobile-composer-top) - var(--mobile-composer-bottom)) !important;
    max-height: calc(var(--mobile-vvh) - var(--mobile-composer-top) - var(--mobile-composer-bottom)) !important;
  }

  body.mobile-emoji-drawer-open #composerCard .composer-body {
    padding-bottom: calc(var(--mobile-emoji-drawer-height) + 14px) !important;
  }

  .composer-emoji-picker {
    bottom: var(--mobile-composer-bottom) !important;
  }

  .composer-emoji-picker:not(.hidden) {
    min-height: 0 !important;
    height: var(--mobile-emoji-drawer-height) !important;
    max-height: var(--mobile-emoji-drawer-height) !important;
  }
}


/* v5.4.0 comments */

.comment-toggle-btn { white-space: nowrap; }
.comments-block { margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,0.08); }
.comments-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.comments-title { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(226,232,240,0.78); }
.comments-close-btn { width: 38px; min-width: 38px; min-height: 38px; padding: 0; border-radius: 12px; background: rgba(255,255,255,0.05); color: var(--text); border: 1px solid var(--line); }
.comment-form { display: grid; gap: 10px; width: 100%; margin: 0 0 12px; padding: 0; box-sizing: border-box; }
.comment-input-wrap, .comment-form, .comment-form-row, .comment-form-actions, .comments-list, .comment-item { box-sizing: border-box; }
.comment-input { display: block; width: 100%; min-height: 86px; resize: vertical; margin: 0; padding: 12px 14px; border-radius: 14px; border: 1px solid rgba(255,255,255,0.12); background: rgba(8,12,20,0.78); color: #f8fafc; font: inherit; box-sizing: border-box; }
.comment-input:focus { outline: 2px solid rgba(96,165,250,0.5); outline-offset: 1px; }
.comment-form-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; width: 100%; margin: 0; }
.comment-toolbar-row { align-items: center; }
.comment-form-actions { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.comment-emoji-btn { min-width: 48px; padding-inline: 12px; }
.comment-note { font-size: 12px; color: rgba(226,232,240,0.66); margin: 0; }
.comments-list { display: grid; gap: 10px; margin: 0; }
.comment-item { width: 100%; margin: 0; padding: 10px 12px; border: 1px solid rgba(255,255,255,0.08); border-radius: 14px; background: rgba(255,255,255,0.03); }
.comment-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin-bottom: 6px; }
.comment-author { font-weight: 700; color: #f3f6ff; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.comment-meta { font-size: 12px; color: rgba(226,232,240,0.72); }
.comment-text { color: #dbe4f0; font-size: 14px; line-height: 1.5; word-break: break-word; }
.post-text a, .comment-text a, .post-text a:visited, .comment-text a:visited { color: var(--accent); }
.comment-you-badge { font-size: 10px; padding: 2px 6px; }
.comment-actions-row { margin-top: 10px; display: flex; justify-content: flex-end; }
.comments-empty { color: rgba(226,232,240,0.72); font-size: 14px; padding: 4px 2px; }
.comment-submit-btn[disabled] { opacity: 0.7; cursor: progress; }
@media (max-width: 760px) { .comment-head, .comment-form-row { align-items: flex-start; } .comment-meta { margin-left: auto; } .comment-input { min-height: 74px; } .comment-form-actions { width: 100%; justify-content: flex-end; } }



/* v5.4.6 desktop topbar two-div layout + sticky post button */
.app-topbar {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: stretch !important;
  column-gap: 14px !important;
  padding: 12px 14px !important;
  padding-right: 14px !important;
}
.app-topbar-title {
  display: flex !important;
  align-items: center !important;
  min-height: 58px !important;
  min-width: 0 !important;
}
.app-topbar-title .hero-copy {
  justify-self: auto !important;
  width: 100% !important;
}
.app-topbar-title h1,
.app-topbar-title .app-version {
  text-align: left !important;
}
.app-topbar-action {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 12px !important;
  min-height: 58px !important;
  position: relative !important;
}
.app-topbar .topbar-actions {
  width: auto !important;
  justify-content: flex-end !important;
  flex-wrap: nowrap !important;
}
.app-topbar .floating-composer-btn {
  position: relative !important;
  top: auto !important;
  right: auto !important;
  left: auto !important;
  bottom: auto !important;
  margin: 0 !important;
  flex: 0 0 auto !important;
}
@media (min-width: 761px) {
  .app-topbar {
    position: sticky !important;
    top: 8px !important;
    z-index: 60 !important;
  }
}
@media (max-width: 760px) {
  .app-topbar {
    grid-template-columns: 1fr !important;
    padding-right: 14px !important;
  }
  .app-topbar-title {
    min-height: 0 !important;
  }
  .app-topbar-title h1,
  .app-topbar-title .app-version {
    text-align: center !important;
  }
  .app-topbar-action {
    min-height: 0 !important;
    justify-content: flex-end !important;
  }
  .app-topbar .topbar-actions {
    justify-content: center !important;
    width: 100% !important;
  }
  .app-topbar .floating-composer-btn {
    position: fixed !important;
    top: calc(env(safe-area-inset-top) + 12px) !important;
    right: calc(env(safe-area-inset-right) + 12px) !important;
  }
}


/* v5.4.7 header stability fix */
.app-wrap,
.app,
.feed {
  overflow: visible !important;
}

.app-topbar {
  position: sticky !important;
  top: 8px !important;
  z-index: 1000 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  column-gap: 14px !important;
  overflow: visible !important;
}

.app-topbar-title {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 0 !important;
  min-height: 58px !important;
}

.app-topbar-title .hero-copy {
  width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
}

.app-topbar-title h1,
.app-topbar-title .app-version {
  width: 100% !important;
  text-align: center !important;
}

.app-topbar-action {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 12px !important;
  min-height: 58px !important;
  overflow: visible !important;
}

.app-topbar .topbar-actions {
  width: auto !important;
  justify-content: flex-end !important;
  flex-wrap: nowrap !important;
}

.app-topbar .floating-composer-btn {
  position: relative !important;
  top: auto !important;
  right: auto !important;
  left: auto !important;
  bottom: auto !important;
  margin: 0 !important;
  flex: 0 0 auto !important;
}

@media (max-width: 760px) {
  .app-topbar {
    top: calc(env(safe-area-inset-top) + 6px) !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    padding-right: 14px !important;
  }

  .app-topbar-title {
    min-height: 52px !important;
  }

  .app-topbar .topbar-actions {
    width: auto !important;
  }

  .app-topbar .floating-composer-btn {
    position: relative !important;
  }
}


/* v5.4.8 fixed sticky Post button only */
.app-topbar {
  position: relative !important;
}

.app-topbar-action {
  position: relative !important;
  min-width: 68px !important;
  min-height: 58px !important;
  overflow: visible !important;
}

.app-topbar .floating-composer-btn {
  position: fixed !important;
  top: calc(env(safe-area-inset-top) + 12px) !important;
  right: max(12px, calc((100vw - min(820px, calc(100% - 14px))) / 2 + 14px)) !important;
  left: auto !important;
  bottom: auto !important;
  margin: 0 !important;
  z-index: 1101 !important;
}

@media (max-width: 760px) {
  .app-topbar-action {
    min-width: 0 !important;
    min-height: 52px !important;
  }

  .app-topbar .floating-composer-btn {
    top: calc(env(safe-area-inset-top) + 12px) !important;
    right: calc(env(safe-area-inset-right) + 12px) !important;
  }
}


/* v5.4.14 true sticky via independent button layer */
.app-topbar-fab-anchor {
  display: none !important;
}

@media (min-width: 761px) {
  .app-wrap {
    overflow: visible !important;
  }

  .app-topbar-fab-anchor {
    position: sticky !important;
    top: calc(env(safe-area-inset-top, 0px) + 10px) !important;
    z-index: 1105 !important;
    display: flex !important;
    justify-content: flex-end !important;
    align-items: flex-start !important;
    height: 0 !important;
    margin: 0 !important;
    pointer-events: none !important;
    overflow: visible !important;
  }

  .app-topbar {
    position: relative !important;
    top: auto !important;
    z-index: 60 !important;
    margin-top: 10px !important;
    margin-bottom: 10px !important;
    padding-top: 14px !important;
    padding-right: 86px !important;
    padding-bottom: 14px !important;
  }

  .app-topbar-action {
    display: none !important;
  }

  .app-topbar-fab-anchor .floating-composer-btn {
    position: relative !important;
    top: 0 !important;
    right: 14px !important;
    left: auto !important;
    bottom: auto !important;
    margin: 10px 0 0 !important;
    z-index: 1106 !important;
    pointer-events: auto !important;
  }

  .app-topbar + .identity {
    margin-top: 0 !important;
  }
}

@media (max-width: 760px) {
  .app-topbar-fab-anchor {
    display: contents !important;
  }

  .app-topbar {
    margin-top: 6px !important;
    margin-bottom: 10px !important;
  }

  .app-topbar .app-topbar-action {
    display: none !important;
  }

  .app-topbar-fab-anchor .floating-composer-btn {
    position: fixed !important;
    top: calc(env(safe-area-inset-top) + 12px) !important;
    right: calc(env(safe-area-inset-right) + 12px) !important;
    left: auto !important;
    bottom: auto !important;
    z-index: 1106 !important;
  }
}


/* v5.4.15 desktop post button pinned while scrolling + changelog folder packaging */
@media (min-width: 761px) {
  .app-topbar-fab-anchor {
    display: contents !important;
    position: static !important;
    height: auto !important;
    margin: 0 !important;
    pointer-events: auto !important;
  }

  .app-topbar {
    margin-top: 10px !important;
    margin-bottom: 12px !important;
    padding-top: 14px !important;
    padding-right: 86px !important;
    padding-bottom: 14px !important;
  }

  .app-topbar-fab-anchor .floating-composer-btn {
    position: fixed !important;
    top: calc(env(safe-area-inset-top, 0px) + 26px) !important;
    right: max(16px, calc((100vw - min(820px, calc(100vw - 14px))) / 2 + 16px)) !important;
    left: auto !important;
    bottom: auto !important;
    margin: 0 !important;
    z-index: 1106 !important;
    pointer-events: auto !important;
  }
}


/* v5.4.16 normalized fixed header heights + consistent card spacing */
:root {
  --topbar-gap: var(--stack-gap, 10px);
  --topbar-height-desktop: 82px;
  --topbar-height-mobile: 74px;
  --topbar-inline-pad: 14px;
  --topbar-button-space: 86px;
}

.app-topbar,
.app-topbar-title,
.app-topbar-action,
.app-topbar .hero-copy {
  box-sizing: border-box !important;
}

@media (min-width: 761px) {
  .app-topbar {
    height: var(--topbar-height-desktop) !important;
    min-height: var(--topbar-height-desktop) !important;
    max-height: var(--topbar-height-desktop) !important;
    margin-top: var(--topbar-gap) !important;
    margin-bottom: var(--topbar-gap) !important;
    padding: 0 var(--topbar-button-space) 0 var(--topbar-inline-pad) !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
  }

  .app-topbar-title,
  .app-topbar-action {
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    align-self: stretch !important;
  }

  .app-topbar-title {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
  }

  .app-topbar .hero-copy {
    min-height: 100% !important;
    height: 100% !important;
    justify-content: center !important;
    gap: 4px !important;
  }

  .app-topbar-fab-anchor .floating-composer-btn {
    top: calc(env(safe-area-inset-top, 0px) + 22px) !important;
    right: max(14px, calc((100vw - min(820px, calc(100vw - 14px))) / 2 + 14px)) !important;
  }
}

@media (max-width: 760px) {
  .app-topbar {
    height: var(--topbar-height-mobile) !important;
    min-height: var(--topbar-height-mobile) !important;
    max-height: var(--topbar-height-mobile) !important;
    margin-top: 10px !important;
    margin-bottom: var(--topbar-gap) !important;
    padding: 0 72px 0 12px !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
  }

  .app-topbar-title,
  .app-topbar-action {
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    align-self: stretch !important;
  }

  .app-topbar-title {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
  }

  .app-topbar .hero-copy {
    min-height: 100% !important;
    height: 100% !important;
    justify-content: center !important;
    gap: 4px !important;
  }

  .app-topbar-fab-anchor .floating-composer-btn {
    top: calc(env(safe-area-inset-top) + 16px) !important;
    right: calc(env(safe-area-inset-right) + 12px) !important;
  }
}


/* v5.4.17 header uses same card system as rest of app */
:root {
  --topbar-stack-gap: 10px;
  --topbar-desktop-height: 86px;
  --topbar-mobile-height: 78px;
  --topbar-pad-x-desktop: 14px;
  --topbar-pad-x-mobile: 12px;
  --topbar-button-buffer-desktop: 86px;
  --topbar-button-buffer-mobile: 74px;
}

.app-topbar {
  width: 100% !important;
  max-width: 100% !important;
  margin: var(--topbar-stack-gap) 0 !important;
  box-sizing: border-box !important;
  overflow: visible !important;
}

.app-topbar-action {
  display: none !important;
}

.app-topbar-title {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-height: none !important;
  padding: 0 !important;
}

.app-topbar .hero-copy {
  width: 100% !important;
  min-height: 0 !important;
  height: auto !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
}

@media (min-width: 761px) {
  .app-topbar {
    display: block !important;
    height: var(--topbar-desktop-height) !important;
    min-height: var(--topbar-desktop-height) !important;
    max-height: var(--topbar-desktop-height) !important;
    padding: 12px var(--topbar-button-buffer-desktop) 12px var(--topbar-pad-x-desktop) !important;
  }

  .app-topbar-title {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 100% !important;
  }

  .app-topbar-fab-anchor .floating-composer-btn {
    top: calc(env(safe-area-inset-top, 0px) + 18px) !important;
    right: max(14px, calc((100vw - min(820px, calc(100% - 14px))) / 2 + 14px)) !important;
  }
}

@media (max-width: 760px) {
  .app-topbar {
    display: block !important;
    height: var(--topbar-mobile-height) !important;
    min-height: var(--topbar-mobile-height) !important;
    max-height: var(--topbar-mobile-height) !important;
    margin: 10px 0 !important;
    padding: 10px var(--topbar-button-buffer-mobile) 10px var(--topbar-pad-x-mobile) !important;
  }

  .app-topbar-title {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 100% !important;
  }

  .app-topbar-fab-anchor .floating-composer-btn {
    top: calc(env(safe-area-inset-top, 0px) + 12px) !important;
    right: calc(env(safe-area-inset-right, 0px) + 12px) !important;
  }
}


/* v5.4.18 true fixed header height + fixed margins */
:root {
  --topbar-fixed-gap-desktop: 10px;
  --topbar-fixed-gap-mobile: 10px;
  --topbar-fixed-height-desktop: 86px;
  --topbar-fixed-height-mobile: 78px;
  --topbar-fixed-pad-left-desktop: 14px;
  --topbar-fixed-pad-right-desktop: 86px;
  --topbar-fixed-pad-left-mobile: 12px;
  --topbar-fixed-pad-right-mobile: 74px;
}

.app-topbar {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  overflow: visible !important;
}

.app-topbar-title,
.app-topbar .hero-copy {
  box-sizing: border-box !important;
  width: 100% !important;
}

@media (min-width: 761px) {
  .app-topbar {
    display: block !important;
    height: var(--topbar-fixed-height-desktop) !important;
    min-height: var(--topbar-fixed-height-desktop) !important;
    max-height: var(--topbar-fixed-height-desktop) !important;
    margin-top: var(--topbar-fixed-gap-desktop) !important;
    margin-bottom: var(--topbar-fixed-gap-desktop) !important;
    padding: 0 var(--topbar-fixed-pad-right-desktop) 0 var(--topbar-fixed-pad-left-desktop) !important;
  }

  .app-topbar-title {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 100% !important;
    min-height: 100% !important;
    max-height: 100% !important;
    padding: 0 !important;
  }

  .app-topbar .hero-copy {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    height: 100% !important;
    min-height: 100% !important;
    max-height: 100% !important;
    gap: 4px !important;
    padding: 0 !important;
    margin: 0 !important;
  }
}

@media (max-width: 760px) {
  .app-topbar {
    display: block !important;
    height: var(--topbar-fixed-height-mobile) !important;
    min-height: var(--topbar-fixed-height-mobile) !important;
    max-height: var(--topbar-fixed-height-mobile) !important;
    margin-top: var(--topbar-fixed-gap-mobile) !important;
    margin-bottom: var(--topbar-fixed-gap-mobile) !important;
    padding: 0 var(--topbar-fixed-pad-right-mobile) 0 var(--topbar-fixed-pad-left-mobile) !important;
  }

  .app-topbar-title {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 100% !important;
    min-height: 100% !important;
    max-height: 100% !important;
    padding: 0 !important;
  }

  .app-topbar .hero-copy {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    height: 100% !important;
    min-height: 100% !important;
    max-height: 100% !important;
    gap: 4px !important;
    padding: 0 !important;
    margin: 0 !important;
  }
}


/* v5.4.19 DreamAI red/black theme override */
:root {
  --bg: #050505;
  --panel: #111111;
  --panel-2: #1a1a1a;
  --line: rgba(255,255,255,0.08);
  --text: #f5f5f7;
  --muted: #b9b9c7;
  --accent: #ff0000;
  --accent-2: #ff4d4d;
  --danger: #ff9d9d;
  --good: #9ff7c5;
  --shadow: 0 20px 50px rgba(0,0,0,0.5);
  --radius: 22px;
}

html, body {
  background: radial-gradient(circle at top, rgba(255,0,0,0.16), transparent 30%), linear-gradient(180deg, #0a0a0a 0%, var(--bg) 100%);
}

.app-wrap {
  width: min(860px, calc(100% - 16px));
  margin: 10px auto 24px;
}

.card, .mini-card, .composer {
  background: linear-gradient(180deg, rgba(26,26,26,0.97), rgba(17,17,17,0.96));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.hero-card {
  padding: 18px 18px 16px;
  background: linear-gradient(180deg, rgba(255,0,0,0.18), rgba(255,0,0,0.03));
}

.brand-badge-wrap {
  margin-bottom: 10px;
}

.brand-badge {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  text-decoration: none;
  background: rgba(255,0,0,0.2);
  border: 1px solid rgba(255,0,0,0.4);
  color: #ffb3b3;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-badge:hover {
  box-shadow: 0 0 18px rgba(255,0,0,0.18);
}

h1 {
  font-size: clamp(28px, 5.4vw, 46px);
}

.app-version {
  color: #ffb3b3;
  opacity: 0.95;
}

input, textarea {
  background: rgba(10,10,10,0.88);
  border: 1px solid rgba(255,255,255,0.09);
  color: var(--text);
}

input:focus, textarea:focus {
  border-color: rgba(255,0,0,0.48);
  box-shadow: 0 0 0 4px rgba(255,0,0,0.12);
}

button {
  background: rgba(255,0,0,0.2);
  color: #fff;
  border: 1px solid rgba(255,0,0,0.38);
  box-shadow: none;
}

button:hover {
  background: rgba(255,0,0,0.28);
}

.secondary-btn, .file-picker {
  background: rgba(255,255,255,0.04);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.10);
}

.secondary-btn:hover, .file-picker:hover {
  border-color: rgba(255,0,0,0.38);
}

#postButton, .floating-composer-btn {
  background: #ff0000;
  border: 1px solid rgba(255,0,0,0.6);
  color: #fff;
}

.fab-svg line {
  stroke: #fff;
}

.floating-composer-btn {
  box-shadow: 0 18px 42px rgba(0,0,0,0.35), 0 0 0 1px rgba(255,255,255,0.08) inset;
}

.composer-backdrop {
  background: rgba(0,0,0,0.76);
  backdrop-filter: blur(6px);
}

.composer {
  background: linear-gradient(180deg, rgba(26,26,26,0.99), rgba(14,14,14,0.98));
  border: 1px solid rgba(255,255,255,0.08);
}

.mini-card {
  background: linear-gradient(180deg, rgba(26,26,26,0.94), rgba(17,17,17,0.94));
}

.mini-value {
  color: #fff;
}

.post {
  background: linear-gradient(180deg, rgba(26,26,26,0.95), rgba(17,17,17,0.95));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 22px;
}

.post.flash {
  animation: flashCardRed 1.4s ease;
}

@keyframes flashCardRed {
  0% { box-shadow: 0 0 0 0 rgba(255,0,0,0.42), var(--shadow);}
  100% { box-shadow: var(--shadow);}
}

.avatar {
  background: linear-gradient(135deg, #ff0000, #990000) !important;
}

.share-btn {
  background: rgba(255,255,255,0.04);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.10);
}

.delete-btn {
  background: rgba(255,0,0,0.14);
  color: #ffd4d4;
  border: 1px solid rgba(255,0,0,0.26);
}

.you-badge {
  background: #ff0000;
  color: #fff;
}

.img-wrap {
  background: rgba(255,255,255,0.02);
}

.img-badge, .sync-badge {
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(255,255,255,0.12);
}

.lightbox {
  background: rgba(0,0,0,0.96);
}

.lightbox-close, .lightbox-nav {
  background: rgba(255,0,0,0.15);
  border: 1px solid rgba(255,0,0,0.35);
}

@media (max-width: 760px) {
  .hero-card {
    padding: 16px 14px 14px;
  }

  h1 {
    font-size: clamp(32px, 8vw, 40px);
  }

  .app-version, .mini-label, .meta, .time, .tagline, .helper-text, .status {
    font-size: 13px;
  }

  .mini-value {
    font-size: 16px;
  }

  input, textarea, button, .file-picker, .selected-file, .author, .post-text {
    font-size: 16px;
  }
}


/* v5.4.20 mobile title sizing + dedicated DreamAI link box + fresher app shell updates */
.brand-link-box {
  display: flex;
  justify-content: center;
  width: 100%;
  margin: 0 0 8px;
}

.brand-badge-wrap {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-bottom: 0;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
}

@media (max-width: 760px) {
  :root {
    --topbar-fixed-height-mobile: 96px;
    --topbar-fixed-gap-mobile: 14px;
    --topbar-fixed-pad-left-mobile: 12px;
    --topbar-fixed-pad-right-mobile: 74px;
  }

  .app-wrap {
    width: min(860px, calc(100% - 12px));
    margin-top: 12px;
  }

  .app-topbar {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
  }

  .app-topbar .hero-copy {
    gap: 6px !important;
  }

  .brand-link-box {
    margin: 0 0 4px;
    padding-top: 2px;
  }

  .brand-badge {
    padding: 7px 12px;
    font-size: 11px;
    letter-spacing: 0.07em;
  }

  .app-topbar-title h1 {
    font-size: clamp(20px, 7vw, 28px) !important;
    line-height: 1.05 !important;
    margin: 0 !important;
  }

  .app-version {
    margin-top: 2px;
    font-size: 9px;
    letter-spacing: 0.18em;
  }
}


/* v5.4.25 slightly smaller title */
.app-topbar-title h1 {
  font-size: clamp(24px, 4.2vw, 38px) !important;
}

@media (max-width: 760px) {
  .app-topbar-title h1 {
    font-size: clamp(18px, 5.8vw, 24px) !important;
    line-height: 1.08 !important;
  }
}


/* v5.4.25 custom favicon set */
@media (max-width: 760px) {
  :root {
    --mobile-composer-top: calc(env(safe-area-inset-top, 0px) + 126px);
    --mobile-composer-bottom: calc(env(safe-area-inset-bottom, 0px) + 8px);
  }

  #composerCard .composer-body {
    scroll-padding-top: 12px !important;
  }

  #postInput {
    min-height: 140px !important;
  }
}


.post-edit-shell { margin: 12px 0; display: grid; gap: 10px; }
.post-edit-input { min-height: 120px; }
.post-edit-note { font-size: 13px; line-height: 1.4; color: var(--muted, rgba(255,255,255,0.7)); }
.post-edit-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.edit-btn { background: rgba(134,211,255,0.10); border: 1px solid rgba(134,211,255,0.22); }


/* v5.4.27 DreamAI.pro back-link + footer alignment */
.desktop-brand-link-box {
  margin: 0 0 10px;
}

.mobile-brand-link-box {
  display: none;
  margin: 0 0 8px;
}

.brand-link-box {
  justify-content: center;
}

.brand-badge {
  min-width: 148px;
  min-height: 38px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255,0,0,0.2);
  border: 1px solid rgba(255,0,0,0.42);
  color: #ffb3b3;
  text-decoration: none;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.02) inset;
}

.brand-badge:hover {
  background: rgba(255,0,0,0.24);
}

.site-footer {
  width: 100%;
  padding: 10px 8px 2px;
  text-align: center;
}

.site-footer-copy {
  color: #ffb3b3;
  opacity: 0.9;
  font-size: 12px;
  line-height: 1.45;
  letter-spacing: 0.04em;
}

@media (max-width: 760px) {
  .desktop-brand-link-box {
    display: none;
  }

  .mobile-brand-link-box {
    display: flex;
    width: 100%;
    margin: 0 0 6px;
  }

  .mobile-brand-link-box .brand-badge {
    min-width: 0;
    min-height: 32px;
    padding: 6px 12px;
    font-size: 10px;
    letter-spacing: 0.08em;
  }

  .app-topbar {
    height: auto !important;
    min-height: var(--topbar-fixed-height-mobile) !important;
    max-height: none !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
  }

  .app-topbar-title {
    gap: 6px !important;
  }

  .site-footer {
    padding-top: 12px;
    padding-bottom: 2px;
  }

  .site-footer-copy {
    font-size: 11px;
  }
}

@media (min-width: 761px) {
  .mobile-brand-link-box {
    display: none !important;
  }
}


/* v5.4.28 main-site-matched hero header */
.hero-brand-link-box {
  margin: 0 0 12px;
}

.app-hero-shell {
  display: block !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  padding: 22px 20px 18px !important;
  overflow: hidden !important;
  background: linear-gradient(180deg, rgba(255,0,0,0.20), rgba(255,0,0,0.05)) !important;
}

.app-hero-title {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 18px !important;
  width: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  height: auto !important;
  padding: 0 !important;
}

.hero-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 16px 36px rgba(0,0,0,0.38);
}

.app-hero-copy {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: center !important;
  width: auto !important;
  min-width: 0 !important;
  height: auto !important;
  gap: 8px !important;
  text-align: left !important;
  margin: 0 !important;
}

.app-hero-copy h1 {
  margin: 0 !important;
  font-size: clamp(30px, 4.8vw, 48px) !important;
  line-height: 1.04 !important;
  text-align: left !important;
}

.hero-subtitle {
  margin: 0 !important;
  font-size: clamp(14px, 2vw, 18px);
  line-height: 1.45;
  color: #f2d7d7;
  max-width: 46ch;
}

.hero-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-mode-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(0,0,0,0.32);
  border: 1px solid rgba(255,255,255,0.14);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.app-hero-shell .app-version {
  display: block;
  width: 100%;
  margin-top: 10px !important;
  text-align: center !important;
  color: #ffb3b3;
}

@media (max-width: 760px) {
  .hero-brand-link-box {
    margin-bottom: 10px;
  }

  .app-hero-shell {
    padding: 16px 14px 14px !important;
  }

  .app-hero-title {
    flex-direction: column !important;
    align-items: center !important;
    gap: 12px !important;
  }

  .hero-avatar {
    width: 82px;
    height: 82px;
  }

  .app-hero-copy {
    align-items: center !important;
    text-align: center !important;
    width: 100% !important;
  }

  .app-hero-copy h1,
  .hero-subtitle,
  .app-hero-shell .app-version {
    text-align: center !important;
  }

  .app-hero-copy h1 {
    font-size: clamp(26px, 7.6vw, 36px) !important;
  }

  .hero-subtitle {
    font-size: 14px;
    max-width: 28ch;
  }

  .hero-meta-row {
    justify-content: center;
  }
}


/* v5.4.32 mobile header/title fit + composer clearance */
.app-hero-copy h1 {
  text-transform: none !important;
}

@media (max-width: 760px) {
  .app-hero-shell {
    padding: 14px 12px 12px !important;
  }

  .app-hero-title {
    gap: 10px !important;
  }

  .hero-avatar {
    width: 72px;
    height: 72px;
  }

  .app-hero-copy {
    gap: 6px !important;
  }

  .app-hero-copy h1 {
    font-size: clamp(19px, 5.2vw, 26px) !important;
    line-height: 1.08 !important;
    white-space: nowrap !important;
    letter-spacing: 0.01em !important;
  }

  .hero-subtitle {
    max-width: 24ch;
    font-size: 13px;
    line-height: 1.35;
  }

  .app-hero-shell .app-version {
    margin-top: 8px !important;
  }

  :root {
    --mobile-composer-top: 88px;
  }

  #composerCard {
    top: var(--mobile-composer-top) !important;
    bottom: max(10px, env(safe-area-inset-bottom, 0px) + 10px) !important;
    height: auto !important;
    max-height: calc(var(--mobile-vvh, 100dvh) - var(--mobile-composer-top) - max(10px, env(safe-area-inset-bottom, 0px) + 10px)) !important;
  }

  #composerCard .composer-body {
    padding-top: 2px !important;
    scroll-padding-top: 6px !important;
  }

  #postInput {
    position: relative !important;
    top: 0 !important;
    min-height: 108px !important;
    margin-top: 0 !important;
  }
}


/* v5.4.32 inline accordion composer + root avatar */
.app-hero-copy h1 {
  white-space: nowrap !important;
}

.composer-accordion {
  margin-top: 14px;
  padding: 12px;
  overflow: hidden;
}

.composer-accordion-toggle {
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 16px;
  background: #ff0000;
  border: 1px solid rgba(255,0,0,0.65);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: none;
}

.composer-toggle-text {
  flex: 1 1 auto;
  text-align: center;
}

.composer-toggle-icon {
  flex: 0 0 auto;
  font-size: 28px;
  line-height: 1;
  transition: transform .2s ease;
}

.composer-accordion.is-open .composer-toggle-icon {
  transform: rotate(45deg);
}

.composer-accordion .composer-body {
  padding-top: 12px;
}

.composer-accordion.collapsed .composer-body.hidden {
  display: none;
}

#composerCard, #composerBackdrop, .composer-backdrop, .floating-composer-btn, .app-topbar-fab-anchor {
  display: none !important;
}

#composerCard.composer-accordion {
  display: block !important;
}

.composer-accordion-toggle.pulse {
  animation: fabPulse .6s ease;
}

@media (max-width: 760px) {
  .hero-avatar {
    width: 64px;
    height: 64px;
  }

  .app-hero-copy h1 {
    font-size: clamp(16px, 4.9vw, 21px) !important;
    line-height: 1.04 !important;
    letter-spacing: 0 !important;
  }

  .hero-subtitle {
    max-width: 30ch;
    font-size: 12px;
  }

  .composer-accordion {
    padding: 10px;
    margin-top: 12px;
  }

  .composer-accordion-toggle {
    min-height: 48px;
    padding: 10px 14px;
    font-size: 17px;
  }

  .composer-toggle-icon {
    font-size: 25px;
  }

  #postInput {
    min-height: 124px !important;
  }
}


/* v5.4.33 force visible inline Create Post bar */
#composerCard.composer-accordion {
  display: block !important;
  position: relative !important;
  inset: auto !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: none !important;
  margin: 12px 0 0 !important;
  padding: 12px !important;
  overflow: visible !important;
  z-index: 2 !important;
}

#composerCard.composer-accordion .composer-accordion-toggle {
  appearance: none !important;
  -webkit-appearance: none !important;
  display: flex !important;
  width: 100% !important;
  min-height: 54px !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 12px 16px !important;
  border: 1px solid #8f0000 !important;
  border-radius: 16px !important;
  background: linear-gradient(180deg, #ff2a2a 0%, #d90000 100%) !important;
  color: #ffffff !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.14), 0 8px 18px rgba(217,0,0,0.24) !important;
  visibility: visible !important;
  opacity: 1 !important;
}

#composerCard.composer-accordion .composer-toggle-text {
  display: block !important;
  width: 100% !important;
  text-align: center !important;
  font-size: 18px !important;
  font-weight: 900 !important;
  letter-spacing: 0.03em !important;
  color: #fff !important;
}

#composerCard.composer-accordion .composer-toggle-icon {
  flex: 0 0 auto !important;
  font-size: 28px !important;
  font-weight: 900 !important;
  color: #fff !important;
}

#composerBackdrop,
.composer-backdrop,
.floating-composer-btn,
.app-topbar-fab-anchor {
  display: none !important;
}

@media (max-width: 760px) {
  #composerCard.composer-accordion {
    margin-top: 10px !important;
    padding: 10px !important;
  }

  #composerCard.composer-accordion .composer-accordion-toggle {
    min-height: 50px !important;
    padding: 10px 14px !important;
  }

  #composerCard.composer-accordion .composer-toggle-text {
    font-size: 17px !important;
  }
}


/* v5.4.35 stable Create Post accordion */
#composerCard.composer-accordion {
  display: block !important;
  position: relative !important;
  inset: auto !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 12px 0 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

#composerCard.composer-accordion.collapsed {
  padding: 0 !important;
}

#composerCard.composer-accordion .composer-accordion-toggle {
  appearance: none !important;
  -webkit-appearance: none !important;
  display: flex !important;
  width: 100% !important;
  min-height: 56px !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  margin: 0 !important;
  padding: 14px 18px !important;
  border: 1px solid #7e0000 !important;
  border-radius: 18px !important;
  background: linear-gradient(180deg, #ff2424 0%, #d80000 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 10px 22px rgba(216, 0, 0, 0.24), inset 0 1px 0 rgba(255,255,255,0.12) !important;
  visibility: visible !important;
  opacity: 1 !important;
  cursor: pointer !important;
}

#composerCard.composer-accordion.is-open .composer-accordion-toggle {
  display: none !important;
}

#composerCard.composer-accordion .composer-toggle-text {
  flex: 0 1 auto !important;
  display: block !important;
  text-align: center !important;
  font-size: 18px !important;
  line-height: 1.1 !important;
  font-weight: 900 !important;
  letter-spacing: 0.03em !important;
  color: #fff !important;
}

#composerCard.composer-accordion .composer-toggle-icon {
  display: none !important;
}

#composerCard.composer-accordion .composer-body {
  display: block !important;
  margin-top: 0 !important;
  padding: 14px !important;
  border-radius: 20px !important;
  border: 1px solid var(--line) !important;
  background: var(--panel) !important;
  box-shadow: var(--shadow) !important;
}

#composerCard.composer-accordion .composer-body.hidden {
  display: none !important;
}

#composerBackdrop,
.composer-backdrop,
.floating-composer-btn,
.app-topbar-fab-anchor {
  display: none !important;
}

@media (max-width: 760px) {
  #composerCard.composer-accordion {
    margin-top: 10px !important;
  }

  #composerCard.composer-accordion .composer-accordion-toggle {
    min-height: 52px !important;
    padding: 12px 14px !important;
    border-radius: 16px !important;
  }

  #composerCard.composer-accordion .composer-toggle-text {
    font-size: 17px !important;
  }

  #composerCard.composer-accordion .composer-body {
    padding: 12px !important;
  }
}


/* v5.4.36 header true-centering override */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}

.app-wrap {
  overflow-x: hidden;
}

.topbar.card.hero-card.app-topbar.app-hero-shell {
  display: grid !important;
  grid-template-columns: minmax(72px, 92px) minmax(0, 1fr) minmax(72px, 92px) !important;
  align-items: center !important;
  gap: 16px !important;
  padding: 16px 18px !important;
}

.topbar.card.hero-card.app-topbar.app-hero-shell .hero-side {
  min-width: 72px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.topbar.card.hero-card.app-topbar.app-hero-shell .hero-side-right {
  visibility: hidden;
}

.topbar.card.hero-card.app-topbar.app-hero-shell .hero-center {
  min-width: 0;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.topbar.card.hero-card.app-topbar.app-hero-shell .hero-avatar {
  width: 72px !important;
  height: 72px !important;
  border-radius: 50% !important;
  object-fit: cover;
  display: block;
  margin: 0 auto;
}

.topbar.card.hero-card.app-topbar.app-hero-shell h1,
.topbar.card.hero-card.app-topbar.app-hero-shell .hero-subtitle,
.topbar.card.hero-card.app-topbar.app-hero-shell .app-version {
  width: 100%;
  text-align: center !important;
  margin-left: auto;
  margin-right: auto;
}

.topbar.card.hero-card.app-topbar.app-hero-shell h1 {
  margin: 0;
  font-size: clamp(28px, 4.2vw, 34px) !important;
  line-height: 1.05;
}

.topbar.card.hero-card.app-topbar.app-hero-shell .hero-subtitle {
  margin-top: 6px;
  font-size: clamp(16px, 2vw, 18px);
}

.topbar.card.hero-card.app-topbar.app-hero-shell .app-version {
  margin-top: 10px;
  font-size: 12px;
  letter-spacing: 0.18em;
}

@media (max-width: 760px) {
  .topbar.card.hero-card.app-topbar.app-hero-shell {
    grid-template-columns: 60px minmax(0, 1fr) 60px !important;
    gap: 10px !important;
    padding: 14px 12px !important;
  }

  .topbar.card.hero-card.app-topbar.app-hero-shell .hero-side {
    min-width: 60px;
  }

  .topbar.card.hero-card.app-topbar.app-hero-shell .hero-avatar {
    width: 54px !important;
    height: 54px !important;
  }

  .topbar.card.hero-card.app-topbar.app-hero-shell h1 {
    font-size: clamp(20px, 7vw, 24px) !important;
    line-height: 1.08;
    white-space: nowrap;
  }

  .topbar.card.hero-card.app-topbar.app-hero-shell .hero-subtitle {
    font-size: 13px;
    line-height: 1.35;
  }

  .topbar.card.hero-card.app-topbar.app-hero-shell .app-version {
    font-size: 11px;
  }
}


/* v5.4.41 stable visible Create Post trigger + inline accordion */
#createPostBar,
.create-post-trigger {
  appearance: none !important;
  -webkit-appearance: none !important;
}

.create-post-trigger-wrap {
  margin-top: 12px;
}

#createPostBar.create-post-trigger {
  display: flex !important;
  width: 100% !important;
  min-height: 56px !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 14px 18px !important;
  border-radius: 18px !important;
  border: 1px solid #7e0000 !important;
  background: linear-gradient(180deg, #ff2424 0%, #d80000 100%) !important;
  color: #fff !important;
  font-size: 18px !important;
  font-weight: 900 !important;
  letter-spacing: 0.03em !important;
  box-shadow: 0 10px 22px rgba(216, 0, 0, 0.24), inset 0 1px 0 rgba(255,255,255,0.12) !important;
  cursor: pointer !important;
  visibility: visible !important;
  opacity: 1 !important;
}

#createPostBar.create-post-trigger.hidden {
  display: none !important;
}

#createPostBar.create-post-trigger:hover {
  filter: brightness(1.03);
}

#composerCard.composer-inline {
  display: block !important;
  position: relative !important;
  inset: auto !important;
  margin-top: 12px !important;
  padding: 14px !important;
  overflow: visible !important;
}

#composerCard.composer-inline.hidden {
  display: none !important;
}

#composerCard.composer-inline .composer-inline-body {
  padding-top: 0 !important;
}

#composerCard.composer-inline #postInput {
  min-height: 128px !important;
}

#composerAccordionToggle {
  display: none !important;
}

@media (max-width: 760px) {
  .create-post-trigger-wrap {
    margin-top: 10px;
  }

  #createPostBar.create-post-trigger {
    min-height: 52px !important;
    padding: 12px 14px !important;
    font-size: 17px !important;
    border-radius: 16px !important;
  }

  #composerCard.composer-inline {
    margin-top: 10px !important;
    padding: 12px !important;
  }

  #composerCard.composer-inline #postInput {
    min-height: 120px !important;
  }
}


/* v5.4.41 hard reset for inline Create Post accordion */
html, body {
  max-width: 100%;
  overflow-x: hidden !important;
}

.app-wrap {
  overflow-x: clip;
}

.create-post-trigger-wrap {
  width: 100%;
  margin: 12px 0 0 !important;
}

#createPostBar.create-post-trigger {
  position: relative !important;
  inset: auto !important;
  transform: none !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  bottom: auto !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  z-index: 2 !important;
}

#composerCard.composer-inline,
#composerCard.composer-inline.card {
  position: relative !important;
  inset: auto !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  bottom: auto !important;
  transform: none !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 12px 0 0 !important;
  padding: 14px !important;
  z-index: 1 !important;
  overflow: hidden !important;
}

#composerCard.composer-inline.hidden {
  display: none !important;
}

#composerCard.composer-inline .composer-inline-body,
#composerCard.composer-inline .composer-body {
  position: static !important;
  inset: auto !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  bottom: auto !important;
  transform: none !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  display: block !important;
  overflow: visible !important;
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
}

#composerCard.composer-inline .label {
  display: none !important;
}

#composerCard.composer-inline #postInput,
#composerCard.composer-inline textarea {
  display: block !important;
  position: static !important;
  inset: auto !important;
  transform: none !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  min-height: 128px !important;
  margin: 0 0 12px !important;
}

#composerCard.composer-inline .composer-row {
  display: grid !important;
  grid-template-columns: auto auto minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 10px !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
}

#composerCard.composer-inline .emoji-toggle-btn,
#composerCard.composer-inline .file-picker,
#composerCard.composer-inline #postButton,
#composerCard.composer-inline .selected-file {
  position: static !important;
  inset: auto !important;
  transform: none !important;
  max-width: 100% !important;
}

#composerCard.composer-inline .selected-file {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

#composerCard.composer-inline #preview {
  display: none;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  margin: 12px 0 0 !important;
}

#composerCard.composer-inline .composer-footer {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  width: 100% !important;
  margin-top: 12px !important;
}

#composerCard.composer-inline .helper-text,
#composerCard.composer-inline .status {
  min-width: 0 !important;
}

@media (max-width: 760px) {
  .create-post-trigger-wrap {
    margin-top: 10px !important;
  }

  #composerCard.composer-inline,
  #composerCard.composer-inline.card {
    margin-top: 10px !important;
    padding: 12px !important;
  }

  #composerCard.composer-inline #postInput,
  #composerCard.composer-inline textarea {
    min-height: 120px !important;
  }

  #composerCard.composer-inline .composer-row {
    grid-template-columns: 1fr auto !important;
    grid-template-areas:
      "emoji file"
      "selected selected"
      "post post" !important;
    align-items: stretch !important;
  }

  #composerCard.composer-inline .emoji-toggle-btn {
    grid-area: emoji;
    width: 100% !important;
  }

  #composerCard.composer-inline .file-picker {
    grid-area: file;
    width: 100% !important;
  }

  #composerCard.composer-inline .selected-file {
    grid-area: selected;
  }

  #composerCard.composer-inline #postButton {
    grid-area: post;
    width: 100% !important;
  }

  #composerCard.composer-inline .composer-footer {
    flex-direction: column !important;
    align-items: flex-start !important;
  }
}


/* v5.4.39 closeable create-post accordion */
#composerCard.composer-inline .composer-inline-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  margin-bottom: 8px !important;
}

#composerCard.composer-inline .composer-inline-title {
  font-size: 14px !important;
  font-weight: 800 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
  color: var(--muted) !important;
}

#composerCard.composer-inline .composer-inline-close {
  flex: 0 0 auto !important;
  width: 40px !important;
  min-width: 40px !important;
  height: 40px !important;
  min-height: 40px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 12px !important;
  border: 1px solid var(--line) !important;
  background: rgba(255,255,255,0.05) !important;
  color: var(--text) !important;
  font-size: 24px !important;
  line-height: 1 !important;
  cursor: pointer !important;
}

#composerCard.composer-inline .composer-inline-close:hover {
  background: rgba(255,255,255,0.09) !important;
}

#composerCard.composer-inline .composer-inline-close:active {
  transform: scale(0.97) !important;
}

@media (max-width: 760px) {
  #composerCard.composer-inline .composer-inline-head {
    margin-bottom: 10px !important;
  }

  #composerCard.composer-inline .composer-inline-close {
    width: 42px !important;
    min-width: 42px !important;
    height: 42px !important;
    min-height: 42px !important;
  }
}


/* v5.4.42 TikTok + Rumble embeds */
.tiktok-embed-wrap,
.rumble-embed-wrap {
  background: rgba(255,255,255,0.04);
}

.embed-fallback-link {
  display: none;
}

.embed-fallback-link a {
  color: var(--accent);
  text-decoration: underline;
}


/* v5.4.43 universal embeds */
.video-wrapper video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: contain;
  display: block;
  background: #000;
}

.social-embed-card {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-height: 620px;
  margin-top: 10px;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255,255,255,0.04);
}

.social-embed-card iframe {
  width: 100%;
  min-height: 620px;
  border: 0;
  display: block;
  background: #fff;
}

.instagram-embed-wrap iframe {
  min-height: 710px;
}

.facebook-embed-wrap iframe {
  min-height: 540px;
}

.youtube-embed-wrap,
.tiktok-embed-wrap,
.rumble-embed-wrap,
.vimeo-embed-wrap,
.direct-video-wrap,
.instagram-embed-wrap,
.facebook-embed-wrap {
  max-width: 100%;
}

@media (max-width: 640px) {
  .social-embed-card {
    min-height: 540px;
  }

  .social-embed-card iframe {
    min-height: 540px;
  }

  .instagram-embed-wrap iframe {
    min-height: 620px;
  }

  .facebook-embed-wrap iframe {
    min-height: 500px;
  }
}


.tiktok-mobile-card { min-height: auto; padding: 16px; background: rgba(255,255,255,0.04); border-radius: 14px; border: 1px solid rgba(255,255,255,0.08); }
.embed-mobile-inner { display: flex; flex-direction: column; gap: 10px; }
.embed-mobile-title { font-weight: 800; font-size: 16px; }
.embed-mobile-url { font-size: 12px; color: var(--muted, rgba(255,255,255,0.7)); word-break: break-word; }
.mobile-visible { display: block; }
.post-edit-emoji-btn { min-width: 48px; padding-inline: 12px; }


.app-mobile-card {
  min-height: auto;
  padding: 16px;
  background: rgba(255,255,255,0.04);
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
}

.app-open-btn {
  appearance: none;
  border: none;
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 800;
  font-size: 14px;
  line-height: 1.2;
  color: #fff;
  background: linear-gradient(135deg, #ff003c, #ff4b2b);
  box-shadow: 0 8px 24px rgba(255, 0, 60, 0.22);
}

.app-open-btn:active {
  transform: translateY(1px);
}


/* v5.4.48 TikTok mobile card polish */
.embed-mobile-badge {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.88);
  background: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.05));
  border: 1px solid rgba(255,255,255,0.10);
}

.app-open-btn-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  margin-top: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.10);
  color: #fff;
}

.tiktok-mobile-card .embed-mobile-url {
  word-break: break-word;
}


.tiktok-mobile-link-card {
  display: block;
  text-decoration: none;
  color: inherit;
}

.tiktok-mobile-link-card:hover,
.tiktok-mobile-link-card:focus-visible {
  text-decoration: none;
}

.tiktok-mobile-link-card .tiktok-mobile-card {
  cursor: pointer;
}

.tiktok-mobile-link-hint {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  width: 100%;
  padding: 12px 16px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff4b4b 0%, #b30000 100%);
  border: 1px solid rgba(255,255,255,0.16);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-align: center;
  box-sizing: border-box;
}


/* v5.4.59 ultra-clean embed UI */
.embed-mobile-badge { display: none !important; }
.app-mobile-card .embed-mobile-inner { padding-top: 0; }
