/* R2: ticket row sizing and compact mobile workspace. */
@media screen and (max-width:900px) {
 /* Explicit tracks stop dates, badges and unread counts squeezing the subject. */
 .portal-layout .ticket-inbox .inbox-row,
 .portal-layout .admin-ticket-inbox .inbox-row,
 .portal-layout .inbox-row {
  display:grid; grid-template-columns:40px minmax(0,1fr) auto;
  align-items:start; gap:10px 12px; padding:16px;
 }
 .portal-layout .inbox-row .inbox-icon { grid-column:1; grid-row:1; width:40px; height:40px; }
 .portal-layout .inbox-row .inbox-subject { grid-column:2; grid-row:1; width:100%; min-width:0; }
 .portal-layout .inbox-row .inbox-subject strong { display:block; font-size:14px; line-height:1.55; word-break:normal; overflow-wrap:anywhere; }
 .portal-layout .inbox-row .inbox-subject small { font-size:12px; line-height:1.5; overflow-wrap:anywhere; }
 .portal-layout .inbox-row .inbox-meta { grid-column:2 / -1; grid-row:2; margin:0; display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-start; gap:8px 12px; min-width:0; }
 .portal-layout .inbox-row .inbox-meta small { white-space:normal; overflow-wrap:anywhere; font-size:12px; }
 .portal-layout .inbox-row :is(.inbox-unread,.admin-inbox-badge) { grid-column:3; grid-row:1; margin:0; align-self:start; max-width:64px; overflow-wrap:anywhere; }
 .portal-layout .inbox-row > .ui-icon,
 .portal-layout .inbox-row > svg { display:none; }
 .portal-layout .inbox-row .badge { white-space:normal; }
 .portal-layout :is(.ticket-categories,.admin-ticket-categories) { display:flex; flex-wrap:wrap; gap:8px; }
 .portal-layout :is(.ticket-categories,.admin-ticket-categories) > .btn { flex:1 1 140px; white-space:normal; min-height:44px; }
}
@media screen and (max-width:700px) {
 /* The header scrolls with the document instead of covering its working area. */
 .portal-layout .topbar { position:relative; top:auto; align-items:flex-start; }
 .portal-layout .topbar > .mobile-menu { align-self:flex-start; }
 .portal-layout .top-actions { align-items:center; }
 .portal-layout .topbar .preferences { gap:4px; }
 .portal-layout .topbar .preferences .combo-trigger { min-height:40px; }
 .portal-layout .topbar .searchbox { margin-top:0; }
 .portal-layout .conversation { height:clamp(520px,88svh,780px); min-height:0; }
 .portal-layout .conversation .panel-head { flex:none; padding:16px; }
 .portal-layout .conversation .panel-head h2 { font-size:16px; line-height:1.45; }
 .portal-layout .conversation .conversation-messages { min-height:140px; flex:1 1 0; overflow:auto; }
 .portal-layout .conversation .conversation-compose { max-height:48%; padding:14px; gap:10px; flex:0 0 auto; }
 .portal-layout .conversation-compose .field { margin:0; }
 .portal-layout .conversation-compose .file-picker { display:flex; flex-wrap:wrap; gap:10px; min-width:0; }
 .portal-layout .conversation-compose .file-picker > * { min-width:0; max-width:100%; overflow-wrap:anywhere; }
 .portal-layout .conversation-compose .button-row { width:100%; margin:0; }
 .portal-layout .conversation-compose .button-row .btn { flex:1; min-height:44px; }
 .portal-layout.as-conversation-page .chat-launch { position:static; margin:16px auto max(20px,env(safe-area-inset-bottom)); width:auto; min-height:44px; padding:12px 18px; }
 .portal-layout.as-conversation-page .chat-launch > span { display:inline; }
 .portal-layout .notification-row .grow,
 .portal-layout .document-row .grow { flex-basis:calc(100% - 60px); }
}
