:root {
  color-scheme: light;
  font-family: system-ui, "Noto Sans Bengali", sans-serif;
  line-height: 1.5;
  color: #192f42;
  background: #edf2f6;
  --navy: #153653;
  --blue: #215472;
  --muted: #506477;
  --line: #d9e3eb;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100dvh; }
.masthead { background: #fff; border-bottom: 1px solid var(--line); }
.masthead-content {
  width: min(100% - clamp(2rem, 10vw, 13rem), 100rem);
  margin-inline: auto;
  padding-block: clamp(1.55rem, 3vw, 2.65rem);
}
h1, h2, p { margin: 0; }
h1 {
  color: var(--navy);
  font-size: clamp(1.95rem, 3.7vw, 3.05rem);
  font-weight: 740;
  letter-spacing: -.035em;
  line-height: 1.12;
}
.masthead p { margin-top: .55rem; color: var(--muted); font-size: clamp(.96rem, 1.45vw, 1.22rem); }
.widget {
  --gutter: clamp(.75rem, 2.35vw, 2rem);
  position: fixed;
  right: max(var(--gutter), env(safe-area-inset-right));
  bottom: max(var(--gutter), env(safe-area-inset-bottom));
}
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .6; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible {
  outline: 3px solid #ad560e;
  outline-offset: 3px;
}
.launcher {
  display: grid;
  place-items: center;
  width: clamp(3.55rem, 5.2vw, 4.65rem);
  aspect-ratio: 1;
  border: 0;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  box-shadow: 0 .5rem 1.6rem #15365336;
}
.launcher:hover, #submit:hover:not(:disabled) { background: var(--blue); }
.chat-icon {
  position: relative;
  width: 1.37rem;
  height: 1.04rem;
  border: 2px solid currentColor;
  border-radius: .24rem;
}
.chat-icon::before {
  content: "";
  position: absolute;
  top: .22rem;
  left: .22rem;
  width: .68rem;
  height: 2px;
  background: currentColor;
  box-shadow: 0 .22rem currentColor;
}
.chat-icon::after {
  content: "";
  position: absolute;
  bottom: -.31rem;
  left: .12rem;
  width: .43rem;
  height: .43rem;
  border: solid currentColor;
  border-width: 0 0 2px 2px;
  background: var(--navy);
  transform: skewY(-35deg);
}
.launcher:hover .chat-icon::after { background: var(--blue); }
.panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-columns: minmax(0, 1fr);
  width: min(33rem, calc(100vw - 2 * var(--gutter) - env(safe-area-inset-left) - env(safe-area-inset-right)));
  height: min(35.5rem, calc(100dvh - 2 * var(--gutter) - env(safe-area-inset-top) - env(safe-area-inset-bottom)));
  border: 1px solid #c9d9e4;
  border-radius: 1.25rem;
  background: #fff;
  box-shadow: 0 1.25rem 3.25rem #19364b32;
}
.chat-header {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .8rem 1rem;
  border-radius: 1.18rem 1.18rem 0 0;
  background: var(--navy);
  color: #fff;
}
.chat-identity { flex: 1; min-width: 0; }
.chat-identity h2 { font-size: clamp(.95rem, 3.5vw, 1.22rem); line-height: 1.2; }
.chat-identity p { color: #e4edf5; font-size: .81rem; margin-top: .18rem; overflow-wrap: anywhere; }
.chat-header select, .icon-button {
  min-height: 2.75rem;
  border: 1px solid #ffffff35;
  border-radius: .55rem;
  color: inherit;
  background: #ffffff17;
}
.chat-header select { padding-inline: .35rem; font-size: .84rem; }
.chat-header option { background: #fff; color: #192f42; }
.icon-button {
  width: 2.75rem;
  flex: 0 0 auto;
  font-size: 1.6rem;
  line-height: 1;
}
.icon-button:hover:not(:disabled) { background: #ffffff2b; }
.chat-body { overflow-y: auto; overscroll-behavior: contain; padding: 1rem; }
.chat-body:focus-visible { outline: 3px solid #ad560e; outline-offset: -3px; }
.reply {
  background: #edf3f8;
  border-radius: .85rem .85rem .85rem .2rem;
  padding: .7rem .85rem;
  width: fit-content;
  max-width: 96%;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
#conversation { display: grid; gap: .7rem; }
#conversation:not(:empty) { margin-top: .75rem; }
.starters { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .7rem; }
.starters:empty { display: none; }
.starters button {
  border: 1px solid #c2d3df;
  border-radius: 2rem;
  background: #fff;
  color: #204766;
  padding: .42rem .68rem;
  min-height: 2.25rem;
  font-size: .825rem;
  text-align: left;
}
.starters button:hover:not(:disabled) { background: #edf3f8; }
.composer { border-top: 1px solid var(--line); padding: .78rem 1rem; }
.input-row { display: flex; gap: .45rem; }
input { flex: 1; min-width: 0; border: 1px solid #7f95a7; border-radius: .65rem; padding: .62rem .67rem; color: inherit; }
input::placeholder { color: var(--muted); }
#submit { border: 0; border-radius: .65rem; padding: .62rem .86rem; background: var(--navy); color: #fff; font-weight: 650; }
#notice, #status, #fallback { color: #475e72; font-size: .78rem; }
#notice { margin-top: .43rem; }
#status:not(:empty), #fallback:not(:empty) { margin-bottom: .42rem; }
.reply a, #fallback a { display: block; width: fit-content; margin-top: .25rem; color: #164a75; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 390px) {
  .chat-header, .chat-body, .composer { padding-inline: .65rem; }
  .chat-header { gap: .28rem; }
  .icon-button { width: 2.5rem; }
}
