/* v1.15.1: preserve visible controls around device cutouts and browser chrome. */
:root{--hsm-safe-top:env(safe-area-inset-top,0px);--hsm-safe-bottom:env(safe-area-inset-bottom,0px);--hsm-safe-left:env(safe-area-inset-left,0px);--hsm-safe-right:env(safe-area-inset-right,0px)}
.cl-expand{display:none}
@media screen and (min-width:781px){
 body.mm-message-page #season-banner{margin:10px 0 8px!important}
 body.mm-message-page #season-banner .season-hero,body.mm-message-page #season-banner .season-approved-art{height:58px!important;min-height:58px!important;max-height:58px!important;object-fit:cover!important;object-position:center 30%!important}
 body.mm-message-page #season-banner .season-hero-copy{padding:4px 8px}
 body.mm-message-page #season-banner h2,body.mm-message-page #season-banner .season-title{font-size:22px!important;margin:0!important}
 body.mm-message-page #season-banner p,body.mm-message-page #season-footer{display:none!important}
 body.mm-message-page #content{padding:12px 18px 18px!important}
 body.mm-message-page .mp-heading{margin:0 0 7px;gap:10px}
 body.mm-message-page .mp-heading h1{font-size:23px;margin:0}
 body.mm-message-page .mp-heading .eyebrow{display:none}
 body.mm-message-page .mp-tabs{padding:0 0 7px;margin:0;gap:5px}
 body.mm-message-page .mp-tabs .btn{min-height:34px;padding:6px 10px;font-size:12px}
 body.mm-message-page #content>.th-policy{margin:0 0 8px;padding:7px 10px;font-size:11px;line-height:1.35}
 body.mm-message-page .th-workspace{height:var(--cl-height,620px)!important;min-height:480px!important;max-height:none!important;grid-template-columns:minmax(225px,29%) minmax(0,1fr)}
 body.mm-message-page .th-thread,body.mm-message-page .th-rooms{min-height:0;overflow:hidden}
 body.mm-message-page #team-room-list{min-height:0;overflow:auto;flex:1}
 body.mm-message-page .th-thread-head{min-height:62px;flex-shrink:0;padding:10px 15px;gap:10px}
 body.mm-message-page .th-thread-head h2{font-size:18px;line-height:1.2}
 body.mm-message-page .th-thread-head p{font-size:11px;line-height:1.35;margin:4px 0 0}
 body.mm-message-page .th-message-log{flex:1;min-height:270px!important;padding:16px 20px;overflow:auto;overscroll-behavior:contain}
 body.mm-message-page .th-message{max-width:85%;margin-bottom:12px}
 body.mm-message-page .th-message-meta{margin-bottom:3px;font-size:11px}
 body.mm-message-page .th-translation{padding:1px 2px;font-size:10px;line-height:1.25}
 body.mm-message-page .th-translation.mm-original>span{display:none}
 body.mm-message-page .th-translation.mm-original:not(:has(details)){display:none}
 body.mm-message-page .mp-message-actions{font-size:10px;line-height:1.2}
 body.mm-message-page .mp-message-actions>summary{padding:3px 0}
 body.mm-message-page .th-bubble{min-height:0}
 body.mm-message-page .th-bubble{padding:9px 13px}
 body.mm-message-page .th-bubble p{font-size:15px;line-height:1.5}
 body.mm-message-page .th-compose{flex-shrink:0;padding:10px 14px;background:#fff}
 body.mm-message-page .th-compose .mp-compose-toolbar,body.mm-message-page .th-compose .mp-compose-options,body.mm-message-page .th-compose>small{display:none!important}
 body.mm-message-page .th-compose-row{align-items:flex-end;gap:10px}
 body.mm-message-page .mm-add{display:inline-grid!important}
 body.mm-message-page .th-compose textarea[name=text]{min-height:54px;max-height:110px;resize:vertical;font:16px/1.45 system-ui;padding:10px 12px}
 body.mm-message-page .th-compose button[type=submit]{min-height:46px;margin-bottom:3px}
 body.mm-message-page #mp-uploaded{max-height:92px;overflow:auto}
 body.mm-message-page #mp-uploaded:empty,body.mm-message-page #mp-reply:empty,body.mm-message-page #mp-send-status:empty,body.mm-message-page .th-compose .form-error:empty{display:none}
 body.mm-message-page .mm-option-status:not([hidden]){display:inline-block;font-size:11px;padding:3px 8px;margin-top:5px;background:#fff7e6;border:1px solid #e8d8b4;border-radius:6px}
 body.mm-message-page .cl-expand{display:inline-flex;white-space:nowrap;min-height:38px;font-size:12px;padding:7px 10px}
 body.cl-expanded #season-banner,body.cl-expanded .mp-heading,body.cl-expanded .mp-tabs,body.cl-expanded #content>.th-policy{display:none!important}
 body.cl-expanded #content{padding-top:10px!important}
 body.mm-message-page #mp-jump{flex-shrink:0;margin:0 auto 4px}
}
@media screen and (max-width:780px){
 /* Specificity intentionally exceeds the full seasonal theme's old 57px override. */
 body .workspace>.topbar,body[data-season]:not([data-season="neutral"])[data-season-art="full"] .workspace>.topbar{
  box-sizing:border-box;height:auto!important;min-height:calc(58px + var(--hsm-safe-top))!important;
  padding:var(--hsm-safe-top) max(10px,var(--hsm-safe-right)) 0 max(10px,var(--hsm-safe-left))!important;
  position:sticky;top:0;gap:7px;align-items:center
 }
 body .topbar>.top-actions{flex-shrink:0;gap:6px}
 body .topbar #menu-toggle,body .topbar .icon-btn,body .topbar #avatar{flex-shrink:0;min-width:36px;min-height:40px}
 body #sidebar{padding-top:calc(20px + var(--hsm-safe-top));padding-bottom:calc(16px + var(--hsm-safe-bottom));height:100dvh;box-sizing:border-box}
 body .sidebar-close{top:calc(12px + var(--hsm-safe-top))}
 body #mobile-nav{padding-left:max(4px,var(--hsm-safe-left));padding-right:max(4px,var(--hsm-safe-right));padding-bottom:max(7px,var(--hsm-safe-bottom))}
 body.mm-chat-active .th-thread-head{box-sizing:border-box;height:auto!important;min-height:calc(66px + var(--hsm-safe-top));padding:calc(8px + var(--hsm-safe-top)) max(10px,var(--hsm-safe-right)) 8px max(10px,var(--hsm-safe-left))!important;align-items:center}
 body.mm-chat-active .th-compose{padding:9px max(10px,var(--hsm-safe-right)) max(10px,var(--hsm-safe-bottom)) max(10px,var(--hsm-safe-left))!important}
 body.mm-chat-active .th-message-log{padding-left:max(12px,var(--hsm-safe-left));padding-right:max(12px,var(--hsm-safe-right))}
 body.mm-chat-active #mp-main{height:var(--mm-height,100dvh)!important;top:var(--mm-top,0px)!important;max-height:none!important;overflow:hidden}
 body.mm-chat-active .th-thread-head>div{min-width:0}
 body.mm-chat-active .th-thread-head p{max-width:100%;overflow-wrap:anywhere}
 body.mm-chat-active .th-compose textarea[name=text]{max-height:100px}
 body #modal[open]{max-height:calc(100dvh - var(--hsm-safe-top) - var(--hsm-safe-bottom) - 24px);max-width:calc(100vw - var(--hsm-safe-left) - var(--hsm-safe-right) - 20px);overflow:auto}
 body #mm-sheet{max-height:calc(100dvh - var(--hsm-safe-top) - 12px);padding-left:var(--hsm-safe-left);padding-right:var(--hsm-safe-right)}
 body .th-popup{top:calc(68px + var(--hsm-safe-top));right:max(12px,var(--hsm-safe-right));max-width:calc(100vw - var(--hsm-safe-left) - var(--hsm-safe-right) - 24px)}
 body.mm-chat-active .th-popup{top:calc(var(--mm-top,0px) + 70px + var(--hsm-safe-top))}
 .cl-expand{display:none!important}
}
@media screen and (min-width:781px) and (max-height:690px){
 body.mm-message-page #season-banner{display:none!important}
 body.mm-message-page .th-workspace{min-height:410px!important}
 body.mm-message-page .th-message-log{min-height:225px!important}
}
@media print{.cl-expand{display:none!important}}
