/* Mira: compact chat and a stationary, manually repositionable assistant. */
:root{--atlas-mint:#b9dedf;--atlas-gold:#dfcda9;--atlas-ink:#141b23;--atlas-line:#465261}
.mira-pet,.atlas-panel{font-family:Inter,'DM Sans',sans-serif;color:#edf5ed;box-sizing:border-box}
.mira-pet *,.atlas-panel *{box-sizing:border-box}
.mira-pet button,.atlas-panel button{font:inherit;cursor:pointer}
.mira-pet button:focus-visible,.atlas-panel button:focus-visible{outline:2px solid #edd393;outline-offset:4px}
.atlas-kicker{display:flex;align-items:center;gap:10px;font-size:9px;letter-spacing:1.7px;color:var(--atlas-gold);font-weight:600;text-transform:uppercase}
.atlas-signal{width:6px;height:6px;border-radius:50%;background:var(--atlas-mint);flex-shrink:0}
.atlas-buttons{display:flex;gap:10px;flex-wrap:wrap}
.atlas-button{display:inline-flex;align-items:center;justify-content:center;gap:12px;min-height:44px;padding:12px 18px;border-radius:12px;border:1px solid #78907a66;background:#c2f4d8;color:#122a20!important;font-size:12px!important;font-weight:600!important;transition:transform .2s,background .2s}
.atlas-button:hover{transform:translateY(-2px);background:#d7ffe7}
.atlas-button.secondary{background:#ffffff04;color:#d8e6db!important;border-color:#77968160}
.atlas-icon-button{display:grid;place-items:center;min-width:40px;min-height:40px;background:transparent;border:1px solid #79917e40;border-radius:11px;color:#c9dacc;font-size:19px!important}
.atlas-icon-button:hover{background:#ffffff0a}
.atlas-panel{position:fixed;z-index:90;bottom:138px;right:24px;width:390px;max-height:min(700px,calc(100dvh - 162px));display:flex;flex-direction:column;border:1px solid #64836c;border-radius:25px;background:linear-gradient(145deg,#1c3228,#101e19);box-shadow:0 25px 85px #0008;overflow:hidden;animation:atlas-arrive .32s ease-out}
.atlas-panel[hidden],.atlas-dock[hidden]{display:none!important}
.atlas-panel-header{display:flex;align-items:center;gap:11px;padding:19px 20px;border-bottom:1px solid #66816b45}
.atlas-panel-title{flex:1}
.atlas-panel-title h2{font-size:17px;font-weight:500;margin:0 0 4px!important;color:#edf6e9}
.atlas-panel-title p{font-size:10px;margin:0;color:#b4c7b8}
.atlas-mode{border:0;background:#0b1c1480;color:#c9dabd;border-radius:0;padding:10px 20px;text-align:left;font-size:10px!important;display:flex;align-items:center;gap:8px}
.atlas-mode:hover{text-decoration:underline}
.atlas-conversation{overflow-y:auto;overscroll-behavior:contain;flex:1;min-height:110px;padding:20px;scroll-behavior:smooth}
.atlas-message{margin-bottom:20px;animation:atlas-arrive .22s ease-out;max-width:100%;overflow-wrap:anywhere}
.atlas-message-label{font-size:8px;font-weight:600;letter-spacing:1.7px;color:var(--atlas-gold);margin-bottom:9px}
.atlas-message p{font-size:12px;line-height:1.8;color:#d2e1d5;white-space:pre-wrap;margin:0}
.atlas-message.user{background:#c7e0c411;border:1px solid #86aa9030;border-radius:15px 15px 4px 15px;padding:12px 15px;margin-left:25px}
.atlas-message.user .atlas-message-label{color:#a7bcad}
.atlas-message.user p{color:#e0ecdf}
.atlas-message .atlas-button{margin-top:13px;min-height:38px;padding:9px 13px;font-size:11px!important}
.atlas-suggestions{display:flex;flex-wrap:wrap;gap:7px;padding:0 20px 15px}
.atlas-suggestions button{border:1px solid #759a7c55;border-radius:18px;background:#1a3427;color:#c9decd;padding:8px 11px;font-size:10px!important;min-height:34px}
.atlas-composer{padding:14px 16px 10px;border-top:1px solid #66816b45;background:#0d1c1555}
.atlas-input-row{display:flex;gap:8px;align-items:flex-end;border:1px solid #6f91775c;border-radius:15px;background:#0b1912;padding:7px}
.atlas-input-row:focus-within{border-color:var(--atlas-gold)}
.atlas-input-row textarea{resize:none;width:100%;min-height:42px;max-height:100px;border:0!important;background:none!important;padding:10px 6px!important;color:#e9f2e6!important;font:12px/1.7 Inter,sans-serif;outline:none!important;box-shadow:none!important}
.atlas-send{width:40px;height:40px;flex-shrink:0;border:0;border-radius:10px;background:var(--atlas-mint);color:#173625;font-size:21px!important}
.atlas-send:disabled{opacity:.5;cursor:wait}
.atlas-composer-footer{display:flex;justify-content:space-between;gap:10px;font-size:9px;color:#92aa9b;padding:9px 3px 0}
.atlas-clear{padding:0;background:none;color:#b5cbb9;border:0;font-size:9px!important;text-decoration:underline}
.atlas-busy{display:flex;align-items:center;gap:5px;color:#b7c9b7;font-size:10px;padding:0 20px 13px}
.atlas-busy[hidden]{display:none}
.atlas-busy i{width:4px;height:4px;border-radius:50%;background:var(--atlas-gold);animation:atlas-dot 1.1s ease-in-out infinite}
.atlas-busy i:nth-child(2){animation-delay:.15s}
.atlas-busy i:nth-child(3){animation-delay:.3s}
.atlas-highlight{outline:2px solid #dcc17d!important;outline-offset:7px;transition:outline-color .3s;scroll-margin-top:125px}
.mira-pet{position:fixed;z-index:80;right:22px;bottom:max(16px,env(safe-area-inset-bottom));width:114px;height:140px;isolation:isolate}
.mira-motion{height:126px;transform-origin:70% 100%}
.mira-pet-button{display:block;width:114px;height:133px;padding:0;background:none;border:0;border-radius:45%;touch-action:none;user-select:none;-webkit-user-select:none;cursor:grab!important;-webkit-tap-highlight-color:transparent}
.mira-pet-button:active{cursor:grabbing!important}
.mira-character{width:100%;height:100%;overflow:visible;display:block}
.mira-body{transform-origin:90px 173px}
.mira-eyes{transform-box:fill-box;transform-origin:center}
.mira-head{transform-origin:90px 110px;}
.mira-arm.right{transform-origin:120px 125px}
.mira-pet-button:hover .mira-arm.right{}
.mira-pet.on-left{right:auto;left:22px}
.mira-pet.on-left .mira-settings{right:auto;left:0}
.mira-name{position:absolute;left:27px;bottom:0;display:flex;align-items:center;gap:6px;background:#14281f;border:1px solid #8bac8070;border-radius:20px;color:#e4efdd;font-size:10px!important;letter-spacing:.5px;padding:5px 11px;min-height:28px}
.mira-name>span{width:4px;height:4px;border-radius:50%;background:#c7edba}
.mira-settings-toggle{position:absolute;right:-9px;bottom:0;width:32px;height:32px;border:1px solid #73897070;border-radius:50%;background:#13261e;color:#e4d4a7;font-size:21px!important;line-height:1}
.mira-settings{position:absolute;bottom:42px;right:0;width:230px;z-index:4;border:1px solid #718767;border-radius:16px;background:#14271f;padding:10px;box-shadow:0 14px 30px #0006;animation:atlas-arrive .2s ease-out}
.mira-settings>span{display:block;padding:9px 7px 10px;font-size:8px;letter-spacing:1px;color:#cab888}
.mira-settings button{display:block;width:100%;text-align:left;border:0;border-radius:8px;padding:11px 8px;min-height:44px;color:#daeadb;background:none;font-size:12px}
.mira-settings button:hover{background:#a9ceab15}
.mira-settings button:disabled{opacity:.65;cursor:default}
.mira-restore{position:absolute;right:0;bottom:0;min-height:42px;padding:8px 14px;border:1px solid #678468;border-radius:24px;background:#14281f;color:#d5e6d5;display:flex;align-items:center;gap:8px;font-size:11px!important}
.mira-restore span{color:#e0c58a;font-size:19px}
.mira-settings[hidden],.mira-restore[hidden]{display:none!important}
.mira-pet.quiet{width:84px;height:42px}
.mira-pet.quiet .mira-motion,.mira-pet.quiet .mira-name,.mira-pet.quiet .mira-settings-toggle{display:none}
.mira-pet.dragging{cursor:grabbing}
.mira-pet.dragging .mira-motion{transform:rotate(-7deg)}
.mira-avatar{display:block;width:46px;height:46px;overflow:hidden;border:1px solid #b1ca9566;border-radius:15px;background:radial-gradient(ellipse at top,#395b44,#15271f);flex-shrink:0}
.mira-avatar img{width:58px;max-width:none;height:68px;margin:-5px 0 0 -6px}
.atlas-panel{transform-origin:bottom right;border-color:#84917480;background:linear-gradient(140deg,#233c2e,#10241c 65%);box-shadow:0 24px 65px #0007}
.atlas-panel-header{padding:16px 18px}
.atlas-panel-title h2{letter-spacing:.1px;font-size:19px}
.atlas-panel-title p{font-size:11px;color:#b5c8b2}
.atlas-mode{font-size:10px!important;padding:11px 18px}
.atlas-message p{font-size:13px;line-height:1.8}
.atlas-message-label{font-size:9px}
.atlas-message.user{border-color:#a7c18c25}
.atlas-composer-footer{font-size:9px;line-height:1.5}
.atlas-send{min-height:40px}
.atlas-input-row textarea{font-size:14px}
.atlas-suggestions button{min-height:38px;font-size:11px!important}
.atlas-suggestions{gap:6px}
.atlas-suppressed .mira-pet,.atlas-suppressed .atlas-panel,.entry-pending .mira-pet{visibility:hidden;pointer-events:none}
.atlas-paused .mira-pet *,.atlas-suppressed .mira-pet *,.mira-pet.quiet *,.mira-pet.chat-open *,.mira-pet.dragging *{animation-play-state:paused!important}
.atlas-paused .atlas-busy i{animation-play-state:paused}
@keyframes atlas-arrive{from{opacity:0;translate:0 10px;scale:.98}to{opacity:1;translate:0 0;scale:1}}
@keyframes atlas-dot{50%{opacity:.3;transform:translateY(-2px)}}
@media(max-width:560px){
.mira-pet{width:90px;height:112px;right:12px;bottom:max(12px,env(safe-area-inset-bottom))}
.mira-motion{height:98px}
.mira-pet-button{width:90px;height:105px}
.mira-name{left:16px;font-size:9px!important;padding:3px 9px;min-height:26px}
.mira-settings-toggle{right:-3px;width:28px;height:28px}
.mira-pet.on-left{left:12px}
.mira-settings{width:220px}
.atlas-panel{right:10px;left:10px;bottom:calc(125px + var(--atlas-keyboard-inset,0px));width:auto;max-height:calc(var(--atlas-visible-height,100dvh) - 142px);border-radius:22px}
.atlas-panel-header{padding:13px 15px}
.atlas-conversation{padding:16px}
.atlas-suggestions{padding-inline:16px}
.atlas-input-row textarea{font-size:16px}
.atlas-message p{font-size:13px}
.atlas-keyboard .mira-pet{visibility:hidden}
.atlas-keyboard .atlas-panel{bottom:calc(8px + var(--atlas-keyboard-inset,0px));max-height:calc(var(--atlas-visible-height,100dvh) - 16px)}
.atlas-keyboard .atlas-suggestions{display:none}
.atlas-keyboard .atlas-panel-header{padding-block:8px}
.atlas-keyboard .atlas-conversation{min-height:60px}
}
@media(max-height:550px){
.atlas-panel{bottom:12px;max-height:calc(100dvh - 24px)}
.mira-pet.chat-open{visibility:hidden}
}
@media(prefers-reduced-motion:reduce){
.mira-pet *,.atlas-panel,.atlas-panel *{animation:none!important;transition:none!important;scroll-behavior:auto!important}
}
@media print{
.mira-pet,.atlas-panel{display:none!important}
.atlas-highlight{outline:none!important}
}
.mira-settings{position:fixed;bottom:auto;right:auto}
.mira-pet.on-left .mira-settings{right:auto}
@media(min-width:561px){
.mira-panel-left .atlas-panel{left:24px;right:auto;transform-origin:bottom left}
}
.atlas-panel-header,.atlas-mode,.atlas-suggestions,.atlas-composer,.atlas-busy{flex-shrink:0}
.atlas-conversation{min-height:0;flex:1 1 auto}
@media(max-height:550px){
.atlas-suggestions{display:none}
.atlas-panel-header{padding-block:9px}
.atlas-conversation{min-height:0}
}
.atlas-stop{margin-left:auto;min-height:32px;padding:5px 12px;border:1px solid #7e997d77;border-radius:16px;color:#dbe8cd;background:#173024;font-size:11px!important}
.atlas-panel{background:radial-gradient(ellipse at 100% 0,#697a9920,transparent 50%),#171e26;border-color:#71869870;box-shadow:0 22px 60px #0006,0 1px 0 #dceaf21a inset}
.atlas-panel-header{position:relative;isolation:isolate;border-color:#a0b4cb24;background:linear-gradient(110deg,#adcbd712,#bcb0d709);overflow:hidden}
.atlas-panel-header:after{content:'';position:absolute;z-index:-1;right:55px;top:-42px;width:130px;height:130px;border:1px solid #b8c8df25;border-radius:50%;box-shadow:0 0 0 15px #b7add908,0 0 0 34px #aac7d306;pointer-events:none}
.atlas-panel-title h2{color:#f1f0eb}
.atlas-panel-title p{color:#bdc7d1}
.atlas-mode{background:none;color:#bdcdd8;padding:10px 20px;font-size:10px!important;cursor:default}
.atlas-mode:hover{text-decoration:none}
.atlas-mode-detail{margin-left:auto;color:#a7a4ba;font-size:8px;letter-spacing:1.4px}
.atlas-mode.offline .atlas-signal{background:#d9be95}
.atlas-signal{background:#9cd4d9;box-shadow:0 0 0 3px #9cd4d90d}
.atlas-message p{color:#d8dfe6;font-size:13px;line-height:1.7}
.atlas-message-label{color:#c5bfdc}
.atlas-message.user{background:#9bb8d414;border-color:#aac6df24}
.atlas-message.user p{color:#e3eaf1}
.atlas-message.user .atlas-message-label{color:#afc7dd}
.atlas-button{background:#c4dde5;color:#172932!important;border-color:#b9d7e2}
.atlas-button:hover{background:#ddebf0}
.atlas-button.secondary{color:#d4dce6!important;background:transparent;border-color:#6e819650}
.atlas-suggestions button{background:#a9bed10a;border-color:#a6bdd134;color:#c4d7e3;min-height:38px}
.atlas-suggestions button:last-child{color:#d0c6e3;border-color:#c2b1df30}
.atlas-suggestions button:hover{background:#bdcce614}
.has-conversation .atlas-suggestions{display:none}
.atlas-composer{background:#11171e60;border-color:#a0b4cb24}
.atlas-input-row{background:#101820;border-color:#829caf4d}
.atlas-input-row:focus-within{border-color:#aacddf;box-shadow:0 0 0 3px #a5c6df0c}
.atlas-input-row textarea{color:#eef1f5!important}
.atlas-input-row textarea::placeholder{color:#a6b5c3;opacity:1}
.atlas-send{background:linear-gradient(135deg,#d5e4eb,#b8c7e0);color:#182a3b}
.atlas-send:hover:not(:disabled){background:#dfebf4}
.atlas-composer-footer{color:#adb9c6;align-items:center;line-height:1.65;flex-wrap:wrap}
.atlas-clear{color:#d2c7e4;min-height:32px;white-space:nowrap}
.atlas-stop{background:#273440;border-color:#8ea6bd55;color:#d9e4ed}
.atlas-icon-button{border-color:#90a7be40;color:#dce2ec}
.atlas-busy{color:#bdcbd9}
.mira-settings{background:#1b2531;border-color:#8aa4be66}
.mira-name,.mira-settings-toggle{background:#1b2936;border-color:#a9bfd44d;color:#e0e8ed}
.mira-pet:before{background:radial-gradient(ellipse,#a8c8e320,transparent 68%)}
@media(max-width:560px){
.atlas-mode{padding-inline:16px}
.atlas-composer{padding:10px 13px 6px}
.atlas-conversation{padding:15px 16px}
.atlas-message{margin-bottom:16px}
}
.atlas-composer-footer,.atlas-clear{font-size:10px!important}
.atlas-clear{min-width:48px}
@media(max-width:560px){
.atlas-composer-footer,.atlas-clear{font-size:11px!important}
}

.atlas-composer-footer{justify-content:flex-end}

/* Keep the companion, name and settings in one centered vertical column. */
.mira-pet{height:186px}
.mira-name{left:50%;bottom:48px;transform:translateX(-50%);white-space:nowrap}
.mira-settings-toggle{left:50%;right:auto;bottom:0;transform:translateX(-50%);width:44px;height:36px;border-radius:18px}
@media(min-width:561px){.atlas-panel{bottom:218px;max-height:calc(var(--atlas-visible-height,100dvh) - 238px)}}
@media(max-width:560px){
 .mira-pet{height:158px}
 .mira-name{left:50%;bottom:44px}
 .mira-settings-toggle{left:50%;right:auto;width:44px;height:36px}
 .atlas-panel{bottom:calc(178px + var(--atlas-keyboard-inset,0px));max-height:calc(var(--atlas-visible-height,100dvh) - 196px)}
 .atlas-keyboard .atlas-panel{bottom:calc(8px + var(--atlas-keyboard-inset,0px));max-height:calc(var(--atlas-visible-height,100dvh) - 16px)}
}
@media(max-height:550px){.atlas-panel{bottom:12px;max-height:calc(100dvh - 24px)}}
.mira-pet.quiet{height:42px}
.atlas-message a.atlas-button{text-decoration:none;max-width:100%;overflow-wrap:anywhere}
.atlas-message .atlas-button:focus-visible{outline:2px solid #dec58f;outline-offset:3px}
