/* Phone layout for /community.html (loaded at (max-width: 760px)). */
/* What changes on a phone: a shorter head; the region chips scroll
   edge to edge; the two tabs share the full width as 44px targets; sort,
   search, vote, title and reply controls grow to thumb size; forms stack
   with full-width actions; the toast and sign-in prompt clear the home
   indicator. This sheet loads
   after the page's own <style>, so same-specificity rules here win. */

/* ---------- head ---------- */
.page-head { padding: 22px 0 14px; }
.page-head h1 { font-size: 1.85rem; line-height: 1.12; margin: 8px 0 8px; }
.page-head p { font-size: .95rem; line-height: 1.55; }

/* ---------- built-road notices ---------- */
.notices { padding: 12px 14px; margin-bottom: 16px; }
.notices li { font-size: .95rem; line-height: 1.5; }
/* Each link on its own line reads as a tappable action, not inline text. */
.notices li a { display: inline-flex; align-items: center; min-height: 40px; margin: 0 14px 0 0; }
.notices li b { margin-right: 12px; }
.notices #noticeDone { width: 100%; min-height: 44px; font-size: .9rem; }

/* ---------- region chips ---------- */
/* Bleed the chip row to the screen edges so a clipped chip reads as
   "scroll for more" instead of a cut-off box. */
.layout { gap: 12px; }
.rlist {
  margin: 0 -16px; padding: 2px 16px 6px; scroll-padding: 0 16px;
  scroll-snap-type: x proximity; overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.rlist::-webkit-scrollbar { display: none; }
.rbtn, .rbtn.sub { min-height: 44px; padding: 8px 14px; border-radius: 999px; scroll-snap-align: start; font-size: .92rem; }
.rbtn .n { font-size: .78rem; }

/* ---------- region head + tabs ---------- */
.rhead { margin-bottom: 4px; }
.rhead h2 { font-size: 1.2rem; }
.rhead .sub { font-size: .78rem; }
/* The two tabs split the width so each is a wide thumb target. */
.tabs { gap: 0; margin: 0 -16px 14px; padding: 0 8px; }
.tab { flex: 1 0 auto; justify-content: center; min-height: 46px; padding: 10px 8px 11px; font-size: .92rem; }
.tab .n { font-size: .74rem; }

/* ---------- toolbar ---------- */
.toolbar { gap: 10px; margin-bottom: 12px; }
.sort { width: 100%; }
.sort button { min-height: 40px; font-size: .88rem; }
.qbox input { min-height: 44px; padding: 10px 12px; }
.toolbar .btn-primary { width: 100%; flex: 1 1 100%; min-height: 46px; font-size: .95rem; }
.toolbar .count { font-size: .8rem; }
.seed-btn { min-height: 40px; }

/* ---------- forms ---------- */
.pform { padding: 16px 14px; }
.pform h2 { font-size: 1.15rem; }
.pform .hint { font-size: .92rem; line-height: 1.5; }
.fgrid { gap: 14px; }
.in { min-height: 46px; padding: 11px 12px; }
textarea.in { min-height: 96px; }
textarea.in.tall { min-height: 160px; }
label.field { font-size: .75rem; }
.fhelp { font-size: .84rem; line-height: 1.45; }
/* Submit full width and first; Cancel full width under it. */
.form-actions { flex-direction: column; align-items: stretch; gap: 8px; }
.form-actions .btn { width: 100%; min-height: 46px; font-size: .95rem; }
.form-err { font-size: .9rem; }

/* ---------- topic / suggestion rows ---------- */
.trow { grid-template-columns: 52px minmax(0, 1fr); gap: 12px; padding: 12px 14px 12px 10px; align-items: start; }
.trow.topic { padding: 10px 14px 12px; }
.vote { width: 52px; min-height: 56px; font-size: 1rem; }
.vote svg { width: 16px; height: 16px; }
/* The title opens the thread: pad it to a 40px target without moving
   the text (the negative margin takes the padding back). */
.ttitle { padding: 9px 0; margin: -6px 0 -4px; font-size: 1.05rem; }
.tsub { font-size: .88rem; gap: 6px 10px; }
.excerpt { font-size: .95rem; line-height: 1.5; }
.pill { font-size: .75rem; padding: 2px 8px; }
.src { font-size: .74rem; padding: 2px 7px; }
.tmeta { font-size: .8rem; margin-top: 2px; }
.tmeta .btn { min-height: 40px; }
.tbody { padding: 0 14px 16px 14px; }
.tbody.topic { padding: 0 14px 16px 14px; }
.reply { padding: 11px 12px; }
.reply .who { font-size: .8rem; }
.reply p { font-size: .95rem; line-height: 1.5; }
.more { font-size: .8rem; }
.more a, .linkish { display: inline-block; padding: 8px 0; }
.more.permalink { margin-top: 8px; }
.reply-form textarea { min-height: 88px; }
.reply-form .btn { width: 100%; min-height: 44px; }
.reply-gate a { display: inline-flex; align-items: center; min-height: 40px; font-size: .95rem; }
.more-row .btn { width: 100%; min-height: 44px; }

/* ---------- ops (staff only, but still has to be tappable) ---------- */
.ops { gap: 8px; padding: 8px 10px; }
.ops .in { min-height: 40px; font-size: 16px; }
.ops .btn-xs { min-height: 40px; padding: 6px 12px; font-size: .84rem; }
.ops-k { font-size: .75rem; }
.ops-x { padding: 8px 0 8px 8px; font-size: .78rem; }

/* ---------- empty states ---------- */
.empty { padding: 32px 18px; }
.empty .btn { min-height: 44px; }

/* ---------- toast + sign-in prompt ---------- */
/* Lift both clear of the iPhone home indicator. */
.toast { bottom: calc(16px + env(safe-area-inset-bottom)); font-size: .92rem; text-align: center; }
.gate-pop { bottom: calc(12px + env(safe-area-inset-bottom)); padding: 16px; }
.gate-pop .form-actions { flex-direction: row; }
.gate-pop .form-actions .btn { flex: 1; width: auto; }

@media (max-width: 370px) {
  .page-head h1 { font-size: 1.65rem; }
}
