:root {
  --rit-gogi-blue: #0b63f6;
  --rit-gogi-blue-2: #2f7af8;
  --rit-gogi-blue-dark: #0c3f98;
  --rit-gogi-purple: #6d4ae8;
  --rit-gogi-green: #16a86f;
  --rit-gogi-navy: #101828;
  --rit-gogi-text: #1d2939;
  --rit-gogi-muted: #667085;
  --rit-gogi-subtle: #98a2b3;
  --rit-gogi-surface: #ffffff;
  --rit-gogi-canvas: #f7f9fc;
  --rit-gogi-bubble: #f3f6fb;
  --rit-gogi-border: #e4e9f1;
  --rit-gogi-border-strong: #d7deea;
  --rit-gogi-shadow: 0 30px 80px rgba(15, 23, 42, .20), 0 8px 24px rgba(15, 23, 42, .08);
  --rit-gogi-shadow-soft: 0 8px 22px rgba(15, 23, 42, .065);
  --rit-gogi-radius-window: 24px;
  --rit-gogi-radius-card: 15px;
  --rit-gogi-ease: cubic-bezier(.22, 1, .36, 1);
}

.rit-gogi,
.rit-gogi * { box-sizing: border-box; }
.rit-gogi { font-family: "Open Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--rit-gogi-text); }
.rit-gogi button { font: inherit; }
.rit-gogi button:focus-visible,
.rit-gogi a:focus-visible { outline: 3px solid rgba(11,99,246,.24); outline-offset: 3px; }

/* --------------------------------------------------------------------------
   Floating launcher
   -------------------------------------------------------------------------- */
.rit-gogi--floating { position: fixed; right: 24px; bottom: 24px; z-index: 99999; }
.rit-gogi__backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: rgba(6, 15, 31, .35);
  -webkit-backdrop-filter: blur(1.5px);
  backdrop-filter: blur(1.5px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .28s ease, visibility .28s ease;
}
.rit-gogi--floating.rit-gogi--open .rit-gogi__backdrop {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.rit-gogi__launcher-wrap { position: relative; z-index: 2; display: flex; justify-content: flex-end; transition: opacity .28s ease, transform .38s var(--rit-gogi-ease); }
.rit-gogi__launcher {
  position: relative;
  min-height: 60px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 5px 13px 5px 5px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #123f9a 0%, var(--rit-gogi-blue) 66%, var(--rit-gogi-purple) 100%);
  color: #fff;
  box-shadow: 0 16px 38px rgba(11,99,246,.28), 0 5px 14px rgba(15,23,42,.14);
  cursor: pointer;
  isolation: isolate;
  font-weight: 800;
  transition: transform .26s var(--rit-gogi-ease), box-shadow .26s ease;
  animation: rit-gogi-breathe 5.2s ease-in-out infinite;
}
.rit-gogi__launcher:hover { transform: translateY(-2px); box-shadow: 0 20px 46px rgba(11,99,246,.33), 0 8px 18px rgba(15,23,42,.14); }
.rit-gogi__launcher-glow { position: absolute; inset: -4px; z-index: -1; border-radius: inherit; background: linear-gradient(135deg, rgba(11,99,246,.28), rgba(109,74,232,.23)); filter: blur(12px); opacity: .58; }
.rit-gogi__launcher img { width: 50px; height: 50px; aspect-ratio: 1; border-radius: 50%; object-fit: cover; object-position: center 24%; background: #fff; border: 2px solid rgba(255,255,255,.92); }
.rit-gogi__launcher-label { font-size: 14px; letter-spacing: .01em; }
.rit-gogi__launcher-dot { width: 8px; height: 8px; border-radius: 50%; background: #39d98a; box-shadow: 0 0 0 4px rgba(57,217,138,.14); }
.rit-gogi__peek { position: absolute; right: 3px; bottom: calc(100% + 10px); max-width: 230px; padding: 9px 12px; border: 1px solid #dfe7f4; border-radius: 14px 14px 4px 14px; background: #fff; color: #23324a; box-shadow: 0 12px 30px rgba(15,23,42,.13); font-size: 13px; font-weight: 750; opacity: 0; transform: translateY(8px) scale(.97); pointer-events: none; transition: opacity .22s ease, transform .32s var(--rit-gogi-ease); }
.rit-gogi__peek--show { opacity: 1; transform: translateY(0) scale(1); }

/* --------------------------------------------------------------------------
   Main assistant window
   -------------------------------------------------------------------------- */
.rit-gogi__panel {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 74px;
  width: min(520px, calc(100vw - 32px));
  height: min(700px, calc(100dvh - 112px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(16,24,40,.09);
  border-radius: var(--rit-gogi-radius-window);
  background: rgba(255,255,255,.995);
  box-shadow: var(--rit-gogi-shadow);
  backdrop-filter: blur(18px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(20px) scale(.965);
  transform-origin: 92% 100%;
  transition: opacity .3s ease, transform .52s var(--rit-gogi-ease), visibility .3s;
}
.rit-gogi--floating.rit-gogi--open .rit-gogi__panel { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0) scale(1); }
.rit-gogi--floating.rit-gogi--open .rit-gogi__launcher-wrap { opacity: 0; pointer-events: none; transform: translateY(8px) scale(.94); }
.rit-gogi--inline .rit-gogi__panel { position: relative; right: auto; bottom: auto; width: min(520px, 100%); height: min(700px, 82dvh); margin: 0 auto; opacity: 1; visibility: visible; pointer-events: auto; transform: none; }

/* Header */
.rit-gogi__header {
  flex: 0 0 auto;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px 10px 13px;
  color: #fff;
  background: linear-gradient(135deg, #153d91 0%, #1768ed 72%, #5f4ad8 100%);
  border-bottom: 1px solid rgba(255,255,255,.11);
}
.rit-gogi__identity { min-width: 0; display: flex; align-items: center; gap: 10px; }
.rit-gogi__identity-avatar { position: relative; width: 44px; height: 44px; flex: 0 0 44px; aspect-ratio: 1; overflow: hidden; border-radius: 50%; background: #fff; border: 2px solid rgba(255,255,255,.86); box-shadow: 0 5px 14px rgba(4,28,76,.17); }
.rit-gogi__identity-avatar::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(15,23,42,.05); pointer-events: none; }
.rit-gogi__state-image { width: 100%; height: 100%; display: block; object-fit: contain; object-position: center; padding: 2px; opacity: 1; transform: scale(1); transition: opacity .18s ease, transform .34s var(--rit-gogi-ease); }
.rit-gogi__state-image--fade-out { opacity: .18; transform: scale(.965); }
.rit-gogi__state-image--fade-in { animation: rit-gogi-state-in .34s var(--rit-gogi-ease) both; }
.rit-gogi__identity-copy { min-width: 0; }
.rit-gogi__identity-line { display: flex; align-items: center; gap: 9px; min-width: 0; }
.rit-gogi__identity-line strong { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; line-height: 1.15; }
.rit-gogi__subtitle { display: block; margin-top: 2px; color: rgba(255,255,255,.75); font-size: 11.5px; line-height: 1.2; }
.rit-gogi__status { display: inline-flex; align-items: center; gap: 5px; padding: 3px 7px; border-radius: 999px; background: rgba(255,255,255,.10); color: rgba(255,255,255,.88); font-size: 9.5px; font-weight: 700; line-height: 1; white-space: nowrap; }
.rit-gogi__status-dot { width: 6px; height: 6px; border-radius: 50%; background: #45e59b; box-shadow: 0 0 0 3px rgba(69,229,155,.12); animation: rit-gogi-pulse 2.8s infinite; }
.rit-gogi__close { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255,255,255,.10); color: #fff; cursor: pointer; font-size: 23px; line-height: 1; transition: background .2s ease, transform .2s var(--rit-gogi-ease); }
.rit-gogi__close:hover { background: rgba(255,255,255,.18); transform: rotate(4deg) scale(1.03); }

/* --------------------------------------------------------------------------
   Welcome state
   -------------------------------------------------------------------------- */
.rit-gogi__welcome-screen {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
  padding: 28px 30px 32px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 20%, rgba(11,99,246,.09), transparent 34%),
    linear-gradient(180deg, #fcfdff 0%, #f7f9fc 100%);
  opacity: 1;
  transform: translateY(0) scale(1);
  transition: opacity .32s ease, transform .46s var(--rit-gogi-ease), filter .32s ease;
}
/* The HTML hidden attribute must win over the welcome display:flex declaration.
   Otherwise the invisible welcome view keeps reserving half of the chat height. */
.rit-gogi__welcome-screen[hidden],
.rit-gogi.rit-gogi--chat-mode .rit-gogi__welcome-screen { display: none !important; }
.rit-gogi__welcome-screen::before { content: ""; position: absolute; width: 280px; height: 280px; left: 50%; top: 52px; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(circle, rgba(82,121,255,.12), rgba(82,121,255,0) 67%); pointer-events: none; }
.rit-gogi__welcome-screen--out { opacity: 0; transform: translateY(-10px) scale(.985); filter: blur(1.5px); pointer-events: none; }
.rit-gogi__welcome-avatar-wrap { position: relative; z-index: 1; width: 184px; height: 184px; flex: 0 0 auto; display: grid; place-items: center; }
.rit-gogi__welcome-halo { position: absolute; width: 170px; height: 170px; border-radius: 50%; background: radial-gradient(circle, rgba(77,118,255,.15), rgba(109,74,232,.04) 56%, transparent 72%); animation: rit-gogi-halo 5s ease-in-out infinite; }
.rit-gogi__welcome-avatar { position: relative; z-index: 1; width: 168px; height: 168px; aspect-ratio: 1; display: block; object-fit: contain; object-position: center; filter: drop-shadow(0 13px 22px rgba(30,55,110,.13)); opacity: 0; transform: translateY(12px) scale(.94); }
.rit-gogi__welcome-screen--enter .rit-gogi__welcome-avatar { animation: rit-gogi-welcome-avatar .6s var(--rit-gogi-ease) forwards, rit-gogi-welcome-float 5.4s ease-in-out .8s infinite; }
.rit-gogi__welcome-copy { position: relative; z-index: 1; width: min(390px, 100%); min-height: 95px; text-align: center; }
.rit-gogi__welcome-copy strong { display: block; min-height: 34px; color: var(--rit-gogi-navy); font-size: 25px; line-height: 1.25; letter-spacing: -.02em; }
.rit-gogi__welcome-copy p { margin: 8px auto 0; min-height: 50px; max-width: 370px; color: #59667b; font-size: 14.5px; line-height: 1.62; }
.rit-gogi__welcome-cursor { display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: -.1em; border-radius: 2px; background: var(--rit-gogi-blue); animation: rit-gogi-cursor .78s steps(1,end) infinite; }
.rit-gogi__welcome-actions { position: relative; z-index: 1; width: min(400px, 100%); display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 3px; }
.rit-gogi__welcome-actions button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 13px;
  border: 1px solid #d8e4f8;
  border-radius: 15px;
  background: #fff;
  color: #194f9f;
  box-shadow: 0 7px 18px rgba(15,23,42,.045);
  cursor: pointer;
  font-size: 12.8px;
  font-weight: 800;
  line-height: 1.25;
  opacity: 0;
  transform: translateY(10px) scale(.985);
  transition: opacity .3s ease, transform .45s var(--rit-gogi-ease), border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.rit-gogi__welcome-actions button:hover { transform: translateY(-2px); border-color: #b9d1ff; background: #fbfdff; box-shadow: 0 10px 22px rgba(11,99,246,.08); }
.rit-gogi__welcome-action--visible { opacity: 1 !important; transform: translateY(0) scale(1) !important; }
.rit-gogi__welcome-actions button:nth-child(2) { color: #5d43b7; border-color: #ded8fb; }
.rit-gogi__welcome-actions button:nth-child(3) { color: #13745b; border-color: #cfeade; }
.rit-gogi__welcome-actions button:nth-child(4) { color: #9a5d00; border-color: #f1dfb8; }
.rit-gogi__welcome-actions button:disabled { cursor: default; }

/* --------------------------------------------------------------------------
   Chat state
   -------------------------------------------------------------------------- */
.rit-gogi__body { flex: 1 1 auto; min-height: 0; background: var(--rit-gogi-canvas); }
.rit-gogi__chat-shell { position: relative; flex: 1; min-height: 0; display: none; overflow: hidden; opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(9px) scale(.995); transition: opacity .34s ease, transform .5s var(--rit-gogi-ease), visibility .34s; }
.rit-gogi__chat-shell--mounted { display: flex; }
.rit-gogi.rit-gogi--chat-mode .rit-gogi__chat-shell { flex: 1 1 0; height: 100%; min-height: 0; }
.rit-gogi__chat-shell--active { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0) scale(1); }
.rit-gogi__conversation { width: 100%; height: 100%; min-width: 0; min-height: 0; display: flex; flex-direction: column; opacity: 0; transform: translateX(14px); transition: opacity .36s ease .05s, transform .52s var(--rit-gogi-ease) .05s; }
.rit-gogi__chat-shell--active .rit-gogi__conversation { opacity: 1; transform: translateX(0); }
.rit-gogi__conversation { background: var(--rit-gogi-canvas); }
.rit-gogi__chat { flex: 1 1 auto; min-height: 0; padding: 16px 16px 10px; overflow-y: auto; overscroll-behavior: contain; scroll-behavior: smooth; scrollbar-width: thin; scrollbar-color: #cbd5e1 transparent; background: linear-gradient(180deg, #f8faff 0%, #f7f9fc 100%); }
.rit-gogi__chat::-webkit-scrollbar { width: 8px; }
.rit-gogi__chat::-webkit-scrollbar-thumb { border: 2px solid transparent; border-radius: 999px; background: #cbd5e1; background-clip: padding-box; }
.rit-gogi__results { display: block; width: 100%; max-width: 100%; margin: 0; padding: 0; }

/* Chat messages */
.rit-gogi__message { display: flex; gap: 9px; align-items: flex-start; margin: 0 0 13px; }
.rit-gogi__message--user { justify-content: flex-end; }
.rit-gogi__mini-avatar { width: 36px; height: 36px; flex: 0 0 36px; aspect-ratio: 1; margin-top: 1px; overflow: hidden; border: 1px solid #dce5f2; border-radius: 50%; background: #fff; box-shadow: 0 4px 11px rgba(15,23,42,.06); }
.rit-gogi__mini-avatar img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: center 18%; transform: scale(1.05); }
.rit-gogi__bubble { max-width: 82%; padding: 11px 13px; border: 1px solid #e6ebf2; border-radius: 16px 16px 16px 6px; background: var(--rit-gogi-bubble); box-shadow: 0 4px 12px rgba(15,23,42,.025); }
.rit-gogi__bubble strong { color: var(--rit-gogi-navy); font-size: 14px; line-height: 1.35; }
.rit-gogi__bubble p { margin: 4px 0 0; color: #536179; font-size: 14px; line-height: 1.58; }
.rit-gogi__bubble--user { max-width: 75%; padding: 10px 13px; border: 0; border-radius: 16px 16px 6px 16px; background: linear-gradient(135deg, #1769ed, #337cf8); color: #fff; box-shadow: 0 7px 18px rgba(11,99,246,.15); font-size: 13.5px; font-weight: 780; }
.rit-gogi__enter { animation: rit-gogi-enter .34s var(--rit-gogi-ease) both; }

/* Typing */
.rit-gogi__typing { min-width: 58px; display: flex; align-items: center; gap: 5px; padding-block: 12px; }
.rit-gogi__typing span { width: 7px; height: 7px; border-radius: 50%; background: #8190a8; animation: rit-gogi-dot 1.15s infinite ease-in-out; }
.rit-gogi__typing span:nth-child(2) { animation-delay: .14s; }
.rit-gogi__typing span:nth-child(3) { animation-delay: .28s; }
.rit-gogi__typing-cursor { display: inline-block; width: 2px; height: 1.05em; margin-left: 3px; vertical-align: -.12em; border-radius: 2px; background: var(--rit-gogi-blue); animation: rit-gogi-cursor .78s steps(1,end) infinite; }

/* News result */
.rit-gogi__story { position: relative; display: grid; grid-template-columns: 27px minmax(0,1fr); gap: 10px; margin: 0 0 11px 45px; padding: 12px 13px; border: 1px solid #e3e9f1; border-radius: var(--rit-gogi-radius-card); background: #fff; box-shadow: 0 5px 14px rgba(15,23,42,.035); overflow: hidden; }
.rit-gogi__story::before { content: ""; position: absolute; left: 0; top: 11px; bottom: 11px; width: 3px; border-radius: 0 4px 4px 0; background: linear-gradient(180deg, var(--rit-gogi-blue), var(--rit-gogi-purple)); opacity: .72; }
.rit-gogi__story-number { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: #edf4ff; color: var(--rit-gogi-blue); font-size: 11px; font-weight: 900; }
.rit-gogi__tag { display: inline-flex; max-width: 100%; padding: 3px 7px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-radius: 999px; background: #f0f5ff; color: #2557aa; font-size: 10.5px; font-weight: 800; }
.rit-gogi__story-copy { min-width: 0; }
.rit-gogi__story-copy h4 { margin: 5px 0 4px; color: var(--rit-gogi-navy); font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }
.rit-gogi__story-copy p { margin: 0; color: #59667a; font-size: 13.35px; line-height: 1.55; overflow-wrap: anywhere; }
.rit-gogi__news-link { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; color: var(--rit-gogi-blue); font-size: 12.5px; font-weight: 850; text-decoration: none; transition: opacity .26s ease, transform .3s var(--rit-gogi-ease); }
.rit-gogi__news-link span { transition: transform .2s ease; }
.rit-gogi__news-link:hover { text-decoration: underline; }
.rit-gogi__news-link:hover span { transform: translateX(4px); }
.rit-gogi__news-link--hidden { opacity: 0; transform: translateY(4px); pointer-events: none; }

/* Quick replies */
.rit-gogi__quick-actions,
.rit-gogi__fallback-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 3px 0 15px 45px; }
.rit-gogi__quick-actions button,
.rit-gogi__fallback-action { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 12px; border: 1px solid #d4e0f6; border-radius: 999px; background: #fff; color: #174ca6; box-shadow: 0 4px 12px rgba(15,23,42,.025); font-size: 12.5px; font-weight: 800; cursor: pointer; transition: opacity .3s ease, transform .38s var(--rit-gogi-ease), border-color .2s ease, box-shadow .2s ease, background .2s ease; }
.rit-gogi__fallback-action:nth-child(2) { border-color: #caeadf; color: #087c59; }
.rit-gogi__fallback-action { opacity: 0; transform: translateY(8px) scale(.988); }
.rit-gogi__fallback-action--visible { opacity: 1; transform: translateY(0) scale(1); }
.rit-gogi__quick-actions button:hover,
.rit-gogi__fallback-action:hover { transform: translateY(-2px); background: #fbfdff; box-shadow: 0 7px 17px rgba(15,23,42,.055); }
.rit-gogi__fallback-action--pressed,
.rit-gogi__quick-action--pressed { transform: scale(.97) !important; }
.rit-gogi__fallback-actions--used { opacity: .46; transform: scale(.995); transition: opacity .25s ease, transform .25s ease; }

/* Composer */
.rit-gogi__composer { flex: 0 0 auto; min-height: 52px; display: grid; grid-template-columns: 22px minmax(0,1fr) 38px; align-items: center; gap: 8px; margin: 7px 12px 9px; padding: 6px 6px 6px 12px; border: 1px solid #dfe5ed; border-radius: 999px; background: #fff; box-shadow: 0 5px 16px rgba(15,23,42,.045); }
.rit-gogi__composer-icon { color: var(--rit-gogi-purple); font-size: 15px; }
.rit-gogi__composer-placeholder { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #8a96a8; font-size: 13px; }
.rit-gogi__composer-send { width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 50%; background: linear-gradient(135deg,var(--rit-gogi-blue),var(--rit-gogi-purple)); color: #fff; opacity: .42; cursor: not-allowed; }
.rit-gogi__privacy-note { flex: 0 0 auto; padding: 0 14px 9px; background: #fff; color: #98a2b3; font-size: 10px; line-height: 1.35; text-align: center; }
.rit-gogi:not(.rit-gogi--chat-mode) .rit-gogi__privacy-note { max-height: 0; padding-top: 0; padding-bottom: 0; opacity: 0; overflow: hidden; }
.rit-gogi.rit-gogi--chat-mode .rit-gogi__privacy-note { max-height: 48px; opacity: 1; transition: opacity .28s ease .22s; }

/* State motion - subtle and layout-safe */
.rit-gogi[data-gogi-state="thinking"] .rit-gogi__identity-avatar { animation: rit-gogi-avatar-think 2.5s ease-in-out infinite; }
.rit-gogi[data-gogi-state="searching"] .rit-gogi__identity-avatar,
.rit-gogi[data-gogi-state="loading"] .rit-gogi__identity-avatar { animation: rit-gogi-avatar-work 2.2s ease-in-out infinite; }
.rit-gogi[data-gogi-state="happy"] .rit-gogi__identity-avatar,
.rit-gogi[data-gogi-state="found"] .rit-gogi__identity-avatar { animation: rit-gogi-avatar-found .55s var(--rit-gogi-ease) both; }

/* Animations */
@keyframes rit-gogi-breathe { 0%,100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-2px) scale(1.008); } }
@keyframes rit-gogi-pulse { 0% { box-shadow: 0 0 0 0 rgba(69,229,155,.28); } 70% { box-shadow: 0 0 0 6px rgba(69,229,155,0); } 100% { box-shadow: 0 0 0 0 rgba(69,229,155,0); } }
@keyframes rit-gogi-halo { 0%,100% { transform: scale(.97); opacity: .72; } 50% { transform: scale(1.04); opacity: 1; } }
@keyframes rit-gogi-welcome-avatar { from { opacity: 0; transform: translateY(14px) scale(.92); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes rit-gogi-welcome-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes rit-gogi-state-in { from { opacity: .25; transform: scale(.97); } to { opacity: 1; transform: scale(1); } }
@keyframes rit-gogi-avatar-think { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-1.5px); } }
@keyframes rit-gogi-avatar-work { 0%,100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-1.5px) scale(1.015); } }
@keyframes rit-gogi-avatar-found { 0% { transform: scale(.97); } 65% { transform: scale(1.035); } 100% { transform: scale(1); } }
@keyframes rit-gogi-enter { from { opacity: 0; transform: translateY(7px) scale(.993); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes rit-gogi-dot { 0%,60%,100% { transform: translateY(0); opacity: .34; } 30% { transform: translateY(-4px); opacity: 1; } }
@keyframes rit-gogi-cursor { 0%,48% { opacity: 1; } 49%,100% { opacity: 0; } }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 900px) and (min-width: 721px) {
  .rit-gogi--floating { right: 18px; bottom: 18px; }
  .rit-gogi__panel { width: min(500px, calc(100vw - 36px)); height: min(680px, calc(100dvh - 104px)); }
}

@media (max-width: 720px) {
  html.rit-gogi-page--open { overflow: hidden; overscroll-behavior: none; }
  .rit-gogi--floating { right: 12px; bottom: 12px; margin-bottom: 70px; }
  .rit-gogi__launcher { min-height: 56px; padding-right: 11px; }
  .rit-gogi__launcher img { width: 46px; height: 46px; }
  .rit-gogi__panel {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100dvh;
    max-height: none;
    border: 0;
    border-radius: 0;
    transform: translateY(22px) scale(.995);
    transform-origin: 50% 100%;
    box-shadow: none;
  }
  .rit-gogi--floating.rit-gogi--open .rit-gogi__panel { transform: translateY(0) scale(1); }
  .rit-gogi__header { min-height: 66px; padding: max(9px, env(safe-area-inset-top)) 11px 9px 12px; }
  .rit-gogi__identity-avatar { width: 42px; height: 42px; flex-basis: 42px; }
  .rit-gogi__welcome-screen { padding: 20px 16px max(24px, env(safe-area-inset-bottom)); gap: 14px; }
  .rit-gogi__welcome-screen::before { top: 38px; width: 245px; height: 245px; }
  .rit-gogi__welcome-avatar-wrap { width: 164px; height: 164px; }
  .rit-gogi__welcome-avatar { width: 150px; height: 150px; }
  .rit-gogi__welcome-copy { min-height: 88px; }
  .rit-gogi__welcome-copy strong { font-size: 23px; }
  .rit-gogi__welcome-copy p { font-size: 14px; }
  .rit-gogi__welcome-actions { width: min(390px,100%); grid-template-columns: 1fr; }
  .rit-gogi__welcome-actions button { min-height: 50px; }
  .rit-gogi__chat { padding: 14px 12px 8px; }
  .rit-gogi__bubble { max-width: 88%; }
  .rit-gogi__bubble--user { max-width: 84%; }
  .rit-gogi__story { margin-left: 0; padding: 12px; }
  .rit-gogi__quick-actions,
  .rit-gogi__fallback-actions { margin-left: 0; }
  .rit-gogi__composer { margin: 6px 10px 8px; }
  .rit-gogi__privacy-note { padding-bottom: max(8px, env(safe-area-inset-bottom)); }
}

@media (max-width: 430px) {
  .rit-gogi__identity-line { gap: 6px; }
  .rit-gogi__identity-line strong { max-width: 120px; }
  .rit-gogi__status { font-size: 9px; padding-inline: 6px; }
  .rit-gogi__welcome-avatar-wrap { width: 146px; height: 146px; }
  .rit-gogi__welcome-avatar { width: 136px; height: 136px; }
  .rit-gogi__welcome-copy strong { font-size: 21px; }
  .rit-gogi__welcome-copy p { font-size: 13.5px; line-height: 1.58; }
  .rit-gogi__story { grid-template-columns: 25px minmax(0,1fr); gap: 9px; }
  .rit-gogi__story-copy h4 { font-size: 13.7px; }
  .rit-gogi__story-copy p { font-size: 13px; }
}

@media (max-height: 620px) and (min-width: 721px) {
  .rit-gogi__panel { height: calc(100dvh - 92px); bottom: 68px; }
  .rit-gogi__welcome-avatar-wrap { width: 145px; height: 145px; }
  .rit-gogi__welcome-avatar { width: 132px; height: 132px; }
  .rit-gogi__welcome-screen { gap: 10px; padding-block: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .rit-gogi *,
  .rit-gogi *::before,
  .rit-gogi *::after { animation: none !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
