/* Agent page uses the same glass robot as the main application. */
.agent-topbar__account .guide-toggle{
  order:0;flex:0 0 42px;width:42px;height:42px;min-height:42px;padding:0;
  border-radius:14px;border-color:rgba(94,193,250,.48);
  background:linear-gradient(145deg,rgba(25,69,112,.88),rgba(10,28,55,.96));
  box-shadow:inset 0 0 13px rgba(93,199,255,.14),0 0 16px rgba(41,139,220,.18);
}
.agent-topbar__account .guide-toggle__icon{width:24px;height:24px;font-size:19px;background:transparent;box-shadow:none}
body.guide-hidden .agent-topbar__account .guide-toggle{border-color:rgba(120,132,169,.4);background:rgba(7,13,28,.82)}
.agent-topbar__account .guide-toggle:focus-visible{outline:2px solid #a2e2ff;outline-offset:3px}

#heartOrbit .orbit-card{
  border-color:rgba(157,198,255,calc(.27 + var(--card-depth,.5) * .3));
  background:linear-gradient(148deg,rgba(35,56,98,.78),rgba(9,24,55,.79) 42%,rgba(12,13,39,.86));
  -webkit-backdrop-filter:blur(22px) saturate(1.4);
  backdrop-filter:blur(22px) saturate(1.4);
  box-shadow:inset 0 1px 0 rgba(222,240,255,.21),inset 0 -18px 25px rgba(67,103,192,.1),0 12px 32px rgba(0,0,0,.42),0 0 19px rgba(75,155,255,.14);
}
#heartOrbit .orbit-card.is-front,#heartOrbit .orbit-card.is-active-domain{
  border-color:rgba(139,225,255,.85);
  box-shadow:inset 0 1px 0 rgba(244,252,255,.3),inset 0 0 24px rgba(101,168,252,.15),0 18px 42px rgba(0,0,0,.48),0 0 32px rgba(82,185,255,.28);
}
#heartOrbit .orbit-card b{color:#d4f2ff;text-shadow:0 0 12px rgba(112,211,255,.35)}
#heartOrbit .orbit-card span{color:#c5d4ea}

