/* CNS app visual reference, local diary-layout-refresh snapshot. */
/* Reversible Desk panels and shared heading layout. Remove this import to restore those styles.
   Theme sweep, navigation and authentication styles live separately. */
.main>.top>div:first-child{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap}
.main>.top h1{text-transform:none;letter-spacing:normal;font-weight:600;font-size:1.2rem;line-height:1.4}
.main>.top .sub{opacity:.25;margin:0;font:400 .87rem/1.5 var(--display);letter-spacing:0;color:var(--muted)}
.desk2{
  grid-template-columns:minmax(300px,24%) minmax(0,1fr);
  --desk-panel-gap:clamp(18px,1.8vw,28px);
  gap:var(--desk-panel-gap);padding:var(--desk-panel-gap);
  height:100%;min-height:0;background:var(--bg);
}
.desk2>.col{
  background:var(--surface);border:1px solid var(--rule);border-radius:24px;
  min-width:0;min-height:0;overflow:auto;scrollbar-width:thin;
}
/* Keep the feed's scrolling area inside the panel's rounded shell. */
.desk2>.col:first-child{display:flex;flex-direction:column;overflow:hidden;padding-block:12px}
.desk2>.col:first-child .q-head{position:relative;top:auto;flex:none;padding-top:2px}
.desk2>.col:first-child .qlist{flex:1;min-height:0;overflow:auto;scrollbar-width:thin}
.desk2>.col:last-of-type{border-right:1px solid var(--rule)}
.desk2 .q-head{background:var(--surface);padding:14px 13px 12px;border-radius:23px 23px 0 0}
.desk2 .search{background:color-mix(in srgb,var(--surface) 55%,var(--bg))}
.desk2 .filters{gap:6px 3px}
.desk2 .filters button{font-size:.74rem;padding-inline:8px}
.desk2 .qlist{padding:6px 8px 24px}
.desk2 .qr:hover{background:var(--surface-2)}
.desk2 .qg-h{padding-block:18px 9px}
.desk2 .detail2{min-height:100%;padding-bottom:40px}
.desk2 .d-top{padding:20px 24px;gap:16px}
.desk2 .d-grid{padding:24px 24px 0}
.desk2 .suggest{box-shadow:inset 4px 0 0 var(--accent);background:color-mix(in srgb,var(--surface) 55%,var(--bg));border-radius:16px}
.desk2 .thread{background:var(--surface-2)}
.desk2 .empty{min-height:100%}
@media(min-width:821px) and (max-width:1100px){
  .desk2{grid-template-columns:minmax(275px,32%) minmax(0,1fr);--desk-panel-gap:16px}
  .desk2 .d-top{padding:18px}
  .desk2 .d-grid{padding:18px 18px 0}
  .main>.top>div:first-child{gap:6px 10px}
}
@media(max-width:820px){
  .main>.top>div:first-child{display:block}
  .main>.top h1{font-size:1.05rem;letter-spacing:normal}
  .main>.top .sub{margin-top:3px;font-size:.75rem}
  .desk2{display:block;height:auto;padding:12px}
  .desk2>.col{border:1px solid var(--rule);border-radius:20px;overflow:visible}
  .desk2>.col:first-child{display:block;overflow:visible;padding-block:0}
  .desk2>.col:first-child .q-head{padding-top:14px}
  .desk2>.col:first-child .qlist{overflow:visible}
  .desk2 .q-head{border-radius:19px 19px 0 0;padding:14px}
  .desk2 .qlist{padding-bottom:18px}
  .desk2.m-detail>#detailCol{display:block}
  .desk2 .m-back{border-radius:19px 19px 0 0}
  .desk2 .detail2{padding-bottom:20px}
  .desk2 .d-top{padding:18px}
  .desk2 .d-grid{padding:18px 14px 8px!important}
}

/* Let the review card use the space left below the conversation. */
@media(min-width:821px){
  .desk2 #detailCol{overflow:hidden}
  .desk2 .detail2{display:flex;flex-direction:column;height:100%;min-height:0;padding-bottom:0}
  .desk2 .d-top{flex:none}
  .desk2 .d-grid{flex:1;min-height:0;padding-bottom:24px;overflow:hidden}
  .desk2 .d-main{display:flex;flex-direction:column;height:100%;min-height:0}
  .desk2 .d-main>div:first-child{flex:0 1 auto;min-height:0;max-height:40%;overflow:auto;scrollbar-width:thin}
  .desk2 .d-main>.flag{flex:none}
  .desk2 .suggest{display:flex;flex-direction:column;flex:1;min-height:0;overflow:auto;scrollbar-width:thin}
  .desk2 .suggest>*{flex-shrink:0}
  .desk2 .suggest .sg-actions{margin-top:auto;padding-top:18px}
  .desk2 .suggest .sg-note{flex:none}
  .desk2 .suggest .more-menu{top:auto;bottom:calc(100% + 6px)}
}

/* Match the message-thread surround in light mode only. */
:root[data-theme="light"] .desk2 :is(.search,.suggest){background:var(--surface-2)}
@media(prefers-color-scheme:light){
  :root:not([data-theme="dark"]) .desk2 :is(.search,.suggest){background:var(--surface-2)}
}
