:root {
  --atlas-width: min(460px, 100vw);
  --atlas-bg: rgba(8, 13, 24, 0.94);
  --atlas-panel: rgba(18, 27, 44, 0.76);
  --atlas-panel-strong: rgba(22, 33, 53, 0.94);
  --atlas-border: rgba(255, 255, 255, 0.12);
  --atlas-text: #f4f7fb;
  --atlas-muted: #aebbd0;
  --atlas-accent: #79d8ff;
  --atlas-accent-2: #8d7cff;
  --atlas-danger: #ff7f8c;
  --atlas-shadow: 0 24px 80px rgba(0, 0, 0, 0.46);
  --atlas-radius: 20px;
  --atlas-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

#skyPixelAtlasRoot,
#skyPixelAtlasRoot * { box-sizing: border-box; }
#skyPixelAtlasRoot { font-family: var(--atlas-font); color: var(--atlas-text); }

.atlas-launcher {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 2147483000;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 18px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(22,35,57,.96), rgba(47,32,82,.96));
  color: #fff;
  box-shadow: 0 16px 46px rgba(0,0,0,.42), inset 0 1px 0 rgba(255,255,255,.12);
  cursor: pointer;
  font: 700 14px/1 var(--atlas-font);
  letter-spacing: .01em;
  backdrop-filter: blur(18px) saturate(150%);
  transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}
.atlas-launcher:hover { transform: translateY(-2px); box-shadow: 0 20px 58px rgba(0,0,0,.5); }
.atlas-launcher:focus-visible { outline: 3px solid rgba(121,216,255,.55); outline-offset: 3px; }
.atlas-launcher__icon { font-size: 20px; filter: drop-shadow(0 2px 8px rgba(121,216,255,.45)); }
.atlas-launcher[aria-expanded="true"] { opacity: 0; pointer-events: none; }

.atlas-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2147482997;
  background: rgba(2, 6, 13, .34);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
  backdrop-filter: blur(2px);
}
.atlas-backdrop.is-open { opacity: 1; pointer-events: auto; }

.atlas-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 2147482999;
  width: var(--atlas-width);
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-left: 1px solid var(--atlas-border);
  background:
    radial-gradient(circle at 15% 0%, rgba(81,131,255,.16), transparent 32%),
    radial-gradient(circle at 100% 20%, rgba(158,98,255,.12), transparent 30%),
    var(--atlas-bg);
  box-shadow: var(--atlas-shadow);
  backdrop-filter: blur(26px) saturate(145%);
  transform: translateX(102%);
  transition: transform .3s cubic-bezier(.2,.8,.2,1);
}
.atlas-sidebar.is-open { transform: translateX(0); }

