.event-guide {
  --eg-text: #eff2e9;
  --eg-muted: #bac8bd;
  --eg-line: rgba(233, 244, 228, .13);
  position: fixed;
  right: max(26px, env(safe-area-inset-right));
  bottom: calc(max(23px, env(safe-area-inset-bottom)) + var(--eg-keyboard-offset, 0px));
  z-index: 30;
  color: var(--eg-text);
  font-family: var(--form-font, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
  font-size: 13px;
  letter-spacing: -.012em;
}
.event-guide button, .event-guide textarea { font: inherit; }
.event-guide button { -webkit-tap-highlight-color: transparent; }
.event-guide button:focus-visible, .event-guide a:focus-visible, .eg-conversation:focus-visible {
  outline: 2px solid #d6e6b5;
  outline-offset: 4px;
}
.eg-launcher {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 52px;
  padding: 8px 16px 8px 11px;
  border: 1px solid rgba(215, 239, 205, .24);
  border-radius: 999px;
  background: linear-gradient(115deg, rgba(138, 184, 130, .19), rgba(217, 217, 217, .1));
  color: #f0f4e8;
  box-shadow: 0 0 24px rgba(143, 197, 129, .08), inset 0 1px 0 rgba(245, 255, 232, .1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background .2s, border-color .2s, box-shadow .2s;
  cursor: pointer;
}
.eg-launcher:hover, .eg-launcher[aria-expanded=true] {
  border-color: rgba(222, 243, 208, .37);
  background: linear-gradient(115deg, rgba(148, 191, 136, .24), rgba(217, 217, 217, .13));
  box-shadow: 0 0 28px rgba(143, 197, 129, .12), inset 0 1px 0 rgba(245, 255, 232, .12);
}
.eg-launcher-label { font-size: 14px; font-weight: 450; letter-spacing: -.025em; }
.eg-orb, .eg-orb canvas { display: block; width: 30px; height: 30px; flex: none; }
.eg-launcher-divider { height: 18px; width: 1px; background: rgba(226, 239, 218, .19); margin-left: 7px; }
.eg-launcher-chevron { width: 15px; height: 15px; fill: none; stroke: #d6e0ce; stroke-width: 1.35; stroke-linecap: round; stroke-linejoin: round; transform: rotate(0deg); transform-origin: center; transition: transform .22s ease; }
.eg-launcher[aria-expanded=true] .eg-launcher-chevron { transform: rotate(-90deg); }
.eg-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 12px);
  display: flex;
  flex-direction: column;
  width: min(360px, calc(100vw - 32px));
  height: min(430px, max(150px, calc(var(--eg-viewport-height, 100dvh) - 108px)));
  overflow: hidden;
  border: 1px solid rgba(238, 246, 231, .19);
  border-radius: 21px;
  background: linear-gradient(145deg, rgba(217, 217, 217, .115), rgba(217, 217, 217, .075)), rgba(13, 25, 24, .83);
  box-shadow: 0 14px 46px rgba(0, 0, 0, .15);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.eg-panel[hidden] { display: none; }
.event-guide.is-open .eg-panel { animation: eg-panel-in .17s cubic-bezier(.2, .7, .2, 1) both; }
.eg-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex: none; padding: 11px 12px 11px 20px; border-bottom: 1px solid var(--eg-line); }
.eg-header h2 { display: flex; align-items: center; gap: 9px; margin: 0; font: 550 16px/1.2 var(--form-font); letter-spacing: -.025em; color: var(--eg-text); }
.eg-header h2:focus { outline: none; }
.eg-online-dot { width: 6px; height: 6px; flex: none; border-radius: 50%; background: #b9d992; box-shadow: 0 0 8px rgba(185, 217, 146, .2); animation: eg-online-pulse 2.8s ease-in-out infinite; }
.eg-close { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; flex: none; border: 0; border-radius: 50%; background: transparent; color: #b7c5ba; cursor: pointer; transition: color .15s, background .15s; }
.eg-close:hover { background: rgba(232, 241, 225, .08); color: var(--eg-text); }
.eg-close svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.25; stroke-linecap: round; }
.eg-conversation { display: flex; flex-direction: column; min-height: 0; flex: 1; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #6c827450 transparent; padding: 18px 19px 8px; }
.eg-starters { display: flex; flex-direction: column; gap: 4px; flex: none; width: 100%; max-width: 286px; margin: auto; padding-block: 8px; }
.eg-starters[hidden] { display: none; }
.eg-starter { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 9px 7px; border: 0; border-radius: 8px; background: transparent; color: #d3ddd2; text-align: left; font-size: 14px !important; line-height: 1.5 !important; cursor: pointer; transition: color .18s; }
.eg-starter:hover { color: #f3f6ee; }
.eg-starter svg { flex: none; width: 15px; height: 15px; fill: none; stroke: #83978a; stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round; transition: stroke .18s, transform .18s; }
.eg-starter:hover svg { stroke: #caddaf; transform: translateX(2px); }
.eg-messages { display: flex; flex-direction: column; gap: 19px; list-style: none; padding: 0; margin: 0; }
.eg-messages:empty { display: none; }
.eg-messages li { padding: 0; margin: 0; }
.eg-messages p { margin: 0; font-size: 13px; line-height: 1.6; font-weight: 400; white-space: pre-wrap; overflow-wrap: anywhere; }
.eg-answer { padding-right: 8px !important; color: #e2e9df; }
.eg-answer-label { display: block; margin-bottom: 8px; color: #93a79a; font-size: 8px; line-height: 1.2; letter-spacing: .12em; font-weight: 500; }
.eg-question { display: flex; justify-content: flex-end; padding-left: 30px !important; }
.eg-question p { padding: 8px 12px; border-radius: 12px 12px 4px 12px; background: rgba(220, 235, 210, .105); color: #f1f5ed; line-height: 1.45; }
.eg-answer a { color: #d5e6b8; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.eg-answer a:hover { color: #eef8dc; }
.eg-answer.is-streaming p::after { content: ""; display: inline-block; width: 2px; height: 12px; margin-left: 3px; border-radius: 1px; background: #d8e6bd; vertical-align: -1px; }
.eg-bottom { flex: none; padding: 10px 10px 10px; }
.eg-composer { display: flex; align-items: flex-end; gap: 10px; padding: 5px 5px 5px 17px; border: 1px solid rgba(234, 242, 227, .18); border-radius: 28px; background: rgba(222, 237, 214, .045); box-shadow: inset 0 1px 0 rgba(237, 249, 232, .04); transition: border-color .15s; }
.eg-composer:focus-within { border-color: rgba(216, 235, 194, .32); }
.eg-composer textarea { display: block; flex: 1; min-width: 0; resize: none; width: 100%; height: 24px; min-height: 24px; max-height: 72px; border: 0; outline: none; border-radius: 0; padding: 0; margin: 10px 0; color: #eef3e8; background: none; box-shadow: none; font-size: 14px; line-height: 24px; letter-spacing: -.01em; }
.eg-composer textarea::placeholder { color: #899c8c; opacity: 1; }
.eg-send { display: grid; flex: none; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: #d6e6b5; color: #183023; transition: background .15s, opacity .15s; cursor: pointer; }
.eg-send:hover:not(:disabled) { background: #e4eecb; }
.eg-send:disabled { background: rgba(209, 228, 197, .14); color: #a2b59b; cursor: default; }
.eg-send svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.eg-churning { display: flex; align-items: center; gap: 9px; min-height: 24px; padding: 1px 0 4px; }
.eg-loader-grid { display: grid; grid-template-columns: repeat(3, 3px); gap: 1.5px; flex: none; }
.eg-loader-grid>span { display: block; width: 3px; height: 3px; border-radius: .5px; background: #d0e2b4; opacity: .17; animation: eg-pixel-on .65s ease-in-out infinite; }
.eg-churning-label { color: transparent; background: linear-gradient(90deg, #789076 35%, #d5e4c0 50%, #789076 65%); background-size: 200% 100%; background-clip: text; -webkit-background-clip: text; animation: eg-shimmer 1.4s linear infinite; font-size: 12px; }
.eg-elapsed { margin-left: 1px; color: #81967e; font-family: ui-monospace, SFMono-Regular, monospace; font-size: 10px; font-variant-numeric: tabular-nums; }
.eg-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.event-guide[data-motion=off] .eg-panel, .event-guide[data-motion=off] .eg-loader-grid>span, .event-guide[data-motion=off] .eg-churning-label, .event-guide[data-motion=off] .eg-online-dot { animation: none; }
.event-guide[data-motion=off] .eg-launcher-chevron { transition: none; }
.event-guide[data-compact=true] .eg-header { padding-top: 8px; padding-bottom: 8px; }
.event-guide[data-compact=true] .eg-conversation { padding-top: 10px; }
@keyframes eg-online-pulse { 0%, 100% { opacity: .65; box-shadow: 0 0 5px rgba(185, 217, 146, .1); } 50% { opacity: 1; box-shadow: 0 0 9px rgba(185, 217, 146, .3); } }
@keyframes eg-pixel-on { 0%, 100% { opacity: .15; } 45% { opacity: .95; } }
@keyframes eg-shimmer { to { background-position: -200% 0; } }
@keyframes eg-panel-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 600px) {
  .event-guide { right: max(16px, env(safe-area-inset-right)); bottom: calc(max(17px, env(safe-area-inset-bottom)) + var(--eg-keyboard-offset, 0px)); }
  .eg-launcher { min-height: 48px; padding: 7px 14px 7px 9px; gap: 9px; }
  .eg-launcher-label { font-size: 13px; }
  .eg-launcher-divider { margin-left: 5px; }
  .eg-panel { bottom: calc(100% + 10px); width: min(360px, calc(100vw - 32px)); height: min(430px, max(150px, calc(var(--eg-viewport-height, 100dvh) - 92px))); }
  .eg-composer textarea { font-size: 16px; }
  .eg-close { width: 44px; height: 44px; }
  .eg-send { width: 44px; height: 44px; }
  .event-guide[data-keyboard=true]:not(.is-open) { visibility: hidden; pointer-events: none; }
  .event-guide[data-keyboard=true].is-open .eg-launcher { visibility: hidden; }
  .event-guide[data-keyboard=true].is-open .eg-panel { bottom: 0; height: min(430px, calc(var(--eg-viewport-height, 100dvh) - 34px)); }
}
@media (pointer: coarse) {
  .eg-close, .eg-send { width: 44px; height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .event-guide *, .event-guide *::after { animation: none !important; transition: none !important; }
}
@media (max-width: 430px) {
  .eg-launcher { gap: 3px; padding: 7px 9px 7px 7px; }
  .eg-launcher-label, .eg-launcher-divider { display: none; }
  .eg-launcher-chevron { width: 13px; height: 13px; }
}
@media (prefers-reduced-transparency: reduce) {
  .eg-panel { background: #23332c; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .eg-launcher { background: #283e30; backdrop-filter: none; -webkit-backdrop-filter: none; }
}

/* The small disclosure is present only when the AI service is enabled. */
.eg-ai-badge { padding: 2px 4px; border: 1px solid rgba(210, 231, 182, .2); border-radius: 4px; color: #b9cea6; font-size: 8px; font-weight: 500; line-height: 1; letter-spacing: .02em; }
.eg-ai-badge[hidden], .eg-disclosure[hidden] { display: none; }
.eg-disclosure { margin: 7px 9px 0; color: #a9b9ac; font-size: 9px; line-height: 1.4; font-weight: 400; letter-spacing: 0; }
