.guest-page {
  --guest-blue: #2563cf;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  isolation: isolate;
  background: #f5f7fa;
  color: #23334d;
}

.guest-atmosphere {
  position: absolute;
  z-index: -1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background: #edf3fb url('/ppi-chemistry-background.webp?v=20261112-ppi') center / cover no-repeat;
}

.guest-atmosphere::before,
.guest-atmosphere::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.guest-atmosphere::before {
  inset: -12%;
  background:
    radial-gradient(ellipse at 11% 37%, #fff6e06b, transparent 31%),
    radial-gradient(ellipse at 91% 33%, #b7d7ff50, transparent 36%),
    radial-gradient(ellipse at 51% 57%, #ffffff65, transparent 48%);
  animation: guest-sky 20s ease-in-out infinite alternate;
}

.guest-atmosphere::after {
  inset: 0;
  background: linear-gradient(180deg, #edf4ff40, transparent 23%, transparent 75%, #f3f7fbd9);
}

@keyframes guest-sky {
  from { transform: translate3d(-4%, -2%, 0); opacity: .64; }
  to { transform: translate3d(5%, 3%, 0) scale(1.06); opacity: 1; }
}

.guest-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(100%, 1200px);
  min-height: 72px;
  margin-inline: auto;
  padding: 14px 24px;
}

.guest-link {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #9cafc486;
  border-radius: 999px;
  color: #23334d;
  background: #ffffff8c;
  min-height: 43px;
  padding: 8px 19px;
  font-size: 14px;
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.guest-link:hover {
  border-color: #8fa6c6;
  background: #ffffff;
  box-shadow: 0 3px 12px #36679d16;
}

.guest-main {
  flex: 1;
  display: grid;
  place-items: center;
  padding: clamp(40px, 8vh, 80px) 24px 44px;
}

.guest-chat { width: min(100%, 880px); }

.guest-chat h1 {
  margin: 0 0 clamp(26px, 4.8vh, 46px);
  padding-inline-start: .11em;
  color: #22314b;
  text-align: center;
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 400;
  letter-spacing: .11em;
  line-height: 1.38;
}

.guest-composer {
  padding: 13px 12px 11px;
  border: 1px solid #c6d8ed;
  border-radius: 24px;
  background: #fbfdffc9;
  box-shadow: inset 0 0 0 1px #ffffff88, 0 10px 34px #305f9410;
  backdrop-filter: blur(14px);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.guest-composer:focus-within {
  border-color: #7296d3;
  background: #f8fbffad;
  box-shadow: 0 0 0 3px #87a8e036;
}

.guest-composer textarea {
  display: block;
  width: 100%;
  min-height: 68px;
  max-height: min(38vh, 280px);
  resize: vertical;
  padding: 1px 10px 8px;
  border: 0;
  outline: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 16px;
  line-height: 1.6;
}

@supports (field-sizing: content) {
  .guest-composer textarea { field-sizing: content; resize: none; }
}

.guest-composer textarea::placeholder { color: #52627a; }

.guest-composer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0 0 3px;
  color: #4e617b;
  font-size: 12px;
}

.guest-composer-actions kbd {
  padding: 2px 5px;
  border-radius: 5px;
  background: #ffffff69;
  color: #344966;
  font: inherit;
  font-weight: 600;
}

.guest-composer-actions span span { margin: 0 4px; }
#guest-shortcuts { margin-inline-start: auto; text-align: end; }
.guest-composer .plugin-pill { min-height: 34px; padding-inline: 12px; }

.guest-send, .guest-dialog-close {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: 50%;
  transition: background .18s ease;
}

.guest-send { color: #fff; background: var(--guest-blue); }
.guest-send:hover:not(:disabled) { background: #2b5bc7; }
.guest-send:disabled { color: #405f92; background: #cfdbf0; opacity: 1; cursor: default; }

.guest-send svg,
.guest-link svg,
.guest-dialog-close svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.guest-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 16px;
  margin-top: clamp(24px, 4.4vh, 40px);
}

.guest-link svg { width: 17px; height: 17px; }

.guest-footer {
  padding: 12px 24px 22px;
  color: #4c617b;
  text-align: center;
  font-size: 12px;
}

.guest-dialog {
  position: fixed;
  width: min(424px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  padding: 32px 34px 34px;
  border: 1px solid #fff;
  border-radius: 24px;
  color: #26364f;
  overscroll-behavior: contain;
  box-shadow: 0 20px 64px #1029493a;
}

.guest-dialog::backdrop {
  background: #263e6250;
  backdrop-filter: blur(6px);
}

.guest-dialog h2 {
  margin: 0 32px 8px;
  color: #203352;
  text-align: center;
  letter-spacing: 0;
}

.guest-dialog .login-subtitle { margin-bottom: 24px; color: #4d607b; text-align: center; }
.guest-dialog .login-error { color: #9c3e31; }
.guest-dialog form > label { margin-top: 12px; color: #3d526c; }
.guest-dialog input { padding-inline: 15px; border-radius: 999px; border-color: #d5dfed; }
.guest-dialog input::placeholder { color: #647790; }
.guest-dialog .password-field input { padding-inline-end: 46px; }
.guest-dialog .captcha-image { border-radius: 999px; }
.guest-dialog .captcha-help { color: #5d718c; }
.guest-dialog .login-submit { margin-top: 12px; border-radius: 999px; background: var(--guest-blue); }
.guest-dialog .login-submit:hover { background: #2b5bc7; }
.guest-dialog-close { position: absolute; inset: 14px 14px auto auto; color: #50647f; background: transparent; }
.guest-dialog-close:hover { background: #edf3fd; }

@media (prefers-reduced-motion: reduce) {
  .guest-atmosphere::before { animation: none; }
  .guest-page button, .guest-composer, .guest-link { transition: none; }
}

@media (forced-colors: active) {
  .guest-composer:focus-within { outline: 2px solid Highlight; outline-offset: 2px; }
}