.agent-robot.life-robot{
  left:auto;right:max(15px,env(safe-area-inset-right));
  bottom:max(17px,env(safe-area-inset-bottom));z-index:65;
  flex-direction:row-reverse;align-items:flex-end;gap:12px;
}
.gesture-camera-panel{left:18px;right:auto}
.agent-robot .life-robot__button{flex:none}
.agent-robot .life-guide-robot{position:absolute;right:0;bottom:0}
.agent-robot .agent-robot__panel{
  position:absolute;right:0;bottom:calc(100% + 10px);z-index:3;
  box-sizing:border-box;width:min(390px,calc(100vw - 24px));
  max-height:min(72dvh,650px);overflow-y:auto;overscroll-behavior:contain;
  padding:14px 18px 22px;
  border-color:rgba(139,202,255,.32);
  background:linear-gradient(155deg,rgba(24,31,57,.98),rgba(9,16,32,.98));
  box-shadow:0 26px 75px rgba(0,0,0,.5),0 0 28px rgba(91,141,238,.13);
  transform:translateY(22px) scale(.94);
  transition:transform .42s cubic-bezier(.22,1,.36,1),opacity .32s ease,visibility .42s ease;
  scrollbar-width:thin;
}
.agent-robot.open .agent-robot__panel{transform:translateY(0) scale(1)}
.agent-robot__panel .life-robot__head{align-items:center}
.agent-robot__panel .life-robot__head .life-robot__help{margin-left:auto}
.agent-robot__panel-message{min-height:34px;margin:12px 0 15px!important;color:#dceaff!important;font-size:12px!important;line-height:1.5!important}
.agent-robot__intro{display:flex;align-items:center;gap:9px;margin:0 0 14px;padding:9px;border:1px solid rgba(139,202,255,.19);border-radius:12px;background:rgba(6,16,34,.55)}
.agent-robot__intro button{flex:none;min-height:35px;padding:0 12px;border:1px solid rgba(139,202,255,.38);border-radius:9px;background:rgba(43,88,145,.65);color:#f0f8ff;font:700 11px "Manrope",sans-serif;cursor:pointer;transition:background .2s ease,transform .2s ease}
.agent-robot__intro button:hover{background:rgba(65,123,187,.84);transform:translateY(-1px)}
.agent-robot__intro button:focus-visible{outline:2px solid #8acbff;outline-offset:2px}
.agent-robot__intro span{color:#aebfd8;font-size:10px;line-height:1.35}
.agent-robot__panel-form{display:flex;gap:8px;margin-bottom:12px}
.agent-robot__panel-form input{min-width:0;flex:1;min-height:39px;padding:9px 11px;border:1px solid rgba(139,202,255,.28);border-radius:11px;background:rgba(6,16,34,.75);color:#f1f7ff;font:inherit;font-size:12px}
.agent-robot__panel-form input:focus-visible{outline:2px solid #8acbff;outline-offset:2px}
.agent-robot__panel-form button{flex:none;padding:0 12px;border:1px solid rgba(139,202,255,.42);border-radius:11px;background:linear-gradient(135deg,rgba(47,100,164,.8),rgba(28,67,123,.9));color:#fff;font:600 11px "Manrope",sans-serif;cursor:pointer}
.agent-robot__panel-form button:hover{background:rgba(68,126,193,.95)}
.agent-robot__commands-host .suggestions-toggle{display:flex;align-items:center;justify-content:center;gap:9px;width:100%;margin:0;padding:10px 12px;border-radius:11px;font-size:12px}
.agent-robot__commands-host .suggestions-toggle::after{content:'⌄';display:inline-block;transition:transform .32s ease}
.agent-robot__commands-host .suggestions-toggle[aria-expanded="true"]::after{transform:rotate(180deg)}
.agent-robot__panel .suggestions:not([hidden]){
  position:static;display:flex;flex-wrap:wrap;align-content:flex-start;gap:7px;
  box-sizing:border-box;width:100%;max-height:0;margin:0;padding:0;
  overflow:hidden;opacity:0;transform:translateY(-8px);
  border:1px solid transparent;border-radius:13px;background:rgba(5,13,29,.65);
  transition:max-height .48s cubic-bezier(.22,1,.36,1),padding .38s ease,margin .38s ease,opacity .3s ease,transform .38s ease,border-color .38s ease;
}
.agent-robot__panel .suggestions.is-expanded{
  max-height:min(40dvh,330px);margin-top:10px;padding:10px;overflow-y:auto;
  opacity:1;transform:none;border-color:rgba(139,202,255,.22);
}
.agent-robot .life-guide-robot,.agent-robot .life-guide-robot__head,.agent-robot .life-guide-robot__arm,.agent-robot .life-guide-robot__leg{
  transition:transform .45s cubic-bezier(.2,.8,.2,1);
}
.agent-robot__bubble{
  position:relative;max-width:min(295px,calc(100vw - 116px));min-width:130px;
  margin-bottom:47px;padding:13px 15px;border:1px solid rgba(168,204,255,.38);border-radius:17px;
  background:linear-gradient(135deg,rgba(30,34,70,.91),rgba(9,22,48,.91));
  -webkit-backdrop-filter:blur(18px) saturate(1.28);backdrop-filter:blur(18px) saturate(1.28);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.17),0 14px 38px rgba(0,0,0,.42),0 0 25px rgba(126,105,242,.2);
  color:#eef5ff;font-size:12px;line-height:1.46;overflow-wrap:anywhere;
  opacity:0;visibility:hidden;transform:translateY(8px) scale(.96);
  transition:opacity .24s ease,visibility .24s ease,transform .28s cubic-bezier(.2,.8,.2,1);
  pointer-events:none;
}
.agent-robot__bubble.is-visible{opacity:1;visibility:visible;transform:none}
.agent-robot__bubble.is-speaking{border-color:rgba(137,224,255,.65);box-shadow:inset 0 1px 0 rgba(255,255,255,.23),0 14px 38px rgba(0,0,0,.42),0 0 30px rgba(85,202,255,.27)}
.heart-thought{display:none!important}

body.heart-radio-playing .agent-robot .life-guide-robot{animation:agentRobotDance .92s ease-in-out infinite}
body.heart-radio-playing .agent-robot .life-guide-robot__body{animation:agentRobotBody .46s ease-in-out infinite alternate}
body.heart-radio-playing .agent-robot .life-guide-robot__head{animation:agentRobotHead .92s ease-in-out infinite}
body.heart-radio-playing .agent-robot .life-guide-robot__arm--left{animation:agentRobotArmLeft .46s ease-in-out infinite alternate}
body.heart-radio-playing .agent-robot .life-guide-robot__arm--right{animation:agentRobotArmRight .46s ease-in-out infinite alternate}
body.heart-radio-playing .agent-robot .life-guide-robot__leg--left{animation:agentRobotLegLeft .46s ease-in-out infinite alternate}
body.heart-radio-playing .agent-robot .life-guide-robot__leg--right{animation:agentRobotLegRight .46s ease-in-out infinite alternate}
body.heart-radio-playing .agent-robot .life-guide-robot__antenna{animation:agentRobotAntenna .35s ease-in-out infinite alternate}
body.heart-radio-playing .agent-robot.is-dance-groove .life-guide-robot{animation:agentRobotGroove 1.28s ease-in-out infinite}
body.heart-radio-playing .agent-robot.is-dance-bounce .life-guide-robot{animation:agentRobotBounce .68s cubic-bezier(.28,.8,.35,1) infinite}
body.heart-radio-playing .agent-robot.is-dance-twist .life-guide-robot{animation:agentRobotTwist 1.6s ease-in-out infinite}
body:not(.heart-radio-playing) .agent-robot:not(.is-dancing):not(.is-moonwalking):not(.is-greeting):not(.is-celebrating):not(.is-reacting) .life-guide-robot{animation:agentRobotIdle 3.8s ease-in-out infinite}
.agent-robot.is-dancing .life-guide-robot{animation:agentRobotDance .92s ease-in-out infinite}
.agent-robot.is-moonwalking .life-guide-robot{animation:agentRobotMoonwalk 2.4s ease-in-out both}
.agent-robot.is-greeting .life-guide-robot{animation:agentRobotGreeting 1.5s ease-in-out both}
.agent-robot.is-reacting .life-guide-robot{animation:agentRobotReact .72s ease-in-out both}
.agent-robot.is-celebrating .life-guide-robot{animation:agentRobotJoy 1.2s ease-in-out both}
.agent-robot.is-greeting .life-guide-robot__arm--right,.agent-robot.is-celebrating .life-guide-robot__arm--right{animation:agentRobotWave .36s ease-in-out 3 alternate}
.agent-robot.is-moonwalking .life-guide-robot__leg--left{animation:agentRobotMoonLeg .42s ease-in-out 5 alternate}
.agent-robot.is-moonwalking .life-guide-robot__leg--right{animation:agentRobotMoonLeg .42s ease-in-out 5 alternate-reverse}
@keyframes agentRobotIdle{0%,100%{transform:translateY(0)}50%{transform:translateY(-3px)}}
@keyframes agentRobotMoonwalk{0%{transform:translateX(0) rotate(0)}25%{transform:translateX(11px) rotate(-5deg)}55%{transform:translateX(33px) rotate(4deg)}80%{transform:translateX(17px) rotate(-3deg)}100%{transform:translateX(0) rotate(0)}}
@keyframes agentRobotMoonLeg{from{transform:rotate(-24deg)}to{transform:rotate(30deg)}}
@keyframes agentRobotGreeting{0%,100%{transform:translateY(0) rotate(0)}35%{transform:translateY(-10px) rotate(-8deg)}65%{transform:translateY(-5px) rotate(6deg)}}
@keyframes agentRobotReact{0%,100%{transform:scale(1)}45%{transform:scale(1.08) rotate(5deg)}}
@keyframes agentRobotJoy{0%,100%{transform:translateY(0) rotate(0)}25%{transform:translateY(-13px) rotate(-7deg)}50%{transform:translateY(0) rotate(5deg)}75%{transform:translateY(-8px) rotate(-4deg)}}
@keyframes agentRobotWave{from{transform:rotate(-20deg)}to{transform:rotate(-115deg)}}
@keyframes agentRobotDance{0%,100%{transform:translate3d(0,0,0) rotate(0)}25%{transform:translate3d(6px,-8px,0) rotate(8deg)}50%{transform:translate3d(0,-3px,0) rotate(0)}75%{transform:translate3d(-6px,-8px,0) rotate(-8deg)}}
@keyframes agentRobotBody{from{transform:translateX(-50%) rotate(-6deg)}to{transform:translateX(-50%) rotate(6deg)}}
@keyframes agentRobotHead{0%,100%{transform:translateX(-50%) rotate(0)}25%{transform:translateX(-50%) rotate(-10deg)}75%{transform:translateX(-50%) rotate(10deg)}}
@keyframes agentRobotArmLeft{from{transform:rotate(18deg)}to{transform:rotate(100deg)}}
@keyframes agentRobotArmRight{from{transform:rotate(-18deg)}to{transform:rotate(-100deg)}}
@keyframes agentRobotLegLeft{from{transform:rotate(-12deg)}to{transform:rotate(13deg)}}
@keyframes agentRobotLegRight{from{transform:rotate(12deg)}to{transform:rotate(-13deg)}}
@keyframes agentRobotAntenna{from{transform:translateX(-50%) rotate(-16deg)}to{transform:translateX(-50%) rotate(16deg)}}
@keyframes agentRobotGroove{0%,100%{transform:translateX(0) rotate(0)}25%{transform:translateX(-7px) rotate(-9deg)}75%{transform:translateX(7px) rotate(9deg)}}
@keyframes agentRobotBounce{0%,100%{transform:translateY(0) scaleY(1)}45%{transform:translateY(-13px) scaleY(1.04)}70%{transform:translateY(1px) scaleY(.97)}}
@keyframes agentRobotTwist{0%,100%{transform:rotateY(0) rotate(0)}25%{transform:rotateY(18deg) rotate(7deg)}75%{transform:rotateY(-18deg) rotate(-7deg)}}

@media(max-width:650px){
  .agent-robot.life-robot{left:auto;right:max(8px,env(safe-area-inset-right));bottom:max(8px,env(safe-area-inset-bottom));gap:0}
  .agent-robot .agent-robot__panel{width:min(390px,calc(100vw - 16px));max-height:min(70dvh,560px)}
  .agent-robot .life-robot__button{width:65px;height:91px}
  .agent-robot .life-guide-robot{scale:.82;transform-origin:right bottom}
  .agent-robot__bubble{max-width:min(200px,calc(100vw - 105px));margin-bottom:37px;padding:10px 12px;font-size:11px}
  body:has(.gesture-camera-panel.is-visible) .agent-robot__bubble{min-width:0;max-width:calc(100vw - 274px)}
}
@media(max-width:800px){
  .gesture-camera-panel{left:max(10px,env(safe-area-inset-left));right:auto}
}
@media(max-width:350px){
  body:has(.gesture-camera-panel.is-visible) .agent-robot__bubble{
    position:absolute;left:auto;right:0;bottom:calc(100% + 82px);
    min-width:130px;max-width:min(190px,calc(100vw - 24px));margin:0;
  }
}
@media(prefers-reduced-motion:reduce){
  .agent-robot .agent-robot__panel,.agent-robot__panel .suggestions:not([hidden]),.agent-robot__commands-host .suggestions-toggle::after{transition:none!important}
  body.heart-radio-playing .agent-robot .life-guide-robot,
  body.heart-radio-playing .agent-robot .life-guide-robot *,
  .agent-robot .life-guide-robot,.agent-robot .life-guide-robot *{animation:none!important}
  .agent-robot__bubble{transition:none}
}

/* Shared material and entrances for both application robots. */
.agent-robot{--agent-glass:linear-gradient(145deg,rgba(255,255,255,.09),rgba(255,255,255,.03) 24%,rgba(0,0,0,.18) 52%,rgba(255,255,255,.025)),rgba(7,9,13,.74);--agent-edge:rgba(220,235,255,.2);--agent-shadow:0 30px 80px rgba(0,0,0,.62),0 0 24px rgba(180,210,255,.045),inset 0 1px 0 rgba(255,255,255,.2),inset 0 -1px 0 rgba(255,255,255,.045)}
.agent-robot .agent-robot__panel,.agent-robot .agent-robot__bubble,.agent-robot .life-robot__camera{color:#fff;background:var(--agent-glass);border-color:var(--agent-edge);box-shadow:var(--agent-shadow);backdrop-filter:blur(24px) saturate(135%);-webkit-backdrop-filter:blur(24px) saturate(135%)}
.agent-robot .agent-robot__panel{transform:translateY(25px) scale(.96);filter:blur(4px);transition:transform .54s cubic-bezier(.18,.8,.2,1),opacity .42s ease,visibility .54s ease,filter .42s ease}
.agent-robot.open .agent-robot__panel{transform:translateY(0) scale(1);filter:none}
.agent-robot .agent-robot__commands-host>summary{padding:10px 12px;border:1px solid var(--agent-edge);border-radius:11px;color:#dceaff;font-size:12px;cursor:pointer}
.agent-robot .agent-robot__commands-host>summary:hover{background:rgba(255,255,255,.065)}
#lifeRobot .agent-robot__panel-form input{border:1px solid rgba(139,202,255,.28);background:rgba(6,16,34,.75)}
#lifeRobotReply.agent-robot__bubble:not([hidden]){opacity:1;visibility:visible;transform:none;pointer-events:auto}
#lifeRobotReply.agent-robot__bubble::after{right:-7px;bottom:18px;border-color:var(--agent-edge);background:#121725}
#lifeRobotReplyText{padding-right:18px}
.agent-robot__bubble-close{position:absolute;top:6px;right:6px;width:22px;height:22px;padding:0;border:1px solid rgba(168,204,255,.18);border-radius:50%;background:rgba(10,16,31,.5);color:#bcd8ee;font:15px/1 Arial,sans-serif;cursor:pointer}
.agent-robot__bubble-close:hover{background:rgba(255,255,255,.12);color:#fff}
@media(prefers-reduced-motion:reduce){.agent-robot .agent-robot__panel{transition:none;filter:none}}

#lifeRobot .agent-robot__panel-form{display:flex;gap:8px;margin:14px 0 12px}
#lifeRobot .agent-robot__panel-form input{box-sizing:border-box;min-width:0;flex:1;min-height:39px;padding:9px 11px;border-radius:11px;font-size:12px}
#lifeRobot .agent-robot__panel-form button{min-width:0;flex:none;min-height:39px;padding:0 12px;border:1px solid rgba(139,202,255,.42);border-radius:11px;background:linear-gradient(135deg,rgba(47,100,164,.8),rgba(28,67,123,.9));color:#fff;font:600 11px Manrope,sans-serif;cursor:pointer}
#lifeRobot .agent-robot__panel-form button:hover{background:rgba(68,126,193,.95)}
#lifeRobot .agent-robot__panel-form button:disabled{opacity:.5;cursor:default}
#lifeRobot .suggestions-toggle{border:1px solid rgba(139,202,255,.24);background:rgba(255,255,255,.035);color:#dceaff;font-family:inherit;cursor:pointer}
#lifeRobot .suggestions-label{display:block;width:100%;color:#bdc3d1;font-size:11px}
#lifeRobot .suggestions-guide{width:100%;min-width:0}

/* Keep action replies readable at narrow widths. */
#lifeRobotReply.agent-robot__bubble{display:flex;flex-direction:column;align-items:stretch;gap:12px;width:min(295px,calc(100vw - 105px));box-sizing:border-box;padding-right:30px}
#lifeRobotReplyText{display:block;flex:none;width:auto;min-width:0;padding-right:0;overflow-wrap:break-word}
#lifeRobotReply .life-agent-message-action{align-self:flex-start;max-width:100%;white-space:normal}
@media(max-width:650px){#lifeRobotReply.agent-robot__bubble{width:min(245px,calc(100vw - 100px));max-width:calc(100vw - 100px)}}

/* Keep every standard assistant control visible on phones with tighter spacing. */
@media(max-width:800px){
 #lifeRobot #lifeRobotPanel{padding:6px 12px 14px;max-height:calc(100dvh - 116px)}
 #lifeRobotPanel .life-robot__head{margin-bottom:4px;gap:8px}
 #lifeRobotPanel .agent-robot__panel-message{min-height:0;margin:4px 0 6px!important}
 #lifeRobotPanel .future-letter-compose{margin:4px 0 6px;padding:6px 10px;min-height:44px;font-size:12px;gap:8px}
 #lifeRobotPanel .agent-appearance-picker{margin:0 0 6px;padding:4px 8px 6px}
 #lifeRobotPanel .agent-sync-settings{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 8px;margin:4px 0 6px;padding:4px 8px 6px}
 #lifeRobotPanel .agent-sync-settings .sync-enabled-label{grid-column:1/-1;min-height:28px}
 #lifeRobotPanel .sync-schedule-row{display:contents}
 #lifeRobotPanel [data-sync-interval-label]{flex-wrap:nowrap;gap:6px}
 #lifeRobotPanel [data-sync-interval-label]>.notes-category-picker{width:auto;flex:1;min-width:0}
 #lifeRobotPanel .agent-sync-settings select{width:100%;min-width:0;min-height:36px;padding:5px 6px}
 #lifeRobotPanel .agent-sync-settings [data-sync-now]{min-height:36px;padding:6px 10px}
 #lifeRobotPanel .agent-sync-settings small{grid-column:1/-1}
 #lifeRobotPanel .agent-robot__intro{flex-wrap:wrap;gap:4px 8px;margin:0 0 6px;padding:5px 7px}
 #lifeRobotPanel .agent-robot__intro-toggle{margin-left:auto}
 #lifeRobotPanel #agentIntroStatus{flex-basis:100%}
 #lifeRobotPanel .agent-robot__panel-form{margin:6px 0;gap:6px}
 #lifeRobotPanel .agent-robot__panel-form input{min-height:40px;font-size:16px;padding:7px 9px}
 #lifeRobotPanel .agent-developer-footer{margin-top:6px;padding-top:6px}
 #lifeRobotPanel .command-assistant-status{margin-top:4px}
}
@media(max-width:800px) and (max-height:700px){
 #lifeRobot #lifeRobotPanel{bottom:0;max-height:calc(100dvh - 16px)}
}

/* Replies are overlays: changing their text must not change the robot hit box. */
#lifeRobot .agent-robot__bubble{position:absolute;right:0;bottom:calc(100% + 12px);margin:0;background:rgba(31,33,39,.73);border-color:#ffffff32;box-shadow:0 14px 38px #0005;backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);pointer-events:none!important}
#lifeRobot .agent-robot__bubble::after{background:rgba(31,33,39,.73);border-color:#ffffff32}
#lifeRobot .agent-robot__bubble :is(button,a){pointer-events:auto}
#lifeRobot:not(.open) .agent-robot__panel{pointer-events:none}
/* Keep the hover hit box fixed; individual transforms preserve the figure's animations. */
@media(hover:hover) and (pointer:fine){
 #lifeRobot[data-agent-appearance="robot"] .life-robot__button:hover{transform:none!important}
 #lifeRobot[data-agent-appearance="robot"] .life-robot__button>.life-guide-robot{translate:0 0;rotate:0deg;transition:translate .22s ease,rotate .22s ease}
 #lifeRobot[data-agent-appearance="robot"] .life-robot__button:hover>.life-guide-robot{translate:0 -4px;rotate:-1.5deg}
}
@media(prefers-reduced-motion:reduce){#lifeRobot[data-agent-appearance="robot"] .life-robot__button>.life-guide-robot{transition:none;translate:none;rotate:none}}