.atlas-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--atlas-border);
  background: rgba(7,12,22,.54);
}
.atlas-brand { display:flex; align-items:center; gap:12px; min-width:0; }
.atlas-brand__mark {
  width: 42px; height:42px; display:grid; place-items:center; flex:0 0 auto;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(94,210,255,.22), rgba(137,104,255,.24));
  border: 1px solid rgba(255,255,255,.15);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
  font-size: 22px;
}
.atlas-brand__eyebrow { font-size: 11px; font-weight: 800; color: var(--atlas-accent); letter-spacing:.14em; text-transform:uppercase; }
.atlas-brand__title { margin-top:3px; font-size:18px; font-weight:800; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.atlas-header__actions { display:flex; gap:8px; }
.atlas-icon-button {
  width: 38px; height:38px; display:grid; place-items:center;
  border: 1px solid var(--atlas-border); border-radius:12px;
  color:var(--atlas-text); background:rgba(255,255,255,.055); cursor:pointer;
  transition: background .18s ease, transform .18s ease;
}
.atlas-icon-button:hover { background:rgba(255,255,255,.1); transform:translateY(-1px); }
.atlas-icon-button:focus-visible { outline: 2px solid var(--atlas-accent); outline-offset:2px; }

.atlas-context-bar {
  display:flex; align-items:center; gap:8px; min-height:38px; padding:8px 16px;
  color:var(--atlas-muted); font-size:12px; border-bottom:1px solid var(--atlas-border);
  background:rgba(255,255,255,.025);
}
.atlas-context-dot { width:7px; height:7px; border-radius:50%; background:#72f0b2; box-shadow:0 0 12px rgba(114,240,178,.7); }
.atlas-context-text { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }

.atlas-main { flex:1; min-height:0; overflow:hidden; position:relative; }
.atlas-view { position:absolute; inset:0; display:flex; flex-direction:column; }
.atlas-history-view { transform:translateX(-100%); transition:transform .24s ease; background:var(--atlas-bg); }
.atlas-chat-view { transition:transform .24s ease; }
.atlas-sidebar.is-history .atlas-history-view { transform:translateX(0); }
.atlas-sidebar.is-history .atlas-chat-view { transform:translateX(100%); }

.atlas-messages { flex:1; overflow:auto; padding:18px 16px 12px; scroll-behavior:smooth; }
.atlas-messages::-webkit-scrollbar, .atlas-history-list::-webkit-scrollbar { width:10px; }
.atlas-messages::-webkit-scrollbar-thumb, .atlas-history-list::-webkit-scrollbar-thumb { background:rgba(255,255,255,.13); border-radius:999px; border:3px solid transparent; background-clip:padding-box; }

.atlas-welcome { padding:4px 2px 12px; }
.atlas-welcome h2 { margin:0 0 8px; font-size:24px; line-height:1.18; letter-spacing:-.02em; }
.atlas-welcome p { margin:0; color:var(--atlas-muted); font-size:14px; line-height:1.55; }
.atlas-suggestions { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:16px; }
.atlas-suggestion {
  min-height:94px; padding:13px; text-align:left; border:1px solid var(--atlas-border); border-radius:16px;
  background:linear-gradient(145deg, rgba(255,255,255,.065), rgba(255,255,255,.028));
  color:var(--atlas-text); cursor:pointer; transition:transform .18s ease, border-color .18s ease, background .18s ease;
}
.atlas-suggestion:hover { transform:translateY(-2px); border-color:rgba(121,216,255,.35); background:rgba(121,216,255,.075); }
.atlas-suggestion strong { display:block; margin-bottom:6px; font-size:13px; }
.atlas-suggestion span { display:block; color:var(--atlas-muted); font-size:12px; line-height:1.35; }

.atlas-message { display:flex; gap:10px; margin:0 0 16px; animation:atlasMessageIn .22s ease both; }
.atlas-message--user { justify-content:flex-end; }
.atlas-message__avatar { width:30px; height:30px; flex:0 0 auto; display:grid; place-items:center; border-radius:10px; border:1px solid var(--atlas-border); background:rgba(255,255,255,.06); font-size:15px; }
.atlas-message__bubble { max-width:84%; padding:12px 14px; border:1px solid var(--atlas-border); border-radius:17px; background:var(--atlas-panel); box-shadow:0 8px 24px rgba(0,0,0,.15); }
.atlas-message--user .atlas-message__bubble { background:linear-gradient(145deg, rgba(54,116,185,.82), rgba(76,61,153,.8)); border-bottom-right-radius:6px; }
.atlas-message--assistant .atlas-message__bubble { border-bottom-left-radius:6px; }
.atlas-message__content { font-size:14px; line-height:1.56; overflow-wrap:anywhere; }
.atlas-message__content p { margin:0 0 10px; }
.atlas-message__content p:last-child { margin-bottom:0; }
.atlas-message__content code { padding:2px 5px; border-radius:6px; background:rgba(0,0,0,.28); font-family:ui-monospace, SFMono-Regular, Menlo, monospace; font-size:.92em; }
.atlas-message__meta { margin-top:8px; color:rgba(220,230,245,.58); font-size:10px; }

.atlas-thinking { display:inline-flex; align-items:center; gap:5px; min-width:52px; }
.atlas-thinking i { width:7px; height:7px; border-radius:50%; background:var(--atlas-accent); animation:atlasPulse 1.15s infinite ease-in-out; }
.atlas-thinking i:nth-child(2) { animation-delay:.14s; }
.atlas-thinking i:nth-child(3) { animation-delay:.28s; }

.atlas-composer-wrap { padding:10px 14px 14px; border-top:1px solid var(--atlas-border); background:rgba(6,10,19,.72); }
.atlas-composer {
  display:flex; align-items:flex-end; gap:9px; padding:9px 9px 9px 13px;
  border:1px solid rgba(255,255,255,.14); border-radius:18px;
  background:rgba(255,255,255,.065); box-shadow:inset 0 1px 0 rgba(255,255,255,.05);
}
.atlas-composer:focus-within { border-color:rgba(121,216,255,.48); box-shadow:0 0 0 3px rgba(121,216,255,.08); }
.atlas-input { width:100%; max-height:150px; min-height:24px; resize:none; border:0; outline:0; background:transparent; color:var(--atlas-text); font:500 14px/1.5 var(--atlas-font); }
.atlas-input::placeholder { color:#8190a7; }
.atlas-send { width:38px; height:38px; flex:0 0 auto; border:0; border-radius:12px; color:#06101a; background:linear-gradient(135deg, var(--atlas-accent), #b9ecff); cursor:pointer; font-size:18px; font-weight:900; transition:transform .18s ease, opacity .18s ease; }
.atlas-send:hover { transform:translateY(-1px); }
.atlas-send:disabled { opacity:.42; cursor:not-allowed; transform:none; }
.atlas-disclaimer { margin-top:7px; text-align:center; color:#7f8ca1; font-size:10px; }

.atlas-history-head { display:flex; align-items:center; gap:10px; padding:16px; border-bottom:1px solid var(--atlas-border); }
.atlas-history-head h3 { margin:0; font-size:16px; }
.atlas-history-list { flex:1; overflow:auto; padding:12px; }
.atlas-history-item { width:100%; display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:8px; padding:12px; border:1px solid var(--atlas-border); border-radius:14px; background:rgba(255,255,255,.04); color:var(--atlas-text); text-align:left; cursor:pointer; }
.atlas-history-item:hover { background:rgba(255,255,255,.075); }
.atlas-history-item__copy { min-width:0; }
.atlas-history-item__title { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; font-size:13px; font-weight:700; }
.atlas-history-item__date { margin-top:4px; color:var(--atlas-muted); font-size:10px; }
.atlas-history-delete { width:30px; height:30px; border:0; border-radius:9px; color:var(--atlas-danger); background:transparent; cursor:pointer; }
.atlas-history-delete:hover { background:rgba(255,127,140,.12); }
.atlas-empty { padding:28px 18px; text-align:center; color:var(--atlas-muted); font-size:13px; }

.atlas-toast { position:fixed; left:50%; bottom:24px; z-index:2147483646; transform:translate(-50%, 20px); opacity:0; pointer-events:none; padding:10px 14px; border:1px solid var(--atlas-border); border-radius:12px; background:rgba(9,15,26,.94); color:#fff; box-shadow:0 12px 38px rgba(0,0,0,.4); transition:.2s ease; font:600 12px/1.2 var(--atlas-font); }
.atlas-toast.is-visible { transform:translate(-50%,0); opacity:1; }

@keyframes atlasPulse { 0%, 80%, 100% { transform:scale(.72); opacity:.45; } 40% { transform:scale(1); opacity:1; } }
@keyframes atlasMessageIn { from { opacity:0; transform:translateY(7px); } to { opacity:1; transform:none; } }

@media (max-width: 680px) {
  :root { --atlas-width: 100vw; }
  .atlas-sidebar { border-left:0; }
  .atlas-launcher { right:14px; bottom:14px; min-height:48px; padding:0 15px; }
  .atlas-suggestions { grid-template-columns:1fr; }
  .atlas-message__bubble { max-width:89%; }
  body.atlas-open { overflow:hidden; }
}

@media (prefers-reduced-motion: reduce) {
  .atlas-sidebar, .atlas-backdrop, .atlas-launcher, .atlas-message, .atlas-history-view, .atlas-chat-view { transition:none !important; animation:none !important; }
}

/* Atlas v2.3 Aurora Voice Mode */
.atlas-mic {
  width:38px; height:38px; flex:0 0 auto; border:1px solid rgba(139,236,221,.28); border-radius:12px;
  display:grid; place-items:center; color:#eaffff; background:linear-gradient(145deg, rgba(53,187,180,.20), rgba(90,87,213,.20));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08); cursor:pointer; transition:transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.atlas-mic:hover { transform:translateY(-1px); border-color:rgba(139,236,221,.62); box-shadow:0 0 22px rgba(76,220,204,.18); }
.atlas-mic.is-unsupported { opacity:.5; }
.atlas-speaker { font-size:14px; }

.atlas-voice {
  position:fixed; inset:0; z-index:2147483647; display:grid; place-items:center; padding:24px;
  opacity:0; visibility:hidden; pointer-events:none; transition:opacity .34s ease, visibility .34s ease;
  font-family:var(--atlas-font, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
}
.atlas-voice.is-open { opacity:1; visibility:visible; pointer-events:auto; }
.atlas-voice__veil {
  position:absolute; inset:0; background:
    radial-gradient(circle at 50% 44%, rgba(31,128,150,.25), transparent 32%),
    radial-gradient(circle at 28% 24%, rgba(71,203,173,.14), transparent 34%),
    radial-gradient(circle at 76% 72%, rgba(91,71,206,.18), transparent 38%),
    rgba(2,7,14,.88);
  backdrop-filter:blur(22px) saturate(1.25);
}
.atlas-voice__panel {
  position:relative; width:min(620px, calc(100vw - 32px)); min-height:620px; box-sizing:border-box;
  display:flex; flex-direction:column; align-items:center; justify-content:center; padding:54px 34px 30px;
  overflow:hidden; border:1px solid rgba(188,250,244,.19); border-radius:36px;
  background:linear-gradient(160deg, rgba(10,29,40,.76), rgba(11,12,31,.82));
  box-shadow:0 40px 130px rgba(0,0,0,.68), inset 0 1px 0 rgba(255,255,255,.08);
  transform:translateY(18px) scale(.97); transition:transform .38s cubic-bezier(.2,.8,.2,1);
}
.atlas-voice.is-open .atlas-voice__panel { transform:none; }
.atlas-voice__panel::before {
  content:""; position:absolute; inset:-40%; opacity:.55; pointer-events:none;
  background:conic-gradient(from 0deg, transparent, rgba(59,226,198,.10), transparent 24%, rgba(98,88,238,.12), transparent 48%, rgba(45,167,222,.10), transparent 72%);
  animation:atlasAuroraBackdrop 18s linear infinite;
}
.atlas-voice__close {
  position:absolute; top:18px; right:18px; z-index:4; width:42px; height:42px; border-radius:50%;
  border:1px solid rgba(255,255,255,.16); background:rgba(255,255,255,.06); color:#eaffff; font-size:27px; cursor:pointer;
}
.atlas-voice__eyebrow { position:relative; z-index:2; margin-bottom:20px; color:rgba(210,250,247,.68); font-size:11px; font-weight:800; letter-spacing:.22em; text-transform:uppercase; }
.atlas-voice__orb-wrap { position:relative; z-index:2; width:270px; height:270px; display:grid; place-items:center; }
.atlas-voice__orb {
  position:relative; width:190px; height:190px; overflow:hidden; border-radius:50%; cursor:pointer;
  background:radial-gradient(circle at 32% 24%, rgba(242,255,255,.82), rgba(87,220,218,.22) 16%, rgba(10,40,64,.88) 54%, rgba(7,9,31,.96) 100%);
  border:1px solid rgba(214,255,250,.46);
  box-shadow:0 0 42px rgba(64,231,205,.28), 0 0 100px rgba(69,115,241,.18), inset -20px -26px 55px rgba(3,8,30,.82), inset 14px 12px 30px rgba(210,255,252,.16);
  transition:transform .35s ease, box-shadow .35s ease;
}
.atlas-voice__orb:hover { transform:scale(1.025); }
.atlas-voice__glass { position:absolute; inset:0; border-radius:inherit; background:linear-gradient(135deg, rgba(255,255,255,.31), transparent 20%, transparent 66%, rgba(255,255,255,.06)); box-shadow:inset 0 0 25px rgba(255,255,255,.09); }
.atlas-voice__aurora { position:absolute; width:230px; height:90px; left:-18px; border-radius:50%; filter:blur(11px); mix-blend-mode:screen; opacity:.72; }
.atlas-voice__aurora--one { top:44px; background:linear-gradient(90deg, transparent, #3ff2c1, #35aef2, transparent); transform:rotate(-18deg); animation:atlasAuroraOne 5.8s ease-in-out infinite alternate; }
.atlas-voice__aurora--two { top:82px; background:linear-gradient(90deg, transparent, #4de8e5, #7e63ff, #44e3a8, transparent); transform:rotate(14deg); animation:atlasAuroraTwo 7.4s ease-in-out infinite alternate; }
.atlas-voice__aurora--three { top:110px; background:linear-gradient(90deg, transparent, #355eff, #8a5cff, #3df0c2, transparent); transform:rotate(-7deg); animation:atlasAuroraThree 6.7s ease-in-out infinite alternate; }
.atlas-voice__stars { position:absolute; inset:0; opacity:.75; background-image:radial-gradient(circle, rgba(255,255,255,.9) 0 1px, transparent 1.4px); background-size:31px 31px; mask-image:radial-gradient(circle, #000 35%, transparent 78%); animation:atlasStarsDrift 18s linear infinite; }
.atlas-voice__rings { position:absolute; inset:0; display:grid; place-items:center; pointer-events:none; }
.atlas-voice__rings i { position:absolute; width:202px; height:202px; border-radius:50%; border:1px solid rgba(101,232,217,.2); opacity:.42; }
.atlas-voice__rings i:nth-child(2) { width:230px; height:230px; border-color:rgba(87,166,255,.17); }
.atlas-voice__rings i:nth-child(3) { width:260px; height:260px; border-color:rgba(143,103,255,.13); }
.atlas-voice__status { position:relative; z-index:2; margin-top:12px; color:#efffff; font-size:22px; font-weight:760; text-align:center; }
.atlas-voice__transcript { position:relative; z-index:2; width:min(480px, 90%); min-height:55px; margin-top:12px; color:rgba(223,241,247,.72); font-size:15px; line-height:1.48; text-align:center; }
.atlas-voice__levels { position:relative; z-index:2; height:36px; margin:14px 0 18px; display:flex; align-items:center; gap:4px; }
.atlas-voice__levels i { width:3px; height:8px; border-radius:4px; background:linear-gradient(#75f4d0, #6498ff); opacity:.36; transform-origin:center; }
.atlas-voice__actions { position:relative; z-index:2; display:flex; gap:10px; flex-wrap:wrap; justify-content:center; }
.atlas-voice__primary, .atlas-voice__secondary { min-height:44px; padding:0 17px; border-radius:14px; font-weight:750; cursor:pointer; }
.atlas-voice__primary { display:flex; align-items:center; gap:8px; border:1px solid rgba(142,245,226,.36); color:#061718; background:linear-gradient(135deg, #7cf2d2, #8bc7ff); box-shadow:0 10px 30px rgba(60,226,198,.14); }
.atlas-voice__secondary { border:1px solid rgba(255,255,255,.15); color:#e6f8fa; background:rgba(255,255,255,.06); }

.atlas-voice__settings { position:relative; z-index:2; width:min(420px, 92%); margin-top:18px; display:grid; gap:10px; }
.atlas-voice__profile { display:flex; align-items:center; justify-content:space-between; gap:12px; color:rgba(224,244,247,.78); font-size:12px; }
.atlas-voice__profile > span { font-weight:750; letter-spacing:.04em; }
.atlas-voice__profile select { min-width:180px; padding:9px 32px 9px 11px; border:1px solid rgba(126,235,215,.22); border-radius:11px; color:#eaffff; background:rgba(7,20,30,.82); outline:none; }
.atlas-voice__profile select:focus { border-color:rgba(126,235,215,.58); box-shadow:0 0 0 3px rgba(74,226,198,.10); }

.atlas-voice__toggle { position:relative; z-index:2; display:flex; align-items:center; gap:9px; margin-top:0; color:rgba(224,244,247,.75); font-size:12px; }
.atlas-voice__toggle input { accent-color:#61e7c8; }
.atlas-voice__privacy { position:relative; z-index:2; max-width:470px; margin-top:13px; color:rgba(190,210,220,.48); font-size:10px; line-height:1.4; text-align:center; }

.atlas-voice[data-mode="listening"] .atlas-voice__orb { transform:scale(1.06); box-shadow:0 0 55px rgba(67,245,205,.5), 0 0 135px rgba(74,130,255,.28), inset -20px -26px 55px rgba(3,8,30,.78); animation:atlasOrbBreathe 1.65s ease-in-out infinite; }
.atlas-voice[data-mode="listening"] .atlas-voice__rings i { animation:atlasVoiceRing 1.8s ease-out infinite; }
.atlas-voice[data-mode="listening"] .atlas-voice__rings i:nth-child(2) { animation-delay:.35s; }
.atlas-voice[data-mode="listening"] .atlas-voice__rings i:nth-child(3) { animation-delay:.7s; }
.atlas-voice[data-mode="listening"] .atlas-voice__levels i { animation:atlasVoiceLevel .72s ease-in-out infinite alternate; opacity:.9; }
.atlas-voice[data-mode="listening"] .atlas-voice__levels i:nth-child(3n) { animation-delay:.1s; }
.atlas-voice[data-mode="listening"] .atlas-voice__levels i:nth-child(4n) { animation-delay:.22s; }
.atlas-voice[data-mode="listening"] .atlas-voice__levels i:nth-child(5n) { animation-delay:.34s; }
.atlas-voice[data-mode="thinking"] .atlas-voice__orb { animation:atlasOrbThink 2.2s ease-in-out infinite; }
.atlas-voice[data-mode="thinking"] .atlas-voice__aurora--one { animation-duration:1.8s; }
.atlas-voice[data-mode="thinking"] .atlas-voice__aurora--two { animation-duration:2.2s; }
.atlas-voice[data-mode="thinking"] .atlas-voice__aurora--three { animation-duration:1.6s; }
.atlas-voice[data-mode="speaking"] .atlas-voice__orb { animation:atlasOrbSpeak 1.2s ease-in-out infinite; }
.atlas-voice[data-mode="speaking"] .atlas-voice__levels i { animation:atlasVoiceLevel .48s ease-in-out infinite alternate; opacity:.86; }
.atlas-voice[data-mode="error"] .atlas-voice__orb { box-shadow:0 0 45px rgba(255,111,136,.28), inset -20px -26px 55px rgba(3,8,30,.82); }

@keyframes atlasAuroraBackdrop { to { transform:rotate(360deg); } }
@keyframes atlasAuroraOne { from { transform:translate(-12px,8px) rotate(-18deg) scale(.9); } to { transform:translate(20px,-7px) rotate(-7deg) scale(1.15); } }
@keyframes atlasAuroraTwo { from { transform:translate(12px,-5px) rotate(14deg) scale(1.1); } to { transform:translate(-18px,10px) rotate(2deg) scale(.92); } }
@keyframes atlasAuroraThree { from { transform:translate(-8px,3px) rotate(-7deg); } to { transform:translate(15px,-8px) rotate(10deg); } }
@keyframes atlasStarsDrift { to { transform:rotate(360deg) scale(1.08); } }
@keyframes atlasOrbBreathe { 0%,100% { transform:scale(1.03); } 50% { transform:scale(1.085); } }
@keyframes atlasOrbThink { 0%,100% { transform:rotate(-2deg) scale(1.01); filter:hue-rotate(0deg); } 50% { transform:rotate(3deg) scale(1.065); filter:hue-rotate(24deg); } }
@keyframes atlasOrbSpeak { 0%,100% { transform:scale(1.02); } 45% { transform:scale(1.075); } 70% { transform:scale(1.035); } }
@keyframes atlasVoiceRing { 0% { transform:scale(.72); opacity:.5; } 100% { transform:scale(1.22); opacity:0; } }
@keyframes atlasVoiceLevel { from { height:6px; } to { height:30px; } }

@media (max-width:680px) {
  .atlas-voice { padding:0; }
  .atlas-voice__panel { width:100vw; min-height:100dvh; border:0; border-radius:0; padding:58px 18px 24px; }
  .atlas-voice__orb-wrap { width:240px; height:240px; }
  .atlas-voice__orb { width:174px; height:174px; }
  .atlas-voice__status { font-size:20px; }
}
@media (prefers-reduced-motion:reduce) {
  .atlas-voice *, .atlas-voice *::before, .atlas-voice *::after { animation:none !important; transition:none !important; }
}

/* Atlas v2.5 — modern black interface + search-bar launcher */
:root {
  --atlas-blue:#58a6ff;
  --atlas-cyan:#63e6ff;
  --atlas-black:#030507;
  --atlas-panel:#07090d;
  --atlas-panel-2:#0b0f15;
  --atlas-line:rgba(104,174,255,.20);
}

.sky-pixel-search-box {
  align-items:center;
  overflow:visible;
}
.sky-pixel-search-box #skyPixelSearchInput { min-width:0; }

.atlas-launcher.atlas-search-launcher {
  position:relative;
  inset:auto;
  flex:0 0 auto;
  min-width:132px;
  height:48px;
  padding:5px 12px 5px 7px;
  margin:0;
  display:inline-flex;
  align-items:center;
  justify-content:flex-start;
  gap:9px;
  border:1px solid rgba(91,177,255,.42);
  border-radius:999px;
  color:#edf8ff;
  background:linear-gradient(145deg,rgba(7,15,26,.98),rgba(1,5,10,.98));
  box-shadow:0 0 0 1px rgba(91,177,255,.08),0 0 22px rgba(43,139,255,.18),inset 0 1px 0 rgba(255,255,255,.08);
  transform:none;
  z-index:auto;
  pointer-events:auto;
  cursor:pointer;
  transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease;
}
.atlas-launcher.atlas-search-launcher:hover {
  transform:translateY(-1px);
  border-color:rgba(105,207,255,.72);
  box-shadow:0 0 0 1px rgba(91,177,255,.12),0 0 30px rgba(43,139,255,.32),inset 0 1px 0 rgba(255,255,255,.11);
}
.atlas-launcher__orb {
  position:relative;
  width:35px;
  height:35px;
  flex:0 0 35px;
  overflow:hidden;
  border-radius:50%;
  background:
    radial-gradient(circle at 34% 27%,rgba(255,255,255,.95) 0 2%,transparent 8%),
    radial-gradient(circle at 60% 70%,rgba(74,105,255,.8),transparent 45%),
    radial-gradient(circle at 35% 55%,rgba(76,240,220,.8),transparent 48%),
    #071225;
  box-shadow:0 0 13px rgba(74,192,255,.7),inset -7px -8px 14px rgba(0,0,0,.55),inset 4px 4px 10px rgba(255,255,255,.18);
}
.atlas-launcher__orb i {
  position:absolute;
  width:42px;
  height:13px;
  left:-4px;
  top:10px;
  border-radius:50%;
  filter:blur(3px);
  opacity:.72;
  transform:rotate(-18deg);
  background:linear-gradient(90deg,transparent,#43ffd0,#579cff,#a66cff,transparent);
  animation:atlasSearchAurora 4.5s ease-in-out infinite alternate;
}
.atlas-launcher__orb i:nth-child(2){top:18px;left:1px;opacity:.45;animation-delay:-1.4s;transform:rotate(13deg)}
.atlas-launcher__orb i:nth-child(3){top:5px;left:-9px;opacity:.30;animation-delay:-2.7s;transform:rotate(30deg)}
.atlas-launcher__label { display:flex; flex-direction:column; align-items:flex-start; line-height:1.02; white-space:nowrap; }
.atlas-launcher__label strong { font-size:13px; font-weight:820; letter-spacing:.01em; }
.atlas-launcher__label small { margin-top:3px; font-size:9px; color:rgba(172,213,241,.62); font-weight:650; letter-spacing:.04em; text-transform:uppercase; }

.atlas-sidebar {
  width:min(470px,calc(100vw - 24px));
  background:linear-gradient(180deg,rgba(5,7,10,.99),rgba(1,3,6,.995));
  border:1px solid rgba(87,158,236,.22);
  border-radius:22px 0 0 22px;
  box-shadow:-18px 0 70px rgba(0,0,0,.72),0 0 42px rgba(31,108,204,.10);
}
.atlas-header {
  min-height:72px;
  padding:13px 16px;
  background:linear-gradient(180deg,rgba(10,14,21,.98),rgba(5,8,13,.96));
  border-bottom:1px solid rgba(91,162,240,.14);
}
.atlas-brand__mark {
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  border:1px solid rgba(88,177,255,.25);
  background:#07101d;
  box-shadow:0 0 22px rgba(42,141,255,.18),inset 0 1px 0 rgba(255,255,255,.07);
}
.atlas-brand__orb,.atlas-welcome__orb {
  position:relative;
  display:block;
  overflow:hidden;
  border-radius:50%;
  background:radial-gradient(circle at 35% 30%,rgba(255,255,255,.92),transparent 7%),radial-gradient(circle at 35% 62%,#46ebd1,transparent 45%),radial-gradient(circle at 67% 68%,#4b72ff,transparent 48%),#06101e;
  box-shadow:0 0 16px rgba(73,176,255,.48),inset -9px -10px 17px rgba(0,0,0,.6);
}
.atlas-brand__orb { width:27px;height:27px; }
.atlas-brand__orb i,.atlas-welcome__orb i { position:absolute;left:-12%;width:125%;height:22%;border-radius:50%;filter:blur(4px);background:linear-gradient(90deg,transparent,#4fffd3,#5b9cff,#a566ff,transparent);animation:atlasSearchAurora 4s ease-in-out infinite alternate; }
.atlas-brand__orb i:first-child,.atlas-welcome__orb i:first-child { top:30%;transform:rotate(-16deg); }
.atlas-brand__orb i:last-child,.atlas-welcome__orb i:nth-child(2) { top:58%;transform:rotate(14deg);animation-delay:-2s; }
.atlas-brand__eyebrow { color:rgba(117,185,247,.66); }
.atlas-brand__title { font-size:18px;letter-spacing:-.01em; }
.atlas-context-bar { background:rgba(5,10,17,.96);border-bottom-color:rgba(88,161,237,.11); }
.atlas-context-dot { background:#66d8ff;box-shadow:0 0 12px #4caeff; }
.atlas-main,.atlas-chat-view,.atlas-messages { background:transparent; }
.atlas-messages { padding:20px 17px 160px; }

.atlas-message__avatar {
  background:radial-gradient(circle at 35% 35%,#8ff7ff,#4d91ff 50%,#111a39 78%);
  color:#02070d;
  border:1px solid rgba(115,211,255,.34);
  box-shadow:0 0 18px rgba(57,155,255,.22);
}
.atlas-message--assistant .atlas-message__bubble {
  color:#e9f4ff;
  background:linear-gradient(145deg,rgba(15,21,31,.96),rgba(8,12,18,.98));
  border:1px solid rgba(93,156,222,.16);
  box-shadow:0 10px 28px rgba(0,0,0,.22);
}
.atlas-message--user .atlas-message__bubble {
  color:#f5fbff;
  background:linear-gradient(145deg,#0f4d91,#0a3266);
  border:1px solid rgba(100,190,255,.35);
  box-shadow:0 8px 24px rgba(13,91,173,.25);
}
.atlas-message__meta { color:rgba(164,193,218,.46); }
.atlas-message__content code { background:rgba(77,153,235,.13);border:1px solid rgba(85,173,255,.16); }

.atlas-composer-wrap {
  padding:14px 15px 13px;
  background:linear-gradient(180deg,rgba(3,5,8,0),rgba(3,5,8,.96) 22%,rgba(3,5,8,1));
}
.atlas-composer {
  min-height:58px;
  gap:8px;
  border:1px solid rgba(72,174,255,.66);
  border-radius:19px;
  background:linear-gradient(145deg,rgba(7,13,22,.99),rgba(2,6,11,.99));
  box-shadow:0 0 0 1px rgba(70,165,255,.08),0 0 26px rgba(23,129,255,.24),inset 0 1px 0 rgba(255,255,255,.06);
  transition:border-color .18s ease,box-shadow .18s ease;
}
.atlas-composer:focus-within {
  border-color:#65c7ff;
  box-shadow:0 0 0 3px rgba(57,154,255,.10),0 0 38px rgba(27,141,255,.38),inset 0 1px 0 rgba(255,255,255,.08);
}
.atlas-input { color:#eef8ff;background:transparent;font-size:15px; }
.atlas-input::placeholder { color:rgba(151,190,221,.48); }
.atlas-send {
  width:40px;height:40px;
  color:#03111e;
  background:linear-gradient(145deg,#7ee8ff,#4b9cff);
  box-shadow:0 0 20px rgba(61,166,255,.34);
}
.atlas-mic { border-color:rgba(83,177,255,.25);background:rgba(54,126,207,.12); }
.atlas-mic:hover { background:rgba(65,159,255,.22);box-shadow:0 0 16px rgba(56,164,255,.18); }
.atlas-disclaimer { color:rgba(146,176,202,.37); }

.atlas-welcome { padding:20px 4px 8px;text-align:left; }
.atlas-welcome__orb { width:68px;height:68px;margin:0 0 22px 3px;box-shadow:0 0 34px rgba(72,177,255,.34),inset -15px -17px 25px rgba(0,0,0,.62); }
.atlas-welcome__orb i { height:16%;filter:blur(7px); }
.atlas-welcome__orb i:nth-child(3){top:44%;transform:rotate(34deg);animation-delay:-1s;opacity:.55}
.atlas-welcome__eyebrow { margin-bottom:7px;color:#66baff;font-size:11px;font-weight:800;letter-spacing:.12em;text-transform:uppercase; }
.atlas-welcome h2 { margin:0;color:#f5faff;font-size:28px;letter-spacing:-.035em; }
.atlas-welcome p { margin:10px 0 21px;color:rgba(188,210,228,.67);font-size:14px;line-height:1.55; }
.atlas-suggestions { display:grid;grid-template-columns:1fr 1fr;gap:9px; }
.atlas-suggestion {
  min-height:112px;
  padding:13px;
  text-align:left;
  color:#eaf6ff;
  border:1px solid rgba(90,160,225,.16);
  border-radius:16px;
  background:linear-gradient(145deg,rgba(12,18,27,.98),rgba(6,10,16,.98));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.035);
  transition:transform .16s ease,border-color .16s ease,background .16s ease,box-shadow .16s ease;
}
.atlas-suggestion:hover {
  transform:translateY(-2px);
  border-color:rgba(82,182,255,.45);
  background:linear-gradient(145deg,rgba(16,29,45,.99),rgba(7,14,24,.99));
  box-shadow:0 10px 25px rgba(0,0,0,.22),0 0 20px rgba(39,132,231,.09);
}
.atlas-suggestion__icon { display:grid;place-items:center;width:27px;height:27px;margin-bottom:11px;border-radius:9px;color:#72c9ff;background:rgba(69,154,241,.13);border:1px solid rgba(85,180,255,.17);font-size:14px; }
.atlas-suggestion strong { display:block;margin-bottom:5px;font-size:13px; }
.atlas-suggestion span:last-child { color:rgba(166,194,217,.55);font-size:11px;line-height:1.4; }

.atlas-icon-button { color:rgba(207,228,244,.73);background:rgba(255,255,255,.035);border-color:rgba(103,165,222,.11); }
.atlas-icon-button:hover { color:#fff;background:rgba(72,155,235,.13);border-color:rgba(96,184,255,.23); }
.atlas-history-item { background:rgba(10,16,24,.88);border-color:rgba(89,151,210,.13); }

@keyframes atlasSearchAurora {
  0%{transform:translateX(-5px) rotate(-18deg) scale(.9)}
  100%{transform:translateX(7px) rotate(-5deg) scale(1.12)}
}

@media (max-width:760px) {
  .sky-pixel-search-box { gap:6px; }
  .atlas-launcher.atlas-search-launcher { min-width:48px;width:48px;padding:6px;justify-content:center; }
  .atlas-launcher__label { display:none; }
  .atlas-launcher__orb { width:34px;height:34px;flex-basis:34px; }
  .atlas-sidebar { width:100vw;border-radius:0; }
  .atlas-suggestions { grid-template-columns:1fr; }
}

@media (max-width:480px) {
  .sky-pixel-search button#skyPixelSearchButton { padding:0 12px; }
  .atlas-launcher.atlas-search-launcher { width:44px;min-width:44px;height:44px; }
  .atlas-launcher__orb { width:31px;height:31px;flex-basis:31px; }
}


/* ===== Sky Pixel Tools launcher beside AI Atlas ===== */
.sky-pixel-tools-launcher {
  position: static;
  flex: 0 0 auto;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 13px;
  border: 1px solid rgba(102, 202, 255, .30);
  border-radius: 15px;
  color: #f7fbff;
  background:
    radial-gradient(circle at 22% 15%, rgba(123, 224, 255, .20), transparent 40%),
    linear-gradient(145deg, rgba(12, 26, 43, .96), rgba(16, 41, 65, .94));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.10),
    0 0 0 1px rgba(64,172,255,.05),
    0 8px 24px rgba(0,0,0,.26);
  cursor: pointer;
  font-family: var(--atlas-font);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.sky-pixel-tools-launcher:hover {
  transform: translateY(-1px);
  border-color: rgba(113, 222, 255, .58);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 0 22px rgba(46, 179, 255, .22), 0 10px 28px rgba(0,0,0,.30);
}
.sky-pixel-tools-launcher:focus-visible {
  outline: 3px solid rgba(92, 207, 255, .42);
  outline-offset: 2px;
}
.sky-pixel-tools-launcher.is-active,
.sky-pixel-tools-launcher[aria-expanded="true"] {
  border-color: rgba(119, 231, 255, .76);
  background: linear-gradient(145deg, rgba(10, 42, 68, .98), rgba(15, 62, 91, .96));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 0 26px rgba(45, 199, 255, .34);
}
.sky-pixel-tools-launcher__icon {
  width: 29px;
  height: 29px;
  flex: 0 0 29px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #c9f6ff;
  background: linear-gradient(145deg, rgba(67, 207, 255, .30), rgba(73, 131, 255, .20));
  border: 1px solid rgba(181, 239, 255, .24);
  box-shadow: 0 0 15px rgba(51, 200, 255, .24);
  font-size: 15px;
}
.sky-pixel-tools-launcher__label {
  display: grid;
  gap: 2px;
  text-align: left;
  white-space: nowrap;
}
.sky-pixel-tools-launcher__label strong {
  font-size: 12px;
  line-height: 1;
  letter-spacing: .01em;
}
.sky-pixel-tools-launcher__label small {
  color: rgba(210, 231, 245, .64);
  font-size: 9px;
  line-height: 1;
}

@media (max-width: 820px) {
  .sky-pixel-tools-launcher__label { display: none; }
  .sky-pixel-tools-launcher { width: 44px; padding: 0; justify-content: center; border-radius: 14px; }
}


/* ===== Atlas mobile bottom-sheet experience ===== */
@media (max-width: 720px) {
  :root {
    --atlas-width: 100vw;
  }

  .atlas-backdrop {
    background: rgba(0, 0, 0, .52);
    backdrop-filter: blur(5px);
  }

  .atlas-sidebar {
    top: auto !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: min(84dvh, 760px) !important;
    max-height: calc(100dvh - 8px) !important;
    border-left: 0 !important;
    border-top: 1px solid rgba(255,255,255,.15) !important;
    border-radius: 24px 24px 0 0 !important;
    transform: translateY(104%) !important;
    box-shadow: 0 -24px 80px rgba(0,0,0,.58) !important;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .atlas-sidebar::before {
    content: "";
    position: absolute;
    top: 8px;
    left: 50%;
    width: 44px;
    height: 5px;
    border-radius: 999px;
    background: rgba(255,255,255,.28);
    transform: translateX(-50%);
    z-index: 10;
  }

  .atlas-sidebar.is-open {
    transform: translateY(0) !important;
  }

  .atlas-header {
    position: sticky;
    top: 0;
    z-index: 8;
    padding: 22px 14px 12px !important;
    background: rgba(5, 9, 17, .92) !important;
    backdrop-filter: blur(18px);
  }

  .atlas-brand__mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .atlas-brand__title {
    font-size: 16px;
  }

  .atlas-context-bar {
    position: sticky;
    top: 72px;
    z-index: 7;
    min-height: 34px;
    padding: 7px 14px;
    background: rgba(5,9,17,.88);
    backdrop-filter: blur(16px);
  }

  .atlas-messages {
    padding: 14px 12px 10px;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .atlas-message {
    margin-bottom: 13px;
  }

  .atlas-message__bubble {
    max-width: 90%;
    padding: 11px 13px;
  }

  .atlas-message__content {
    font-size: 14px;
    line-height: 1.5;
  }

  .atlas-composer-wrap {
    position: sticky;
    bottom: 0;
    z-index: 9;
    padding: 8px 10px calc(10px + env(safe-area-inset-bottom, 0px));
    background: rgba(5, 9, 17, .94);
    backdrop-filter: blur(18px);
  }

  .atlas-composer {
    min-height: 54px;
    border-radius: 18px;
    padding: 8px 8px 8px 12px;
  }

  .atlas-input {
    font-size: 16px; /* prevents iOS zoom */
    min-height: 28px;
  }

  .atlas-send,
  .atlas-icon-button {
    min-width: 44px;
    min-height: 44px;
  }

  .atlas-welcome {
    padding: 8px 0 14px;
  }

  .atlas-welcome h2 {
    font-size: 22px;
  }

  .atlas-suggestions {
    display: flex !important;
    gap: 10px !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory;
    padding: 2px 2px 8px;
    margin-right: -12px;
    -webkit-overflow-scrolling: touch;
  }

  .atlas-suggestion {
    flex: 0 0 min(78vw, 280px);
    min-height: 108px;
    scroll-snap-align: start;
  }

  .sky-pixel-search {
    top: max(8px, env(safe-area-inset-top, 0px)) !important;
    width: calc(100vw - 12px) !important;
    max-width: calc(100vw - 12px) !important;
  }

  .sky-pixel-search-box {
    padding: 6px !important;
    gap: 6px !important;
    border-radius: 18px !important;
  }

  .sky-pixel-search input {
    font-size: 16px !important;
    padding: 10px 12px !important;
  }

  .sky-pixel-search button {
    min-width: 44px;
    min-height: 44px;
  }

  body.atlas-open #map {
    pointer-events: none;
    touch-action: none;
  }
}

@media (max-width: 430px) {
  .atlas-header__actions {
    gap: 5px;
  }

  .atlas-icon-button {
    width: 42px;
    height: 42px;
  }

  .atlas-brand__eyebrow {
    display: none;
  }

  .atlas-brand__title {
    font-size: 15px;
  }

  .atlas-context-bar {
    top: 70px;
  }
}
