/* HBN Instant Messenger, standalone normal-browser page (im.humanbroadcastingnetwork.org).
   Loaded after the messenger's inline CSS (lib/registry-im.js) and wallpaper.css. Every rule is scoped to [data-standalone="1"] / body.im-sa,
   so the desktop messenger on humanbroadcastingnetwork.org is untouched. */
@font-face{font-family:"InterLocal";src:url("/fonts/Inter-400.ttf") format("truetype");font-weight:400;font-display:swap}
@font-face{font-family:"InterLocal";src:url("/fonts/Inter-600.ttf") format("truetype");font-weight:600;font-display:swap}
@font-face{font-family:"InterLocal";src:url("/fonts/Inter-700.ttf") format("truetype");font-weight:700;font-display:swap}
html:has(body.im-sa),body.im-sa{margin:0;height:100%;overflow:hidden;overscroll-behavior:none}
body.im-sa{font:14px/1.45 "InterLocal","Segoe UI",system-ui,-apple-system,sans-serif;color:#172554;background:#4a8ef0;-webkit-text-size-adjust:100%}
.im-desk[data-standalone="1"]{--win-face:#ffffff;--win-fg:#172554;--win-gold:#D4A537;--win-field:#ffffff;--win-shadow:#c4cad6;--win-glow:rgba(23,37,84,.16);
  position:fixed;inset:0;height:100dvh;display:flex;flex-direction:column;overflow:hidden;color:#172554;font:inherit}
.im-desk[data-standalone="1"]:not([data-wp]),.im-desk[data-standalone="1"][data-wp=hills]{background:#4a8ef0 url("/messenger/wp/hills.svg") center bottom/cover no-repeat}
.im-desk[data-standalone="1"] *{box-sizing:border-box}

/* top bar */
.sa-top{flex:0 0 auto;display:flex;align-items:center;gap:14px;min-width:0;height:54px;padding:0 16px;background:linear-gradient(180deg,#1e3a8a 0%,#172554 60%,#0b1a4a 100%);color:#fff;border-bottom:2px solid var(--win-gold);box-shadow:0 2px 12px rgba(5,12,40,.35)}
.sa-brand{display:flex;align-items:center;gap:10px;min-width:0;color:#fff!important;text-decoration:none;flex:0 1 auto}
.sa-brand img{flex:0 0 auto;filter:drop-shadow(0 0 6px rgba(125,211,252,.5))}
.sa-brand h1{margin:0;font-size:17px;line-height:1.2;font-weight:700;letter-spacing:.1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sa-t-short,.sa-site-short{display:none}
.sa-t-short::before{content:attr(data-t)}
.sa-site{margin-right:auto;min-width:0;font-size:13px;color:#cfe0ff!important;text-decoration:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:4px 2px}
.sa-site:hover{color:#fff!important;text-decoration:underline}
.sa-acct{display:flex;align-items:center;gap:10px;min-width:0;flex:0 1 auto}
.sa-acct form{margin:0;flex:0 0 auto}
.sa-me{display:flex;align-items:center;gap:7px;min-width:0;font-size:13px}
.sa-me b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:200px;font-weight:700}
.sa-st{color:#cfe0ff;font-size:12px;white-space:nowrap}
.sa-su{font-size:13px;color:#FFD21F!important;white-space:nowrap}
.sa-top .im-btn{min-height:30px;font-size:13px}
.sa-top .im-btn.im-sm{min-height:28px;padding:1px 10px}
.sa-so{display:inline-flex;align-items:center;text-decoration:none;color:#172554!important}
.sa-top .im-dot{border-color:#fff}

/* flash message */
.sa-flash{flex:0 0 auto}
.sa-flash .reg-msg{margin:0;padding:8px 16px;font-weight:600;font-size:13px}
.sa-flash .reg-ok{background:#dcfce7;color:#14532d}.sa-flash .reg-err{background:#fee2e2;color:#7f1d1d}

/* tabs: phones only */
.sa-tabs{display:none}

/* panes */
.sa-main{flex:1 1 auto;min-height:0;display:flex;gap:16px;padding:16px;align-items:stretch}
.sa-pane{display:flex;flex-direction:column;min-width:0;min-height:0;background:#fff;color:#172554;border:1px solid #d4d4d8;border-radius:10px;box-shadow:0 10px 30px rgba(5,12,40,.28);overflow:hidden}
.im-desk[data-standalone="1"] .im-list{flex:0 0 340px;width:340px;height:auto}
.im-desk[data-standalone="1"] .im-chat{flex:1 1 auto;width:auto;height:auto;min-width:0}
.sa-ph{flex:0 0 auto;display:flex;align-items:center;gap:10px;min-width:0;height:42px;padding:0 14px;background:linear-gradient(180deg,#fff 0%,#f0f2f7 100%);border-bottom:2px solid var(--win-gold);font-size:14px;color:#172554}
.sa-ph b,.sa-ph #im-title{font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.sa-mback{display:none;font-weight:700;text-decoration:none;color:#1f4fd1!important;white-space:nowrap}
.im-desk[data-standalone="1"] .im-body{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;padding:10px 12px 12px;gap:0;overflow:hidden}
.im-desk[data-standalone="1"] .im-list .im-body{overflow:auto}
.im-desk[data-standalone="1"] .im-tree{min-height:120px}
.im-desk[data-standalone="1"] .im-list.signed-in .im-tree{flex:1 1 auto}
.im-desk[data-standalone="1"] .im-tools{flex:0 0 auto}
.im-desk[data-standalone="1"] .im-mascot{flex-shrink:0}
.im-desk[data-standalone="1"] .im-hist{font-size:14px;line-height:1.5;padding:10px 12px;background:#fff}
.im-desk[data-standalone="1"] .im-hist .im-m{margin:0 0 4px}
.im-desk[data-standalone="1"] .im-status{flex:0 0 auto}
.im-desk[data-standalone="1"] .im-compose{flex:0 0 auto}
.im-desk[data-standalone="1"] .im-compose textarea{height:64px;font-size:14px;line-height:1.4;padding:8px 10px;border-radius:6px}
.im-desk[data-standalone="1"] .im-btn{border-radius:6px}
.im-desk[data-standalone="1"] .im-f input[type=text],.im-desk[data-standalone="1"] .im-f input[type=password],.im-desk[data-standalone="1"] .im-f select{font-size:14px;padding:7px 9px;border-radius:6px;min-height:34px}
.im-desk[data-standalone="1"] .im-f label{font-size:13px}
.im-desk[data-standalone="1"] .im-so .im-btn{min-height:34px;padding:4px 18px}
.im-desk[data-standalone="1"] .im-gc{min-height:36px;border-radius:6px}
.im-desk[data-standalone="1"] .im-row{min-height:30px}
.im-desk[data-standalone="1"] .im-star{height:30px}
.im-desk[data-standalone="1"] .im-tools summary{padding:4px 0}
.im-desk[data-standalone="1"] .im-mascot{border-radius:8px}
.im-desk[data-standalone="1"] .im-list.signed-in .im-mascot{display:none}
.sa-foot{flex:0 0 auto;margin:10px 0 0;font-size:12px;color:#4a5068;text-align:center}
.sa-foot a{color:#4a5068;text-decoration:underline}
.im-desk[data-standalone="1"] .im-list:not(.signed-in) .im-body{justify-content:flex-start}
.im-desk[data-standalone="1"] .im-list:not(.signed-in) .im-tools{margin-top:12px}
.im-desk[data-standalone="1"] .im-list:not(.signed-in) .sa-foot{margin-top:auto;padding-top:10px}
#gc-log,.im-desk[data-standalone="1"] .gc-log{min-height:0}
.im-desk[data-standalone="1"] .gc-name{padding:8px 0}

/* narrow desktop windows */
@media (max-width:899px) and (min-width:700px){
  .sa-main{gap:12px;padding:12px}
  .im-desk[data-standalone="1"] .im-list{flex-basis:280px;width:280px}
  .sa-site-full{display:none}.sa-site-short{display:inline}
}

/* phones: one pane at a time, tab bar, full-bleed panes */
@media (max-width:699px){
  .sa-top{height:48px;gap:10px;padding:0 12px}
  .sa-brand h1{font-size:15px}
  .sa-brand img{width:26px;height:26px}
  .sa-site{font-size:13px}
  .sa-site-full{display:none}.sa-site-short{display:inline}
  .sa-me b{max-width:96px}
  .sa-tabs{flex:0 0 auto;display:flex;background:#0b1a4a;border-bottom:2px solid var(--win-gold)}
  .sa-tab{flex:1 1 50%;text-align:center;padding:10px 8px;min-height:44px;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:14px;color:#cfe0ff!important;text-decoration:none;border-bottom:3px solid transparent;margin-bottom:-2px}
  .im-desk[data-standalone="1"][data-view=list] .sa-tab-l,.im-desk[data-standalone="1"][data-view=chat] .sa-tab-c{color:#fff!important;border-bottom-color:#FFD21F;background:rgba(255,255,255,.08)}
  .sa-main{padding:0;gap:0}
  .sa-pane{border-radius:0;border-width:0;box-shadow:none;flex:1 1 auto;width:100%}
  .im-desk[data-standalone="1"] .im-list,.im-desk[data-standalone="1"] .im-chat{flex:1 1 auto;width:100%}
  .im-desk[data-standalone="1"][data-view=chat] .im-chat{position:static;inset:auto;z-index:auto}
  .im-desk[data-standalone="1"][data-view=chat] .im-list,.im-desk[data-standalone="1"][data-view=list] .im-chat{display:none}
  .sa-ph{height:40px}
  .sa-mback{display:inline}
  .im-chat:has(#im-cbody[data-mode=gc]) .sa-mback{display:none}   /* the Sign On / Chat tabs already switch panes */
  .im-desk[data-standalone="1"] .im-body{padding:8px 10px 10px}
  .im-desk[data-standalone="1"] .im-hist{font-size:15px}
  .im-desk[data-standalone="1"] .im-compose textarea{font-size:16px;height:56px}
  .im-desk[data-standalone="1"] .im-f input[type=text],.im-desk[data-standalone="1"] .im-f input[type=password],.im-desk[data-standalone="1"] .im-f select{font-size:16px;min-height:42px}
  .im-desk[data-standalone="1"] .im-btn{min-height:42px}
  .sa-top .im-btn{min-height:34px}
  .sa-top .im-btn.im-sm{min-height:34px}
  .im-desk[data-standalone="1"] .im-row{min-height:40px}
  .im-desk[data-standalone="1"] .im-star{height:40px;width:40px}
  .im-desk[data-standalone="1"] .im-gc{min-height:44px}
  .im-desk[data-standalone="1"] .im-sm{min-height:36px}
  .im-desk[data-standalone="1"] .im-tools summary{padding:10px 0}
  .im-desk[data-standalone="1"] .im-mascot img{width:56px;height:56px}
}
@media (max-width:440px){
  .sa-t-full{display:none}.sa-t-short{display:inline}
  .sa-st,.sa-su{display:none}
}
@media (max-width:340px){
  .sa-site{display:none}
}
@media (prefers-reduced-motion:reduce){.im-desk[data-standalone="1"] *{transition:none!important;animation:none!important}}
