.main-panel {
  width: 100%;
}

.app-shell {
  background:
    radial-gradient(ellipse 190px 150px at 100% 17%, rgba(255, 139, 37, .25), transparent 74%),
    radial-gradient(ellipse 170px 190px at 0% 93%, rgba(255, 139, 37, .2), transparent 72%),
    radial-gradient(circle at 70% 0%, rgba(118, 36, 160, .35), transparent 34%),
    linear-gradient(130deg, #190f46 0%, #0a102b 38%, #080d22 100%);
}

.topbar {
  height: auto;
  min-height: 84px;
  padding: 8px 20px;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
  min-width: 0;
}

.header-logo {
  display: block;
  flex: none;
  width: 220px;
  max-height: 68px;
  height: auto;
  object-fit: contain;
  object-position: center;
}

.topbar .brand-tagline {
  max-width: 460px;
  margin: 0;
  position: relative;
  isolation: isolate;
  color: #ffd19a;
  font-family: 'EB Garamond', Garamond, 'Times New Roman', serif;
  font-size: clamp(19px, 1.72vw, 21px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.025em;
}

.brand-tagline__base {
  display: block;
  position: relative;
  z-index: 1;
  background: linear-gradient(100deg, #ffb74e 0%, #ffd09a 56%, #e8b8ff 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: .25px rgba(255, 242, 226, .42);
}

.brand-tagline__base::after {
  content: attr(data-text);
  position: absolute;
  z-index: 2;
  inset: 0;
  color: transparent;
  background: linear-gradient(108deg,
    transparent 0%,
    transparent 43%,
    rgba(255, 255, 255, .18) 46%,
    rgba(255, 249, 229, .8) 48%,
    #fff 50%,
    rgba(255, 247, 222, .92) 52%,
    rgba(255, 255, 255, .24) 55%,
    transparent 59%,
    transparent 100%);
  background-size: 240% 100%;
  background-position: 120% 0;
  background-repeat: no-repeat;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 3px rgba(255, 249, 230, .78)) drop-shadow(0 0 8px rgba(255, 139, 37, .48));
  pointer-events: none;
  user-select: none;
  animation: brand-text-glint 3.2s linear infinite;
}

@keyframes brand-text-glint {
  from { background-position: 120% 0; }
  to { background-position: -120% 0; }
}

.topbar .brand-tagline::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: -10px -24px;
  border-radius: 999px;
  background: radial-gradient(ellipse at center, rgba(255, 139, 37, .31), rgba(255, 139, 37, .12) 42%, transparent 74%);
  filter: blur(15px);
  pointer-events: none;
}

@media (min-width: 1024px) {
  .topbar .brand-tagline {
    margin-left: auto;
    margin-right: clamp(72px, 10vw, 144px);
  }
}

.chat-stage {
  padding: 10px;
}

.webchat-frame-shell {
  position: relative;
  z-index: 1;
  flex: 1;
  min-height: 0;
  width: 100%;
  overflow: hidden;
  border-radius: 14px;
  background: rgba(8, 14, 38, .74);
}

.webchat-container {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.webchat-container iframe {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 100% !important;
  border: 0 !important;
}

.webchat-header-mask {
  position: absolute;
  z-index: 5;
  inset: 0 0 auto;
  height: 60px;
  pointer-events: auto;
  touch-action: none;
  user-select: none;
  overflow: hidden;
  background:
    radial-gradient(ellipse 250px 82px at 0% 0%, rgba(214, 28, 158, .28), transparent 82%),
    radial-gradient(ellipse 220px 78px at 100% 0%, rgba(255, 139, 37, .22), transparent 82%),
    linear-gradient(112deg, #201044 0%, #151332 48%, #0e1530 100%);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .035), 0 10px 22px rgba(6, 8, 24, .14);
}

.webchat-header-mask::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(214, 28, 158, .62) 28%, rgba(255, 139, 37, .56) 72%, transparent);
}

.webchat-fallback {
  position: absolute;
  z-index: 6;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 24px;
  text-align: center;
  color: #9ea6cb;
  font-size: 14px;
  line-height: 1.6;
}

.webchat-fallback[hidden] {
  display: none;
}

@media (max-width: 760px) {
  .main-panel {
    padding: 10px;
  }

  .topbar {
    min-height: 72px;
    height: auto;
    padding: 8px 12px;
  }

  .topbar-brand {
    gap: 10px;
  }

  .header-logo {
    width: clamp(132px, 43vw, 178px);
    max-height: 54px;
  }

  .topbar .brand-tagline {
    max-width: none;
    flex: 1;
    margin: 0;
    font-size: clamp(12px, 3.5vw, 14px);
    line-height: 1.24;
  }

  .chat-stage {
    margin-top: 10px;
    padding: 6px;
  }

  .webchat-frame-shell {
    border-radius: 10px;
  }

  .webchat-header-mask {
    height: 56px;
  }
}
