/* Topic-owned controls and mobile discussion layout. */
/* Home stays a short guide. Linked preview rows own the shared 14px padding,
   rather than getting a second inset from their list item. */
#app .home-guide .home-actions { margin-top:16px; }
#app .home-guide .home-needs > li { padding:0; }
.topic .btn.primary, .reply-form .btn.primary, .survey .btn.primary { width:100%; }
.reply-form > .row { flex-direction:column; align-items:stretch; }
.reply-form .btn.primary { flex-shrink:0; }
label[data-update-backing][hidden] { display:none; }
[data-reply-summary]:empty { display:none; }
[data-reply-summary] { flex-basis:100%; }
/* Short filter rows fit when possible and wrap rather than hiding choices. */
.home .chips, .topic .chips { flex-wrap:wrap; overflow:visible; }
.home .chip, .topic .chip { flex-shrink:0; }
.topic-dot { display:inline-block; width:7px; height:7px; border-radius:50%; background:currentColor; vertical-align:middle; }
/* Four full labels fit at 360px, including content dots and 44px targets. */
.topic .ltabs { overflow:visible; }
.topic .ltabs ul { flex-wrap:nowrap; min-width:0; gap:4px; }
.topic .ltabs li { flex:1 1 auto; }
.topic .ltabs a { display:flex; justify-content:center; white-space:nowrap; padding:4px 2px; gap:4px; }
.topic details > summary { cursor:pointer; min-height:44px; }
.composer { position:sticky; bottom:calc(64px + env(safe-area-inset-bottom)); z-index:3; max-height:46vh; overflow:auto; }
.composer:not(.expanded):not(:focus-within) > :is(.btn, .hint), .composer:not(.expanded):not(:focus-within) > label, .composer:not(.expanded):not(:focus-within) > fieldset, .composer:not(.expanded):not(:focus-within) > .upd-preview { display:none; }
.composer textarea, .reply-form textarea { min-height:44px; max-height:180px; resize:vertical; }
.reply-form { position:sticky; bottom:calc(64px + env(safe-area-inset-bottom)); background:var(--card); z-index:4; max-height:46vh; overflow:auto; }
.authored-text, .c-text { white-space:pre-wrap; overflow-wrap:anywhere; }
.reply-quote { border-left:3px solid #89958d; padding-left:.7rem; margin:.5rem 0; }
#topic-undo { color:inherit; background:transparent; border:1px solid currentColor; padding:.5rem; margin-left:1rem; }
.home h1 { margin-top:0; }
.topic-sheet { position:fixed; inset:auto 0 0; margin:0 auto; width:min(100%, 680px); max-height:80dvh; overflow:auto; border:0; border-radius:18px 18px 0 0; padding:20px; box-sizing:border-box; color:var(--ink); background:var(--card); }
.topic-sheet::backdrop { background:rgb(0 0 0 / .45); }
.topic-sheet p { white-space:pre-wrap; overflow-wrap:anywhere; }
