#aether-assistant-root {
  --aether-ink: #17231e;
  --aether-muted: #5e6b65;
  --aether-paper: #fffdf8;
  --aether-rule: #d8d5ca;
  --aether-green: #174f3b;
  --aether-fire: #f26938;
  color: var(--aether-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  position: relative;
  z-index: 2147483000;
}

#aether-assistant-root button,
#aether-assistant-root input,
#aether-assistant-root textarea { font: inherit; }

.aether-launcher {
  align-items: center;
  background: var(--aether-green);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 50%;
  bottom: 1.35rem;
  box-shadow: 0 12px 35px rgba(16, 43, 33, .28);
  color: white;
  cursor: pointer;
  display: flex;
  height: 3.8rem;
  justify-content: center;
  padding: .45rem;
  position: fixed;
  right: 1.35rem;
  width: 3.8rem;
}

.aether-launcher:hover { transform: translateY(-2px); }
.aether-launcher:focus-visible { outline: 3px solid #f6b36f; outline-offset: 3px; }
.aether-launcher svg { height: 3.1rem; overflow: visible; width: 2.6rem; }
.aether-flame { fill: var(--aether-fire); }
.aether-coin { fill: #f5c655; stroke: #fff7d1; stroke-width: 1.4; }
.aether-dollar { fill: none; stroke: #173e31; stroke-linecap: round; stroke-width: 3.5; }

.aether-panel {
  background: var(--aether-paper);
  border: 1px solid var(--aether-rule);
  border-radius: 1rem;
  bottom: 6rem;
  box-shadow: 0 24px 70px rgba(18, 30, 25, .24);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  height: min(43rem, calc(100vh - 8rem));
  overflow: hidden;
  position: fixed;
  right: 1.35rem;
  width: min(26rem, calc(100vw - 2rem));
}

.aether-panel[hidden], .aether-nudge[hidden], .aether-view[hidden] { display: none !important; }
.aether-head { align-items: center; background: #173e31; color: white; display: flex; justify-content: space-between; padding: .85rem 1rem; }
.aether-head > div:first-child { display: flex; flex-direction: column; gap: .12rem; }
.aether-head strong { font-family: Georgia, serif; font-size: 1.08rem; }
.aether-head span { color: #d6e1dc; font-size: .7rem; }
.aether-head a { color: inherit; text-decoration: underline; }
.aether-head button { background: transparent; border: 0; color: white; cursor: pointer; }
.aether-head > div:last-child { align-items: center; display: flex; gap: .5rem; }
.aether-head .aether-new { border: 1px solid rgba(255,255,255,.28); border-radius: 999px; font-size: .72rem; padding: .35rem .6rem; }
.aether-close { font-size: 1.55rem; line-height: 1; }

.aether-tabs { border-bottom: 1px solid var(--aether-rule); display: grid; grid-template-columns: repeat(2, 1fr); }
.aether-tabs button { background: transparent; border: 0; color: var(--aether-muted); cursor: pointer; font-size: .72rem; padding: .72rem .25rem; }
.aether-tabs button[aria-current="page"] { box-shadow: inset 0 -2px var(--aether-fire); color: var(--aether-ink); font-weight: 700; }
.aether-view { min-height: 0; overflow: auto; }
[data-view="chat"] { display: grid; grid-template-rows: minmax(0, 1fr) auto auto; overflow: hidden; }
.aether-messages { display: flex; flex-direction: column; gap: .7rem; overflow-y: auto; padding: 1rem; }
.aether-message { align-self: flex-start; background: #f0eee7; border-radius: .75rem .75rem .75rem .15rem; max-width: 91%; padding: .72rem .8rem; }
.aether-message.is-user { align-self: flex-end; background: #dfece5; border-radius: .75rem .75rem .15rem .75rem; }
.aether-message.is-proactive { border-left: 3px solid var(--aether-fire); }
.aether-message.is-save-prompt { background: #fff5e8; border: 1px solid #efcfaa; }
.aether-message p { color: var(--aether-ink); font-size: .87rem; line-height: 1.48; margin: 0; white-space: pre-wrap; }
.aether-message.is-streaming p::after { animation: aether-caret .8s step-end infinite; color: var(--aether-fire); content: "▍"; margin-left: .08rem; }
.aether-privacy-note { color: var(--aether-muted); display: block; font-size: .66rem; line-height: 1.4; margin-top: .55rem; }
.aether-sources { color: var(--aether-muted); font-size: .68rem; line-height: 1.4; margin-top: .55rem; }
.aether-sources a { color: var(--aether-green); }
.aether-status { color: var(--aether-muted); font-size: .72rem; min-height: 1rem; padding: 0 1rem .35rem; }
.aether-compose { border-top: 1px solid var(--aether-rule); box-sizing: border-box; min-width: 0; padding: .75rem; }
.aether-compose > div { align-items: flex-end; display: flex; gap: .45rem; min-width: 0; }
.aether-compose textarea { background: white; border: 1px solid var(--aether-rule); border-radius: .55rem; box-sizing: border-box; color: var(--aether-ink); flex: 1; height: 2.8rem; max-height: 7rem; min-height: 2.8rem; min-width: 0; overflow-y: auto; padding: .62rem; resize: none; width: 100%; }
.aether-compose button, .aether-save-button, .aether-login-form button { background: var(--aether-green); border: 0; border-radius: .5rem; color: white; cursor: pointer; padding: .65rem .8rem; }
.aether-compose button { flex: 0 0 auto; }
.aether-compose button:disabled { cursor: wait; opacity: .55; }

.aether-login-form { display: grid; gap: .45rem; margin-top: .65rem; }
.aether-login-form label { color: var(--aether-muted); display: grid; font-size: .7rem; gap: .25rem; }
.aether-login-form input { background: white; border: 1px solid var(--aether-rule); border-radius: .4rem; color: var(--aether-ink); padding: .55rem; }
.aether-login-form p { font-size: .74rem; }

[data-view="history"] { padding: 1rem; }
.aether-view h2 { font-family: Georgia, serif; font-size: 1.15rem; margin: 0 0 .85rem; }
.aether-empty { color: var(--aether-muted); font-size: .78rem; line-height: 1.45; }
.aether-history-row { align-items: center; border-top: 1px solid var(--aether-rule); display: flex; gap: .5rem; justify-content: space-between; padding: .65rem 0; }
.aether-history-open { background: transparent; border: 0; color: var(--aether-ink); cursor: pointer; display: flex; flex: 1; flex-direction: column; text-align: left; }
.aether-history-open strong { font-size: .8rem; }
.aether-history-open span { color: var(--aether-muted); font-size: .68rem; margin-top: .15rem; }
.aether-delete { background: transparent; border: 0; color: #9b3c2e; cursor: pointer; font-size: .7rem; }

.aether-nudge { background: var(--aether-paper); border: 1px solid var(--aether-rule); border-radius: .8rem; bottom: 6rem; box-shadow: 0 16px 45px rgba(18,30,25,.2); max-width: min(22rem, calc(100vw - 2rem)); padding: .75rem; position: fixed; right: 1.35rem; }
.aether-nudge-message { background: transparent; border: 0; color: var(--aether-ink); cursor: pointer; font-weight: 650; line-height: 1.4; padding: 0; text-align: left; }
.aether-nudge > div { display: flex; gap: .8rem; margin-top: .6rem; }
.aether-nudge > div button { background: transparent; border: 0; color: var(--aether-green); cursor: pointer; font-size: .7rem; padding: 0; text-decoration: underline; }

@media (max-width: 600px) {
  .aether-launcher { bottom: 1rem; height: 3.5rem; right: 1rem; width: 3.5rem; }
  .aether-panel { border-radius: 0; bottom: 0; height: 100dvh; right: 0; width: 100vw; }
  .aether-nudge { bottom: 5.5rem; right: 1rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .aether-launcher { transition: transform .16s ease; }
}

@keyframes aether-caret { 50% { opacity: 0; } }
