/* Independent layouts. The forum shell stays fluid on desktop. */
@media (min-width:1100px) {
 :root { --side:260px; --header:64px; --gutter:24px; }
 .topbar,.nav-collapsed .topbar { height:64px;grid-template-columns:244px minmax(0,1fr) auto;gap:24px;padding:0 24px 0 12px; }
 .topbar .search { width:100%;max-width:none;height:40px; }
 .header-right { gap:16px; }
 .sidebar { top:64px;width:260px; }
 .main { margin:76px 24px 28px 284px;max-width:none; }
 .nav-collapsed .main { margin-left:24px; }
 .content-panel { width:100%;max-width:none;padding:24px;min-height:calc(100dvh - 104px); }
 .topic-list { gap:16px; }
 .topic-card { grid-template-columns:28px minmax(0,1fr);gap:14px;min-height:88px;padding:18px; }
 .topic-card>.avatar { width:28px;height:28px; }
 .topic-title { font-size:18px; }
 .post-body { max-width:80ch; }
 .filter-popover,.nav-collapsed .filter-popover { top:60px;left:auto;right:24px; }
 .panel-footer { padding-bottom:64px; }
}
@media (min-width:1600px) {
 .main { margin-right:32px; }
 .content-panel { padding:32px; }
}
@media (width > 760px) and (width < 1100px) {
 :root { --side:0px;--header:64px;--gutter:0px; }
 .topbar,.nav-collapsed .topbar { display:grid;height:64px;grid-template-columns:minmax(190px,230px) minmax(120px,1fr) auto;gap:16px;padding:0 16px; }
 .brand { font-size:18px; }
 .brand-group { gap:8px; }
 .search { height:40px;width:100%;max-width:none; }
 .header-right { gap:8px; }
 .language-control select { max-width:96px; }
 .main,.nav-collapsed .main { margin:76px 16px 24px;max-width:none; }
 .content-panel { width:100%;max-width:none;padding:24px;min-height:calc(100dvh - 100px); }
 .filter-popover,.nav-collapsed .filter-popover { top:60px;right:16px;left:auto; }
 .drawer-shade { top:64px; }
 .sidebar,.nav-collapsed .sidebar { top:64px;width:300px; }
 .topic-title { font-size:18px; }
}
@media (width < 1100px) {
 .sidebar,.nav-collapsed .sidebar { bottom:0;transform:translateX(-100%);background:var(--page);box-shadow:8px 0 28px #0001;transition:transform .18s; }
 .drawer-open .sidebar,.drawer-open.nav-collapsed .sidebar { transform:translateX(0); }
 .drawer-open { overflow:hidden; }
 .sidebar-inner { padding-bottom:calc(24px + env(safe-area-inset-bottom,0px)); }
 .sidebar .side-link,.section-toggle { min-height:44px; }
 .icon-button { min-width:44px;min-height:44px; }
}
@media (max-width:760px) {
 :root { --side:0px;--header:112px;--gutter:0px; }
 .topbar,.nav-collapsed .topbar { display:grid;height:112px;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:44px 44px;gap:8px;padding:8px 12px; }
 .topbar>.brand-group { grid-column:1;grid-row:1;gap:4px;min-width:0; }
 .topbar>.header-right { grid-column:2;grid-row:1;gap:6px;min-width:0; }
 .topbar>.search { grid-column:1/-1;grid-row:2;width:100%;height:44px;margin:0;max-width:none; }
 .brand { font-size:16px;letter-spacing:-.5px; }
 #menu-toggle { width:44px;height:44px;flex:none;padding:10px; }
 .language-control select { max-width:76px;min-height:44px;font-size:12px; }
 .account-actions .pill { min-height:40px;height:40px; }
 .account-actions [data-auth=register] { display:none; }
 .account-actions .account-name { max-width:50px; }
 .sidebar,.nav-collapsed .sidebar { top:112px;width:min(300px,88vw); }
 .drawer-shade { top:112px; }
 .main,.nav-collapsed .main { margin:112px 0 0;max-width:none; }
 .content-panel { width:100%;max-width:none;border-radius:0;box-shadow:none;padding:18px 16px 0;min-height:calc(100dvh - 112px); }
 .list-toolbar { min-height:44px;margin-bottom:12px; }
 .tab { min-height:44px;padding:8px 10px; }
 .topic-total { font-size:11px; }
 .announcement { height:auto;min-height:148px;margin-bottom:14px;border-radius:8px; }
 .announcement-copy { width:100%;max-width:100%;padding:16px 48px 16px 16px; }
 .announcement h1 { font-size:20px;line-height:1.4;letter-spacing:-.4px; }
 .announcement p { font-size:13px;max-width:none;line-height:1.6; }
 .banner-category { margin-bottom:6px; }
 .banner-art,.banner-corner { display:none; }
 .banner-link { min-height:36px;margin-top:12px;padding:0;font-size:13px; }
 .banner-close { position:absolute;right:4px;top:4px;width:44px;height:44px; }
 .topic-list { gap:0; }
 .topic-card { grid-template-columns:28px minmax(0,1fr);gap:12px;min-height:96px;padding:18px 0;border:0;border-bottom:1px solid #ececec;border-radius:0;box-shadow:none; }
 .topic-card>.avatar { width:28px;height:28px; }
 .topic-title { font-size:16px;line-height:1.55;overflow-wrap:anywhere; }
 .pinned { min-height:144px; }
 .pinned .topic-title { padding-right:0; }
 .pinned-badge { position:static;display:inline-flex;margin-top:10px; }
 .topic-meta { flex-wrap:wrap;gap:6px 8px;font-size:11px; }
 .topic-meta .meta-author,.topic-meta .meta-separator { display:none; }
 .topic-excerpt { font-size:13px;line-height:1.7;margin-top:10px;max-width:none; }
 .detail-heading { font-size:22px;line-height:1.5;overflow-wrap:anywhere; }
 .detail-summary { flex-wrap:wrap; }
 .post { grid-template-columns:28px minmax(0,1fr);gap:12px;padding:22px 0; }
 .post .avatar { width:28px;height:28px; }
 .post-body { font-size:16px;line-height:1.8;max-width:none; }
 .post-header { flex-wrap:wrap; }
 .post-header time { margin-left:0; }
 .reply-editor textarea,input,textarea { font-size:16px; }
 .plain-button,.post-tools button,.section-toggle,.side-link,.load-more { min-height:44px; }
 .category-tag { min-height:28px; }
 .filter-popover,.nav-collapsed .filter-popover { top:108px;right:12px;left:auto;width:min(320px,calc(100% - 24px)); }
 #site-dialog { width:calc(100% - 24px);max-width:500px;max-height:calc(100dvh - 32px);overflow:auto; }
 .assistant-launcher { right:16px;bottom:calc(16px + env(safe-area-inset-bottom,0px));min-height:44px; }
 .assistant-panel { right:12px;bottom:calc(76px + env(safe-area-inset-bottom,0px));width:min(350px,calc(100% - 24px));max-height:calc(100dvh - 200px);overflow:auto; }
 .panel-footer { padding-bottom:calc(88px + env(safe-area-inset-bottom,0px)); }
 .auth-layout { max-width:440px; }
}
@media (max-width:390px) {
 .topbar,.nav-collapsed .topbar { padding-left:8px;padding-right:8px;column-gap:4px; }
 .topbar .brand { font-size:14px; }
 .topbar .language-control select { max-width:64px; }
 #menu-toggle { width:40px;min-width:40px;padding:8px; }
 .header-right { gap:4px; }
 .topbar #my-account { max-width:80px!important; }
 .topbar .account-actions .account-name { max-width:28px; }
}


/* Signed-in account entry: avatar only on desktop and mobile. */
.topbar .account-actions #my-account {
 display:inline-grid;place-items:center;flex:none;
 width:40px;min-width:40px;max-width:40px!important;height:40px;min-height:40px;
 padding:0!important;gap:0;border:0;border-radius:50%;background:transparent;
}
.topbar .account-actions #my-account:hover { background:#00000008; }
.topbar .account-actions #my-account .avatar {
 width:32px;height:32px;border-radius:50%;margin:0;
}
