/* Read-only pages for visitors (views/public-*.ejs): red top bar, one column of cards, a sticky "sign in" bar. */
.pub { padding-bottom: 96px; }
.pub-top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px; background: var(--red); box-shadow: 0 2px 12px rgba(238, 17, 68, .22); }
.pub-signin { background: #fff; color: var(--red); font-weight: 800; padding: 7px 16px; border-radius: 999px; font-size: 14px; }
.pub-main { max-width: 640px; margin: 0 auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.pub .card { background: var(--surface); border-radius: var(--radius); padding: 16px; box-shadow: 0 1px 2px rgba(0, 0, 0, .04); }
.pub .muted { color: var(--muted); }
.pub-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.pub-hero h1 { font-size: 22px; margin-top: 6px; }
.pub-hero.small h2 { font-size: 17px; }
.pub-bio { margin: 6px 0 0; white-space: pre-line; overflow-wrap: anywhere; }
.pub-stats { display: flex; justify-content: center; gap: 28px; margin-top: 10px; }
.pub-stats div { display: flex; flex-direction: column; }
.pub-stats b { font-size: 18px; }
.pub-stats span { color: var(--muted); font-size: 13px; }
.pub-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; justify-content: center; }
.pub-btn { background: var(--grad); color: #fff; font-weight: 800; padding: 10px 22px; border-radius: 999px; }
.pub-btn.ghost { background: var(--chip); color: var(--text); }
.pub-answer { display: flex; flex-direction: column; gap: 10px; }
.pub-q h1, .pub-q h2 { font-size: 17px; font-weight: 800; line-height: 1.35; overflow-wrap: anywhere; }
.pub-asker { display: block; font-size: 13px; color: var(--red); margin-bottom: 4px; }
.pub-asker.muted { color: var(--muted); }
.pub-by { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.pub-body { margin: 0; white-space: pre-line; overflow-wrap: anywhere; font-size: 16px; }
.pub-answer .media { width: 100%; border-radius: 14px; max-height: 520px; object-fit: cover; background: var(--surface-2); }
.pub-like { align-self: flex-start; color: var(--muted); font-size: 14px; }
.pub-empty, .pub-more { text-align: center; }
.pub-more { color: var(--red); font-weight: 700; }
.pub-cta { position: fixed; inset-inline: 0; bottom: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(0, 0, 0, .06); }
.pub-cta-text { display: flex; flex-direction: column; min-width: 0; }
.pub-cta-text small { color: var(--muted); }
.pub-cta-btn { flex-shrink: 0; background: var(--grad); color: #fff; font-weight: 800; padding: 10px 16px; border-radius: 999px; font-size: 14px; }
.pub-foot { max-width: 640px; margin: 8px auto 0; padding: 0 16px 16px; text-align: center; color: var(--muted); font-size: 13px; }
.pub-foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; margin-bottom: 8px; }
@media (max-width: 420px) { .pub-cta-text small { display: none; } }
/* Visitors' home and hashtag pages */
.pub-intro { background: var(--grad) !important; color: #fff; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 26px 20px !important; border: 0 !important; }
.pub-intro h1 { font-size: 24px; line-height: 1.35; }
.pub-intro p { margin: 0; opacity: .92; }
.pub-btn.light { background: #fff; color: var(--red); margin-top: 6px; }
.pub-h { font-size: 16px; font-weight: 700; margin: 10px 4px -2px; }
.pub-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.pub-tags a { background: var(--surface); border: 1px solid var(--line); color: var(--red); font-weight: 600; font-size: 14px; padding: 7px 14px; border-radius: 999px; }
.pub-tags a:hover { background: var(--pink); }
.pub-people { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.pub-people::-webkit-scrollbar { display: none; }
.pub .pub-person { flex: 0 0 132px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 14px 10px; }
.pub-person b { font-size: 14px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pub-person small { color: var(--muted); font-size: 12px; direction: ltr; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pub-tag-title { font-size: 26px; color: var(--red); direction: ltr; unicode-bidi: isolate; }
.pub .card { border: 1px solid var(--line); }
