/* Stable frame: the shared chrome does not move when switching public views. */
/* Short viewports scroll the document instead of clipping the composer. */
html{scrollbar-gutter:stable;-webkit-text-size-adjust:100%;text-size-adjust:100%}
body.public-chat-layout{height:100svh;min-height:520px;display:flex;flex-direction:column;overflow:hidden;background:#070a09}
body.public-chat-layout>.chat-page{display:flex;width:100%;height:auto;min-height:0;flex:1 1 auto;padding:0;margin:0;gap:0}
body.public-chat-layout>.chat-page[hidden]{display:none!important}
body.public-chat-layout .chat-stage{display:flex;flex:1 1 auto;min-height:0;width:100%}
body.public-chat-layout .chat-window{flex:1 1 auto;min-height:0;height:auto;border:0;border-radius:0;box-shadow:none}
body.public-chat-layout .chat-log{min-width:0;min-height:0;overflow-x:hidden;overflow-y:auto;overflow-anchor:none;overscroll-behavior:contain;scrollbar-gutter:stable}
body.public-chat-layout .composer-shell{flex:none;width:100%;border:0;border-top:1px solid #24392d;border-radius:0;box-shadow:none;padding:10px max(12px,calc((100vw - 1400px)/2));background:#090c0b}
body.public-chat-layout .chat-composer{max-width:1400px;margin:auto}
body.public-chat-layout .listing-bottom,body.public-chat-layout .help-bottom{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:7px 18px}
body.public-chat-layout .listing-bottom-info{flex:1 1 300px;min-width:0;font-size:12px;line-height:1.4}
body.public-chat-layout .listing-bottom-actions{display:flex;flex:0 1 auto;min-width:0;gap:8px;justify-content:flex-end}
body.public-chat-layout .listing-bottom-actions button{min-width:0;min-height:44px;padding:8px 12px;font-size:13px;line-height:1.15}
body.public-chat-layout .listing-add-with-count{display:flex;align-items:center;justify-content:center;gap:9px}
body.public-chat-layout .listing-add-count{font-variant-numeric:tabular-nums;white-space:nowrap;color:#70efac}
body.public-chat-layout .listing-note:empty{display:none}
body.public-chat-layout .listing-note{flex-basis:100%;margin:0}
body.public-chat-layout>.site-legal-links{display:flex;flex-wrap:wrap;flex:none;width:100%;min-height:32px;padding:2px 10px;gap:0 15px;background:#050706;font-size:11px}
body.public-chat-layout>.site-legal-links>nav{display:flex;flex-wrap:wrap;gap:0 15px}
body.public-chat-layout>.site-legal-links .transaction-disclaimer{display:none}
body.public-chat-layout>.site-legal-links .site-about{font-size:11px}
.listing-page .listing-feed{grid-template-columns:repeat(auto-fill,minmax(min(100%,290px),1fr));align-content:start;grid-auto-rows:max-content;padding:16px;gap:16px}
.listing-page .listing-feed>.listing-card{min-width:0;max-width:100%;height:auto;min-height:0;overflow:hidden}
@media(max-width:720px){body.public-chat-layout{min-height:480px}.listing-page .listing-feed{grid-template-columns:minmax(0,1fr);gap:12px;padding:12px}.listing-page .listing-card-photo{height:clamp(170px,48vw,260px);min-height:0;aspect-ratio:auto}.listing-page .listing-card .listing-photo{width:100%;height:100%;object-fit:contain}.listing-page .listing-card-body{height:auto;min-height:0;padding:12px 8px}.listing-page .listing-card-body h2{font-size:18px}.public-chat-layout .chat-composer{grid-template-columns:minmax(0,1fr) 80px;gap:6px 10px}.public-chat-layout .message-field textarea{height:68px;min-height:68px;resize:none}.public-chat-layout .content-warning{font-size:10px}.public-chat-layout .terms-check{font-size:10px;line-height:1.3}.public-chat-layout .composer-details input{min-height:36px}.public-chat-layout .listing-bottom-info{font-size:10px;flex-basis:100%;text-align:center}.public-chat-layout .listing-bottom-actions{flex:1 1 100%;justify-content:center}.public-chat-layout .listing-bottom-actions button{flex:1}.public-chat-layout>.site-legal-links{font-size:10px;gap:0 10px}.public-chat-layout>.site-legal-links>nav{gap:0 10px}.public-chat-layout>.site-legal-links a,.public-chat-layout .site-about>summary{min-height:26px}.public-chat-layout .site-about{grid-column:auto}}

/* Keep the two listing actions together in the centre of the bottom strip. */
@media(max-width:1023px){
 body.public-chat-layout .listing-bottom-actions{display:flex;flex:0 1 520px;width:min(100%,520px);margin-inline:auto;justify-content:center;align-items:stretch;gap:8px}
 body.public-chat-layout .listing-bottom-actions button{flex:1 1 0;min-width:0;white-space:normal;text-align:center;line-height:1.1;padding-inline:8px}
}
@media(max-height:520px){body.public-chat-layout{height:auto;min-height:100svh;overflow-y:auto}body.public-chat-layout>.chat-page{flex:none}body.public-chat-layout .chat-window{min-height:260px;max-height:65svh}body.public-chat-layout .chat-log{min-height:160px}}

/* Restore browser pull-to-refresh on phones; chat scrolling can chain to the page edge. */
@media(max-width:720px){body.public-chat-layout{overflow-x:hidden;overflow-y:auto;overscroll-behavior-y:auto}body.public-chat-layout .chat-log{overscroll-behavior-y:auto}}
/* Keep the mobile chat legal navigation compact so the chat keeps the freed space. */
.site-footer-more{flex:1 1 100%;min-width:0;margin:0;color:#d5d7dd;font-size:12px;text-align:center}
.site-footer-more>summary{display:none;list-style:none}
.site-footer-more>summary::-webkit-details-marker{display:none}
.site-footer-expanded{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:0 18px}
@media(max-width:720px){
 body.public-chat-layout[data-public-view="chat"]>.site-legal-links{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;flex:none;gap:0 6px;min-height:28px;padding:0 6px env(safe-area-inset-bottom,0px);background:#050706;font-size:clamp(8px,2.45vw,10px);white-space:nowrap}
 body.public-chat-layout[data-public-view="chat"]>.site-legal-links>nav{display:flex;flex:0 1 auto;flex-wrap:nowrap;align-items:center;justify-content:center;gap:0 6px;min-width:0}
 body.public-chat-layout[data-public-view="chat"]>.site-legal-links>nav a,body.public-chat-layout[data-public-view="chat"]>.site-legal-links>.site-about>summary{min-height:28px}
 body.public-chat-layout[data-public-view="chat"]>.site-legal-links>.site-about{flex:0 0 auto;grid-column:auto;min-width:0;font-size:inherit}
 body.public-chat-layout[data-public-view="chat"]>.site-legal-links>.site-about>summary{min-width:0;gap:2px}
 body.public-chat-layout[data-public-view="chat"]>.site-legal-links>.site-about[open]{flex:1 0 100%;white-space:normal}
 body.public-chat-layout[data-public-view="chat"]>.site-legal-links>.site-footer-more{display:block}
 body.public-chat-layout[data-public-view="chat"]>.site-legal-links>.site-footer-more>summary{display:flex;align-items:center;justify-content:center;min-height:40px;padding:6px 12px;border-top:1px solid #24392d;color:#d5d7dd;cursor:pointer;list-style:none}
 body.public-chat-layout[data-public-view="chat"]>.site-legal-links>.site-footer-more>summary::before{content:"▸";margin-right:7px}
 body.public-chat-layout[data-public-view="chat"]>.site-legal-links>.site-footer-more[open]>summary::before{content:"▾"}
 body.public-chat-layout[data-public-view="chat"]>.site-legal-links>.site-footer-more:not([open])>.site-footer-expanded{display:none}
 body.public-chat-layout[data-public-view="chat"]>.site-legal-links>.site-footer-more[open]>.site-footer-expanded{display:grid;grid-template-columns:minmax(0,1fr);gap:4px;padding:4px 12px calc(8px + env(safe-area-inset-bottom,0px))}
 body.public-chat-layout[data-public-view="chat"]>.site-legal-links>.site-footer-more>.site-footer-expanded>nav{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:0 12px}
 body.public-chat-layout[data-public-view="chat"]>.site-legal-links>.site-footer-more>.site-footer-expanded>nav a{min-height:32px}
}
