/* Guardian HME84 — página pública /chat.html */
.page-guardian-chat { min-height: 100dvh; display: flex; flex-direction: column; }
.gpub-wrap {
  flex: 1; display: flex; flex-direction: column;
  padding: calc(var(--nav-header-height, 72px) + 24px) 1.25rem 2rem;
  max-width: 720px; width: 100%; margin: 0 auto; min-height: 0; box-sizing: border-box;
}
.gpub-card {
  flex: 1; display: flex; flex-direction: column;
  min-height: min(70dvh, 640px);
  max-height: calc(100dvh - var(--nav-header-height, 72px) - 120px);
  border: 1px solid var(--border-mid); border-radius: var(--r-lg);
  background: var(--bg-surface); overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,.35);
}
.gpub-head {
  position: relative;
  flex-shrink: 0; display: flex; align-items: flex-start; gap: 14px;
  padding: 18px 20px; border-bottom: 1px solid var(--border);
  background: rgba(17,19,26,.92);
}
.gpub-head-avatar-slot {
  position: relative;
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  isolation: isolate;
  display: grid;
  place-items: center;
}
.gpub-head-avatar-slot__ambient {
  position: absolute;
  inset: -18%;
  z-index: 0;
  pointer-events: none;
  border-radius: 50%;
  background:
    radial-gradient(circle at 48% 40%, rgba(168, 212, 41, 0.14) 0%, transparent 55%),
    radial-gradient(circle at 55% 62%, rgba(232, 112, 45, 0.09) 0%, transparent 50%),
    radial-gradient(circle at 38% 58%, rgba(232, 96, 10, 0.06) 0%, transparent 48%);
  filter: blur(14px);
  opacity: 0.72;
  -webkit-mask-image: radial-gradient(circle at 50% 48%, #000 28%, transparent 72%);
  mask-image: radial-gradient(circle at 50% 48%, #000 28%, transparent 72%);
}
.gpub-head-avatar {
  position: relative;
  z-index: 1;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: contain;
  padding: 0;
  border: none;
  background: transparent;
}
.gpub-head-text { flex: 1; min-width: 0; }
.gpub-title {
  font-family: var(--font-sans); font-size: 11px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--text-primary); margin: 0;
}
.gpub-sub { margin: 6px 0 0; font-size: 13px; line-height: 1.45; color: var(--text-secondary); }
.gpub-status { display: block; margin-top: 8px; font-size: 11px; letter-spacing: .06em; color: var(--text-muted); }
.gpub-messages {
  flex: 1; min-height: 0; overflow-y: auto; padding: 16px 18px;
  display: flex; flex-direction: column; gap: 10px; scrollbar-width: thin;
}
.gpub-empty { margin: auto; text-align: center; padding: 24px 16px; max-width: 38ch; }
.gpub-empty p { font-size: 14px; line-height: 1.6; color: var(--text-secondary); }
.gpub-msg {
  max-width: 92%; padding: 11px 14px; border-radius: 14px; font-size: 14px; line-height: 1.5;
  white-space: pre-wrap; word-break: break-word;
}
.gpub-msg-user { align-self: flex-end; background: rgba(80,120,200,.28); border: 1px solid var(--border-mid); color: #e8eeff; }
.gpub-msg-assistant { align-self: flex-start; background: rgba(255,255,255,.06); border: 1px solid var(--border); color: var(--text-primary); }
.gpub-msg-error { align-self: flex-start; background: var(--red-dim); border: 1px solid rgba(255,120,120,.35); color: #ffd6d6; }
.gpub-starters { flex-shrink: 0; display: flex; flex-wrap: wrap; gap: 8px; padding: 0 18px 12px; }
.gpub-starters[hidden] { display: none !important; }
.gpub-chip {
  appearance: none; border: 1px solid var(--accent-border); background: var(--accent-dim);
  color: var(--accent); font: inherit; font-size: 12px; font-weight: 500;
  padding: 8px 12px; border-radius: 999px; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.gpub-chip:hover { background: rgba(168,212,41,.2); border-color: var(--accent); }
.gpub-compose {
  flex-shrink: 0;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--border);
  background: rgba(12, 14, 21, 0.72);
}
/* Single rounded composer: input + lime send */
.gpub-composer {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 8px 10px 8px 14px;
  border-radius: 16px;
  border: 1px solid var(--border-mid);
  background: rgba(22, 25, 34, 0.96);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.gpub-composer:focus-within {
  border-color: rgba(168, 212, 41, 0.38);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 0 0 2px rgba(168, 212, 41, 0.1);
}
.gpub-input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  max-height: 140px;
  resize: none;
  padding: 8px 4px 8px 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--text-primary);
  font: inherit;
  font-size: 14px;
  line-height: 1.45;
}
.gpub-input::placeholder {
  color: rgba(240, 237, 230, 0.38);
}
.gpub-input:focus {
  outline: none;
}
.gpub-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.gpub-send {
  flex-shrink: 0;
  appearance: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--control-radius-soft, 12px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0) 42%),
    var(--accent);
  color: #0a0d12;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--control-shadow, 0 1px 2px rgba(0, 0, 0, 0.22));
  transition:
    opacity 0.15s ease,
    transform 0.12s ease,
    box-shadow 0.2s ease,
    filter 0.2s ease;
}
.gpub-send:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.gpub-send-icon {
  display: block;
}
.gpub-send:disabled {
  opacity: 0.44;
  cursor: not-allowed;
  transform: none;
}
.gpub-send:not(:disabled):hover {
  filter: brightness(1.04);
  box-shadow: var(--control-shadow-hover, 0 4px 16px rgba(0, 0, 0, 0.28));
  transform: translateY(-1px);
}
.gpub-send:not(:disabled):active {
  transform: translateY(0);
}
.gpub-thinking { display: flex; gap: 4px; align-self: flex-start; padding: 8px 12px; }
.gpub-thinking span {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent); opacity: .65;
  animation: gpub-bounce 1.1s ease-in-out infinite;
}
.gpub-thinking span:nth-child(2) { animation-delay: .15s; }
.gpub-thinking span:nth-child(3) { animation-delay: .3s; }
@keyframes gpub-bounce { 0%,80%,100%{transform:translateY(0)} 40%{transform:translateY(-5px)} }
.gpub-head-reset {
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 2px;
  appearance: none;
  padding: 0 14px;
  height: var(--control-icon-sm, 36px);
  border: 1px solid var(--control-border, var(--border-mid));
  border-radius: var(--control-radius-pill, 999px);
  background: var(--control-surface, rgba(255, 255, 255, 0.04));
  color: var(--text-secondary);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
  cursor: pointer;
  box-shadow: var(--control-inset-highlight, inset 0 1px 0 rgba(255, 255, 255, 0.08));
  transition:
    border-color 0.2s ease,
    color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}
.gpub-head-reset:hover {
  border-color: var(--accent-border);
  color: var(--text-primary);
  background: var(--control-surface-hover, rgba(255, 255, 255, 0.08));
  box-shadow: var(--control-shadow-hover, 0 4px 16px rgba(0, 0, 0, 0.28));
}
.gpub-head-reset:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
@media (max-width:540px){
  .gpub-wrap { padding-left: 1rem; padding-right: 1rem; }
  .gpub-card { max-height: none; min-height: 65dvh; }
  .gpub-compose { padding-left: 12px; padding-right: 12px; }
}
