:root {
  font: 14px/1.7 "Noto Sans Myanmar", "Myanmar Text", Inter, system-ui, sans-serif;
  color: #172b45;
  background: #e9eff3;
  --blue: #2682d8;
  --muted: #506781;
  --line: #e0e8ef;
  --control: #eff4f8;

}

* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .65; cursor: wait; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
input, textarea {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f6f8fb;
  color: inherit;
  padding: 10px 13px;
  font-size: 16px;
}
.primary, .quiet, .more, .filters button {
  border: 0;
  border-radius: 12px;
  padding: 8px 14px;
  font-weight: 650;
}
.primary { background: var(--blue); color: #fff; }
.primary:hover:enabled { background: #1b70c0; }
.quiet, .more, .filters button { color: #285981; background: var(--control); }
.quiet:hover, .more:hover { background: #e3eef8; }
.error { margin: 0; font-size: 13px; color: #a52c3b; }
.error:empty { display: none; }

.login {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 20px;
  background: radial-gradient(ellipse at 50% 0%, #e2eefb, #f2f6fa 72%);
}
.card {
  width: min(100%, 390px);
  padding: clamp(22px, 6vw, 32px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 16px 50px #28466812;
  text-align: center;
}
.card h1 { margin: 12px 0 0; font-size: 24px; line-height: 1.4; }
.card > p { color: var(--muted); margin: 5px 0 19px; }
.card label { display: block; margin: 12px 0; font-weight: 650; text-align: left; }
.card input { width: 100%; margin-top: 5px; min-height: 46px; }
.card .primary { width: 100%; min-height: 46px; margin-top: 8px; }
.brand-icon, .contact-avatar, .thread-avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 43px;
  height: 43px;
  border-radius: 50%;
  background: linear-gradient(145deg, #62b2f0, #257dce);
  color: #fff;
  font-weight: 750;
}
.card .brand-icon { width: 54px; height: 54px; margin: auto; font-size: 19px; }

.workspace {
  height: 100dvh;
  max-width: 1600px;
  margin: auto;
  padding: 20px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}
.workspace > header, .thread-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 18px;
  border: 1px solid var(--line);
  background: #fff;
}
.workspace > header { border-radius: 18px 18px 0 0; }
.app-name { display: grid; line-height: 1.4; }
.app-name span { color: var(--muted); font-size: 12px; }
#logout { margin-left: auto; }
.desk {
  display: grid;
  grid-template-columns: minmax(270px, 330px) minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 18px 18px;
  box-shadow: 0 14px 42px #203e6012;
}
.inbox { display: flex; flex-direction: column; min-height: 0; background: #fff; border-right: 1px solid var(--line); }
.inbox-top { padding: 18px 16px 13px; border-bottom: 1px solid #edf1f6; }
.search-field { position: relative; }
.search-field svg { width: 17px; height: 17px; position: absolute; left: 13px; top: 50%; transform: translateY(-50%); fill: none; stroke: #5d7893; stroke-width: 1.8; pointer-events: none; }
.search-field input { padding-left: 39px; }
.inbox h1 { margin: 0 0 9px; font-size: 19px; }
.inbox input { width: 100%; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.filters button { font-size: 12px; border-radius: 20px; }
.filters button[aria-pressed=true] { background: #dceeff; color: #125589; }
.inbox-list { overflow: auto; flex: 1; min-height: 0; scrollbar-width: thin; }
.inbox-list, .history { overscroll-behavior-y: contain; }
.item {
  display: grid;
  grid-template-columns: 43px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  width: calc(100% - 12px);
  min-height: 72px;
  margin: 2px 6px;
  padding: 9px;
  border: 0;
  border-radius: 12px;
  background: white;
  text-align: left;
  color: inherit;
}
.item:hover { background: #f2f7fc; }
.item[aria-current=true] { background: #e7f1ff; box-shadow: inset 3px 0 #287be2; }
.contact-details, .contact-meta { display: grid; gap: 2px; min-width: 0; }
.contact-details > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-details span, .contact-meta time { color: var(--muted); font-size: 12px; }
.contact-meta { align-self: start; text-align: right; }
.item .dot { justify-self: end; width: 8px; height: 8px; background: var(--blue); border-radius: 50%; }
.more { display: block; margin: 8px auto; font-size: 12px; }

.thread { min-height: 0; background: linear-gradient(145deg, #edf4fc, #f5f8fb 70%); }
.empty { display: grid; height: 100%; place-items: center; padding: 18px; text-align: center; color: var(--muted); }
.empty > div { padding: 13px 20px; border-radius: 16px; background: #ffffffde; }
.empty strong { color: #25405e; }
.empty p { margin: 3px 0 0; font-size: 13px; }
.inbox .empty { height: auto; }
.conversation { display: grid; height: 100%; grid-template-rows: auto minmax(0, 1fr) auto; }
.thread-head { min-height: 65px; border: 0; border-bottom: 1px solid var(--line); }
.thread { min-width: 0; }
.contact-heading { min-width: 0; line-height: 1.45; }
.contact-heading span { color: var(--muted); font-size: 12px; }
.thread-head h2 { margin: 0; font-size: 17px; }
.day-separator { text-align: center; margin: 8px 0 18px; position: sticky; top: 1px; z-index: 1; pointer-events: none; }
.day-separator time { display: inline-block; padding: 3px 13px; border-radius: 16px; background: #e1ebf6; color: #3b5978; font-size: 12px; }
#back { display: none; }
.history {
  overflow: auto;
  padding: 16px clamp(18px, 3vw, 44px) 12px;
  scrollbar-width: thin;
  scrollbar-color: #b4c5d0 transparent;
}
.bubble {
  width: fit-content;
  min-width: 75px;
  max-width: min(80%, 660px);
  margin: 0 auto 12px 0;
  font-size: 15px;
  padding: 9px 13px 6px;
  border-radius: 14px 14px 14px 4px;
  background: white;
  box-shadow: 0 1px 2px #263e5018;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.bubble.own { margin-left: auto; margin-right: 0; border-radius: 14px 14px 4px 14px; background: #e4efff; color: #172b45; }
.bubble.continued { margin-top: -8px; border-radius: 14px; }
.message-quote { display: block; padding: 3px 8px; margin: 0 0 6px; border-inline-start: 2px solid #4384c7; background: #edf4fb; border-radius: 4px; color: #375674; }
.message-meta { display: flex; justify-content: flex-end; align-items: center; gap: 5px; margin-top: 2px; }
.message-meta time { color: #516b7e; font-size: 11px; }
.receipt { display: inline-flex; color: #586f63; }
.receipt.seen { color: #0775be; }
.receipt svg, #send svg, #attach svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.receipt svg { height: 14px; }

.reply { padding: 10px clamp(14px, 3vw, 44px) max(12px, env(safe-area-inset-bottom)); }
.reply > .error { padding: 3px 8px; background: #fff; border-radius: 8px; margin-bottom: 6px; }
.composer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 9px;
  background: #fff;
  border-radius: 15px;
  box-shadow: 0 1px 3px #20374d18;
}
.composer textarea {
  min-height: var(--composer-control-height);
  max-height: 126px;
  padding: calc((var(--composer-control-height) - 26px) / 2) 4px;
  flex: 1;
  border: 0;
  background: transparent;
  resize: none;
  line-height: 26px;
}
#send, #attach { display: grid; place-items: center; width: 43px; height: 43px; border-radius: 50%; padding: 0; flex: none; }
#attach { background: #eff5fa; }
#send[aria-busy=true] svg { display: none; }
#send[aria-busy=true]::after { content: ""; border: 2px solid #ffffff66; border-top-color: white; border-radius: 50%; width: 16px; height: 16px; animation: send-spin .65s linear infinite; }
@keyframes send-spin { to { transform: rotate(360deg); } }
.attachment-draft {
  display: grid;
  grid-template-columns: 49px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
  padding: 6px 8px;
  border: 1px solid #cee2f4;
  border-radius: 12px;
  background: #f5faff;
}
.attachment-draft img { width: 49px; height: 43px; border-radius: 7px; object-fit: cover; }
.attachment-draft span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.photo-tile {
  display: grid;
  place-items: center;
  width: min(290px, 52vw);
  aspect-ratio: 4/3;
  overflow: hidden;
  margin: 0 0 5px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: #dce7f0;
  color: #405b75;
}
.photo-tile img { display: block; width: 100%; height: 100%; object-fit: cover; }
.photo-tile:hover img { filter: brightness(.95); }
#removeAttachment, #photo form button { width: 36px; height: 36px; padding: 0; border-radius: 50%; font-size: 21px; }
#photo { max-width: 92vw; padding: 12px; border: 0; border-radius: 15px; color: #233a55; }
#photo::backdrop { background: #111d34ce; }
#photo form { display: flex; align-items: center; justify-content: space-between; gap: 25px; }
#photo img { display: block; margin-top: 8px; max-width: 100%; max-height: 76dvh; border-radius: 8px; object-fit: contain; }
.notice { position: fixed; left: 50%; bottom: 12px; transform: translateX(-50%); background: #172f51; color: #fff; padding: 8px 15px; border-radius: 11px; max-width: 95vw; }

@media (max-width: 850px) {
  .workspace { padding: 12px; }
  .desk { grid-template-columns: minmax(225px, 265px) minmax(0, 1fr); }
}
@media (max-width: 680px) {
  .workspace { padding: 0; }
  .workspace > header, .desk { border-radius: 0; }
  .workspace > header { padding: 7px 12px; padding-top: max(7px, env(safe-area-inset-top)); }
  .workspace > header .brand-icon { width: 36px; height: 36px; }
  .desk { display: block; border-inline: 0; }
  .inbox, .thread { height: 100%; border-right: 0; }
  .thread { display: none; }
  .desk.open .inbox { display: none; }
  .desk.open .thread { display: block; }
  .thread-head { min-height: 54px; padding: 6px 10px; }
  .thread-avatar { width: 35px; height: 35px; }
  #back { display: block; }
  .history { padding: 12px; }
  .bubble { max-width: 87%; font-size: 14px; }
  .reply { padding-inline: 9px; }
  .photo-tile { width: min(245px, 57vw); }
}
@media (prefers-reduced-motion: reduce) { #send[aria-busy=true]::after { animation: none; } }

/* Rounded panes, translucent controls and the soft blue chat background. */
:root { --blue: #087de7; --muted: #49647f; --line: #dbe8f8; color: #112240; }
body { background: radial-gradient(ellipse at 68% 48%, #b7d9fa 0, #d0e6fa 48%, #eaf3fc 100%); }
.ui-icon { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.workspace { max-width: 1920px; gap: 12px; padding: 18px; }
.workspace > header {
  min-height: 70px; padding: 8px 23px; border: 1px solid #ffffffad; border-radius: 22px;
  background: linear-gradient(112deg, #ffffffed, #eef5ffce);
  box-shadow: 0 6px 17px #35669726;
  gap: 18px;
}
.workspace > header .brand-icon, .card .brand-icon {
  width: 48px; height: 48px; border-radius: 15px; background: linear-gradient(155deg, #59dcff 0, #0d8feb 54%, #0060c6);
  box-shadow: 0 5px 13px #1976d233, inset 0 2px 3px #ffffff60;
}
.brand-icon .ui-icon { width: 28px; height: 28px; }
.app-name { display: block; font-size: clamp(18px, 2vw, 27px); letter-spacing: -.035em; }
.admin-badge {
  display: flex; align-items: center; gap: 6px; position: relative;
  border-radius: 22px; padding: 5px 12px; background: linear-gradient(140deg,#e5f3ff,#cce3fb);
  color: #075db5; font-weight: 650;
}
.admin-badge::before { content: ''; width: 1px; height: 28px; background: #cbdcee; position: absolute; left: -10px; }
.admin-badge .ui-icon { width: 18px; height: 18px; }
.top-actions { display: flex; align-items: center; gap: 13px; margin-left: auto; }
.icon-button, #logout {
  display: inline-flex; align-items: center; justify-content: center; position: relative;
  width: 44px; height: 44px; padding: 0; border: 1px solid #cbdef5; border-radius: 15px;
  background: linear-gradient(145deg,#f6faff,#dfeafa); color: #244f7a;
  box-shadow: 0 3px 7px #4d7ba019; text-decoration: none;
}
.icon-button:hover, #logout:hover { background: #dbeaff; }
#logout { width: auto; gap: 8px; padding-inline: 13px; font-weight: 650; }
#notifications { background: transparent; border-color: transparent; box-shadow: none; }
#notifications.has-unread::after { content: ''; width: 8px; height: 8px; background: #087de7; border: 1px solid white; border-radius: 50%; position: absolute; top: 8px; right: 8px; }
.desk { grid-template-columns: minmax(285px, 28%) minmax(0, 1fr); gap: 10px; border: 0; border-radius: 0; overflow: visible; box-shadow: none; }
.inbox, .thread { border: 1px solid #ffffffc7; border-radius: 23px; overflow: hidden; box-shadow: 0 9px 24px #3f75ac26; }
.inbox { background: linear-gradient(154deg, #fffffff0, #f3f7fdef); }
.inbox-top { padding: 15px 18px 13px; border-color: #dbe8f5; }
.inbox h1 { display: flex; align-items: center; gap: 12px; font-size: 23px; margin-bottom: 15px; }
.inbox h1 .ui-icon { color: #2789e5; }
.search-field input { min-height: 45px; line-height: 24px; padding-block: 10px; border: 1px solid #c8dcf6; border-radius: 17px; background: linear-gradient(135deg,#f7faff,#e4edf9); }
.filters { margin-top: 12px; gap: 8px; }
.filters button { display: flex; align-items: center; gap: 7px; padding: 6px 12px; min-height: 36px; background: #eaf2fb; font-size: 13px; border: 1px solid #d9e8fa; }
.filters .ui-icon { width: 17px; height: 17px; }
.filters button[aria-pressed=true], #send { color: #fff; background: linear-gradient(145deg,#54c4ff,#117eea 60%,#005fc8); border-color: #389cf0; box-shadow: 0 3px 7px #2480d344; }
.item { grid-template-columns: 49px minmax(0,1fr) auto; gap: 10px; min-height: 75px; width: calc(100% - 16px); margin: 4px 8px; padding: 8px 10px; border: 1px solid transparent; border-radius: 17px; background: transparent; }
.item[aria-current=true] { background: linear-gradient(145deg,#eef6ff,#d0e3fa); border-color: #c6dcf8; box-shadow: inset 4px 0 #1687f6; }
.contact-avatar { width: 49px; height: 49px; font-size: 16px; }
.contact-details strong { font-size: 15px; }
.contact-details span { font-size: 13px; }
.contact-meta time { font-size: 11px; }
.thread { background: linear-gradient(142deg,#ecf3fc 0,#d7e8fa 47%,#eaf2fc 77%); }
.conversation { position: relative; isolation: isolate; }
.wave-backdrop { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.wave-backdrop svg { width: 100%; height: 100%; display: block; }
.thread-head { min-height: 77px; padding: 10px 19px; background: linear-gradient(130deg,#ffffffdf,#edf5ffdf); }
.thread-avatar { width: 54px; height: 54px; font-size: 19px; }
.thread-head h2 { font-size: 20px; }
.history { padding: 20px clamp(16px, 2.6vw, 42px) 12px; }
.day-separator { display: flex; align-items: center; justify-content: center; gap: 12px; max-width: 700px; margin: 8px auto 21px; }
.day-separator::before, .day-separator::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg,transparent,#8fb5dd88); }
.day-separator::after { transform: rotate(180deg); }
.day-separator time { display: inline-flex; align-items: center; gap: 8px; align-items: center; border: 1px solid #ffffffdc; color: #244464; background: linear-gradient(145deg,#e8f3ff,#cee3f9); padding: 6px 15px; border-radius: 22px; }
.day-separator .ui-icon { width: 17px; height: 17px; }
.bubble { padding: 10px 14px 7px; border-radius: 18px 18px 18px 5px; box-shadow: 0 5px 14px #315e8a18; background: #fffffff4; font-size: 16px; }
.bubble.own { background: linear-gradient(140deg,#eef8ff,#d6eaff); border-radius: 18px 18px 5px 18px; }
.bubble.continued { border-radius: 18px; }
.reply { padding: 8px 15px max(15px, env(safe-area-inset-bottom)); }
.composer-wrap { position: relative; }
.composer { --composer-control-height: 46px; border-radius: 21px; padding: 6px 8px; gap: 9px; border: 1px solid white; background: #ffffffed; box-shadow: 0 6px 17px #2e63912a; }
#attach, #send, #emojiToggle { width: 46px; height: var(--composer-control-height); flex: none; border-radius: 17px; }
#attach { border: 1px solid #e2edf9; background: linear-gradient(140deg,#f2f8ff,#e0ecfa); }
#send { border: 1px solid #389cf0; }
#emojiToggle { background: transparent; border-color: transparent; box-shadow: none; color: #577997; }
.emoji-picker { position: absolute; right: 52px; bottom: calc(100% + 6px); z-index: 4; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; padding: 6px; border: 1px solid #d7e6f6; border-radius: 15px; background: white; box-shadow: 0 8px 28px #24456233; }
.emoji-picker button { width: 35px; height: 35px; border: 0; border-radius: 9px; background: transparent; font-size: 19px; }
.emoji-picker button:hover { background: #eaf4ff; }
@media (min-width: 1450px) {
  .workspace { padding: 20px; gap: 14px; }
  .workspace > header { min-height: 76px; padding-inline: 33px; }
  .thread-head { min-height: 92px; padding-inline: 26px; }
  .thread-avatar { width: 62px; height: 62px; }
  .inbox-top { padding: 18px 22px 16px; }
  .item { min-height: 88px; }
  .contact-avatar { width: 55px; height: 55px; }
  .item { grid-template-columns: 55px minmax(0,1fr) auto; }
  .composer { --composer-control-height: 53px; }
}
@media (max-width: 850px) {
  .workspace { padding: 10px; gap: 9px; }
  .desk { grid-template-columns: minmax(245px, 31%) minmax(0,1fr); }
  .contact-meta time { max-width: 68px; line-height: 1.25; }
}
@media (max-width: 680px) {
  .workspace { padding: max(6px, env(safe-area-inset-top)) 6px 6px; gap: 6px; }
  .workspace > header { min-height: 51px; padding: 5px 8px; gap: 8px; border-radius: 14px; }
  .workspace > header .brand-icon { width: 34px; height: 34px; border-radius: 10px; }
  .brand-icon .ui-icon { width: 22px; height: 22px; }
  .app-name { font-size: 16px; }
  .admin-badge { padding: 2px 6px; font-size: 11px; }
  .admin-badge::before { display: none; }
  .admin-badge .ui-icon { width: 13px; height: 13px; }
  .top-actions { gap: 5px; }
  #logout, .icon-button { width: 36px; height: 36px; border-radius: 11px; padding: 0; }
  #logout span { display: none; }
  .inbox, .thread { border-radius: 17px; }
  .thread-head { min-height: 58px; padding: 6px 8px; gap: 7px; }
  .thread-avatar { width: 35px; height: 35px; font-size: 13px; }
  .thread-head h2 { font-size: 16px; }
  .contact-heading span { font-size: 10px; }
  .history { padding: 11px 10px; }
  .bubble { font-size: 14px; max-width: 88%; }
  .reply { padding-inline: 7px; }
  .composer { --composer-control-height: 42px; gap: 4px; padding: 4px 6px; border-radius: 16px; }
  #attach, #send, #emojiToggle { width: 38px; border-radius: 13px; }
}

/* Center the visible lettering within the existing header and avatar boxes. */
.workspace > header .app-name,
.workspace > header .admin-badge-label {
  line-height: 1;
  transform: translateY(2px);
}
.contact-avatar, .thread-avatar {
  line-height: 1;
  padding-block-start: 4px;
}

#loginSubmit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
#loginSubmit[aria-busy=true]::before {
  content: "";
  width: 14px;
  height: 14px;
  border: 2px solid #ffffff66;
  border-top-color: white;
  border-radius: 50%;
  animation: send-spin .65s linear infinite;
}
#notifications[aria-pressed=false] svg { opacity: .55 }
#notifications[aria-pressed=false]::before {
  content: "";
  position: absolute;
  width: 23px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transform: rotate(-45deg);
}
@media (prefers-reduced-motion: reduce) {
  #loginSubmit[aria-busy=true]::before { animation: none }
}

.broadcast-button { display: inline-flex; width: auto; gap: 7px; padding-inline: 12px; }
.broadcast-button span { font-size: .82rem; font-weight: 700; }
.contact-heading h2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-primary {
  min-height: 44px;
  padding: 7px 14px;
  border: 0;
  border-radius: 12px;
  background: #0877d9;
  color: white;
  font-weight: 700;
}
@media (max-width: 640px) {
  .broadcast-button span { display: none; }
  .broadcast-button { width: 38px; padding-inline: 0; }
}

.contact-name {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 36px;
}
.contact-name h2 {
  min-width: 0;
  line-height: 1.45;
}
.name-edit {
  display: inline-flex;
  flex: 0 0 36px;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #2869a3;
}
.name-edit:hover { background: #e0edfc; }
.name-edit .ui-icon {
  display: block;
  width: 17px;
  height: 17px;
  /* Align the diagonal icon with the optical center of the name. */
  transform: translateY(-2px);
}

.alias-dialog {
  width: min(416px, calc(100% - 28px));
  max-height: calc(100dvh - 28px);
  margin: auto;
  padding: 0;
  border: 1px solid #dceafb;
  border-radius: 24px;
  background: #fff;
  color: #162b48;
  box-shadow: 0 24px 70px #122b5052, 0 5px 16px #18386014;
}
.alias-dialog::backdrop {
  background: #142d506b;
  backdrop-filter: blur(3px);
}
.alias-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 20px 22px;
  border-bottom: 1px solid #e0ebf8;
  background: linear-gradient(118deg, #e9f4ff 0%, #f5f9ff 74%);
}
.alias-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid #2383e1;
  border-radius: 15px;
  color: white;
  background: linear-gradient(150deg, #45abf9, #1568cd);
  box-shadow: 0 5px 12px #1477d546, inset 0 1px 0 #ffffff52;
}
.alias-icon .ui-icon { width: 20px; height: 20px; }
.alias-heading h2 { margin: 0; font-size: 1.17rem; font-weight: 750; line-height: 1.55; }
.alias-heading p {
  margin: 1px 0 0;
  color: #496481;
  font-size: .88rem;
  font-variant-numeric: tabular-nums;
}
.alias-close {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid #dbe8f7;
  border-radius: 12px;
  background: #ffffffbc;
  color: #375d84;
}
.alias-close:hover { background: #e6f0fc; }
.alias-close .ui-icon { width: 16px; height: 16px; }
.alias-field { display: grid; gap: 7px; padding: 20px 22px 18px; }
.alias-field label { font-weight: 650; }
.alias-field input {
  width: 100%;
  min-height: 49px;
  padding: 10px 13px;
  border-color: #cfdef0;
  border-radius: 13px;
  background: #f7faff;
}
.alias-field input:focus-visible {
  border-color: #4c98e5;
  outline: 0;
  background: white;
  box-shadow: 0 0 0 3px #2785dc1d;
}
.alias-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 22px 15px;
  border-top: 1px solid #e7eff9;
  background: #f9fbff;
}
.alias-remove {
  min-height: 43px;
  padding: 6px 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #9f3440;
  font-weight: 650;
}
.alias-remove:hover { background: #f9e9ed; }
.alias-actions .member-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 114px;
  margin-inline-start: auto;
  border: 1px solid #096cc7;
  background: linear-gradient(140deg, #1689e9, #0867ca);
  box-shadow: 0 4px 10px #1477d542, inset 0 1px 0 #ffffff42;
}
.alias-actions .member-primary:hover:enabled { background: #096bcf; }
.alias-actions .member-primary .ui-icon { width: 16px; height: 16px; }
@media (max-width: 380px) {
  .alias-header { gap: 8px; padding: 16px 14px; }
  .alias-field { padding: 16px 14px; }
  .alias-actions { padding: 10px 14px; }
}

#broadcast {
  width: min(900px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  border: 1px solid #d7e5f7;
  border-radius: 24px;
  color: #172b45;
  background: #fff;
  box-shadow: 0 24px 70px #142e5752;
  overscroll-behavior: contain;
}
#broadcast::backdrop { background: #142d506b; }
.broadcast-header, .broadcast-heading, .broadcast-summary,
.broadcast-tools, .broadcast-footer, .broadcast-actions, .preview-chat-header {
  display: flex;
  align-items: center;
}
.broadcast-header {
  justify-content: space-between;
  gap: 12px;
  padding: 16px 22px;
  border-bottom: 1px solid #dfebf8;
  background: linear-gradient(110deg, #eaf4ff, #f8fbff 80%);
}
.broadcast-heading { gap: 12px; }
.broadcast-heading h2 { margin: 0; font-size: 1.28rem; line-height: 1.4; }
.broadcast-icon, .preview-avatar {
  display: grid;
  flex: none;
  place-items: center;
  color: #fff;
  background: linear-gradient(148deg, #3baaf7, #1266cd);
  box-shadow: 0 5px 12px #1879d533;
}
.broadcast-icon { width: 43px; height: 43px; border-radius: 14px; }
#closeBroadcast { width: 42px; height: 42px; padding: 0; font-size: 1.25rem; }
.broadcast-summary {
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 13px 22px 0;
}
.broadcast-summary p {
  margin: 0;
  padding: 5px 11px;
  border-radius: 10px;
  background: #eef5fd;
  color: #285981;
  font-size: .85rem;
  font-weight: 650;
}
.broadcast-summary .broadcast-progress { color: #126242; background: #e7f6ee; }
.broadcast-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  gap: 16px;
  padding: 15px 22px 17px;
}
.broadcast-editor, .broadcast-preview {
  min-width: 0;
  padding: 15px;
  border: 1px solid #e0eaf7;
  border-radius: 16px;
}
.broadcast-editor h3, .broadcast-preview h3 {
  margin: 0 0 10px;
  font-size: 1rem;
}
.broadcast-editor label { display: block; margin-bottom: 5px; color: #506781; font-size: .86rem; }
#broadcastText {
  display: block;
  width: 100%;
  min-height: 134px;
  padding: 10px 11px;
  resize: vertical;
  border: 1px solid #d2e1f2;
  background: #f8fbff;
}
#broadcastText:read-only { resize: none; background: #f0f5fb; }
#broadcastText::placeholder { color: #5a738f; }
.broadcast-tools {
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
}
#broadcastLength { margin-inline-start: auto; color: #526a84; font-size: .78rem; white-space: nowrap; }
#attachBroadcastPhoto {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  background: #eaf3ff;
  color: #185f9e;
}
#attachBroadcastPhoto:hover { background: #dcecff; }
#attachBroadcastPhoto .ui-icon { width: 18px; height: 18px; }
.broadcast-preview { background: #f6faff; }
.is-reviewing .broadcast-preview { border-color: #7bb6ef; }
.preview-chat { overflow: hidden; border: 1px solid #d4e3f5; border-radius: 13px; }
.preview-chat-header {
  gap: 8px;
  padding: 8px 11px;
  background: #fff;
  font-size: .84rem;
}
.preview-avatar { width: 29px; height: 29px; border-radius: 10px; }
.preview-avatar .ui-icon { width: 16px; height: 16px; }
.preview-history {
  min-height: 154px;
  max-height: min(320px, 43dvh);
  overflow: auto;
  padding: 11px;
  background: radial-gradient(ellipse at bottom right, #c9e5fd, transparent 74%), #eaf3fc;
}
#broadcastPreviewEmpty { margin: 32px auto; max-width: 200px; text-align: center; color: #506985; font-size: .85rem; }
.preview-bubble {
  width: fit-content;
  max-width: 94%;
  overflow: hidden;
  border-radius: 12px 12px 12px 4px;
  background: #fff;
  box-shadow: 0 2px 6px #1f4b7b16;
}
#broadcastPreviewText { margin: 0; padding: 8px 11px; overflow-wrap: anywhere; white-space: pre-wrap; }
.broadcast-photo { position: relative; background: #edf4fd; }
.broadcast-photo img { display: block; max-width: 100%; max-height: min(235px, 32dvh); object-fit: contain; }
#removeBroadcastPhoto {
  position: absolute;
  top: 7px;
  right: 7px;
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  place-items: center;
  background: #fff;
  box-shadow: 0 2px 10px #163c672a;
}
.broadcast-footer {
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 14px;
  padding: 12px 22px;
  border-top: 1px solid #e1ecf9;
  background: #f8fbff;
}
.broadcast-actions { justify-content: flex-end; gap: 8px; margin-inline-start: auto; flex-wrap: wrap; }
.broadcast-actions .member-primary { min-width: 112px; }
@media (max-width: 620px) {
  #broadcast { width: calc(100% - 18px); max-height: calc(100dvh - 20px); border-radius: 18px; }
  .broadcast-workspace { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .broadcast-header, .broadcast-summary, .broadcast-workspace, .broadcast-footer { padding-inline: 12px; }
  .broadcast-editor, .broadcast-preview { padding: 10px; }
  #broadcastText { min-height: 105px; }
  .preview-history { min-height: 108px; }
  #broadcastPreviewEmpty { margin: 18px auto; }
}

.broadcast-summary .broadcast-progress {
  flex: 1 0 100%;
  padding: 9px 12px;
  border: 1px solid #d6e7fa;
  border-radius: 12px;
  background: #f1f7ff;
  color: #1f568d;
}
.broadcast-progress-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.broadcast-progress-label p { padding: 0; background: transparent; }
#broadcastPercent { flex: none; font-size: 1rem; font-variant-numeric: tabular-nums; }
#broadcastProgressBar {
  display: block;
  width: 100%;
  height: 7px;
  margin-top: 6px;
  accent-color: #0877d9;
}
.broadcast-button { position: relative; }
#broadcastHeaderProgress {
  display: inline-grid;
  min-width: 25px;
  min-height: 19px;
  padding-inline: 4px;
  place-items: center;
  border-radius: 7px;
  background: #0869bf;
  color: white;
  font-size: .7rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}
@media (max-width: 640px) {
  #broadcastHeaderProgress { position: absolute; right: -3px; bottom: -3px; }
}

.chat-info-button { margin-inline-start: auto; flex: none; }
.chat-access-badge {
  margin-inline-start: 8px;
  padding: 4px 8px;
  border-radius: 8px;
  color: #9b3441;
  background: #fcecf0;
  font-size: .78rem;
  white-space: nowrap;
}
.chat-info-body { padding: 14px 22px; }
.chat-info-body strong { overflow-wrap: anywhere; }
.chat-info-body p { margin: 4px 0; }
.chat-info-body strong:empty, .chat-info-body p:empty { display: none; }
#chatInfoState { color: #506781; }
.chat-access-action { margin-inline-start: auto; }
.chat-access-action.is-destructive { background: #a52e42; border-color: #a52e42; }
